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
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.
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.
`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`
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.)
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
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.
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.
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.
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.
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).
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
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.