Commit graph

114 commits

Author SHA1 Message Date
BangShiuh
5c783c708f [Transport/Test] Add tests for IonTransport properties 2018-06-15 10:44:46 -04:00
BangShiuh
1245a694e5 [Test/1D] change TestIonFlame to use IonGasTransport 2018-06-15 10:44:46 -04:00
Ray Speth
d09161716f Fix duplicate key check in parseCompString
The check was being done at a stage where the token being checked could be just
a part of a key (if the key contained a colon), where this partial key could
correspond to another valid key.

Fixes #525
2018-04-13 15:33:35 -04:00
Ray Speth
bde6e05452 [ck2cti] Detect badly formatted values of 4th Troe coefficient
Fixes #499
2018-02-07 22:58:50 -05:00
Ray Speth
f47e98a594 [ck2cti] Fix over-zealous detection of new input file sections
Species names starting with the short form of input file section names
(e.g. 'tran') were incorrectly identified as indicating the start of that
section if they occurred at the start of a line.
2018-02-07 21:27:21 -05:00
Ray Speth
552ba97a2b [ck2cti] Always write surface reactions to CTI file
Surface reactions were not being written to the CTI file if there were no
gas-phase reactions present.

Also update the count of reactions printed in the output summary to include
surface reactions.
2018-01-19 10:34:24 -05:00
Steven DeCaluwe
89fded32d4 Fixes ConstDensityThermo::standardConcentration()
`ConstDensityThermo::standardConcentration(k)` is now calculated
as `density()/molecularWeight(k)`, rather than the previously
incorrect `molarDensity()`.

Note that this causes a problem for any species where
`molecularWeight(k)=0` (i.e. vacancies).  Such species should be
avoided, in this phase model.

For that reason, `sofc-test.xml` is changed so that the oxide bulk
is modeled as an `IdealSolidSolution`
2017-12-06 10:57:15 -05:00
Ray Speth
501b5fd1f5 [test/ck2cti] Add tests for negative reaction orders 2017-12-02 19:18:59 -05:00
Ray Speth
89bca5fcd1 [ck2cti] Convert surface species with specific site occupancies
Entries in the species list like "C3H6(S)/2/" are now correctly identified as a
species named "C3H6(S)" which occupies 2 surface sites.

Fixes #444
2017-08-22 00:29:35 -04:00
Ray Speth
7020fa72bf [Transport] Make SimpleTransport constructible without XML 2017-08-15 17:54:15 -04:00
Ray Speth
4c489c175d [Kinetics] Fix duplicate reaction check to handle unchanged species 2017-08-02 16:46:24 -04:00
Ray Speth
513b43200c [Kinetics] Fix indexing error in Kinetics::checkDuplicates 2017-08-02 16:46:24 -04:00
Richard West
55a8910686 A failing unit test for chemkin files with weird names in PDep rates.
Reactions of the type
 A (+B) <=> C (+B)
ought to work, as long as they are provided a pressure-dependent rate
expression. This commit adds three examples to the test file. The first
works OK, the second two cause problems.

(For what it's worth, this currently crashes the official chemkin.
 Or at least the parentheses do; I've not tested the plus.
 Ansys have created a defect record and say they will fix the issue.)
2017-07-12 09:16:24 -04:00
Steven DeCaluwe
04be9888ed Update importKinetics to identify unspecified electrochemical reactions
Add test coverage for beta default value for electrochem reactions
2017-07-06 18:14:09 -04:00
Bryan W. Weber
6bf74d179b
Handle bad representations of geometry flags
If geometry flags are specified rather that can't be cast to integers,
intercept the ValueError raised by Python and raise a more sensible
exception.

Fixes #446
2017-06-14 17:39:52 -04:00
bangshiuh
e2f718c65b [1D/Python] Add IonFlow to Python interface, with example and test 2017-05-16 13:55:40 -04:00
decaluwe
f9d5f16b72 Adding test coverage for ThermoPhase class RedlichKwongMFTP 2017-02-25 11:36:31 -05:00
Ray Speth
3a119381e8 [Thermo] Fix creation of IonsFromNeutralVPSSTP objects
Added a mock input file derived from the initialization code in
IonsFromNeutralVPSSTP and PDSS_IonsFromNeutral.
2017-02-22 22:18:40 -05:00
Ray Speth
11a0727d5c [Test] Fix reproducibility of values used in add_species_sequential test
Exact floating point equality can be assured only in the case where the species
are added in the same order, since this affects summations involved in
calculating the mixture molecular weight. This resulted in test failures with
certain versions of the Intel compiler.

Resolves #433.
2017-02-21 20:53:29 -05:00
Ray Speth
a02753ae79 [Test/ck2cti] Test pdep reactions with custom units 2017-02-20 19:14:12 -05:00
Ray Speth
b39537bfcb [Thermo] Merge functionality of VPSSMgr into VPStandardStateTP
Remove the now-unused VPSSMgr class and descendants.
2017-02-13 13:25:46 -05:00
Ray Speth
38d291c683 [Thermo] Fix reference pressure assumptions in VPSSMgr classes
The reference pressure (p0) must be species-specific, since for certain PDSS
classes (e.g. PDSS_Water) p0 is a function of temperature, while for other
classes (PDSS_ConstVol) it is a constant.

VPSSMgr_Water_ConstVol further assumed that the reference pressure for all
species was 1 atm, ignoring the setting in the PDSS object. Fixing this changed
test results for HMW_test_1 and HMW_test_3.

