bryanwweber / cansen Goto Github PK
View Code? Open in Web Editor NEWSENKIN-like wrapper for Cantera
License: MIT License
SENKIN-like wrapper for Cantera
License: MIT License
Print warning to user that the keyword will be ignored.
Need to add examples of how to read the binary save file.
Also remove file check in convert_mech
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.
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
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:
Need to decide how to handle these problems.
Could this be packaged for conda (please)?
Documentation needs to be added for each function and for the operations within each function.
Interpolation of the sensitivity matrix needs to be done when the last time step does not match the end time. Probably the previous sensitivity will need to read from disk.
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.
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 timeNREV
- Number of revolutions to run the simulation for. Use one of TIME
, NCANG
, NREV
to specify the end timeInvestigate h5py instead of pytables
Keywords DTIGN
and TLIM
are implemented. Need to implement
TIFP
- Temperature slope = maximumUIGN
- User specified functionKLIM
- Species maximumshould_be_with_underscores not camelCase
Add distutils setup to install as a package. Add entry points so that it can be used as a script
There may be a bug in the calculation of O atoms. Also need to update how to check that all required elements are in the complete products.
The documentation folder should not be on the main code branches. Look up a tutorial for Sphinx to figure out how to do this.
When --multi
is specified and extra products are in the CPROD lines (e.g. CO2 for H2 O2 combustion) the processes are spawned but nothing seems to happen. Cases without this work fine
Return the reactor
, n_vars
, wall
, and tempFunc
It would be nice to be able to specify several cases to run in a single file and have CanSen read them. These cases would then be run automatically, in parallel if the user desires, since it should be embarrassingly parallel.
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
Specifying multiple problem types currently sets the last one to occur. Instead, we should throw an error and inform the user.
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.
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.
Instead of using sys.exit(1) when an error has occured
Need keywords
ICEN
- Internal combustion engine keywordCMPR
- compression ratio, default 15DEG0
- Starting crank angle, default 180 degreesVOLD
- Displacement volumeVOLC
- Clearance volumeLOLR
- Ratio of the length of the engine connecting rod to the crank radius, default 3.33RPM
- Revolutions per minute, default 1500It 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.
Rather than printing the error to the console, properly raise an exception. This should probably be a new exception class relevant to the particular error.
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:
However, several benefits were noted:
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.
So that multiple SimulationCases can be run in embarrassingly parallel mode.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.