Commit Graph
455 Commits
Author SHA1 Message Date
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
Bryan W. Weber eb5dbc69e6 [ctml2yaml] Add IdealSolidSolnPhase conversion 2019-12-01 21:07:43 -05:00
Bryan W. Weber b9522a4ffb [ctml2yaml] Finish adding Margules phase thermo 2019-12-01 21:07:43 -05:00
Bryan W. Weber f1474d7644 [ctml2yaml] Add LatticeSolid phase 2019-12-01 21:07:43 -05:00
Bryan W. Weber 89fd38ba67 [ctml2yaml] Add Ideal VPSS and PDSS_HKFT types 2019-12-01 21:07:43 -05:00
Bryan W. Weber 7b2a2f9b53 [ctml2yaml] Parse pathological species names
These changes allow parsing composition map strings where colons are
allowed as characters in keys in a colon delimited map, as well as
handling comma or space separated pairs where commas are also valid
characters in the keys.
2019-12-01 21:07:42 -05:00
Bryan W. Weber 70f062af9d [ctml2yaml] Add Motz-Wise correction option
If the Motz-Wise option is specified at the global reactionData node
level, this is used to set the option for all the reactions in that node
that don't otherwise specify the option. This method is easier than
setting the equivalent phase-level option.
2019-12-01 21:07:42 -05:00
Bryan W. Weber bc58b9cffa [ctml2yaml] Margules and ions-from-neutral phases
Add Margules and ions-from-neutral-molecule phases. Margules is not
complete, it is missing the interaction parameters.
2019-12-01 21:07:42 -05:00
Bryan W. Weber 66ce20b15f [ctml2yaml] Add MaskellSolidSolnPhase 2019-12-01 21:07:41 -05:00
Bryan W. Weber 49bf4b50c7 [ctml2yaml] Add Debye-Huckel phase-thermo type
The implementation is not quite complete, some refactoring needs to be
done to make it easier to move data from the phase node to the species
nodes.
2019-12-01 21:07:40 -05:00
Bryan W. Weber be0e17e2b9 [ctml2yaml] Add Shomate species thermo
Fixes error when speciesData has an id attribute other than species_data
and the phase is StoichSubstance.
2019-12-01 21:07:40 -05:00
Bryan W. Weber 6046cc48e7 [ctml2yaml] Add ch4_ion test
Requires multipel reactionArray nodes, multiple speciesArray nodes, and
the option to skip undeclared third body species.
2019-12-01 21:07:39 -05:00
Ingmar Schoegl 719cb3d2b7 [Data] remove zero T2 value from TROE 2019-11-10 22:56:20 -05:00
Ingmar Schoegl e2bfba328c [Kinetics] deprecate magic numbers for falloff reactions 2019-11-08 15:18:26 -05:00
Ingmar Schoegl 2a9554c134 [Base] consolidate shared_ptr access in Solution 2019-11-08 15:12:36 -05:00
Ingmar Schoegl 40ae5b5fb5 [Base] implement initialization of C++ Solution from input files
- implement constructor that loads ThermoPhase, Kinetics, and Transport
from input files (wrapping factory class methods)
- logic for selection of transport manager follows Python object
- add convenience methods to type-cast frequently used classes
2019-11-08 15:12:36 -05:00
Bryan W. Weber 55fe2233b1 [Thermo/YAML] Rename water-IAPWS95 to liquid-water-IAPWS95
The water-IAPWS95 instantiates either WaterSSTP or PDSS_water objects,
both of which are intended for liquid phases only. Clarify the phase
name to liquid-water-IAPWS95 to allow a future phase that could
represent the full liquid<->vapor phase space.
2019-10-06 16:45:21 -04:00
Ingmar Schoegl 717635d3e6 Add case-sensitive/lowercase logic to Phase::species
Further:
* revert unit tests to previous species definitions (some case mis-matches)
* remove non-essential comments
* opt to maintain case-sensitive species maps with lowercase as fallback
2019-09-23 21:53:06 -04:00
Ingmar Schoegl 76dd997692 [Thermo] update unit tests to handle case sensitive species names 2019-09-23 21:53:06 -04:00
Bryan W. Weber ded50547f9 Update test results changed by constants and elements
Update reference values and blessed files in regression tests.
2019-08-09 15:15:30 -04:00
Bryan W. Weber 1e2a9f23a3 [Test] Avoid using path in source tree in tests
The relative path that is eliminated here relied on being in the source
directory structure, breaking tests of the installed Cython interface
2019-06-29 17:02:41 -04:00
Ray Speth dced8fbcad [Test] Make testing of deprecated methods possible
Fatal deprecation warnings are useful for identifying inadvertent use of
deprecated features. However, we still want to retain tests of deprecated
features until those features are removed.
2019-06-25 22:30:59 -04:00
Ray Speth df5a3ae08f [Test] Fix inadvertent reset of "fatal deprecation warnings" flag
Calling appdelete() to erase the input file cache also resets the value of
Application::m_fatal_deprecation_warnings to false.
2019-06-25 22:30:59 -04:00
Ray Speth 44c5094bb2 [Input] Implement 'skip-undeclared-third-bodies' option in YAML format 2019-06-25 22:30:59 -04:00
Ray Speth b77f368ead [Input] Instantiate BinarySolutionTabulatedThermo from YAML 2019-06-25 22:30:59 -04:00
Ray Speth 8eb52a7afb [Input] Create ElectrochemicalReaction objects from YAML definitions 2019-06-25 22:30:59 -04:00
Ray Speth 672b55a72f Add AnyValue::getMapWhere function 2019-06-25 22:30:59 -04:00
Ray Speth b1273301cc [Input] Create Metal objects from YAML definitions 2019-06-25 22:30:59 -04:00