Reaction.hpp
auto lnEquilibriumConstant(const ChemicalProperties &properties) const -> ThermoScalar
Calculate the equilibrium constant of the reaction (in natural log).
Definition: Reaction.cpp:172
auto operator=(Reaction other) -> Reaction &
Assign a Reaction instance to this instance.
Definition: Reaction.cpp:106
auto setEquilibriumConstant(const ThermoScalarFunction &lnk) -> void
Set the equilibrium constant function of the reaction (in natural log scale).
Definition: Reaction.cpp:117
A class to represent a system and its attributes and properties.
Definition: ChemicalSystem.hpp:38
Define a type that describes the equation of a reaction.
Definition: ReactionEquation.hpp:36
auto equation() const -> const ReactionEquation &
Return the equation of the reaction.
Definition: Reaction.cpp:142
auto rate() const -> const ReactionRateFunction &
Return the rate function of the reaction.
Definition: Reaction.cpp:137
The namespace containing all components of the Reaktoro library.
Definition: ChemicalScalar.hpp:24
Reaction()
Construct a default Reaction instance.
Definition: Reaction.cpp:91
auto name() const -> std::string
Return the name of the reaction.
Definition: Reaction.cpp:127
auto setName(std::string name) -> void
Set the name of the reaction.
Definition: Reaction.cpp:112
A class for querying thermodynamic and chemical properties of a chemical system.
Definition: ChemicalProperties.hpp:33
std::function< ChemicalScalar(const ChemicalProperties &)> ReactionRateFunction
The function signature of the rate of a reaction (in units of mol/s).
Definition: Reaction.hpp:44
auto equilibriumConstant() const -> const ThermoScalarFunction &
Return the equilibrium constant function of the reaction.
Definition: Reaction.cpp:132
auto lnReactionQuotient(const ChemicalProperties &properties) const -> ChemicalScalar
Calculate the reaction quotient of the reaction (in natural log scale).
Definition: Reaction.cpp:197
Provide a computational representation of a chemical reaction.
Definition: Reaction.hpp:60
ChemicalScalarBase< double, RowVector > ChemicalScalar
A type that represents a chemical property and its derivatives.
Definition: ChemicalScalar.hpp:35
std::vector< Index > Indices
Define a type that represents a collection of indices.
Definition: Index.hpp:29
auto system() const -> const ChemicalSystem &
Return the chemical system instance of the reaction.
Definition: Reaction.cpp:147
ChemicalVectorBase< Vector, Vector, Vector, Matrix > ChemicalVector
A type that represents a vector of chemical properties and their derivatives.
Definition: ChemicalVector.hpp:39
auto species() const -> const std::vector< Species > &
Return the reacting species of the reaction.
Definition: Reaction.cpp:152
auto lnEquilibriumIndex(const ChemicalProperties &properties) const -> ChemicalScalar
Calculate the equilibrium index of the reaction as .
Definition: Reaction.cpp:213
std::function< ChemicalVector(const ChemicalProperties &)> ReactionRateVectorFunction
The function signature of the rates of a collection of reactions (in units of mol/s).
Definition: Reaction.hpp:50
auto setRate(const ReactionRateFunction &function) -> void
Set the rate function of the reaction (in units of mol/s).
Definition: Reaction.cpp:122
Eigen::Ref< const Eigen::VectorXd > VectorConstRef
< Alias to Eigen type Ref<VectorXd>.
Definition: Matrix.hpp:31
auto stoichiometry(std::string species) const -> double
Return the stoichiometry of a species in the reaction equation.
Definition: Reaction.cpp:167
ThermoScalarBase< double > ThermoScalar
A type that defines a scalar thermo property.
Definition: ScalarTypes.hpp:40
auto indices() const -> const Indices &
Return the indices of the reacting species of the reaction.
Definition: Reaction.cpp:157
auto stoichiometries() const -> VectorConstRef
Return the stoichiometries of the reacting species of the reaction.
Definition: Reaction.cpp:162