Now the complete XML file is storred within the ThermPhase object starting with the root node.
This is needed for later processing of kinetics and transport mechanisms when the ThermoPhase
file is duplicated and the original file is deleted.
xml() is now a const function, and still returns the same pointer.
setXMLdata() is a new function will stores the xml data.
The descendants either calculate molar properties from nondimensonal properties
or vice versa. Add two derived classes to PDSS to implement these behaviors, and
have the leaf classes derive from whichever one of these makes sense.
Formerly getExchangeCurrentQuantities() is now
updateExchangeCurrentQuantities(). This method updates things like
m_StandardConc for computing reaction rates.
Formerly applyExchangeCurrentDensityFormulation() is now
convertExchangeCurrentDensityFormulation(). This method converts
rate expressions from A/m2 to kmol/m2/s.
Eliminates the need for redundant implementations in all the derived
classes. Also, make the return value a "const char*" to eliminate the dangerous
cast.
ThermoPhase already provides an implementation of these methods that raises
an exception to indicate that the method is unimplemented. Therefore,
derived classes which do not implement a method do not need to do this.
Calling solve() again after a successful solution no longer automatically
triggers a Jacobian update. This enables relatively efficient sensitivity
analysis by sequentially perturbing the reaction multipliers and re-solving
the system. Since the perturbed system is close to the orignal, the solution
can be found after only a few steps, even when using the original Jacobian.
Change GeneralMatrix to allow derived classes to not implement QR
factorization. BandMatrix does not implement QR because this LAPACK
does not contain a QR algorithm for this matrix type.
To both check and update the cached state values. Reduces
a lot of code duplication in the use of CachedValues.
I'd like to make state1, state2, and stateNum private so
that they can only be accessed with one of the validate functions,
and also add some asserts to the validate functions that do not
use all of the state variables to ensure that the unused ones are
set to their default values to prevent the case where the wrong
validate() function is called and incorrectly determines that the
cached state is valid.
First pass at making the state variables private caused a test failure
for test_problems/statmech. The m_spthermo->update() call in
IdealGasPhase::_updateThermo() throws an exception for this test right
now that gets caught in equilibrate(). When using validate() the cached
state variable is updated before the m_spthermo->update() call and subsequently
it thinks that the thermo does not need to be updated, whereas when
cached.state1 is being set after the m_spthermo->update() call it does not get
set. The current blessed output for that test is just the text of the exception
that gets caught, so I suspect the test may not work as is.
The ValueCache class is intended to standardize the method for implementing
value caching in Cantera, and to reduce the need to introduce additional member
variables to store cached variables and the thermodynamic state at which the
cached values were computed.
The initial usage is to replace the use of the m_tlast variable in IdealGasPhase
as an example.
Rarefied gas dynamics is an import application area for Sandia, and
it represents a potentially important development direction for Cantera.
These classes provide inroads into that area.
HMWSoln: avoid recomputing lambdas if ionic strength hasn't changed.
MaskellSolidSolnPhase: Avoid recomputing activity coefficients if
r and T haven't changed.
Fix sign error in chemical potentials and update
activity coefficients accordingly.
Correct implementation of getActivityConcentrations()
Additional unit tests.