The check introduced in f6f868fe28 takes place too late, as the pointer to
ReactorBase.m_thermo has already been dereferenced at this point. Most compilers
let this pass, but it is techincally incorrect.
The value of this argument has almost no effect on the integrator, and
frequently confuses users since the ReactorNet can end up at a time either
greater or less than the specified time. By removing this argument, the
distinction betwen step() and advance(t) becomes much more clear.
Adds ReactorNet::reinitialize, which skips all one-time initialization and
re-uses the same CVODES integrator. The Reactor::syncState() method is
introduced for applying new initial conditions for individual Reactor objects.
This approach increases efficiency when solving many similar problems with short
integration times, for example when being used as the chemistry term integrator
in an operator-split CFD code.
This creates a single implementation of the calculation of the contributions of
walls and surface chemistry to the governing equations for all reactor types.
This reflects how the function is usually used. The old signature is now
deprecated, as is the extra argument for transfering "ownership" to the
ReactorNet object.
This function isn't actually called by CVODE (which uses its own difference
quotient method for calculating the Jacobian), so the note here isn't correct.
Change the variable named *species* to be named *component*. This
better matches the utility of this variable, since it can be used to
retrieve any of the state variables. Also, update the corresponding
documentation.
The name 'H' can mean either the species by that name or the entahlpy
of the reactor, in the case of ConstPressureReactor, and the previous
behavior always returned the index of the enthalpy.
This changes the behavior to preferentially return the species, and
adds alternative names for reactor state variables that are less
likely to generate namespace collisions: 'mass', 'volume',
'int_energy', 'enthalpy', 'temperature', 'distance', 'velocity'. The
single character names are still supported.
Resolves Issue 193.
Like IdealGasReactor, this formulation uses the temperature as a state variable
to improve performance for the common use case of reactors containing ideal gas
mixtures.
This formulation of the reactor governing equations, with temperature as a state
variable, works better for ideal gas mixtures. This way, most of the Jacobian
components are derivatives at constant temperature, eliminating the need to
recompute the temperature-dependent part of the rate expressions when computing
these entries.
Expanding the time derivative of the total internal energy only works for ideal
phases, so for the more general case it is necessary to keep the internal energy
as the state variable and use an iterative method for setting the state.
This formulation for the reactor's governing equations significantly improves
the performance of integrator, mostly by improving the quality of the
Jacobian. The effect is small for smaller mechanisms (GRI 3.0) but can lead to
order-of-magnitude improvements for mechanisms with hundreds or thousands of
species.
Since this set of variables corresponds to the intrinsic state variables used
for IdealGasPhase objects, we also eliminate the need to iterate when setting
the state of the thermo object.
Additionally, by using temperature as an independent variable, the
temperature-dependent parts of the kinetic rate expressions do not need to be
recomputed while updating the Jacobian (this optimization is not currently
implemented).