Commit Graph
7323 Commits
Author SHA1 Message Date
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 0ec1c9d99b [ctml2yaml] Retain zero values in the YAML output
As demonstrated in #683, sometimes the zero values are intentional and
meaningful. Rework the SpeciesTransport class to not use this function.
2019-12-01 21:07:44 -05:00
Bryan W. Weber 844f4a02ba [ctml2yaml] Rename class attributes to non-private 2019-12-01 21:07:44 -05:00
Bryan W. Weber 76ab074bb0 [ctml2yaml] Fix trailing space if units is empty
Add a docstring for get_float_or_units. Use the clean_node_text
function.
2019-12-01 21:07:43 -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 0534b1170a [ctml2yaml] Rework reaction type factory
The changes now match all of the options in newReaction, including
synonyms. Butler-Volmer parameters are deprecated so the user is warned.
Simplify processing interface type reactions into one method, since the
electrochem node is optional.
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 1745c4a0be [Test] Use ThermoPhase to load Debye-Huckel 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 7c800db046 [ctml2yaml] Add last species standard state models 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 794905c23c [ctml2yaml] Refactor SpeciesThermo for polynomials
Extract a method to process the polynomials. Ensure that sorting of the
temperature ranges correlates with the sorting of the data.
2019-12-01 21:07:42 -05:00
Bryan W. Weber b10d1d8a49 [Test] Replace phaseid and phases args to converters 2019-12-01 21:07:42 -05:00
Bryan W. Weber df6bcc8444 [ctml2yaml] Simplify reaction type hints 2019-12-01 21:07:42 -05:00
Bryan W. Weber 80816a3c8f [ctml2yaml] Move reaction equation to top of node 2019-12-01 21:07:42 -05:00
Bryan W. Weber 51ae226642 [ctml2yaml] Add SRI falloff reaction type 2019-12-01 21:07:42 -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 b2f87f46ee [ctml2yaml] Add Redlich-Kister thermo phase type 2019-12-01 21:07:42 -05:00
Bryan W. Weber 09975ee7c7 [ctml2yaml] Simplify duplicate id checks 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 3b5bccab9f [Thermo] IonsFromNeutral can specify the neutral phase in another file
When specified in YAML input, the neutral-phase can now be specified as
being in another file by using a / to delimit the file from the phase
name. This is similar to specifying species or elements in another file.
This brings back parity with the XML specification of these phases.
2019-12-01 21:07:42 -05:00
Bryan W. Weber 1de5d66f89 [Thermo] Check that special species was specified
In the IonsFromNeutral phase, if a special-species is not included the
index is never set after initialization and remains at npos. The check
here ensures that a special-species is specified.

Also move building the elemVectorI outside of the jNeut loop. It doesn't
appear to need to be done for every neutral species, so this would save
some effort
2019-12-01 21:07:41 -05:00
Bryan W. Weber e2af32ad64 [Thermo] Make sure the neutral phase is initialized
In the IonsFromNeutral phase, make sure the neutralMoleculePhase is
initialized before we try to use it. This prevents a segfault if the
input YAML file does not have the neutral-phase key.
2019-12-01 21:07:41 -05:00
Bryan W. Weber 66ce20b15f [ctml2yaml] Add MaskellSolidSolnPhase 2019-12-01 21:07:41 -05:00
Bryan W. Weber c7181a30b2 [ctml2yaml] Finish Debye-Huckel phase-thermo type 2019-12-01 21:07:41 -05:00
Bryan W. Weber e61f4b8002 [ctml2yaml] Change XXXX_attribs to just attribs
For Species and Reaction classes. This makes it easier to reference
these attributes and the extra specifier is not needed because it is
implied by the type of class already.
2019-12-01 21:07:41 -05:00
Bryan W. Weber 1418d1a777 [ctml2yaml] Fix RK phase generation after refactor 2019-12-01 21:07:41 -05:00
Bryan W. Weber a3884026eb [ctml2yaml] Use the fancy new error classes
Use error classes that better describe what is missing and print the
actual node instead of its memory address
2019-12-01 21:07:41 -05:00
Bryan W. Weber c76891d156 [ctml2yaml] Refactor species and reaction creation
Create Species and Reaction objects before Phase objects. This allows
the Phase constructor to modify the appropriate objects based on
reaction filtering or various equation of state models where information
is moving from the phase node to the Species.
2019-12-01 21:07:41 -05:00
Bryan W. Weber 8fc20ee8b0 [ctml2yaml] Add types and resolve mypy errors 2019-12-01 21:07:41 -05:00
Bryan W. Weber 28f4c78d32 [ctml2yaml] Rename Species parameter species_node
Just clarify what the input argument is
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 c435b845c9 [Thermo] Fix typos in error messages 2019-12-01 21:07:40 -05:00
Bryan W. Weber 47d33fb20c [ctml2yaml] HMW-electrolyte and piecewise-Gibbs
Use ThermoPhase to load the input files rather than Solution. This
avoids a bug in TransportFactory that would be hit by using Solution.
2019-12-01 21:07:40 -05:00
Bryan W. Weber 3ed782bf99 [ctml2yaml] Phase model lookups are case-sensitive 2019-12-01 21:07:40 -05:00
Bryan W. Weber 9e1598c34f [ctml2yaml] Specialize for Redlich-Kwong EOS
The R-K EOS is moving activity coefficient data from the phase node to
the species node in YAML. However, other phases are retaining this data
in the phase node. This change specializes the previous processing of
the activityCoefficient node to be only for the R-K phase thermo model.
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 449fbd2b94 [ctml2yaml] Use speciesData id name
If a speciesData node has an id other than species_data, use it to label
the corresponding section in the YAML output file.
2019-12-01 21:07:40 -05:00
Bryan W. Weber ee690e8452 [ctml2yaml] Add liquid water phase 2019-12-01 21:07:40 -05:00
Bryan W. Weber 32399406f5 [ctml2yaml] Fixed chemical potential phase thermo 2019-12-01 21:07:40 -05:00
Bryan W. Weber 3e4d64abb0 [ctml2yaml] Add negative reaction orders option 2019-12-01 21:07:40 -05:00
Bryan W. Weber 88634a9964 [ctml2yaml] Add chemically activated reaction type 2019-12-01 21:07:40 -05:00
Bryan W. Weber 7ae7f75b9f [ctml2yaml] Add NASA9 species thermo 2019-12-01 21:07:39 -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
Bryan W. Weber bfaa1a2a52 [SCons] Remove test/work directory during cleaning 2019-12-01 21:07:39 -05:00