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

Detailed Description

Defines a cubic equation of state and calculates thermodynamic properties of a fluid phase.

#include <CubicEOS.hpp>

Classes

struct  InteractionParamsArgs
 
struct  InteractionParamsResult
 
struct  Result
 

Public Types

enum  Model { VanDerWaals, RedlichKwong, SoaveRedlichKwong, PengRobinson }
 Defines the enumeration of available cubic EOS models.
 
using InteractionParamsFunction = std::function< InteractionParamsResult(const InteractionParamsArgs &)>
 

Public Member Functions

 CubicEOS (unsigned nspecies)
 Construct a CubicEOS instance with given number of species. More...
 
 CubicEOS (const CubicEOS &other)
 Construct a copy of a CubicEOS instance.
 
virtual ~CubicEOS ()
 Destroy this CubicEOS instance.
 
auto operator= (CubicEOS other) -> CubicEOS &
 Assign a CubicEOS instance to this.
 
auto numSpecies () const -> unsigned
 Return the number of species in the phase.
 
auto setModel (Model model) -> void
 Set the type of the cubic equation of state (default: PengRobinson). More...
 
auto setPhaseAsLiquid () -> void
 Set the equation of state to compute properties for a liquid phase.
 
auto setPhaseAsVapor () -> void
 Set the equation of state to compute properties for a vapor phase.
 
auto setCriticalTemperatures (const std::vector< double > &values) -> void
 Set the critical temperatures of the species (in units of K).
 
auto setCriticalPressures (const std::vector< double > &values) -> void
 Set the critical pressures of the species (in units of Pa).
 
auto setAcentricFactors (const std::vector< double > &values) -> void
 Set the acentric factors of the species.
 
auto setInteractionParamsFunction (const InteractionParamsFunction &func) -> void
 Set the function that calculates the interaction parameters kij and its temperature derivatives. More...
 
auto operator() (const ThermoScalar &T, const ThermoScalar &P, const ChemicalVector &x) -> Result
 Calculate the thermodynamic properties of the phase. More...
 

Constructor & Destructor Documentation

Reaktoro::CubicEOS::CubicEOS ( unsigned  nspecies)
explicit

Construct a CubicEOS instance with given number of species.

Parameters
nspeciesThe number of species in the phase.

Member Function Documentation

auto Reaktoro::CubicEOS::setModel ( Model  model) -> void

Set the type of the cubic equation of state (default: PengRobinson).

See also
Model
auto Reaktoro::CubicEOS::setInteractionParamsFunction ( const InteractionParamsFunction &  func) -> void

Set the function that calculates the interaction parameters kij and its temperature derivatives.

See also
InteractionParamFunction, InteractionParamArgs, InteractionParamResult
auto Reaktoro::CubicEOS::operator() ( const ThermoScalar T,
const ThermoScalar P,
const ChemicalVector x 
) -> Result

Calculate the thermodynamic properties of the phase.

Parameters
TThe temperature of the phase (in units of K)
PThe pressure of the phase (in units of Pa)
xThe molar fractions of the species in the phase (in units of mol/mol)

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