The CounterFlowDiffusionFlame (CFDF) code is able to perform more general cases
of npflame_init for multiple species fuel and oxidizer streams. The
stoichiometric mixture fraction in the CFDF code uses the Bilger definition of
mixture fraction, using the conservation of elements C, H, and O. This method is
used in the python module, but not the MATLAB npflame_init function.
Also, the CFDF code uses the fuel stream density to calculate the fuel stream
velocity and the oxidizer stream density to calculate the oxidizer stream
velocity, where as the npflame_init code uses the fuel density for both velocity
calculations.
The elementMassFraction code is a MATLAB version of the python function:
elemental_mass_fraction, which is needed to run the CFDF code.
Update the diffflame.m example to use the more general CFDF function since the
input parameters are different than the npflame_init function. This example is
the same as the diffusion_flame.py sample in the Python module.
This fixes some platform-specific test failures when compiling in debug mode,
where estimated temperatures during the Newton iterations were too high,
resulting in non-finite reaction rates.
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.
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.
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.
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.
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.
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.
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.