class ThermoEngine
Declaration
class ThermoEngine { /* full declaration omitted */ };
Description
The ThermoEngine class calculates the thermodynamic properties of the substances from the internal database. It also calculates the electro-chemical and other physico-chemical properties of the solvent
Declared at: ThermoFun/ThermoEngine.h:29
Method Overview
- public ThermoEngine(const ThermoFun::Database & database)
- public ThermoEngine(const ThermoFun::ThermoEngine & other)
- public ThermoEngine(const std::string filename)
- public auto appendData(std::string filename) -> void
- public auto appendData(std::vector<std::string> jsonRecords, std::string _label) -> void
- public auto database() const -> const ThermoFun::Database &
- public auto electroPropertiesSolvent(double T, double & P, const ThermoFun::Substance & solvent) const -> ThermoFun::ElectroPropertiesSolvent
- public auto electroPropertiesSolvent(double T, double & P, std::string solvent) const -> ThermoFun::ElectroPropertiesSolvent
- public auto parseSubstanceFormula(std::string formula) const -> std::map<Element, double>
- public auto propertiesSolvent(double T, double & P, std::string solvent) const -> ThermoFun::PropertiesSolvent
- public auto propertiesSolvent(double T, double & P, const ThermoFun::Substance & solvent) const -> ThermoFun::PropertiesSolvent
- public auto setSolventSymbol(const std::string solvent_symbol) -> void
- public auto solventSymbol() const -> std::string
- public auto thermoPropertiesReaction(double T, double & P, std::string reaction) const -> ThermoFun::ThermoPropertiesReaction
- public auto thermoPropertiesReaction(double T, double & P, const ThermoFun::Reaction & reaction) const -> ThermoFun::ThermoPropertiesReaction
- public auto thermoPropertiesReactionFromReactants(double T, double & P, std::string reaction) const -> ThermoFun::ThermoPropertiesReaction
- public auto thermoPropertiesReactionFromReactants(double T, double & P, const ThermoFun::Reaction & reaction) const -> ThermoFun::ThermoPropertiesReaction
- public auto thermoPropertiesSubstance(double T, double & P, const ThermoFun::Substance & substance) const -> ThermoFun::ThermoPropertiesSubstance
- public auto thermoPropertiesSubstance(double T, double & P, std::string substance) const -> ThermoFun::ThermoPropertiesSubstance
Methods
¶ThermoEngine(const ThermoFun::Database& database)
ThermoEngine(const ThermoFun::Database& database)
Description
Construct a Thermo instance with given Database instance
Declared at: ThermoFun/ThermoEngine.h:42
Parameters
- const ThermoFun::Database& database
¶ThermoEngine(const ThermoFun::ThermoEngine& other)
ThermoEngine(const ThermoFun::ThermoEngine& other)
Description
Construct a copy of an ThermoEngine instance
Declared at: ThermoFun/ThermoEngine.h:45
Parameters
- const ThermoFun::ThermoEngine& other
¶ThermoEngine(const std::string filename)
ThermoEngine(const std::string filename)
Description
Construct a new Thermo Engine object
Declared at: ThermoFun/ThermoEngine.h:39
Parameters
- const std::string filename
- name/path of the file or a string containing a ThermoDataSet in JSON format
¶auto appendData(std::string filename) -> void
auto appendData(std::string filename) -> void
Description
appendData append records to the database from a file
Declared at: ThermoFun/ThermoEngine.h:60
Parameters
- std::string filename
- name/path of the file or a string containing a ThermoDataSet in JSON format
¶auto appendData(
std::vector<std::string> jsonRecords,
std::string _label) -> void
auto appendData(
std::vector<std::string> jsonRecords,
std::string _label) -> void
Description
appendData append records to the database from a vector of JSON strings Records with the same symbol will be overwritten!
Declared at: ThermoFun/ThermoEngine.h:69
Parameters
- std::vector<std::string> jsonRecords
- vector of records in JSON string format
- std::string _label
¶auto database() const
-> const ThermoFun::Database&
auto database() const
-> const ThermoFun::Database&
Description
Returns the instance of the database present inside thermo
Declared at: ThermoFun/ThermoEngine.h:54
¶auto electroPropertiesSolvent(
double T,
double& P,
const ThermoFun::Substance& solvent) const
-> ThermoFun::ElectroPropertiesSolvent
auto electroPropertiesSolvent(
double T,
double& P,
const ThermoFun::Substance& solvent) const
-> ThermoFun::ElectroPropertiesSolvent
Description
Calculate the electro-chemical properties of a substance.
Declared at: ThermoFun/ThermoEngine.h:94
Parameters
- double T
- The temperature value (in units of K)
- double& P
- The pressure value (in units of Pa)
- const ThermoFun::Substance& solvent
- substance solvent object
¶auto electroPropertiesSolvent(double T,
double& P,
std::string solvent)
const -> ThermoFun::ElectroPropertiesSolvent
auto electroPropertiesSolvent(double T,
double& P,
std::string solvent)
const -> ThermoFun::ElectroPropertiesSolvent
Description
Calculate the electro-chemical properties of a substance.
Declared at: ThermoFun/ThermoEngine.h:88
Parameters
- double T
- The temperature value (in units of K)
- double& P
- The pressure value (in units of Pa)
- std::string solvent
- The symbol of the substance solvent
¶auto parseSubstanceFormula(std::string formula)
const -> std::map<Element, double>
auto parseSubstanceFormula(std::string formula)
const -> std::map<Element, double>
Description
Pareses a given substance formula present in the database
Declared at: ThermoFun/ThermoEngine.h:136
Parameters
- std::string formula
Returns
map of Elements and coefficients
¶auto propertiesSolvent(double T,
double& P,
std::string solvent) const
-> ThermoFun::PropertiesSolvent
auto propertiesSolvent(double T,
double& P,
std::string solvent) const
-> ThermoFun::PropertiesSolvent
Description
Calculate the physical properties of a substance.
Declared at: ThermoFun/ThermoEngine.h:100
Parameters
- double T
- The temperature value (in units of K)
- double& P
- The pressure value (in units of Pa)
- std::string solvent
- The symbol of the substance solvent
¶auto propertiesSolvent(
double T,
double& P,
const ThermoFun::Substance& solvent) const
-> ThermoFun::PropertiesSolvent
auto propertiesSolvent(
double T,
double& P,
const ThermoFun::Substance& solvent) const
-> ThermoFun::PropertiesSolvent
Description
Calculate the physical properties of a substance.
Declared at: ThermoFun/ThermoEngine.h:106
Parameters
- double T
- The temperature value (in units of K)
- double& P
- The pressure value (in units of Pa)
- const ThermoFun::Substance& solvent
- substance solvent object
¶auto setSolventSymbol(
const std::string solvent_symbol) -> void
auto setSolventSymbol(
const std::string solvent_symbol) -> void
Description
Sets the symbol of the solvent which is used to calculate properties using the thermo instance
Declared at: ThermoFun/ThermoEngine.h:48
Parameters
- const std::string solvent_symbol
¶auto solventSymbol() const -> std::string
auto solventSymbol() const -> std::string
Description
Returns the symbol of the solvent which is used to calculate properties using the thermo instance
Declared at: ThermoFun/ThermoEngine.h:51
¶auto thermoPropertiesReaction(
double T,
double& P,
std::string reaction) const
-> ThermoFun::ThermoPropertiesReaction
auto thermoPropertiesReaction(
double T,
double& P,
std::string reaction) const
-> ThermoFun::ThermoPropertiesReaction
Description
Calculate the thermodynamic properties of a reaction.
Declared at: ThermoFun/ThermoEngine.h:113
Parameters
- double T
- The temperature value (in units of K)
- double& P
- The pressure value (in units of Pa)
- std::string reaction
- The symbol of the reaction
¶auto thermoPropertiesReaction(
double T,
double& P,
const ThermoFun::Reaction& reaction) const
-> ThermoFun::ThermoPropertiesReaction
auto thermoPropertiesReaction(
double T,
double& P,
const ThermoFun::Reaction& reaction) const
-> ThermoFun::ThermoPropertiesReaction
Description
Calculate the thermodynamic properties of a reaction.
Declared at: ThermoFun/ThermoEngine.h:119
Parameters
- double T
- The temperature value (in units of K)
- double& P
- The pressure value (in units of Pa)
- const ThermoFun::Reaction& reaction
- the reaction object
¶auto thermoPropertiesReactionFromReactants(
double T,
double& P,
std::string reaction) const
-> ThermoFun::ThermoPropertiesReaction
auto thermoPropertiesReactionFromReactants(
double T,
double& P,
std::string reaction) const
-> ThermoFun::ThermoPropertiesReaction
Description
Calculate the thermodynamic properties of a reaction from the substances participating in the reaction.
Declared at: ThermoFun/ThermoEngine.h:125
Parameters
- double T
- The temperature value (in units of K)
- double& P
- The pressure value (in units of Pa)
- std::string reaction
- The symbol of the reaction
¶auto thermoPropertiesReactionFromReactants(
double T,
double& P,
const ThermoFun::Reaction& reaction) const
-> ThermoFun::ThermoPropertiesReaction
auto thermoPropertiesReactionFromReactants(
double T,
double& P,
const ThermoFun::Reaction& reaction) const
-> ThermoFun::ThermoPropertiesReaction
Description
Calculate the thermodynamic properties of a reaction from the substances participating in the reaction.
Declared at: ThermoFun/ThermoEngine.h:131
Parameters
- double T
- The temperature value (in units of K)
- double& P
- The pressure value (in units of Pa)
- const ThermoFun::Reaction& reaction
- the reaction object
¶auto thermoPropertiesSubstance(
double T,
double& P,
const ThermoFun::Substance& substance) const
-> ThermoFun::ThermoPropertiesSubstance
auto thermoPropertiesSubstance(
double T,
double& P,
const ThermoFun::Substance& substance) const
-> ThermoFun::ThermoPropertiesSubstance
Description
Calculate the thermodynamic properties of a substance.
Declared at: ThermoFun/ThermoEngine.h:82
Parameters
- double T
- The temperature value (in units of K)
- double& P
- The pressure value (in units of Pa)
- const ThermoFun::Substance& substance
- substance object
¶auto thermoPropertiesSubstance(
double T,
double& P,
std::string substance) const
-> ThermoFun::ThermoPropertiesSubstance
auto thermoPropertiesSubstance(
double T,
double& P,
std::string substance) const
-> ThermoFun::ThermoPropertiesSubstance
Description
Calculate the thermodynamic properties of a substance.
Declared at: ThermoFun/ThermoEngine.h:76
Parameters
- double T
- The temperature value (in units of K)
- double& P
- The pressure value (in units of Pa)
- std::string substance
- The symbol of the substance