Reaktoro  v2.11.0
A unified framework for modeling chemically reactive systems
KineticsSolver Class Reference

Used for chemical kinetics calculations. More...

#include <KineticsSolver.hpp>

Public Member Functions

 KineticsSolver (ChemicalSystem const &system)
 Construct an KineticsSolver object with given chemical system.
 
 KineticsSolver (EquilibriumSpecs const &specs)
 Construct an KineticsSolver object with given chemical equilibrium specifications to be attained during chemical kinetics.
 
 KineticsSolver (KineticsSolver const &other)
 Construct a copy of an KineticsSolver object.
 
 ~KineticsSolver ()
 Destroy this KineticsSolver object.
 
auto operator= (KineticsSolver other) -> KineticsSolver &
 Assign a copy of an KineticsSolver object to this.
 
auto precondition (ChemicalState &state) -> KineticsResult
 React a chemical state for zero seconds to precondition it. More...
 
auto precondition (ChemicalState &state, EquilibriumRestrictions const &restrictions) -> KineticsResult
 React a chemical state for zero seconds to precondition it respecting given reactivity restrictions. More...
 
auto precondition (ChemicalState &state, EquilibriumConditions const &conditions) -> KineticsResult
 React a chemical state for zero seconds to precondition it respecting given constraint conditions. More...
 
auto precondition (ChemicalState &state, EquilibriumConditions const &conditions, EquilibriumRestrictions const &restrictions) -> KineticsResult
 React a chemical state for zero seconds to precondition it respecting given constraint conditions and reactivity restrictions. More...
 
auto solve (ChemicalState &state, real const &dt) -> KineticsResult
 React a chemical state for a given time interval. More...
 
auto solve (ChemicalState &state, real const &dt, EquilibriumRestrictions const &restrictions) -> KineticsResult
 React a chemical state for a given time interval respecting given reactivity restrictions. More...
 
auto solve (ChemicalState &state, real const &dt, EquilibriumConditions const &conditions) -> KineticsResult
 React a chemical state for a given time interval respecting given constraint conditions. More...
 
auto solve (ChemicalState &state, real const &dt, EquilibriumConditions const &conditions, EquilibriumRestrictions const &restrictions) -> KineticsResult
 React a chemical state for a given time interval respecting given constraint conditions and reactivity restrictions. More...
 
auto solve (ChemicalState &state, KineticsSensitivity &sensitivity, real const &dt) -> KineticsResult
 React a chemical state for a given time interval and compute sensitivity derivatives. More...
 
auto solve (ChemicalState &state, KineticsSensitivity &sensitivity, real const &dt, EquilibriumRestrictions const &restrictions) -> KineticsResult
 React a chemical state for a given time interval respecting given reactivity restrictions and compute sensitivity derivatives. More...
 
auto solve (ChemicalState &state, KineticsSensitivity &sensitivity, real const &dt, EquilibriumConditions const &conditions) -> KineticsResult
 React a chemical state for a given time interval respecting given constraint conditions and compute sensitivity derivatives. More...
 
auto solve (ChemicalState &state, KineticsSensitivity &sensitivity, real const &dt, EquilibriumConditions const &conditions, EquilibriumRestrictions const &restrictions) -> KineticsResult
 React a chemical state for a given time interval respecting given constraint conditions and reactivity restrictions and compute sensitivity derivatives. More...
 
auto setOptions (KineticsOptions const &options) -> void
 Set the options of the kinetics solver.
 

Detailed Description

Used for chemical kinetics calculations.

Member Function Documentation

◆ precondition() [1/4]

auto precondition ( ChemicalState state) -> KineticsResult

React a chemical state for zero seconds to precondition it.

Use this method when your chemical system has species that do not react kinetically and their chemical state is in complete disequilibrium. For example, right after you have set an initial chemical state with an aqueous solution phase in disequilibrium, even though all aqueous species react according to equilibrium, while the mineral phases do not. This method will apply a chemical kinetics step with zero seconds in the given chemical state. This operation will equilibrate only those species that react according to chemical equilibrium, leaving the kinetically controlled species unchanged.

Parameters
[in,out]stateThe initial guess for the calculation (in) and the computed reacted state (out)

◆ precondition() [2/4]

auto precondition ( ChemicalState state,
EquilibriumRestrictions const &  restrictions 
) -> KineticsResult

React a chemical state for zero seconds to precondition it respecting given reactivity restrictions.

Use this method when your chemical system has species that do not react kinetically and their chemical state is in complete disequilibrium. For example, right after you have set an initial chemical state with an aqueous solution phase in disequilibrium, even though all aqueous species react according to equilibrium, while the mineral phases do not. This method will apply a chemical kinetics step with zero seconds in the given chemical state. This operation will equilibrate only those species that react according to chemical equilibrium, leaving the kinetically controlled species unchanged.

Parameters
[in,out]stateThe initial guess for the calculation (in) and the computed reacted state (out)
restrictionsThe reactivity restrictions on the amounts of selected species

◆ precondition() [3/4]

auto precondition ( ChemicalState state,
EquilibriumConditions const &  conditions 
) -> KineticsResult

React a chemical state for zero seconds to precondition it respecting given constraint conditions.

Use this method when your chemical system has species that do not react kinetically and their chemical state is in complete disequilibrium. For example, right after you have set an initial chemical state with an aqueous solution phase in disequilibrium, even though all aqueous species react according to equilibrium, while the mineral phases do not. This method will apply a chemical kinetics step with zero seconds in the given chemical state. This operation will equilibrate only those species that react according to chemical equilibrium, leaving the kinetically controlled species unchanged.

