Reaktoro 
A unified framework for modeling chemically reactive systems
Reaktoro::GaseousPhase Class Reference

Detailed Description

Class that defines a gaseous phase.

#include <GaseousPhase.hpp>

Inheritance diagram for Reaktoro::GaseousPhase:
Collaboration diagram for Reaktoro::GaseousPhase:

Public Member Functions

 GaseousPhase ()
 Construct a default GaseousPhase instance.
 
 GaseousPhase (const GaseousMixture &mixture)
 Construct an GaseousPhase instance with given gaseous mixture. More...
 
auto setChemicalModelIdeal () -> GaseousPhase &
 Set the chemical model of the phase with the ideal gas equation of state.
 
auto setChemicalModelVanDerWaals () -> GaseousPhase &
 Set the chemical model of the phase with the van der Waals equation of state. More...
 
auto setChemicalModelRedlichKwong () -> GaseousPhase &
 Set the chemical model of the phase with the Redlich-Kwong equation of state. More...
 
auto setChemicalModelSoaveRedlichKwong () -> GaseousPhase &
 Set the chemical model of the phase with the Soave-Redlich-Kwong equation of state. More...
 
auto setChemicalModelPengRobinson () -> GaseousPhase &
 Set the chemical model of the phase with the Peng-Robinson equation of state. More...
 
auto setChemicalModelSpycherPruessEnnis () -> GaseousPhase &
 Set the chemical model of the phase with the Spycher et al. More...
 
auto setChemicalModelSpycherReed () -> GaseousPhase &
 Set the chemical model of the phase with the Spycher and Reed (1988) equation of state. More...
 
auto mixture () const -> const GaseousMixture &
 Return the GaseousMixture instance.
 
- Public Member Functions inherited from Reaktoro::Phase
 Phase ()
 Construct a default Phase instance.
 
auto setName (std::string name) -> void
 Set the name of the phase.
 
auto setType (PhaseType type) -> void
 Set the type of the phase.
 
auto setSpecies (const std::vector< Species > &species) -> void
 Set the species of the phase.
 
auto setThermoModel (const PhaseThermoModel &model) -> void
 Set the function that calculates the standard thermodynamic properties of the phase.
 
auto setChemicalModel (const PhaseChemicalModel &model) -> void
 Set the function that calculates the chemical properties of the phase.
 
auto numElements () const -> unsigned
 Return the number of elements in the phase.
 
auto numSpecies () const -> unsigned
 Return the number of species in the phase.
 
auto name () const -> std::string
 Return the name of the phase.
 
auto type () const -> PhaseType
 Return the type of the phase.
 
auto elements () const -> const std::vector< Element > &
 Return the elements of the phase.
 
auto elements () -> std::vector< Element > &
 Return the elements of the phase.
 
auto species () const -> const std::vector< Species > &
 Return the species of the phase.
 
auto species () -> std::vector< Species > &
 Return the species of the phase.
 
auto species (Index index) const -> const Species &
 Return the species of the phase with a given index.
 
auto isFluid () const -> bool
 Return true if the state of matter of the phase is fluid, i.e., liquid, gas, or plasma.
 
auto isSolid () const -> bool
 Return true if the phase type is solid.
 
auto thermoModel () const -> const PhaseThermoModel &
 Return the thermodynamic model function of the phase. More...
 
auto chemicalModel () const -> const PhaseChemicalModel &
 Return the chemical model function of the phase. More...
 
auto indexSpecies (std::string name) const -> Index
 Return the index of a species in the phase. More...
 
auto indexSpeciesWithError (std::string name) const -> Index
 Return the index of a species in the system. More...
 
auto indexSpeciesAny (const std::vector< std::string > &names) const -> Index
 Return the index of the first species in the phase with any of the given names. More...
 
auto indexSpeciesAnyWithError (const std::vector< std::string > &names) const -> Index
 Return the index of the first species in the phase with any of the given names. More...
 
auto properties (double T, double P) const -> PhaseThermoProperties
 Return the calculated standard thermodynamic properties of the species.
 
auto properties (double T, double P, const Vector &n) const -> PhaseChemicalProperties
 Return the calculated chemical properties of the phase and its species.
 

Constructor & Destructor Documentation

Reaktoro::GaseousPhase::GaseousPhase ( const GaseousMixture mixture)
explicit

Construct an GaseousPhase instance with given gaseous mixture.

The Peng-Robinson equation of state is chosen by default to calculate the thermodynamic and chemical properties of this GaseousPhase object.

Member Function Documentation

auto Reaktoro::GaseousPhase::setChemicalModelVanDerWaals ( ) -> GaseousPhase&

Set the chemical model of the phase with the van der Waals equation of state.

Reference: van der Waals, J.D. (1910). The equation of state for gases and liquids. Nobel Lectures in Physics. pp. 254-265.

auto Reaktoro::GaseousPhase::setChemicalModelRedlichKwong ( ) -> GaseousPhase&

Set the chemical model of the phase with the Redlich-Kwong equation of state.

Reference: Redlich, O., Kwong, J.N.S. (1949). On The Thermodynamics of Solutions. Chem. Rev. 44(1) 233–244.

auto Reaktoro::GaseousPhase::setChemicalModelSoaveRedlichKwong ( ) -> GaseousPhase&

Set the chemical model of the phase with the Soave-Redlich-Kwong equation of state.

Reference: Soave, G. (1972). Equilibrium constants from a modified Redlich-Kwong equation of state, Chem. Eng. Sci., 27, 1197-1203.

auto Reaktoro::GaseousPhase::setChemicalModelPengRobinson ( ) -> GaseousPhase&

Set the chemical model of the phase with the Peng-Robinson equation of state.

Reference: Peng, D.Y., Robinson, D.B. (1976). A New Two-Constant Equation of State. Industrial and Engineering Chemistry: Fundamentals 15: 59–64.

auto Reaktoro::GaseousPhase::setChemicalModelSpycherPruessEnnis ( ) -> GaseousPhase&

Set the chemical model of the phase with the Spycher et al.

(2003) equation of state. This model only supports the gaseous species H2O(g) and CO2(g). Any other species will result in a runtime error. Reference: Spycher, N., Pruess, K., Ennis-King, J. (2003). CO2-H2O mixtures in the geological sequestration of CO2. I. Assessment and calculation of mutual solubilities from 12 to 100°C and up to 600 bar. Geochimica et Cosmochimica Acta, 67(16), 3015–3031.

auto Reaktoro::GaseousPhase::setChemicalModelSpycherReed ( ) -> GaseousPhase&

Set the chemical model of the phase with the Spycher and Reed (1988) equation of state.

This model only supports the gaseous species H2O(g), CO2(g), and CH4(g). Any other species will result in a runtime error. Reference: Spycher, N., Reed, M. (1988). Fugacity coefficients of H2, CO2, CH4, H2O and of H2O–CO2–CH4 mixtures: A virial equation treatment for moderate pressures and temperatures applicable to calculations of hydrothermal boiling. Geochimica et Cosmochimica Acta, 52(3), 739–749.


The documentation for this class was generated from the following files:
  • Reaktoro/Thermodynamics/Phases/GaseousPhase.hpp
  • Reaktoro/Thermodynamics/Phases/GaseousPhase.cpp