Commit graph

179 commits

Author SHA1 Message Date
Ray Speth
882a4986da Remove 'thermo' argument from Species constructor
Since the Species object now stores its SpeciesThermoInterpType contents as a
shared_ptr, it is undesirable to have the Species constructor take this as a raw
pointer argument.
2015-04-14 15:29:28 -04:00
Ray Speth
43952b30fc [Thermo] Use shared_ptr<Species> in ThermoPhase 2015-04-14 15:29:28 -04:00
Ray Speth
b495262aff [Matlab] 'cleanup' now deletes all Cantera objects
'cleanup' previously only deleted ThermoPhase, Kinetics, Transport, Domain1D,
Sim1D, and XML_Node objects, while missing all objects associated with reactor
networks (Reactor, ReactorNet, FlowDevice, Wall), MultiPhase, Func1, and
reaction paths (ReactionPathBuilder, ReactionPathDiagram).

Fixes #251.
2015-04-08 23:08:42 -04:00
Ray Speth
0f6fde82bd [Test] Update NasaPoly1Test to use the new SpeciesThermo constructor 2015-02-20 00:11:41 +00:00
Ray Speth
0a3332aa43 [Thermo] Add simpler constructors for SpeciesThermoInterpType objects
These objects do not need to know the index of the species within the phase, so
the new constructors do not take that as an argument.

For the NASA polynomial constructors, the order of the coefficients arrays in
the new constructors has been modified to match the conventional ordering of the
coefficients as written in thermo database files.
2015-01-22 00:04:06 +00: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
44a99de4e0 [Test] Add tests for manually-constructed Transport objects 2015-01-13 23:06:59 +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
e3022a8057 [Kinetics] Check Reaction objects for orders on reversible reactions 2014-11-15 00:47:13 +00:00
Ray Speth
82fbff7a05 [Kinetics] Validate rate coefficient data for Reaction objects 2014-11-15 00:47:09 +00:00
Ray Speth
6727902c3f [Kinetics] Allow skipping third-body efficiencies when using Reaction 2014-11-15 00:47:04 +00:00
Ray Speth
ffe3eb5e5a [Kinetics] Check for undeclared species when using Reaction objects
Skip the reaction or raise an exception based on the
'm_skipUndeclaredSpecies' flag
2014-11-15 00:46:59 +00:00
Ray Speth
69650b8ec2 [Kinetics] InterfaceReaction supports sticking coefficients 2014-11-11 00:12:13 +00:00
Ray Speth
c4e6790fda [Kinetics] Implement addReaction from Reaction for InterfaceKinetics 2014-11-11 00:12:08 +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
Ray Speth
24c509f539 [Kinetics] Fix some cases where duplicate reactions were not detected
Also add several tests which check that the various kinds of duplicate
reactions are being identified as errors or allowed as intended.
2014-11-07 02:15:03 +00:00
Ray Speth
74a522bdda [Test] Add tests for parseCompString
These tests are added as the first part of the new gtest test suite 'general'
2014-11-07 02:14:54 +00:00
Ray Speth
0fd5f14288 [SCons] Rename 'cython' test suite to 'python'
Since the old Python module is gone, we don't need this one to have a different
name.
2014-11-01 00:13:41 +00:00
Ray Speth
5bc4a12e2e Add options for handling Species containing undefined elements 2014-10-17 23:44:37 +00:00
Ray Speth
26b6f190f3 Introduce class Species 2014-10-17 23:44:31 +00:00
Ray Speth
53abe2ee9a [Thermo] Always use GeneralSpeciesThermo
The specialized SpeciesThermo derived types offer no performance benefit now
that GeneralSpeciesThermo manages calculation of the temperature terms
efficiently.
2014-10-15 02:03:06 +00:00
Ray Speth
5cb1d6b338 [Test] Add some SpeciesThermoInterpType tests 2014-10-15 02:03:03 +00:00
Ray Speth
044235c065 [SCons] Remove unnecessary uses of pjoin 2014-10-08 16:54:49 +00:00
Ray Speth
0db18ad0b1 [SCons/Test] Re-run tests if shared library changes 2014-10-08 16:54:39 +00:00
Ray Speth
6d4271fdfe [Test] Improve visibility of total test suite failures
Treat crashes when running the GTest test programs and the Python test suite as
being more severe than individual test failures.
2014-10-03 22:15:06 +00:00
Ray Speth
ceeaaecae7 [Test] fix some size_t warnings 2014-10-03 01:45:38 +00:00
Ray Speth
23921c7889 [Test] Run 'appdelete' at end of GTest tests
This makes it easier to find memory leaks when using Valgrind by suppressing
false positives associated with data cached by Cantera.
2014-10-01 17:52:28 +00:00
Ray Speth
ab4813c592 [Test] Fix memory leaks in CtiConversionTest and ChemkinConversionTest 2014-10-01 17:52:26 +00:00
Ray Speth
1a5f75dd2d [Test] Use Cantera shared library for tests, when possible
On Linux systems, link tests against the Cantera shared library, rather than the
static library to reduce the size of the compiled test suite. This saves over 1
GB of disk space when compiling with debug symbols enabled, and also reduces the
run time of the test suite.

