A class template handling ReactionRate specializations. More...
#include <MultiRate.h>
A class template handling ReactionRate specializations.
Definition at line 21 of file MultiRate.h.
Public Member Functions | |
| string | type () override |
| Identifier of reaction rate type. | |
| void | add (size_t rxn_index, ReactionRate &rate) override |
| Add reaction rate object to the evaluator. | |
| bool | replace (size_t rxn_index, ReactionRate &rate) override |
| Replace reaction rate object handled by the evaluator. | |
| void | resize (Kinetics &kin) override |
| Update array sizes that depend on number of species, reactions or phases. | |
| void | getRateConstants (span< double > kf) override |
| Evaluate all rate constants handled by the evaluator. | |
| void | modifyRateConstants (span< double > kf, span< double > kr) override |
| For certain reaction types that do not follow mass action kinetics (for example, Butler-Volmer), calculate modifications to the forward and reverse rate constants. | |
| void | processRateConstants_ddT (span< double > rop, span< const double > kf, double deltaT) override |
| Evaluate all rate constant temperature derivatives handled by the evaluator; which are multiplied with the array of rate-of-progress variables. | |
| void | processRateConstants_ddP (span< double > rop, span< const double > kf, double deltaP) override |
| Evaluate all rate constant pressure derivatives handled by the evaluator; which are multiplied with the array of rate-of-progress variables. | |
| void | processRateConstants_ddM (span< double > rop, span< const double > kf, double deltaM, bool overwrite=true) override |
| Evaluate all rate constant third-body derivatives handled by the evaluator; which are multiplied with the array of rate-of-progress variables. | |
| void | update (double T) override |
| Update common reaction rate data based on temperature. | |
| void | update (double T, double extra) override |
| Update common reaction rate data based on temperature and extra parameter. | |
| void | update (double T, span< const double > extra) override |
| Update common reaction rate data based on temperature and extra parameter. | |
| bool | update (const ThermoPhase &phase, const Kinetics &kin) override |
| Update data common to reaction rates of a specific type. | |
| double | evalSingle (ReactionRate &rate) override |
| Get the rate for a single reaction. | |
| DataType & | sharedData () |
| Access the underlying shared data object. | |
| virtual string | type ()=0 |
| Identifier of reaction rate type. | |
| virtual void | add (size_t rxn_index, ReactionRate &rate)=0 |
| Add reaction rate object to the evaluator. | |
| virtual bool | replace (size_t rxn_index, ReactionRate &rate)=0 |
| Replace reaction rate object handled by the evaluator. | |
| virtual void | resize (Kinetics &kin)=0 |
| Update array sizes that depend on number of species, reactions or phases. | |
| virtual void | getRateConstants (span< double > kf)=0 |
| Evaluate all rate constants handled by the evaluator. | |
| virtual void | modifyRateConstants (span< double > kf, span< double > kr)=0 |
| For certain reaction types that do not follow mass action kinetics (for example, Butler-Volmer), calculate modifications to the forward and reverse rate constants. | |
| virtual void | processRateConstants_ddT (span< double > rop, span< const double > kf, double deltaT)=0 |
| Evaluate all rate constant temperature derivatives handled by the evaluator; which are multiplied with the array of rate-of-progress variables. | |
| virtual void | processRateConstants_ddP (span< double > rop, span< const double > kf, double deltaP)=0 |
| Evaluate all rate constant pressure derivatives handled by the evaluator; which are multiplied with the array of rate-of-progress variables. | |
| virtual void | processRateConstants_ddM (span< double > rop, span< const double > kf, double deltaM, bool overwrite=true)=0 |
| Evaluate all rate constant third-body derivatives handled by the evaluator; which are multiplied with the array of rate-of-progress variables. | |
| virtual void | update (double T)=0 |
| Update common reaction rate data based on temperature. | |
| virtual void | update (double T, double extra)=0 |
| Update common reaction rate data based on temperature and extra parameter. | |
| virtual void | update (double T, span< const double > extra)=0 |
| Update common reaction rate data based on temperature and extra parameter. | |
| virtual bool | update (const ThermoPhase &phase, const Kinetics &kin)=0 |
| Update data common to reaction rates of a specific type. | |
| virtual double | evalSingle (ReactionRate &rate)=0 |
| Get the rate for a single reaction. | |
Protected Member Functions | |
| void | _update () |
| Helper function to process updates. | |
Protected Attributes | |
| vector< pair< size_t, RateType > > | m_rxn_rates |
| Vector of pairs of reaction rates indices and reaction rates. | |
| map< size_t, size_t > | m_indices |
| DataType | m_shared |
| Mapping of indices. | |
|
inlineoverridevirtual |
Identifier of reaction rate type.
Implements MultiRateBase.
Definition at line 30 of file MultiRate.h.
|
inlineoverridevirtual |
Add reaction rate object to the evaluator.
| rxn_index | index of reaction |
| rate | reaction rate object |
Implements MultiRateBase.
Definition at line 38 of file MultiRate.h.
|
inlineoverridevirtual |
Replace reaction rate object handled by the evaluator.
| rxn_index | index of reaction |
| rate | reaction rate object |
Implements MultiRateBase.
Definition at line 44 of file MultiRate.h.
|
inlineoverridevirtual |
Update array sizes that depend on number of species, reactions or phases.
Implements MultiRateBase.
Definition at line 64 of file MultiRate.h.
|
inlineoverridevirtual |
Evaluate all rate constants handled by the evaluator.
| kf | array of rate constants |
Implements MultiRateBase.
Definition at line 69 of file MultiRate.h.
|
inlineoverridevirtual |
For certain reaction types that do not follow mass action kinetics (for example, Butler-Volmer), calculate modifications to the forward and reverse rate constants.
| [in,out] | kf | On input, contains the rate constants as computed by getRateConstants(). The output value is updated by the reactant StoichManagerN to determine the forward rates of progress. |
| [in,out] | kr | On input, contains the reverse rate constants computed from the forward rate constants and the equilibrium constants. The output value is updated by the product StoichManagerN to determine the reverse rates of progress. |
Implements MultiRateBase.
Definition at line 75 of file MultiRate.h.
|
inlineoverridevirtual |
Evaluate all rate constant temperature derivatives handled by the evaluator; which are multiplied with the array of rate-of-progress variables.
Depending on the implementation of a rate object, either an exact derivative or a numerical approximation may be used.
| [in,out] | rop | array of rop, which is modified by the method; contains rop on input, and d(rop)/dT on output |
| kf | array of forward rate constants (numerical derivative only) | |
| deltaT | relative temperature perturbation (numerical derivative only) |
Implements MultiRateBase.
Definition at line 83 of file MultiRate.h.
|
inlineoverridevirtual |
Evaluate all rate constant pressure derivatives handled by the evaluator; which are multiplied with the array of rate-of-progress variables.
| [in,out] | rop | array of rop, which is modified by the method; contains rop on input, and d(rop)/dP on output |
| kf | array of forward rate constants | |
| deltaP | relative pressure perturbation |
Implements MultiRateBase.
Definition at line 110 of file MultiRate.h.
|
inlineoverridevirtual |
Evaluate all rate constant third-body derivatives handled by the evaluator; which are multiplied with the array of rate-of-progress variables.
| [in,out] | rop | array of rop, which is modified by the method; contains rop on input, and d(rop)/dM on output |
| kf | array of forward rate constants | |
| deltaM | relative perturbation of third-body concentrations | |
| overwrite | if true, rop entries not affected by M are set to zero |
Implements MultiRateBase.
Definition at line 135 of file MultiRate.h.
|
inlineoverridevirtual |
Update common reaction rate data based on temperature.
Only used in conjunction with evalSingle and ReactionRate::eval
| T | temperature [K] |
Implements MultiRateBase.
Definition at line 167 of file MultiRate.h.
|
inlineoverridevirtual |
Update common reaction rate data based on temperature and extra parameter.
Only used in conjunction with evalSingle and ReactionRate::eval
| T | temperature [K] |
| extra | extra parameter (depends on parameterization) |
Implements MultiRateBase.
Definition at line 172 of file MultiRate.h.
|
inlineoverridevirtual |
Update common reaction rate data based on temperature and extra parameter.
Only used in conjunction with evalSingle and ReactionRate::eval
| T | temperature [K] |
| extra | extra vector parameter (depends on parameterization) |
Implements MultiRateBase.
Definition at line 177 of file MultiRate.h.
|
inlineoverridevirtual |
Update data common to reaction rates of a specific type.
This update mechanism is used by Kinetics reaction rate evaluators.
| phase | object representing reacting phase |
| kin | object representing kinetics |
Implements MultiRateBase.
Definition at line 182 of file MultiRate.h.
|
inlineoverridevirtual |
Get the rate for a single reaction.
Used to implement ReactionRate::eval, which allows for the evaluation of a reaction rate expression outside of Kinetics reaction rate evaluators. Mainly used for testing purposes.
Implements MultiRateBase.
Definition at line 192 of file MultiRate.h.
|
inline |
Access the underlying shared data object.
Used for setting up ReactionDataDelegator instances.
Definition at line 202 of file MultiRate.h.
|
inlineprotected |
Helper function to process updates.
Definition at line 208 of file MultiRate.h.
|
protected |
Vector of pairs of reaction rates indices and reaction rates.
Definition at line 217 of file MultiRate.h.
|
protected |
Definition at line 218 of file MultiRate.h.
|
protected |
Mapping of indices.
Definition at line 219 of file MultiRate.h.