Commit graph

6523 commits

Author SHA1 Message Date
Ray Speth
22ecade329 [1D] Use named offsets for solution components 2017-05-16 13:55:40 -04:00
bangshiuh
1057d20731 [1D] Fix IonFlow docstrings and simplify testIonFlame 2017-05-16 13:55:40 -04:00
bangshiuh
6b6d758f23 [1D] Use named offset constants instead of raw numbers 2017-05-16 13:55:40 -04:00
bangshiuh
9dd0134e31 [1D] Add function for importing transport of electron 2017-05-16 13:55:40 -04:00
bangshiuh
e2f718c65b [1D/Python] Add IonFlow to Python interface, with example and test 2017-05-16 13:55:40 -04:00
bangshiuh
3b12c6d662 [1D] Introduction of IonFlow flame class
tested successfully with gri30
2017-05-16 13:55:40 -04:00
Ray Speth
3accd415e8 [Doc] Fix building Matlab Sphinx docs
Forgot to remove references to deprecated code that has been removed
2017-05-13 00:16:34 -04:00
Jeff Santner
2a38b0a765 Allow user to set flame location
A very small change that allows the user to set the initial location of the flame. The original hard-coded values for "locs" are retained as the default, but the user can now modify locs.
2017-05-12 22:57:29 -04:00
Ray Speth
52dbe8c007 [1D] Correct handling of boundary conditions when energy equation is disabled 2017-03-29 18:46:30 -04:00
Ray Speth
bfdc2b9e1d [Thermo] Allow instantiation of DebyeHuckel without XML 2017-03-25 23:42:46 -04:00
Ray Speth
974bbc7da4 Add electron to the built-in elements as an "isotope" 2017-03-25 23:42:46 -04:00
Ray Speth
56022e8989 Introduce class AnyMap 2017-03-25 23:42:46 -04:00
Ray Speth
2c3512c22a [Thermo] Fix PDSS_HKFT initialization when one property is not given
Calculating one of G0, H0, or S0 requires the parent ThermoPhase object, so this
calculation has to be delayed until m_tp has been set.
2017-03-02 19:53:23 -05:00
Steven DeCaluwe
51f419fbad Enabling charge-transfer/electrochemical surface reactions
The previous formulation will only consider a rection as electrochemical
if a beta value is supplied for that reaction *and* the reaction is an
'edge_reaction.'  This is problematic for two reasons: (1) many/most
charge-transfer reactions of interest occur at two-phase boundaries (see,
for example, Li-ion batteries and PEM fuel cells), not the three-phase-
boundary-like edges (which are most relevant for SOFCs).  (2) determining
whether a reaction is electrochemical or not should not rely at all upon
user input - the program itself should check to see whether charge is
transferred between phases, and the appropriate steps should be taken
during rate-of-progress calcuations.

This commit addresses the former issue.  Currently, if a charge-transfer
reaction is written as a surface_reaction, the code does not apply the
voltage correction to the forward rate.  By default, then, the entire
voltage correction is applied to the reverse reaction, which is the same
as setting beta = 0; not a good 'default' behavior (beta = 0.5 is a more
appropriate default).  With this change, surface reactions can now be
supplied with a beta value in cti or xml formats, and will be recognized
as a charge transfer reaction.

Longer term, it would be better to change the constructor routines such
that charge transfer is automatically detected and handled, rather than
relying upon user-specified flags.
2017-02-25 19:13:38 -05:00
decaluwe
f9d5f16b72 Adding test coverage for ThermoPhase class RedlichKwongMFTP 2017-02-25 11:36:31 -05:00
Ray Speth
95a52b2d34 [Test] Fix test compilation with G++ 4.6
G++ 4.6 doesn't support non-static data member initializers
2017-02-23 23:03:14 -05:00
Ray Speth
afafa34c06 [Thermo] Remove unimplemented options for m_formGC from DebyeHuckel 2017-02-22 22:18:40 -05:00
Ray Speth
a6ac446021 [Thermo] Allow instantiation of IdealMolalSoln without XML 2017-02-22 22:18:40 -05:00
Ray Speth
f8ef4a8b2b [Thermo] Allow instantiation of RedlichKisterVPSSTP without XML 2017-02-22 22:18:40 -05:00
Ray Speth
31d54c3b11 [Thermo] Allow instantiation of MaskellSolidSolnPhase without XML 2017-02-22 22:18:40 -05:00
Ray Speth
b033d44d3e [Thermo] Make PDSS_ConstVol configurable without XML 2017-02-22 22:18:40 -05:00
Ray Speth
2b73fe24ba Deprecate class MixedSolventElectrolyte
No existing tests, no known example input files, and not constructible via
ThermoFactory.