Added a test that specifically compares VPSSMgr_Water_ConstVol with
VPSSMgr_General.
2017-02-13 13:25:46 -05:00
Ray Speth
0fd2f7c4d0 [Kinetics] Check for unmatched duplicate reactions
Reactions which are marked as duplicates but have no matching reactions are
considered errors.

Fixes #389
2017-01-23 14:34:18 -05:00
Santosh Shanbhogue
d1df40af87 Separate transport data from comments in parseTransportData 2016-12-09 19:59:52 -05:00
Santosh Shanbhogue
3f382e2590 Add test to catch superflous entries in a tranport file 2016-12-09 19:59:52 -05:00
Ray Speth
8e6d53d18b Enable parsing of composition strings when species names contain colons 2016-11-25 18:19:38 -05:00
Ray Speth
3300611379 Allow colons in species names in CTI phase definitions 2016-11-25 18:19:38 -05:00
Bryan W. Weber
05ad05c904 [ck2cti/Test] Add tests for explicit reverse reaction equal to zero 2016-11-25 18:18:38 -05:00
Ray Speth
e90dbcb27e Remove unnecessary reaction from ptcombust.cti
The current methods for handling negative species do not have the problem
described.
2016-07-28 22:38:05 -04:00
Ray Speth
fd9d60f1ec [ck2cti] Add support for MWON and MWOFF keywords 2016-07-28 18:40:10 -04:00
Ray Speth
1e5eb8c871 [Kinetics] Add option for Motz & Wise correction to sticking reactions 2016-07-28 18:38:40 -04:00
Ray Speth
aa42aa5c81 [ck2cti] Add tests for surface mechanism conversion 2016-07-15 17:57:13 -04:00
Ray Speth
7d18120c4d [ck2cti] Allow elements/isotopes with custom atomic weights
Resolves #344
2016-06-22 20:22:58 -04:00
Ray Speth
9e5362a762 [ck2cti] Add support for Chemkin-style extended elemental composition
Support for elemental composition written on additional lines indicated by
Fortran line-continuation character ('&').
2016-04-08 16:27:32 -04:00
Ray Speth
233399f899 [ck2cti] Fix conversion of NASA9 thermo with only one temperature range 2016-03-28 12:48:10 -04:00
Ray Speth
dfb4d62e12 [1D/Test] Add test for ImpingingJet and ReactingSurface1D 2016-03-27 17:07:37 -04:00
Ray Speth
77c744204e [1D] Try harder to find non-extinct diffusion flames when using 'auto'
Increasing the density of grid points is more likely to lead to a non-extinct
solution, but takes longer to solve. To give good average-case performance,
first try solving on a grid with few points, then increase the number of points
until a reacting solution is found, if possible.
2016-03-27 17:07:36 -04:00
Ray Speth
f0a1e25cd9 [1D] Better initial grid for CounterflowPremixedFlame 2016-03-25 12:21:19 -04:00
imitrichev
a68cdecd94 [Test] Add test for specifying non-reactant orders in CTI files 2016-02-27 14:14:51 -05:00
pwcnorthrop
1183479f88 Add RedlichKister tests and sample case for LiC6 electrode
See #293
2016-02-17 23:34:36 -05:00
Ray Speth
5926d2db7c [ck2cti] Handle reactions containing 'hv' pseudospecies
Convert to an irreversible reaction and ignore the photon.
2015-10-05 14:59:35 -04:00
Ray Speth
4efad93a6d [Kinetics] Fix handling of integral, explicit reaction orders
If any of the reaction orders differ from the corresponding stoichiometric
coefficients, the reaction needs to be handled as the general case, instead of
just when the orders are non-integral.
2015-06-22 11:56:56 -04:00
Ray Speth
e34b2739b2 [Test] Move "negATest" to GTest suite 2015-06-16 16:16:21 -04:00
Ray Speth
25953f94d4 [Transport] Make transport XML node optional
The default is equivalent to specifying <transport model="None">
2015-04-22 14:08:24 -04:00
Andreas Rücker
49c963143e [1D] Add simple radiation model for flames
Implements the radiation model of Liu & Rogg (1991). Optically thin limit,
gray-gas approximation using Planck mean absorption coefficients. Considers
emissions from CO2 and H2O, with the temperature-dependent absorption
coefficients calculated using polynomial fits to results from RADCAL
(Grosshandler, 1993).
2015-01-15 21:15:15 +00:00
Ray Speth
9f6c9e3a46 [ck2cti] Fix reading some input files containing non-unicode characters
In Python 3, attempting to convert some mechanisms would give errors like the
following:

UnicodeDecodeError: 'utf-8' codec can't decode byte 0x96 in position 348:
invalid start byte
2015-01-12 19:55:37 +00:00
Ray Speth
5958578c40 [Kinetics] Check for negative and non-reactant reaction orders
Allow non-reactant orders for electrochemical reactions

Allow negative orders specifically requested, e.g. by setting the
'negative_orders' option in the CTI definition of the reaction.
2014-11-15 00:47:25 +00:00
Ray Speth
be585aab3e [Kinetics] Implement direct constructor for ChebyshevRate 2014-11-11 00:11:33 +00:00
Ray Speth
191e9bcc42 [Kinetics] Implement direct constructor for P-log reactions 2014-11-11 00:11:31 +00:00
Ray Speth
b4afcd3e8e [Kinetics] Implement addReaction using Reaction objects for GasKinetics
This covers elementary, third-body, and falloff reaction types
2014-11-11 00:11:25 +00:00