Commit Graph
7829 Commits
Author SHA1 Message Date
Bryan W. Weber dc1513663c [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 #821, problem introduced in 1866e3542d
2020-08-21 16:07:38 -04:00
Ingmar Schoegl a9a3a4af85 [scons] Fix formatting / update Python example folders
- Make path separators consistent on Windows post-install message
- Update list of Python example folders
2020-08-20 13:40:18 -04:00
Ingmar Schoegl 2c425aaf30 [test_data] Fix formatting / typo
The 'note' indent for the species N2 is not consistent with former
CTI/YAML versions; the note is also not identified as string
2020-08-20 13:40:18 -04:00
Ingmar Schoegl 11f4243376 [Input] Ensure YAML strings are preserved
Ensure that a YAML field `some-field: '12345'`
is read as a string by the C++ parser
2020-08-20 13:40:18 -04:00
Ingmar Schoegl 29f6b94ed3 [thermo] Add comment for maximum length of strings in SolutionArray
The length of strings assigned by built-in SolutionArray methods is
limited to 50 characters.
2020-08-08 21:46:54 -04:00
Ingmar Schoegl 371a4209f1 [thermo] Streamline I/O support of string columns
Address review comments
2020-08-08 21:46:54 -04:00
Ingmar Schoegl 2b04d4fde1 [thermo] Enable phase_of_matter output for SolutionArray 2020-08-08 21:46:54 -04:00
Ingmar Schoegl 2e3e6f91d2 [thermo] Enable export/import of str columns to/from HDF files 2020-08-08 21:46:54 -04:00
Ingmar Schoegl 1e65d6c043 [thermo] Enable import of previously exported str column from CSV files
Implementation based on a suggestion by Bryan W. Weber <bryan.w.weber@gmail.com>
2020-08-08 21:46:54 -04:00
Bryan W. Weber ba13c652b4 [Python] Single-source the minimum Python version
Since we set the minimum Python version in SConstruct, use that value to
fill in python_requires in setup.py.in. This ensures that when the
minimum Python version is changed in the future, setup.py will
automatically reflect the change.
2020-07-27 12:59:50 -04:00
Bryan W. Weber 6edb133c89 [Cython] Enforce a minimum NumPy version
The minimum NumPy version is 1.12 to support the use of numpy.full() in
the SolutionArray interface introduced in #838.
2020-07-27 12:59:50 -04:00
Bryan W. Weber 03bf863d57 [SCons] Synchronize minimum Python versions
The minimum Python version is the same for the full and the minimal
interfaces.
2020-07-27 12:59:50 -04:00
Bryan W. Weber 13b79465a7 [SCons] Check for minimum ruamel.yaml version
Check for the minimum ruamel.yaml version, 0.15.34, at install and test
time. The check happens at install and test time because ruamel.yaml is
only required to run the Python interface, not to build it.
2020-07-27 12:59:50 -04:00
Bryan W. Weber 7c4bb2a57b [CI] Install pandas on CI for testing
One of the SolutionArray tests uses pandas as an output option.
2020-07-27 12:59:50 -04:00
Bryan W. Weber b94736d38c [Cython] Check for minimum version of ruamel.yaml
To run the YAML converter scripts, ruamel.yaml must be installed with a
minumum version at least 0.15.34. We aren't sure what the true minimum
version is, but 0.15.34 was released in September 2017 and is the
newest version available from the Ubuntu 18.04 repositories.
2020-07-27 12:59:50 -04:00
Ingmar Schoegl cfc9623388 [examples] Fix deprecated maxiter keyword 2020-07-27 12:55:22 -04:00
Ingmar Schoegl db139d328e [samples] Add labels to plot in periodic_cstr.py 2020-07-27 12:55:22 -04:00
Ingmar Schoegl 631e6e4a3e [samples] Avoid shadowed SolutionArray entries 2020-07-27 12:55:22 -04:00
Ingmar Schoegl 3d653d962a [samples] Use add_species_alias for labeling 2020-07-27 12:55:22 -04:00
Ingmar Schoegl 9b716c9b89 [samples] Use built-in heat_release_rate method 2020-07-27 12:55:22 -04:00
Ray Speth cf1c0816e7 [Input] Improve handling of YAML null values
YAML documents containing null values no longer generate errors while parsing.

Modify error messages generated by null values to indicate that the error can
be caused by either a missing key or a key with no value.
2020-07-15 12:49:41 -04:00
Ray Speth 773523a4e3 [Equil] Remove incorrect RedlichKwongMFTP::setToEquilState
The inversion of setting the mole fractions based on the chemical potentials
is not obvious for non-ideal phases, and the implementation here based on
an ideal phase leads to incorrect equilibrium solutions.
2020-07-09 20:39:36 -04:00
Ray Speth bc6d696800 [Equil] Fix use of element potential method with IdealSolidSolnPhase
The implementation of IdealSolidSolnPhase::setToEquilState incorrectly used
the input array as the element potentials rather than the species chemical
potentials. The modified implementation corresponds to that of the
IdealGasPhase class.

The previous implementation seems to generally have resulted in an exception
being raised, which normally results in falling back to the Gibbs solver,
so this shouldn't have been producing incorrect results.
2020-07-09 20:39:36 -04:00
Ray Speth f5f12caa8e Fix documentation of ThermoPhase::setToEquilState
The values passed into this function are the nondimensional (species) chemical
potentials, not the element potentials. The method ChemEquil::setToEquilState
already handles calculation of the chemical potentials from the element
potentials.
2020-07-09 20:39:36 -04:00
Ray Speth 07dac7be82 [Test] Update output files for C++ flamespeed sample
The old version of the sample was using a strange definition for the
composition of air which corresponded to neither of the typical
approximations, for example "O2: 1.0, N2: 3.76" or "O2: 0.21, N2: 0.79".
2020-07-05 11:10:05 -04:00
Ray Speth 9832c883bc [Test] Tighten integration tolerances to get repeatable test results
The test_ignition_delay_sensitivity test needs tighter intergrator tolerances
on the sensitivity coefficients in order to give results that reliably match
the finite difference approach on all platforms.
2020-07-05 11:10:05 -04:00
g3bk47 2e0bcdd0e1 Simplify computation of equivalence ratio and mixture fraction 2020-07-05 11:10:05 -04:00
g3bk47 6f009183f8 MixtureFraction/EquilvalenceRatio: add basis paramter and element option 2020-07-05 11:10:05 -04:00
np4075@kit.edu 27c2c8f7e7 Add python example for get/set equivalence ratio 2020-07-05 11:10:05 -04:00
np4075@kit.edu c37937ea03 Add get/set equivalenceRatio/mixtureFraction functions 2020-07-05 11:10:05 -04:00
Ray Speth 047e74bd48 [CI] Remove separate step to build samples
The samples are now built (and run) as part of `scons test`.
2020-07-03 13:06:02 -04:00
Ray Speth 51073c09b2 [Test] Improve formatting of values in regression test error messages 2020-07-03 13:06:02 -04:00
Ray Speth 37d595dab1 Fix erroneous deprecation warnings caused by including onedim.h 2020-07-03 13:06:02 -04:00
Ray Speth 421ea8feb3 [Test] Add regression test based on C++ openmp_ignition sample 2020-07-03 13:06:02 -04:00
Ray Speth 8aa33e9a12 [Test] Add regression test of C++ LiC6_electrode sample 2020-07-03 13:06:02 -04:00
Ray Speth f96da9f15e [Input] Allow use of subdirectories within Cantera data directories
This provides the ability to organize data files included with Cantera
and differentiate data which is useful for different purposes, e.g. sample
data which is only meant to demonstrate capabilities and may not be
physically meaningful.

See Cantera/enhancements#22.

Fixes #774
2020-07-03 13:06:02 -04:00
Ray Speth edce5daf64 [Samples] Remove non-functional NASA_coeffs C++ sample 2020-07-03 13:06:02 -04:00
Ray Speth 53b756a5ea [Test] Use rankine C++ sample for regression test 2020-07-03 13:06:02 -04:00
Ray Speth 257e390b2a [Test] Add regression test using C++ Blasius BVP sample 2020-07-03 13:06:02 -04:00
Ray Speth 097f0e9ca3 [SCons/Test] Enable comparisons of profile data in regression tests
This is the same method used for profile comparisons in the Python test
suite. These comparisons are skipped (with a warning) if Numpy is not
installed.
2020-07-03 13:06:02 -04:00
Ray Speth 10aee9755d [Test] Remove remaining cxx_ex sub-tests
We have plenty of tests of the equilibrium solver for ideal gas mixtures,
and the reaction path diagram test doesn't make a very good C++ example.
2020-07-03 13:06:02 -04:00
Ray Speth 287d9baf2d [Test] Make cxx_ex transport tests into a (tested) c++ sample program 2020-07-03 13:06:02 -04:00
Ray Speth 561b776e80 [Test] Allow generation of CSV files without a "title" row 2020-07-03 13:06:02 -04:00
Ray Speth 271279b7bb [Transport] Deprecate unused 'ndim' parameter of newTransportMgr 2020-07-03 13:06:02 -04:00
Ray Speth 19d6608c64 [Test]: Add regression test of c++ 'kinetics1' sample program
Remove the existing cxx_ex test which duplicates this sample.

Differences in blessed output are a result of updates to atomic weights
in dc96fb5fe8.
2020-07-03 13:06:02 -04:00
Ray Speth 749b884dff [Samples] Fix use of 'air' object in combustor sample 2020-07-03 13:06:02 -04:00
Ray Speth e773e3e59a [Test] Add regression test using C++ combustor example
Changes to the blessed output file are a result of updates to atomic weights,
and to fixes for how flow devices are updated (#886)
2020-07-03 13:06:02 -04:00
Ray Speth 582416a6ed [Input] Set initial composition in air.yaml to match air.cti 2020-07-03 13:06:02 -04:00
Ray Speth 45778cd5c6 [Test] Add regression test using C++ flamespeed sample
Add optional command line arguments to the sample so that it can
produce stable output.
2020-07-03 13:06:02 -04:00
Ray Speth e922c54983 [Reactor] Simplify updates of flow device mass flow rates
Eliminate unnecessary variables m_mdot_in and m_mdot_out, and remove
the need to update the mass flow rates in both updateState and evalEqs
by using the current (trial) time when updating them in updateState.
2020-07-01 15:00:56 -04:00