See #267.
2017-02-22 22:18:40 -05:00
Ray Speth
6154e1b4bd Remove unused list of thermo models from ThermoFactory 2017-02-22 22:18:40 -05:00
Ray Speth
5efea12959 [Thermo] Allow instantiation of IdealSolnGasVPSS without XML
This is also the first test of PDSS_IdealGas that doesn't use XML
2017-02-22 22:18:40 -05:00
Ray Speth
3ea2a6caf3 [Thermo] Remove special case for aqueous phases in VPStandardStateTP
The flag 'm_useTmpRefStateStorage' used when one of the species was PDSS_Water
reduced functionality and provided no performance benefit.
2017-02-22 22:18:40 -05:00
Ray Speth
461b63e462 [SCons] Add option to pass flags to GTest 2017-02-22 22:18:40 -05:00
Ray Speth
3c771ded2b [Thermo] Add PDSS objects to VPStandardStateTP without XML
Added PDSSFactory class to generalize PDSS object creation
2017-02-22 22:18:40 -05:00
Ray Speth
c28ca48cf8 Add option to specify synonyms for Factory model names 2017-02-22 22:18:40 -05:00
Ray Speth
04cac2b277 [Thermo] Refactor construction of PDSS objects
Introduce a default constructor for PDSS objects, and avoid
passing in unnecesary arguments to initialization functions.
2017-02-22 22:18:40 -05:00
Ray Speth
ff46dc93b5 [Thermo] Fix inconsistencies in PDSS_IonsFromNeutral
The definitions of p0, Tmin, and Tmax were circular -- they queried the
STITbyPDSS object which just referenced the same PDSS_IonsFromNeutral
object. Instead, pull these properties from the associated "neutral molecule"
phase.

The overrides of setTemperature and temperature were unnecessary and likely to
cause problems.
2017-02-22 22:18:40 -05:00
Ray Speth
fca22d94e5 [SCons] Print error message if GTest exits abnormally 2017-02-22 22:18:40 -05:00
Ray Speth
574462fd3c [Thermo] Move common PDSS functions up to PDSS_Nondimensional 2017-02-22 22:18:40 -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
dfb32f0c7e [Thermo] Fix errors in entropy calculation in PDSS_IdealGas 2017-02-22 22:18:40 -05:00
Ray Speth
35679c2e9e [Thermo] Make m_species a non-pointer member of ThermoPhase 2017-02-22 22:18:40 -05:00
Steven DeCaluwe
dd521de254 Cleaning up pressure implementation in MixtureFugacityTP and derived classes.
Cleaning up `RedlichKwongMFTP:pressure()` and removing `m_Pcurrent` as a cached
value in `RedlichKwongMFTP` and `MixtureFugacityTP`.  The stored value was only
ever called in one location `RedlichKwongMFTP:getPartialMolarVolumes()`, and
the function call it replaced (`RedlichKwongMFTP:pressure()`) is not all that
involved.
2017-02-22 17:58:54 -05:00
Steven DeCaluwe
ecbd819e91 Commenting out sanity check in `RedlichKwongMFTP::pressure' and removing m_Pcurrent 2017-02-22 17:58:54 -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
Richard West
7b7aea2038 Preserve units in PLOG entries in ck2cti
When converting chemkin into cti using ck2cti, the units were not preserved
in PLOG (pdep_arrhenius) reactions. Now they are.
2017-02-20 19:02:36 -05:00
Ray Speth
db1f1af0a0 [Thermo] Fix RedlichKwongMFTP in temperature-independent case
If the "a" coefficients for all species were temperature independent, the array
containing "a" at the current temperature was never being populated. Fixes a
regression introduced in 19c17d1.
2017-02-17 16:38:47 -05:00
Ray Speth
70e10632d4 [SCons] Fix implicit dependencies on 'build' step
The 'install' and 'test' targets had some undeclared dependencies on the 'build'
target, such that running 'scons install' or 'scons test' without having first
run 'scons build' would result in incomplete installation or test failures,
respectively.

Fixes #432.
2017-02-17 11:51:12 -05:00
Ray Speth
0a1257daed Stream input to ctml_writer to avoid command line length limits
Resolves #416.
2017-02-13 19:37:24 -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
50ed3f2e72 [Thermo] PDSS objects store their own data 2017-02-13 13:25:46 -05:00
Ray Speth
7b529ac2d6 [Thermo] Fix error in PDSS_Water reference state calculations
The water property calculator needs to be given the correct phase guess,
otherwise it will return in an invalid state.
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
0249ce89b8 [Test] Add tests for 'OneWayFlow' and 'scale' reaction path options 2017-02-12 22:32:39 -05:00
Ray Speth
092e00744b [Kinetics] Add test that reaction path fluxes are correct 2017-02-12 22:32:39 -05:00
Ray Speth
5a0fb579a8 [Kinetics] Prevent double counting in reaction path diagrams
This fixes the double counting that occurs in reactions like:

    H + HO2 => 2 OH

Fixes #377
2017-02-12 22:32:39 -05:00