Parameters
[in,out]stateThe initial guess for the calculation (in) and the computed reacted state (out)
conditionsThe specified constraint conditions to be attained during chemical kinetics

◆ precondition() [4/4]

auto precondition ( ChemicalState state,
EquilibriumConditions const &  conditions,
EquilibriumRestrictions const &  restrictions 
) -> KineticsResult

React a chemical state for zero seconds to precondition it respecting given constraint conditions and reactivity restrictions.

Use this method when your chemical system has species that do not react kinetically and their chemical state is in complete disequilibrium. For example, right after you have set an initial chemical state with an aqueous solution phase in disequilibrium, even though all aqueous species react according to equilibrium, while the mineral phases do not. This method will apply a chemical kinetics step with zero seconds in the given chemical state. This operation will equilibrate only those species that react according to chemical equilibrium, leaving the kinetically controlled species unchanged.

Parameters
[in,out]stateThe initial guess for the calculation (in) and the computed reacted state (out)
conditionsThe specified constraint conditions to be attained during chemical kinetics
restrictionsThe reactivity restrictions on the amounts of selected species

◆ solve() [1/8]

auto solve ( ChemicalState state,
real const &  dt 
) -> KineticsResult

React a chemical state for a given time interval.

Parameters
[in,out]stateThe initial guess for the calculation (in) and the computed reacted state (out)
dtThe time step in the kinetics calculation (in s).

◆ solve() [2/8]

auto solve ( ChemicalState state,
real const &  dt,
EquilibriumRestrictions const &  restrictions 
) -> KineticsResult

React a chemical state for a given time interval respecting given reactivity restrictions.

Parameters
[in,out]stateThe initial guess for the calculation (in) and the computed reacted state (out)
dtThe time step in the kinetics calculation (in s).
restrictionsThe reactivity restrictions on the amounts of selected species

◆ solve() [3/8]

auto solve ( ChemicalState state,
real const &  dt,
EquilibriumConditions const &  conditions 
) -> KineticsResult

React a chemical state for a given time interval respecting given constraint conditions.

Parameters
[in,out]stateThe initial guess for the calculation (in) and the computed reacted state (out)
dtThe time step in the kinetics calculation (in s).
conditionsThe specified constraint conditions to be attained during chemical kinetics

◆ solve() [4/8]

auto solve ( ChemicalState state,
real const &  dt,
EquilibriumConditions const &  conditions,
EquilibriumRestrictions const &  restrictions 
) -> KineticsResult

React a chemical state for a given time interval respecting given constraint conditions and reactivity restrictions.

Parameters
[in,out]stateThe initial guess for the calculation (in) and the computed reacted state (out)
dtThe time step in the kinetics calculation (in s).
conditionsThe specified constraint conditions to be attained during chemical kinetics
restrictionsThe reactivity restrictions on the amounts of selected species

◆ solve() [5/8]

auto solve ( ChemicalState state,
KineticsSensitivity sensitivity,
real const &  dt 
) -> KineticsResult

React a chemical state for a given time interval and compute sensitivity derivatives.

Parameters
[in,out]stateThe initial guess for the calculation (in) and the computed reacted state (out)
[out]sensitivityThe sensitivity derivatives of the reacted state with respect to given input conditions
dtThe time step in the kinetics calculation (in s).

◆ solve() [6/8]

auto solve ( ChemicalState state,
KineticsSensitivity sensitivity,
real const &  dt,
EquilibriumRestrictions const &  restrictions 
) -> KineticsResult

React a chemical state for a given time interval respecting given reactivity restrictions and compute sensitivity derivatives.

Parameters
[in,out]stateThe initial guess for the calculation (in) and the computed reacted state (out)
[out]sensitivityThe sensitivity derivatives of the reacted state with respect to given input conditions
dtThe time step in the kinetics calculation (in s).
restrictionsThe reactivity restrictions on the amounts of selected species

◆ solve() [7/8]

auto solve ( ChemicalState state,
KineticsSensitivity sensitivity,
real const &  dt,
EquilibriumConditions const &  conditions 
) -> KineticsResult

React a chemical state for a given time interval respecting given constraint conditions and compute sensitivity derivatives.

Parameters
[in,out]stateThe initial guess for the calculation (in) and the computed reacted state (out)
[out]sensitivityThe sensitivity derivatives of the reacted state with respect to given input conditions
dtThe time step in the kinetics calculation (in s).
conditionsThe specified constraint conditions to be attained during chemical kinetics

◆ solve() [8/8]

auto solve ( ChemicalState state,
KineticsSensitivity sensitivity,
real const &  dt,
EquilibriumConditions const &  conditions,
EquilibriumRestrictions const &  restrictions 
) -> KineticsResult

React a chemical state for a given time interval respecting given constraint conditions and reactivity restrictions and compute sensitivity derivatives.

Parameters
[in,out]stateThe initial guess for the calculation (in) and the computed reacted state (out)
[out]sensitivityThe sensitivity derivatives of the reacted state with respect to given input conditions
dtThe time step in the kinetics calculation (in s).
conditionsThe specified constraint conditions to be attained during chemical kinetics
restrictionsThe reactivity restrictions on the amounts of selected species

The documentation for this class was generated from the following file: