Commit Graph
482 Commits
Author SHA1 Message Date
Raymond Speth 6ce695d96d Bump version to 2.5.0
Update 'cantera-version' in all YAML files to correspond to the stable
release.
2021-02-08 13:28:55 -05:00
Raymond Speth 3bba25fa02 Fix 'execute' bit on SRI test data file 2021-02-08 13:28:55 -05:00
Raymond Speth 272398e6e1 [Test] Fix badly-formated floats in XML input files 2021-01-29 21:35:40 -05:00
Raymond Speth 8c0da723a2 [Input] Add T-min and T-max fields to YAML species thermo 2021-01-29 21:35:40 -05:00
Chao XuandRichard West 324267401f [ck2yaml] Fixed #940 SRI parameter D,E cannot be written into yaml file when they equal to zero (#941)
[ck2yaml] SRI parameter D,E cannot be written into yaml file when they equal zero

Fixes #940

Co-authored-by: Richard West <r.west@northeastern.edu>
2020-12-05 12:33:30 -05:00
12Chao 2cd06194e8 [Kinetics] Report all errors when adding reactions
Instead of reporting only the first error and stopping, continue adding
reactions and collect all of the errors that occur, then report them
at the end. For Plog reactions, report each temperature and pressure
combination that results in an invalid reaction rate.
2020-09-07 13:48:06 -04:00
Bryan W. Weber dbddcab66b Move element check out of else
Clarify reason for error and comment. The code does not need to be inside the
else statement, since the if can only raise the error.
2020-09-01 15:33:18 -04:00
12Chao 91081363d2 [ck2yaml] Improve error when elements are too big
Elements are limited to 3 digits per the NASA format standard. For
users, the error message should be clear what the problem is. Fixes
issue #835
2020-09-01 15:33:18 -04:00
Ingmar Schoegl 031cfa5ae1 [unittests] Fix ch4_ion.yaml
The content of ch4_ion.yaml now matches ch4_ion.cti (the file was re-created
using cti2yaml)
2020-08-21 16:07:38 -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
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
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 c37937ea03 Add get/set equivalenceRatio/mixtureFraction functions 2020-07-05 11:10:05 -04:00
Ingmar Schoegl 764af2462b [AnyMap] Improve error message for missing key in getMapWhere 2020-06-30 12:10:40 -04:00
Ray Speth 79a41633f6 [Input] Add test of mechanism validation when using ck2yaml 2020-06-30 07:53:53 -04:00
Ray Speth 94c14e8553 [Kinetics] Allow negative pre-exponential factor for falloff reactions
If both the high and low rate coefficients for a falloff or chemically
activated reaction are negative, then there is no problem evaluating the rate,
so it can be allowed in the same cases where a negative rate would be
allowed for an elementary reaction, i.e. if the presence of the negative
pre-exponential factors has been explicitly declared.
2020-06-19 17:18:07 -04:00
Jeff Santner 8a591b4920 Automatically add 'negative_A' option for third body reactions
Updates ck2cti to match the behavior of ck2yaml
2020-06-18 18:00:08 -04:00
tsikes b23f1842b7 Fixed: Ck2yaml crashes if reaction equation has both ThreeBodyReaction and Falloff reaction types
Bug: check_duplicate_reactions breaks if sent a third body reaction and falloff reaction because r1.third_body (or r2) is None and has no attribute upper.

Fix: This changes the third body reaction type to have a .third_body of M and then in check_duplicate_reactions check that r1 and r2 are not a mixture of three body reaction type and something else.

Bug: if blank space in header, parser crashes due to regular expression search to determine indent size

Fix: check that the comment is not empty before trying to determine indent size

Improvement: inform user which reaction contains multiple reaction types

Added Tests for both issues fixed
2020-06-02 08:44:59 -04:00
Ray Speth 15b9b33455 [Thermo] Deprecate class FixedChemPotSSTP
This model can easily be replaced with StoichSustance using ConstCpPoly for the
species thermo.

The changed values in the LiSi regression tests suggest that there are some
implementation errors in the FixedChemPotSSTP class which will be automatically
resolved by eliminating it.
2020-04-05 11:21:25 -04:00
Ray Speth 4082636dc3 [Thermo] Deprecate "gas" mode of IdealSolnGasVPSS 2020-04-05 11:21:25 -04:00
Ray Speth 4b8b2fdbf1 [Input] Fix handling of "reactions: none" 2020-03-27 14:28:49 -04:00
Ray Speth 97c96a0ac6 [Test] Move extra.yaml to the correct directory
The interfaces/cython/cantera/test/data directory is just a copy of
test/data, created as part of the build process.
2020-02-21 16:49:04 -05:00
Bryan W. Weber 451fa14c86 [Test] Add test of unknown pure fluid
Ensure that unknown pure-fluid-name values throw an error.
2020-02-12 13:46:12 -05:00
Ray Speth 7147135316 [Input] Allow vapor fraction as part of state in YAML input 2020-02-12 13:46:12 -05:00
Ray Speth 4657df50a2 [Test] Make deprecation warnings fatal for all ways of running tests
Since tests like test_composite.TestModels.test_load_thermo_models rely on
deprecation warnings being fatal, we need to make sure that this setting is
always enabled. Previously, running the tests using "python -m unittest" instead
of the runCythonTests.py script did not do this.

