setStateTP instead of setTemperature and setPressure. Main motivation
is that the IonsFromNeutralVPSSTP child class has setTemperature and
setPressure functions that call setStateTP so this reduces duplicate
work in that case.
gradient (T, X, V) values that it uses to compute fluxes. These
are never changed by the LiquidTransport object so there is no
reason to have them stored locally rather than just holding a pointer
to the data.
and the state of the neutralMoleculePhase_ is updated by the
VPSSIonsFromNeutral phase object that the PDSS_IonsFromNeutral
species object belongs to. Remove neutralMoleculePhase_->setState
calls from PDSS_IonsFromNeutral to avoid duplicate work, and make
it a const * to reflect that.
model for molten salts.
Summary:
- Division is expensive, replace repeated division with multiplication
by stored 1/x.
- New and delete are expensive, make working vectors in some functions
static so that they are not repeatedly instantiated and deleted.
- Reorder a few loops to reduce computation and hopefully cache misses.
Sometimes, while trying to solve the steady-state problem, the Newton solver
would get stuck in a loop where it couldn't find a suitable damping ratio even
after re-revaluating the Jacobian, causing it to get stuck in an loop where it
would keep re-evaluating the Jacobian at the same point (i.e. without having
made a successful damped step).
This change detects this condition and stops the Newton solver so that the 1D
solver can advance the solution by timestepping before trying to solve the
steady-state problem again.
Points which are needed to satisfy the 'ratio' requirement are not removed when
pruning. Previously, it was possible for the solver to get stuck in a loop where
the same points were added and removed after successive grid refinements.
Running Sim1D::solve with loglevel set to 7 or higher will now save the solution
after each attempted steady-state solution, after timestepping, and after
regridding to the file 'debug_sim1d.xml'. This can be useful for diagnosing
convergence issues with some problems.
dimensions in the problem and default it to 1. At present this is
only passed through to the LiquidTransport constructor.
Remove LiquidTransport member m_nDim since the base Transport class
already stores m_nDim.
Don't set m_nDim to 1 in LiquidTransport constructor, it is set by
the Transport constructor.
This allows use of more extensive warning settings for the code that's actually
part of Cantera without generating excessive warnings on code automatically
generated code (e.g. f2c) or code that isn't part of Cantera proper (e.g. gtest,
libexecstream).
instead of int to match the definition for the base Transport class.
Prior to this LiquidTransport::getSpeciesFluxesES was not overriding
the virtual Transport::getSpeciesFluxesES because the prototypes
differed.
A sign error when limiting the temperature step caused the solver to fail if
the initial temperature was higher than sqrt(Tlow*Thigh).
Cherry-picked from trunk (r1883).
For reactions with unity reactant stoichiometric coefficients, explicit values
for the forward reaction order were being ignored while setting up the
StoichManager.
Cherry-picked from trunk (r1802).