This does not work on Windows, where the shared library only exports the Cantera
C interface.
2014-10-01 17:52:21 +00:00
Ray Speth
4544fd3392 [Test] Build tests with optimization disabled
Compiling the tests takes longer than running them, so it actually saves time to
compile the tests with optimizations disabled.
2014-10-01 17:52:18 +00:00
Ray Speth
5c26f7b003 [Test] Preliminary tests for constructing a phase without an input file 2014-09-27 00:09:16 +00:00
Ray Speth
79461c34e8 [Thermo] Add default value for 'id' argument of 'newPhase' 2014-09-27 00:09:11 +00:00
Ray Speth
53102e8d70 [Test] Convert 'fracCoeff' test to GTest 2014-09-26 13:45:06 +00:00
Ray Speth
992782d1e2 [Test] Show test class and test name for failing GTest tests 2014-09-26 13:45:02 +00:00
Ray Speth
337c573958 [Test] Move NASA9poly test to GTest test suite 2014-09-24 23:18:01 +00:00
Ray Speth
de9928977c [ck2cti] Preserve mechanism header comment block 2014-09-24 23:17:47 +00:00
Ray Speth
a3bba51f06 [ck2cti] Preserve comments in the REACTIONS section 2014-09-24 23:17:44 +00:00
Ray Speth
ab6ae72e0d Add missing reaction to "h2o2" mechanism
This mechanism, which is supposed to be the H2 mechanism extracted from GRI-3.0,
was actually missing the reaction H+O2+M <-> HO2+M. This updates the original
input file, regenerates h2o2.cti, and updates the blessed output file for one
test (which changed because the newer version of ck2cti actually retains the
given precision of the transport properties).
2014-09-23 02:20:49 +00:00
Ray Speth
83ae446142 Remove redundant copy of h2o2.xml 2014-09-23 02:20:43 +00:00
Ray Speth
09db5a498a [Thermo] Add getMass/MoleFractionsByName functions with thresholds
This makes it easier to set the composition of a phase based on the composition
of another phase with a different set of species. The threshold argument allows
species with negligible concentrations to be skipped.

Deprecate the unused getMoleFractionsByName function that didn't return a
value.
2014-09-18 22:58:59 +00:00
Ray Speth
2b67ec4538 [Test] Add surface kinetics test based on the sofc.py example 2014-07-30 16:59:30 +00:00
Ray Speth
4236c97259 [Test] Add multiphase equilibrium tests based on 'adiabatic.py' example 2014-07-30 16:59:23 +00:00
Bryan W. Weber
a03b7d6123 [ck2cti/test] Add test for empty reaction section in CK input file 2014-07-17 15:36:53 +00:00
Ray Speth
868573080d [Python/1D] Add premixed counterflow flame configuration 2014-07-10 22:34:24 +00:00
Ray Speth
c29ae666c0 [CTI] Allow non-integer atomicity
This allows specification of lumped species with average compositions,
such as C10.6H21.8.
2014-06-06 00:18:13 +00:00
Ray Speth
3e3557e756 [Test] Add more tests of the VCS equilibrium solver
These tests are based on the 'plasma_equilibrium.py' example, and include
a fairly large number of phases, some of which are only present for certain
temperature ranges.
2014-05-27 02:54:02 +00:00
Ray Speth
2df0396879 [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.
2014-05-07 21:57:34 +00:00