Fixes #802
2020-02-12 13:45:53 -05:00
Ray Speth 97156ffad5 [Python] Handle deprecation warnings from all sources consistently
Since deprecation warnings issued from C++ and from Cython code are shown by
default, set deprecation warnings issued from Python code to do the same.

Also, modify handling of Cython- and Python- issued deprecation warnings when
calling the make_deprecation_warnings_fatal and suppress_deprecation_warnings
functions.
2020-02-12 13:45:53 -05:00
Ingmar Schoegl 53eca8e559 [Input] Move remaining chemkin input files to test/data 2020-02-04 21:34:15 -05:00
Ray Speth 6d06da5df2 [Input] Make string-based instantiation of LatticeSolid possible 2020-01-21 15:50:26 -05:00
Ray Speth 3eeed6327a [Input] Make string-based instantiation of IonsFromNeutral possible 2020-01-21 15:50:26 -05:00
Ray Speth cc2066a043 [Input] Move Debye-Huckel species parameters to their own sub-field 2020-01-21 15:50:26 -05:00
Ray Speth 43ad8bd892 Standardize names used for pure substance models
Ensure that the name returned by Sub::name() is a name that can be used to
reconstruct a substance of the same type.

Make phase names in liquidvapor.yaml match the substance model names.
2020-01-21 15:50:26 -05:00
Ray Speth 902ec6aa7e Handle equality comparisons for types converted by AnyValue 2020-01-21 15:50:26 -05:00
Ray Speth 9b81b1ad16 Implement equality comparisons for AnyValue / AnyMap 2020-01-21 15:50:26 -05:00
Ray Speth f0684875be Make treating AnyMap as vector<AnyMap> easier in some cases
For entries that are lists of maps in the general case but often only contain
one item, it is convenient to allow them to be provided as just a map. This
modifies methods used to work with vectors of AnyMap objects to handle the
case where the child object is just a map.
2020-01-21 15:50:26 -05:00
Bryan W. Weber d020feb668 [YAML] Add deprecated field to YAML files and phases 2020-01-07 09:59:53 -05:00
Ray Speth ba323378db [Test] Fix coverage oscillation in HMWSoln::setBinarySalt
Make a test case which always requires swapping the species
2020-01-05 21:59:39 -05:00
Ray Speth 921147dfeb [Input] Improve behavior when kinetics / reactions are unspecified
Including a 'reactions' field without a 'kinetics' field in the phase definition
is an error.

Including a 'kinetics' field without a 'reactions' field is allowed only if a
'reactions' section exists. To specify a kinetics model with no reactions, the
'reactions' field must be set to 'none'.
2020-01-05 21:59:39 -05:00
Bryan W. Weber 3003156172 [Thermo] Add phase names to a few more phases 2020-01-02 11:56:13 -05:00
Bryan W. Weber 8920063fc9 [Test/SCons] Add fast failure option for tests
Add fast_fail_tests option. If True, the first test failure aborts
running the test suite. Useful when debugging tests and multiple tests
are failing, this option allows them to be easily handled one-by-one.
2020-01-01 22:14:42 -05:00
Ingmar Schoegl f96829eb38 [Thermo] finalize generalization of state vector definition
- switch 'isIncompressible' to 'isCompressible'
- switch 'isStoichPhase' to 'isPure'
- improve deprecation warning messages and docstrings
- rename 'setConstDensity' to 'assignDensity'
- remove warnings for assigning mole fractions for pure substances
- rename 'defaultState' to 'nativeState'; use map instead of vector
2019-12-06 13:52:53 -05:00
Ingmar Schoegl ef8dd04b7a [Thermo] fix setDensity in C++ layer 2019-12-06 13:52:53 -05:00
Bryan W. Weber 96d9c171d2 [ctml2yaml/Test] Remove on-the-fly ctml_writer use
ctml_writer.py maintains global state between calling convert(). This
change commits the resulting XML file into the test/data directory
rather than converting during the test.
2019-12-01 21:22:24 -05:00
Bryan W. Weber e31ad91a15 [ctml2yaml] Combine duplicate section ids
If a reactionData or speciesData node has a duplicated id attribute,
combine the duplicate sections together. If duplicate reaction id
attributes or species names are found, either warn or raise an error.
2019-12-01 21:07:44 -05:00
Bryan W. Weber dfd4e6d4bf [ctml2yaml] Fix several XML parsing errors
The Python Expat parser requires that the <?xml version...> tag occur as
the first characters in the file, even before any blank space, so lstrip
is used to remove any whitespace. In addition, raw & characters are
replaced with their escaped version.
2019-12-01 21:07:44 -05:00
Bryan W. Weber 66c1433101 [ctml2yaml] Add temperature_polynomial conversion 2019-12-01 21:07:44 -05:00
Bryan W. Weber 3a74c979a8 [ctml2yaml] Add non-reactant orders 2019-12-01 21:07:43 -05:00
Bryan W. Weber 645a86a7ca [ctml2yaml] Add conversion for more transport models 2019-12-01 21:07:43 -05:00
Bryan W. Weber c5c0902da2 [ctml2yaml] Add IdealMolalSoln thermo type 2019-12-01 21:07:43 -05:00