Gems Class Reference
A wrapper class for Gems code. More...
#include <Gems.hpp>
Inheritance diagram for Gems:
Collaboration diagram for Gems:
Public Member Functions | |
| Gems () | |
| Construct a default Gems instance. | |
| Gems (std::string filename) | |
| Construct a Gems instance from a specification file. More... | |
| virtual | ~Gems () |
| Destroy this Gems instance. | |
| virtual auto | temperature () const -> double |
| Return the temperature (in units of K) | |
| virtual auto | pressure () const -> double |
| Return the pressure (in units of Pa) | |
| virtual auto | speciesAmounts () const -> Vector |
| Return the amounts of the species (in units of mol) | |
| virtual auto | numElements () const -> unsigned |
| Return the number of elements. | |
| virtual auto | numSpecies () const -> unsigned |
| Return the number of species. | |
| virtual auto | numPhases () const -> unsigned |
| Return the number of phases. | |
| virtual auto | numSpeciesInPhase (Index iphase) const -> unsigned |
| Return the number of species in a phase. | |
| virtual auto | elementName (Index ielement) const -> std::string |
| Return the name of an element. | |
| virtual auto | elementMolarMass (Index ielement) const -> double |
| Return the molar mass of an element (in units of kg/mol) | |
| virtual auto | elementStoichiometry (Index ispecies, Index ielement) const -> double |
| Return the stoichiometry of an element in a species. | |
| virtual auto | speciesName (Index ispecies) const -> std::string |
| Return the name of a species. | |
| virtual auto | phaseName (Index iphase) const -> std::string |
| Return the name of a phase. | |
| virtual auto | properties (ThermoModelResult &res, double T, double P) -> void |
| Return the thermodynamic properties of the phases and its species. More... | |
| virtual auto | properties (ChemicalModelResult &res, double T, double P, VectorConstRef n) -> void |
| Return the chemical properties of the phases and its species. More... | |
| virtual auto | clone () const -> std::shared_ptr< Interface > |
| Return a clone of this Gems instance. | |
| auto | set (double T, double P) -> void |
| Set the temperature and pressure of the Gems instance. More... | |
| auto | set (double T, double P, VectorConstRef n) -> void |
| Set the temperature, pressure and molar composition of the Gems instance. More... | |
| auto | setOptions (const GemsOptions &options) -> void |
| Set the options of the Gems instance. | |
| auto | equilibrate (double T, double P, VectorConstRef b) -> void |
| Calculate the equilibrium state of the system. More... | |
| auto | converged () const -> bool |
| Return the convergence result of the equilibrium calculation. | |
| auto | numIterations () const -> unsigned |
| Return the number of iterations of the equilibrium calculation. | |
| auto | elapsedTime () const -> double |
| Return the wall time of the equilibrium calculation (in units of s) | |
| auto | node () const -> std::shared_ptr< TNode > |
| Return a shared pointer to the TNode instance of Gems. | |
Public Member Functions inherited from Interface | |
| virtual | ~Interface ()=0 |
| Virtual destructor. | |
| auto | formulaMatrix () const -> Matrix |
| Return the formula matrix of the species. | |
| auto | indexElement (std::string element) const -> Index |
| Return the index of an element. | |
| auto | indexSpecies (std::string species) const -> Index |
| Return the index of a species. | |
| auto | indexPhase (std::string phase) const -> Index |
| Return the index of a phase. | |
| auto | indexPhaseWithSpecies (Index ispecies) const -> Index |
| Return the index of the phase with a species. | |
| auto | indexFirstSpeciesInPhase (Index iphase) const -> Index |
| Return the index of the first species in a phase. | |
| auto | system () const -> ChemicalSystem |
| Return a ChemicalSystem instance created from an instance of a class derived from Interface. | |
| auto | state (const ChemicalSystem &system) const -> ChemicalState |
| Return a ChemicalState instance created from an instance of a class derived from Interface. More... | |
| operator ChemicalSystem () const | |
| Convert the classes derived from Interface into a ChemicalSystem instance. | |
Detailed Description
A wrapper class for Gems code.
Constructor & Destructor Documentation
◆ Gems()
| Gems | ( | std::string | filename | ) |
Construct a Gems instance from a specification file.
- Parameters
-
filename The name of the file containing the definition of the chemical system
Member Function Documentation
◆ properties() [1/2]
|
virtual |
Return the thermodynamic properties of the phases and its species.
- Parameters
-
iphase The index of the phase T The temperature (in units of K) P The pressure (in units of Pa)
Implements Interface.
◆ properties() [2/2]
|
virtual |
Return the chemical properties of the phases and its species.
- Parameters
-
T The temperature (in units of K) P The pressure (in units of Pa) n The amounts of the species (in units of mol)
Implements Interface.
◆ set() [1/2]
| auto set | ( | double | T, |
| double | P | ||
| ) | -> void |
Set the temperature and pressure of the Gems instance.
- Parameters
-
T The temperature (in units of K) P The pressure (in units of Pa)
◆ set() [2/2]
| auto set | ( | double | T, |
| double | P, | ||
| VectorConstRef | n | ||
| ) | -> void |
Set the temperature, pressure and molar composition of the Gems instance.
- Parameters
-
T The temperature (in units of K) P The pressure (in units of Pa) n The composition of the species (in units of mol)
◆ equilibrate()
| auto equilibrate | ( | double | T, |
| double | P, | ||
| VectorConstRef | b | ||
| ) | -> void |
Calculate the equilibrium state of the system.
- Parameters
-
T The temperature for the equilibrium calculation (in units of K) P The pressure for the equilibrium calculation (in units of Pa) n The amounts of the elements (in units of mol)
The documentation for this class was generated from the following files:
- Reaktoro/Interfaces/Gems.hpp
- Reaktoro/Interfaces/Gems.cpp
Public Member Functions inherited from