Giter Site home page Giter Site logo

cansen's People

Contributors

bryanwweber avatar kyleniemeyer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cansen's Issues

Volume profiles aren't applied properly

It seems that the volume profile specification does not result in the proper pressure and temperature being maintained through a process. This may be due to low (time) resolution of the volume trace, errors in the numerical derivative, or both. Possible fixes include fitting a continuous function and taking the derivative to get the velocity, or using a higher-order numerical derivative.

Update documentation for the location of executables

Hi,
I recently had an issue searching for the cansen executable under windows. It is not mentioned where to find it and how to use it. It maybe would be a good idea to inform the ignorent user that it is located in the scripts directory.
Best,
Abhi

Add unit tests

There should be a framework in place to ensure that changes don't break existing functionality. The nature of the testing needs to be decided and added.

Decide how to save binary output

In SHA: ee97b3c code was added to save output as a PyTables table instead of a PyTables array. The code in that commit was commented out because of an incompatibility with how the interpolation for printing is done. The following problems were noted in that commit:

  1. Interpolating is more complicated (have to read data off disk to interpolate, or not flush the table on every time step)
  2. Save file might be larger (save file with the table was 2kB larger than with array)

However, several benefits were noted:

  1. Set up of table is simpler than setup of array - doesn't require assigning to temp variable on every timestep
  2. Doesn't require numpy stacking and reshaping operations, which may be slow. No evidence has been found of this being true, but it seems logical

With this issue creation, the following additional benefit is noted:
3) If a table is used, the sensitivities can be stored in their own array of their natural shape and would not require reshaping on every time step, plus an additional reshape on reading the data back in.

Furthermore, it may be useful to save additional solution variables, in particular netw.n_vars, because of the possibility of reshaping the output. These variables don't have a natural place in the array output as it stands. However, a separate table could be created in the output file to store variables such as this. This would not affect the array.

Decide if its possible to break the simulation when ignition happens with derivative

Associated with #12 for automatic ignition delay calculations, it should be possible to break the simulation when the ignition delay is found. There are several potential problems with a generic peak finding algorithm:

  1. There will be noise in the derivative
  2. How to distinguish and not break for first-stage ignition
  3. How to tune the "sensitivity" of the peak finding algorithm

Need to decide how to handle these problems.

Add internal combustion engine model model

Need keywords

  • ICEN - Internal combustion engine keyword
  • CMPR - compression ratio, default 15
  • DEG0 - Starting crank angle, default 180 degrees
  • VOLD - Displacement volume
  • VOLC - Clearance volume
  • LOLR - Ratio of the length of the engine connecting rod to the crank radius, default 3.33
  • RPM - Revolutions per minute, default 1500

Add optional ICEN keywords

Optional ICEN keywords

  • DTDEG - Maximum time step in terms of crank angle degrees, default STPT
  • NCANG - Run the simulation for x crank angle degrees. Use one of TIME, NCANG, NREV to specify the end time
  • NREV - Number of revolutions to run the simulation for. Use one of TIME, NCANG, NREV to specify the end time

Temperature profiles are not applied to the reactor

Setting the Solution state does not affect the reactor after the reactor has been initialized

>>> gas = ct.Solution('h2o2.xml')
>>> reac = ct.Reactor(gas)
>>> reac.T
        300.0
>>> gas.TP = 1000, None
>>> gas()
       Report with T = 1000
>>> reac.T
        300.0
>>> gas()
       Report with T = 300

Add ability to specify pressure profile through volume profile

Since specifying a pressure profile directly is not possible in the current Cantera 2.1.1, we can alternatively specify the volume profile that would achieve a given pressure profile. This might be useful for simulating shock tube experiments where the pressure change is a constant function of time (e.g. 1%/ms). This feature should be in addition to specifying the pressure profile directly because once Cantera is fixed, that will be a useful case as well.

Store CTI file with the HDF output

It would be very useful to store the CTI file in the binary output file, so that post-processing would not rely on having two files present.

Implement ignition delay reporting

  • Decide what to do when ignition happens
  • Give users option to break, just report delay and continue
  • How to handle printing in the case of ignition?

Inconsistent definitions for velocity profiles

In profiles.py, VolumeProfiles outputs dV/dt as velocity, whereas ICEngineProfile calculates the actual piston velocity dx/dt. I stumbled across this issue looking at PyKED's RCM example. Presumably both classes are thought as plugins for cantera's Wall objects, which uses the wall velocity as input (in m/s). where for the RCM the area has to be set to 1: otherwise, the velocity will not be calculated correctly.

I am not certain to what extent CanSen is under development, but the PyKED example draws from here, and certainly uses incorrect units. Curiously, neither bore diameter nor piston area are stored in the current PyKED format, so it is not an easy fix.

Implement sensitivity

  • Parse sensitivity keyword
  • Add sensitivity reactions to reactor
  • Save sensitivity output

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.