Reaktoro 
A unified framework for modeling chemically reactive systems
Reaktoro::Interface Class Referenceabstract

Detailed Description

A class used to interface other codes with Reaktoro.

#include <Interface.hpp>

Inheritance diagram for Reaktoro::Interface:

Public Member Functions

virtual ~Interface ()=0
 Virtual destructor.
 
virtual auto temperature () const -> double=0
 Return the temperature (in units of K)
 
virtual auto pressure () const -> double=0
 Return the pressure (in units of Pa)
 
virtual auto speciesAmounts () const -> Vector=0
 Return the amounts of the species (in units of mol)
 
virtual auto numElements () const -> unsigned=0
 Return the number of elements.
 
virtual auto numSpecies () const -> unsigned=0
 Return the number of species.
 
virtual auto numPhases () const -> unsigned=0
 Return the number of phases.
 
virtual auto numSpeciesInPhase (Index iphase) const -> unsigned=0
 Return the number of species in a phase.
 
virtual auto elementName (Index ielement) const -> std::string=0
 Return the name of an element.
 
virtual auto elementMolarMass (Index ielement) const -> double=0
 Return the molar mass of an element (in units of kg/mol)
 
virtual auto elementStoichiometry (Index ispecies, Index ielement) const -> double=0
 Return the stoichiometry of an element in a species.
 
virtual auto speciesName (Index ispecies) const -> std::string=0
 Return the name of a species.
 
virtual auto phaseName (Index iphase) const -> std::string=0
 Return the name of a phase.
 
virtual auto properties (Index iphase, double T, double P) -> PhaseThermoModelResult=0
 Return the thermodynamic properties of a phase. More...
 
virtual auto properties (Index iphase, double T, double P, const Vector &nphase) -> PhaseChemicalModelResult=0
 Return the chemical properties of a phase. More...
 
virtual auto clone () const -> std::shared_ptr< Interface >=0
 Return a clone of this Interface instance.
 
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.
 

Member Function Documentation

virtual auto Reaktoro::Interface::properties ( Index  iphase,
double  T,
double  P 
) -> PhaseThermoModelResult
pure virtual

Return the thermodynamic properties of a phase.

Parameters
iphaseThe index of the phase
TThe temperature (in units of K)
PThe pressure (in units of Pa)

Implemented in Reaktoro::Gems, and Reaktoro::Phreeqc.

virtual auto Reaktoro::Interface::properties ( Index  iphase,
double  T,
double  P,
const Vector nphase 
) -> PhaseChemicalModelResult
pure virtual

Return the chemical properties of a phase.

Parameters
iphaseThe index of the phase
TThe temperature (in units of K)
PThe pressure (in units of Pa)
nphaseThe amounts of the species in the phase (in units of mol)

Implemented in Reaktoro::Gems, and Reaktoro::Phreeqc.

auto Reaktoro::Interface::state ( const ChemicalSystem system) const -> ChemicalState

Return a ChemicalState instance created from an instance of a class derived from Interface.

Parameters
systemThe chemical system created using method system.

The documentation for this class was generated from the following files:
  • Reaktoro/Interfaces/Interface.hpp
  • Reaktoro/Interfaces/Interface.cpp