Commit graph

134 commits

Author SHA1 Message Date
Ray Speth
b1e05a05f2 [ck2cti] Relax formatting requirement for Chebyshev coefficients.
Allow coefficient data to begin on the same line as the declaration of the
order of the polynomial in each dimension.

Fixes Issue 219.

Cherry-pick of trunk r2937.
2014-06-20 19:41:25 +00:00
Ray Speth
d787349771 [ck2cti] Allow stoichiometric coefficients ending in decimal points
Cherry-pick of trunk r2936.
2014-06-20 19:41:22 +00:00
Ray Speth
78c9c9c0a5 [CTI] Allow omitting third body in Chebyshev reaction equations
Cherry-pick of trunk r2930.
2014-06-20 19:41:14 +00:00
Ray Speth
aa8c73d252 [CTI] Relax formatting requirements for third bodies in reaction strings
Allow 'A + B (+M)' in addition to 'A + B (+ M)'

Cherry-pick of trunk r2929.
2014-06-20 19:41:10 +00:00
Ray Speth
e0f9888601 [ck2cti] Make 'PCHEB' and 'TCHEB' keywords case insensitive
Fixes Issue 213.

Cherry-pick of trunk r2878.
2014-04-29 19:02:38 +00:00
Ray Speth
e59ca5ff6b [ck2cti] Improve error messages associated with missing input files
Partial cherry-pick of trunk r2856.
2014-04-29 19:02:02 +00:00
Ray Speth
953fc46c27 Revert commit intended for trunk that ended up on 2.1 maintenance branch
Reverts r2879, which was actually commited to trunk in r2913.
2014-04-25 20:46:47 +00:00
Steven DeCaluwe
1d0a4711ac Added gas-phse kinetics to RedlichKwongMFTP class 2014-04-09 13:11:35 +00:00
Ray Speth
1b0519e662 [ctml_writer] Fix handling of units in some fields
When using Python 3, using -1 as the dummy value for density and site_density
causes probems, because the (ordered) comparison between a density specified
with units (as a tuple) and 0 is not allowed. Instead, use None as the
placeholder value.

Cherry-pick of trunk commit r2800.
2014-03-24 21:37:00 +00:00
Ray Speth
cc27095599 [ck2cti] Fix support for species names containing '+' and '='
This addesses a parsing error that would occur if a mechanism contained both
'foo' and 'foo+', where reactions written as 'foo+bar' would be parsed as a
reaction with 'foo+' and 'bar'.

See Issue 182.

Cherry pick of trunk commit r2701.
2014-02-03 17:04:48 +00:00
Ray Speth
0590c6c1a3 [ck2cti] Fix for support of unterminated thermo sections
Fixes the case where the next section header contains a modifier, e.g. 'thermo
all' or 'reactions <units>'.

Based on a patch provided by Bryan Weber.

See Issue 199.

Cherry-pick of trunk r2662.
2014-01-23 03:06:23 +00:00
Ray Speth
a23eac62d8 [ck2cti] Improve handling of duplicate species
Warn when a species is given multiple times in the input list. Do not add the
duplicate species to speciesList.

Based on patch provided by Bryan Weber.

Resolves Issue 199.

Cherry-pick of trunk r2660.
2014-01-23 03:06:16 +00:00
Ray Speth
9f156c04fc [Thermo] Make modification of discontinuous NASA polynomials optional
Adding the attribute allow_discontinuities="true" to a phase's
'thermo' node (CTML) or adding 'allow_discontinuous_thermo' to a
phase's 'options' argument (CTI) will disable the automatic adjustment
of the provided polynomials so that enthalpy and entropy are
continuous at the midpoint temperature.

Cherry-pick of trunk r2590.
2014-01-23 02:12:36 +00:00
Ray Speth
5386d6b304 [ctml] Fix constructor for stoichiometric_solid phase
Error introduced in r2579
2013-12-06 23:45:22 +00:00
Ray Speth
81cf00260d [ck2cti] Add support for species names containing '+' and '=' 2013-12-06 23:15:24 +00:00
Ray Speth
44181d5edf [ck2cti/Test] Eliminate confusing messages from expected errors
Suppress error messages from tests of ck2cti that use bad input to
test that input validation is working correctly.
2013-12-06 23:15:21 +00:00
Ray Speth
c9b4d3dbe8 [ck2cti] Add support for truncated section header names
Accept truncated section names such as 'REAC' for 'REACTIONS' and
'ELEM' for 'ELEMENTS'.
2013-12-06 23:15:18 +00:00
Ray Speth
a8111887bf [CTI] Add optional 'note' field to Phase definitions
The note field is preserved when converting to XML, and can be used to
store extra information used by applications other than Cantera.
2013-12-05 20:54:08 +00:00
Ray Speth
904e3e66e9 [ck2cti] Accept reaction units declared in either order
That is, energy followed by quantity or quantity followed by energy.
2013-10-21 22:13:00 +00:00
Ray Speth
94f1b35b79 [ck2cti] Partial support for scientific notation in stoichiometric coefficients
This won't work for positive exponents, because the '+' will still be
interpreted as a delimiter between terms of the reaction expression.
2013-10-21 01:55:18 +00:00
Ray Speth
8498123689 [ck2cti] Show line number for some parsing errors 2013-09-30 01:54:00 +00:00
Ray Speth
717a2367b1 [Transport] Add electricalConductivity method to all language interfaces
Thanks to user 'hencken' for the patch.

