-
-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix examples #905
Fix examples #905
Commits on Aug 20, 2020
-
[Cython/Examples] Fix extract_submechanism example
When loading reactions from a YAML file, an instance of a Kinetics object is required so that the species associated with the reactions are available. The required object is now constructed from the already loaded species definitions. Fixes Cantera#821, problem introduced in 1866e35
Configuration menu - View commit details
-
Copy full SHA for b929916 - Browse repository at this point
Copy the full SHA b929916View commit details -
Fix infinite loop in diffusion_flame_extinction.py
This change reworks the abortion criteria for the diffusion flame extinction example. Previously, the loop was only aborted when the flame temperature was above the inlet temperature, the difference of the flame temperature in the prior two iterations was less than the threshold, AND the change in strain rate parameter was less than the threshold. However, I found that this combination of conditions was never reached, because the only way to change the strain rate delta was to have an extinguished flame, and eventually the flame remains extinguished even if the delta_alpha is reduced. This leads to an infinite loop, since the abortion criteria check are only done if the flame is burning. This change moves the abortion criteria check into the case where the flame is not burning. In addition, the flame temperature check is modified to use np.isclose(). I found that on the last burning iteration, the maximum flame temperature was only just barely above the oxidizer inlet temperature. Thus, the result printed to the screen was not very useful. The change to np.isclose() produces a more useful result for the final burning iteration before extinction. The last non-burning iteration is also saved to the output file(s) for reference. Fixes Cantera#872
Configuration menu - View commit details
-
Copy full SHA for 25abfad - Browse repository at this point
Copy the full SHA 25abfadView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4f55735 - Browse repository at this point
Copy the full SHA 4f55735View commit details -
Fix boundary emissivities deprecation warning
The set_boundary_emissivities method is deprecated and will be removed after Cantera 2.5.0. This change switches one example to use the new property. The property was also missing from the FlameBase class.
Configuration menu - View commit details
-
Copy full SHA for bd78c7b - Browse repository at this point
Copy the full SHA bd78c7bView commit details -
[Example] Specify data file path in flame_fixed_T
This allows the script to be run from the installed location, or from the root of the source tree.
Configuration menu - View commit details
-
Copy full SHA for 4e48f02 - Browse repository at this point
Copy the full SHA 4e48f02View commit details -
[Examples] Replace argon.yaml with air.yaml
argon.yaml is deprecated, use air.yaml and specify the composition instead.
Configuration menu - View commit details
-
Copy full SHA for 4568d36 - Browse repository at this point
Copy the full SHA 4568d36View commit details -
[Reactor/1D] Fix gas phase production on surfaces
The calculation for the production of gas phase species from surface reactions assumed that the gas phase species were stored at the beginning of the rate-of-production array. This is only the case when the gas ThermoPhase instance is the first phase in the Kinetics thermo vector, which is not guaranteed to be the case. It happens that XML input usually forced the gas phase to be the first phase in the thermo vector, so everything worked out fine. This was because the associated phase(s) for a surface phase had to be listed in an XML file, and the XML initializer reads that list to fill the Kinetics thermo vector. In the YAML format, the associated phase does not need to be explicitly listed. Instead, instances of the appropriate phases are passed to the constructor when the InterfaceKinetics is created. The gas phase can then come before or after the surface phase, meaning there is no guarantee of the order of species. This change checks for the starting index of the gas phase species in the InterfaceKinetics species-length arrays to make sure that the appropriate rates of production are added for the gas phase species. Fixes Cantera#902, Cantera#877, Cantera#873
Configuration menu - View commit details
-
Copy full SHA for f2c2ab4 - Browse repository at this point
Copy the full SHA f2c2ab4View commit details -
[1D] Add coverage_enabled getter
Adds a getter function for the coverage_enabled property on the ReactingSurface1D Python class, and the corresponding C++ method.
Configuration menu - View commit details
-
Copy full SHA for 8b349cf - Browse repository at this point
Copy the full SHA 8b349cfView commit details -
[Examples] Fix sofc.py divide-by-zero warning
The switch to the YAML input file revealed that the calculation of the anode and cathode currents in sofc.py relied on a particular order of the phases. This change corrects that by finding the index of the electron "species" in the anode and cathode phases.
Configuration menu - View commit details
-
Copy full SHA for dde4118 - Browse repository at this point
Copy the full SHA dde4118View commit details -
[Examples] Fix UserWarning in ic_engine.py
Matplotlib issues a UserWarning if the xticklabels are explicitly set but the xticks are not explicitly set. We choose to set ticks every 360 degrees of crank angle, which corresponds to every 0.02 seconds in the simulation.
Configuration menu - View commit details
-
Copy full SHA for 68df649 - Browse repository at this point
Copy the full SHA 68df649View commit details -
[Fortran] Add extra_inc_dirs to compile Fortran sample
One of the Fortran samples needs to include the extra_inc_dirs variable so that system header files in non-standard locations will be found.
Configuration menu - View commit details
-
Copy full SHA for b727b1d - Browse repository at this point
Copy the full SHA b727b1dView commit details -
[ReactionPath] Fix IO warning about unclosed file
Use pathlib to write the text content to a file in write_dot. This automatically closes the file handle after the text is written. Also modify the reaction_path.py example to use pathlib and subprocess. These are available since at least Python 3.5 and represent modern best-practices in Python scripts.
Configuration menu - View commit details
-
Copy full SHA for 3578c03 - Browse repository at this point
Copy the full SHA 3578c03View commit details -
[Examples] Properly close multiprocessing.Pool
The multiprocess.Pool object must be closed properly, or the process can hang according to the Python docs. The recommended method for short code blocks is to use the context manager. The format of the arguments to Pool is chosen to allow the last line to be de-dented to remove ambiguity about the definition of the context manager and the content.
Configuration menu - View commit details
-
Copy full SHA for 7ff4af2 - Browse repository at this point
Copy the full SHA 7ff4af2View commit details -
[Examples] Fix FutureWarning in diamond_cvd.py
pandas v1.1.0 issues a FutureWarning when plotting single columns from a DataFrame using the Matplotlib pyplot API. This can be avoided by using the pandas plotting API instead.
Configuration menu - View commit details
-
Copy full SHA for 9c3c7cc - Browse repository at this point
Copy the full SHA 9c3c7ccView commit details -
The content of ch4_ion.yaml now matches ch4_ion.cti (the file was re-created using cti2yaml)
Configuration menu - View commit details
-
Copy full SHA for 3e6edb8 - Browse repository at this point
Copy the full SHA 3e6edb8View commit details -
[examples] Apply band-aid fix to ion_burner_flame.py
A reduction of domain size makes the example more stable.
Configuration menu - View commit details
-
Copy full SHA for 0767e54 - Browse repository at this point
Copy the full SHA 0767e54View commit details -
Configuration menu - View commit details
-
Copy full SHA for 148a6c7 - Browse repository at this point
Copy the full SHA 148a6c7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 42fbd1d - Browse repository at this point
Copy the full SHA 42fbd1dView commit details