class Reaction
Declaration
class Reaction { /* full declaration omitted */ };
Description
The Reaction class is a type used to describe a reaction
Declared at: ThermoFun/Reaction.h:19
Method Overview
- public Reaction(std::string jsonReaction)
- public Reaction(const ThermoFun::Reaction & other)
- public Reaction()
- public auto calc_logK_fT_coefficients() -> ThermoFun::vd
- public auto checkCalcMethodBounds(std::string modelName, double T, double P, ThermoFun::ThermoPropertiesReaction & tpr) -> void
- public auto equation() const -> std::string
- public auto fromEquation(const std::string & reactionEquation) -> void
- public auto jsonString() const -> std::string
- public auto lowerP() const -> double
- public auto lowerT() const -> double
- public auto methodGenEOS() const -> MethodGenEoS_Thrift::type
- public auto method_P() const -> MethodCorrP_Thrift::type
- public auto method_T() const -> MethodCorrT_Thrift::type
- public auto name() const -> std::string
- public auto reactants() const -> std::map<std::string, double>
- public auto referenceP() const -> double
- public auto referenceT() const -> double
- public auto setEquation(std::string equation) -> void
- public auto setJsonString(const std::string & jString) -> void
- public auto setLowerP(double P) -> void
- public auto setLowerT(double T) -> void
- public auto setMethodGenEoS(MethodGenEoS_Thrift::type method_genEoS) -> void
- public auto setMethod_P(MethodCorrP_Thrift::type method_P) -> void
- public auto setMethod_T(MethodCorrT_Thrift::type method_T) -> void
- public auto setName(std::string name) -> void
- public auto setReactants(std::map<std::string, double> reactants) -> void
- public auto setReferenceP(double P) -> void
- public auto setReferenceT(double T) -> void
- public auto setSymbol(std::string symbol) -> void
- public auto setThermoParameters(ThermoFun::ThermoParametersReaction param) -> void
- public auto setThermoReferenceProperties(ThermoFun::ThermoPropertiesReaction refprop) -> void
- public auto setUpperP(double P) -> void
- public auto setUpperT(double T) -> void
- public auto symbol() const -> std::string
- public auto thermoParameters() const -> ThermoFun::ThermoParametersReaction
- public auto thermoReferenceProperties() const -> ThermoFun::ThermoPropertiesReaction
- public auto thermo_ref_prop() const -> ThermoFun::ThermoPropertiesReaction
- public auto upperP() const -> double
- public auto upperT() const -> double
- public virtual ~Reaction()
Methods
¶Reaction(std::string jsonReaction)
Reaction(std::string jsonReaction)
Description
Constrcut a Reaction instance from a JSON string
Declared at: ThermoFun/Reaction.h:26
Parameters
- std::string jsonReaction
¶Reaction(const ThermoFun::Reaction& other)
Reaction(const ThermoFun::Reaction& other)
Description
Construct a copy of an Reaction instance
Declared at: ThermoFun/Reaction.h:29
Parameters
- const ThermoFun::Reaction& other
¶Reaction()
Reaction()
Description
Constrcut a default Reaction instance
Declared at: ThermoFun/Reaction.h:23
¶auto calc_logK_fT_coefficients() -> ThermoFun::vd
auto calc_logK_fT_coefficients() -> ThermoFun::vd
Description
Returns the vector of logK as a function of T coefficients calculated based on the defined method and the available data
Declared at: ThermoFun/Reaction.h:157
¶auto checkCalcMethodBounds(
std::string modelName,
double T,
double P,
ThermoFun::ThermoPropertiesReaction& tpr)
-> void
auto checkCalcMethodBounds(
std::string modelName,
double T,
double P,
ThermoFun::ThermoPropertiesReaction& tpr)
-> void
Description
Checks if the method of clauclation is out of provided T and P bounds. If out of bounds sets the corresponding message inside the property status
Declared at: ThermoFun/Reaction.h:154
Parameters
- std::string modelName
- Given model name
- double T
- temparature in bar
- double P
- pressure in C
- ThermoFun::ThermoPropertiesReaction& tpr
- calculated properties of the reaction, their status message is changed is T and P is out of bounds
¶auto equation() const -> std::string
auto equation() const -> std::string
Description
Returns the equation of the Reaction
Declared at: ThermoFun/Reaction.h:103
¶auto fromEquation(
const std::string& reactionEquation) -> void
auto fromEquation(
const std::string& reactionEquation) -> void
Description
fromEquation initialize the reaction using a reaction equation
Declared at: ThermoFun/Reaction.h:93
Parameters
- const std::string& reactionEquation
- e.g. Calcite = Ca+2 + CO3-2 (use the symbols of substances!)
¶auto jsonString() const -> std::string
auto jsonString() const -> std::string
Description
jonString
Declared at: ThermoFun/Reaction.h:146
Returns
record in json string
¶auto lowerP() const -> double
auto lowerP() const -> double
Description
Return upper presure limit of the correction method (Pa)
Declared at: ThermoFun/Reaction.h:125
¶auto lowerT() const -> double
auto lowerT() const -> double
Description
Return upper temperature limit of the correction method (K)
Declared at: ThermoFun/Reaction.h:122
¶auto methodGenEOS() const
-> MethodGenEoS_Thrift::type
auto methodGenEOS() const
-> MethodGenEoS_Thrift::type
Description
Return the general EOS method code
Declared at: ThermoFun/Reaction.h:134
¶auto method_P() const -> MethodCorrP_Thrift::type
auto method_P() const -> MethodCorrP_Thrift::type
Description
Return the pressure correction method code
Declared at: ThermoFun/Reaction.h:140
¶auto method_T() const -> MethodCorrT_Thrift::type
auto method_T() const -> MethodCorrT_Thrift::type
Description
Return the temperature correction method code
Declared at: ThermoFun/Reaction.h:137
¶auto name() const -> std::string
auto name() const -> std::string
Description
Returns the name of the chemical Reaction
Declared at: ThermoFun/Reaction.h:97
¶auto reactants() const
-> std::map<std::string, double>
auto reactants() const
-> std::map<std::string, double>
Description
Returns the map of reactants symbols and their coeffiicents
Declared at: ThermoFun/Reaction.h:106
¶auto referenceP() const -> double
auto referenceP() const -> double
Description
Returns the references pressure (Pa)
Declared at: ThermoFun/Reaction.h:119
¶auto referenceT() const -> double
auto referenceT() const -> double
Description
Returns the references temperature (K)
Declared at: ThermoFun/Reaction.h:116
¶auto setEquation(std::string equation) -> void
auto setEquation(std::string equation) -> void
Description
Set the equation of the Reaction
Declared at: ThermoFun/Reaction.h:45
Parameters
- std::string equation
¶auto setJsonString(const std::string& jString)
-> void
auto setJsonString(const std::string& jString)
-> void
Description
setJsonString stores the json object of the record
Declared at: ThermoFun/Reaction.h:87
Parameters
- const std::string& jString
¶auto setLowerP(double P) -> void
auto setLowerP(double P) -> void
Description
Set upper presure limit of the correction method (Pa)
Declared at: ThermoFun/Reaction.h:60
Parameters
- double P
¶auto setLowerT(double T) -> void
auto setLowerT(double T) -> void
Description
Set upper temperature limit of the correction method (K)
Declared at: ThermoFun/Reaction.h:57
Parameters
- double T
¶auto setMethodGenEoS(
MethodGenEoS_Thrift::type method_genEoS)
-> void
auto setMethodGenEoS(
MethodGenEoS_Thrift::type method_genEoS)
-> void
Description
Set the code for general EOS calculation method
Declared at: ThermoFun/Reaction.h:69
Parameters
- MethodGenEoS_Thrift::type method_genEoS
¶auto setMethod_P(
MethodCorrP_Thrift::type method_P) -> void
auto setMethod_P(
MethodCorrP_Thrift::type method_P) -> void
Description
Set the code for the pressure correction method
Declared at: ThermoFun/Reaction.h:75
Parameters
- MethodCorrP_Thrift::type method_P
¶auto setMethod_T(
MethodCorrT_Thrift::type method_T) -> void
auto setMethod_T(
MethodCorrT_Thrift::type method_T) -> void
Description
Set the code for the temperature correction method
Declared at: ThermoFun/Reaction.h:72
Parameters
- MethodCorrT_Thrift::type method_T
¶auto setName(std::string name) -> void
auto setName(std::string name) -> void
Description
Set the name of the Reaction.
Declared at: ThermoFun/Reaction.h:39
Parameters
- std::string name
¶auto setReactants(
std::map<std::string, double> reactants)
-> void
auto setReactants(
std::map<std::string, double> reactants)
-> void
Description
Set map of reactant symbols
Declared at: ThermoFun/Reaction.h:48
Parameters
- std::map<std::string, double> reactants
¶auto setReferenceP(double P) -> void
auto setReferenceP(double P) -> void
Description
Set references pressure for the standard proeprties of reaction (Pa)
Declared at: ThermoFun/Reaction.h:54
Parameters
- double P
¶auto setReferenceT(double T) -> void
auto setReferenceT(double T) -> void
Description
Set reference temperature fo the standard properties of reaction (K)
Declared at: ThermoFun/Reaction.h:51
Parameters
- double T
¶auto setSymbol(std::string symbol) -> void
auto setSymbol(std::string symbol) -> void
Description
Set the symbol of the Reaction.
Declared at: ThermoFun/Reaction.h:42
Parameters
- std::string symbol
¶auto setThermoParameters(
ThermoFun::ThermoParametersReaction param)
-> void
auto setThermoParameters(
ThermoFun::ThermoParametersReaction param)
-> void
Description
Set the parameters used for calculating the proeprties of reaction at T and P
Declared at: ThermoFun/Reaction.h:81
Parameters
¶auto setThermoReferenceProperties(
ThermoFun::ThermoPropertiesReaction refprop)
-> void
auto setThermoReferenceProperties(
ThermoFun::ThermoPropertiesReaction refprop)
-> void
Description
Set the refereneces proeprties of reaction
Declared at: ThermoFun/Reaction.h:78
Parameters
¶auto setUpperP(double P) -> void
auto setUpperP(double P) -> void
Description
Set lower pressure limit for the correction method (Pa)
Declared at: ThermoFun/Reaction.h:66
Parameters
- double P
¶auto setUpperT(double T) -> void
auto setUpperT(double T) -> void
Description
Set lower temperature limit of the correction method (K)
Declared at: ThermoFun/Reaction.h:63
Parameters
- double T
¶auto symbol() const -> std::string
auto symbol() const -> std::string
Description
Returns the symbol of the Reaction
Declared at: ThermoFun/Reaction.h:100
¶auto thermoParameters() const
-> ThermoFun::ThermoParametersReaction
auto thermoParameters() const
-> ThermoFun::ThermoParametersReaction
Description
Returns an instance of the defined parameters of the reaction
Declared at: ThermoFun/Reaction.h:113
¶auto thermoReferenceProperties() const
-> ThermoFun::ThermoPropertiesReaction
auto thermoReferenceProperties() const
-> ThermoFun::ThermoPropertiesReaction
Description
Returns the references proeprties of the reaction
Declared at: ThermoFun/Reaction.h:109
¶auto thermo_ref_prop() const
-> ThermoFun::ThermoPropertiesReaction
auto thermo_ref_prop() const
-> ThermoFun::ThermoPropertiesReaction
Declared at: ThermoFun/Reaction.h:110
¶auto upperP() const -> double
auto upperP() const -> double
Description
Return lower pressure limit for the correction method (Pa)
Declared at: ThermoFun/Reaction.h:131
¶auto upperT() const -> double
auto upperT() const -> double
Description
Return lower temperature limit of the correction method (K)
Declared at: ThermoFun/Reaction.h:128
¶virtual ~Reaction()
virtual ~Reaction()
Description
Destroy this instance
Declared at: ThermoFun/Reaction.h:35