Resolves Issue 171.
2013-08-23 17:43:55 +00:00
Ray Speth
c32b54a47d [ck2cti] Fix for reading files with no final 'END' keyword 2013-08-02 23:17:38 +00:00
Ray Speth
03786fd07b [Python] Add support for IdealGasReactor and IdealGasConstPressureReactor 2013-07-31 18:14:45 +00:00
Ray Speth
c76ddefa5f Fix spelling errors 2013-07-26 21:33:50 +00:00
Ray Speth
000e374b6c [ctml_writer] Fix a Python 2.6 compatibility issue
Python 2.6 needs some extra help when trying to execute code
containing Windows (CRLF) line endings.
2013-07-18 19:07:10 +00:00
Ray Speth
1b9d23c120 [ck2cti] Fix parsing third-body reactions with no efficiencies 2013-07-08 01:35:36 +00:00
Ray Speth
f7fc700c8c [ck2cti] Fix third-body reactions with explicit reverse rate expressions 2013-07-08 01:35:33 +00:00
Ray Speth
a69d56ab28 [ck2cti] Check for duplicate thermo entries
By default, raise an exception.
With '--permissive', use the first entry found.
2013-07-08 01:35:30 +00:00
Ray Speth
5d26a264f4 [ck2cti] Add limited support for unterminated sections
Each section of the input file should end with 'END'. Other utilities that work
with these files don't always require this, so we allow unterminated sections
if the '--permissive' flag is used, otherwise these are considered errors.
2013-07-08 01:35:27 +00:00
Ray Speth
812ec6ef77 [ck2cti] Fix for mechanism files with in-line transport data 2013-07-08 01:35:23 +00:00
Ray Speth
e8ab4dda28 [ck2cti] Fix handling of thermo entries with end-of-line comments 2013-07-08 01:35:20 +00:00
Ray Speth
ceeea2ed21 [ck2cti] Improve messages for some input file errors 2013-07-08 01:35:18 +00:00
Ray Speth
f1e5183431 [ck2cti] Fix to allow species names starting with special characters 2013-07-08 01:35:15 +00:00
Ray Speth
2778267a43 [ck2cti] Fix reading files with "CR" (old Macintosh) line endings 2013-07-08 01:35:12 +00:00
Ray Speth
4f236a80fe [ck2cti] Fix reading empty THERMO sections 2013-07-08 01:35:10 +00:00
Ray Speth
08724c9ac3 [ck2cti] Translate "chemically activated" reactions
These are reactions with an additional set of Arrhenius parameters labeled
'HIGH' in the input file. They may also have a set of falloff function
parameters.
2013-07-06 21:44:10 +00:00
Ray Speth
27902b32e0 [ck2cti] Separate falloff functions from falloff reaction type
This is in preparation for adding support for chemically activated reactions,
which also use these falloff functions.
2013-07-06 21:44:07 +00:00
Ray Speth
da95339706 [ctml_writer] Add support for chemically activated reactions 2013-07-06 21:44:05 +00:00
Ray Speth
bd8d257c5e [ctml_writer] Clean up reaction.build 2013-06-28 21:24:26 +00:00
Ray Speth
dd41d8ac90 [ctml_writer] Improve performance of XMLnode._write 2013-06-28 21:24:24 +00:00
Steven DeCaluwe
fde8eeddcc Modified ctml_writer.py to allow loading RedlichKwongMFTP thermo class from a cti file. 2013-06-25 22:06:18 +00:00
Ray Speth
84aaec1417 [Cython] Install ck2cti.py and wrapper script 2013-06-21 20:58:15 +00:00
Ray Speth
66981a244d [ck2cti] Print line number of invalid reaction entry 2013-06-21 20:58:07 +00:00
Ray Speth
92fb4252d0 [ck2cti] Avoid parsing keywords in comments 2013-06-21 20:57:58 +00:00
Ray Speth
39079b93d1 [ck2cti] Consider explicit third bodies in duplicate reaction check
Reactions with the same reactants and products but different named
third bodies are not considered duplicates and do not need to be marked
as such.

Normal third body reactions (with 'M' as the third body) are considered
duplicates of reactions with specific third bodies if the efficiency
for the specific third body is not zero.
2013-06-21 20:57:49 +00:00
Ray Speth
67240c4947 [ck2cti] Fix handling of transport comments with no preceding space 2013-06-17 14:20:38 +00:00
Ray Speth
0018acd607 [ck2cti] Fix a Python 3 incompatibility 2013-06-17 14:20:34 +00:00
Ray Speth
0f13a7159e [ck2cti] Improve performance of duplicate reaction check
Old method was O(N^2). New method is essentially O(N).
2013-06-17 14:20:26 +00:00
Ray Speth
7eae48abba [ck2cti] Show line numbers of unmarked duplicate reactions 2013-06-17 14:20:23 +00:00