CubicEOS.hpp
65 // \eqc{k_{ij}=\dfrac{-\dfrac{1}{2}\sum_{k=1}^{N_{g}}\sum_{l=1}^{N_{g}}(\alpha_{ik}-\alpha_{jk})(\alpha_{il}-\alpha_{jl})A_{kl}\cdot(298.15T^{-1})^{\left(\frac{B_{kl}}{A_{kl}}-1\right)}-\left(\dfrac{\sqrt{a_{i}}}{b_{i}}-\dfrac{\sqrt{a_{j}}}{b_{j}}\right)}{2\dfrac{\sqrt{a_{i}a_{j}}}{b_{i}b_{j}}}.}
237 auto BipModelPhreeqc(Strings const& substances, BipModelParamsPhreeqc const& params = {}) -> BipModel;
240 auto BipModelSoreideWhitson(Strings const& substances, BipModelParamsSoreideWhitson const& params = {}) -> BipModel;
244 struct [[deprecated("BipModelParamsPHREEQC has been deprecated and renamed to BipModelParamsPhreeqc.")]] BipModelParamsPHREEQC
248 auto BipModelPHREEQC(Strings const& substances, BipModelParamsPHREEQC const& params = {}) -> BipModel;
Calculates thermodynamic properties of fluid phases based on a cubic equation of state model.
Definition: CubicEOS.hpp:166
auto equationSpecs() const -> EquationSpecs const &
Return the underlying EquationSpecs object used to create this Equation object.
auto compute(Props &props, real const &T, real const &P, ArrayXrConstRef const &x) -> void
Compute the thermodynamic properties of the phase.
Equation(EquationSpecs const &specs)
Construct an Equation object representing a cubic equation of state.
auto operator=(Equation other) -> Equation &
Assign an Equation object to this.
Equation(Equation const &other)
Construct a copy of an Equation object.
The namespace containing all components of the Reaktoro library.
Definition: Algorithms.hpp:29
autodiff::MatrixXreal MatrixXr
Convenient alias to Eigen type.
Definition: Matrix.hpp:131
autodiff::real real
The number type used throughout the library.
Definition: Real.hpp:26
std::vector< std::string > Strings
Convenient alias for std::vector<String>.
Definition: Types.hpp:55
std::unique_ptr< T > Ptr
Convenient alias for std::unique_ptr<T>.
Definition: Types.hpp:102
StateOfMatter
The list of states of matter for phases.
Definition: StateOfMatter.hpp:27
Eigen::Ref< const ArrayXr > ArrayXrConstRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:89
autodiff::ArrayXreal ArrayXr
Convenient alias to Eigen type.
Definition: Matrix.hpp:87
The arguments for the evaluation of a function in a cubic equation of state.
Definition: CubicEOS.hpp:97
real const & Tr
The reduced temperature with respect to the substance for which is computed.
Definition: CubicEOS.hpp:98
real const & omega
The acentric factor of the substance for which is computed.
Definition: CubicEOS.hpp:100
real const & TrT
The first-order temperature derivative of for convenience.
Definition: CubicEOS.hpp:99
The value and temperature derivatives of the function in a cubic equation of state.
Definition: CubicEOS.hpp:89
real alphaT
The evaluated first-order temperature derivative of the function.
Definition: CubicEOS.hpp:91
real alpha
The evaluated value of the function in a cubic equation of state.
Definition: CubicEOS.hpp:90
real alphaTT
The evaluated second-order temperature derivative of the function.
Definition: CubicEOS.hpp:92
The arguments for the evaluation of binary interaction parameters in a cubic equation of state.
Definition: CubicEOS.hpp:69
ArrayXrConstRef Tcr
The critical temperatures of the substances in the fluid phase (in K).
Definition: CubicEOS.hpp:72
ArrayXrConstRef aT
The first-order temperature derivative of .
Definition: CubicEOS.hpp:76
real const & T
The temperature of the fluid (in K).
Definition: CubicEOS.hpp:71
ArrayXrConstRef b
The variables in the cubic equation of state for each substance in the fluid phase computed at curre...
Definition: CubicEOS.hpp:81
Strings const & substances
The chemical formulas of the substances in the fluid phase.
Definition: CubicEOS.hpp:70
ArrayXrConstRef Pcr
The critical pressures of the substances in the fluid phase (in Pa).
Definition: CubicEOS.hpp:73
ArrayXrConstRef alpha
The variables in the cubic equation of state for each substance in the fluid phase computed at curre...
Definition: CubicEOS.hpp:78
ArrayXrConstRef aTT
The second-order temperature derivative of .
Definition: CubicEOS.hpp:77
ArrayXrConstRef omega
The acentric factors of the substances in the fluid phase.
Definition: CubicEOS.hpp:74
ArrayXrConstRef a
The variables in the cubic equation of state for each substance in the fluid phase computed at curre...
Definition: CubicEOS.hpp:75
ArrayXrConstRef alphaTT
The second-order temperature derivative of .
Definition: CubicEOS.hpp:80
ArrayXrConstRef alphaT
The first-order temperature derivative of .
Definition: CubicEOS.hpp:79
Definition: CubicEOS.hpp:245
The parameters in the binary interaction parameter model of PHREEQC for Peng-Robinson EOS.
Definition: CubicEOS.hpp:199
The parameters in the binary interaction parameter model of Søreide and Whitson (1992) for Peng-Robin...
Definition: CubicEOS.hpp:210
The binary interaction parameters for the cubic equation of state.
Definition: CubicEOS.hpp:56
MatrixXr k
The computed binary interaction parameters for the species in the fluid phase.
Definition: CubicEOS.hpp:57
MatrixXr kT
The computed first-order temperature derivative of the binary interaction parameters .
Definition: CubicEOS.hpp:58
MatrixXr kTT
The computed second-order temperature derivative of the binary interaction parameters .
Definition: CubicEOS.hpp:59
The necessary constants , , , and function that uniquely define a cubic equation of state.
Definition: CubicEOS.hpp:130
AlphaModel alphafn
The function in the cubic equation of state.
Definition: CubicEOS.hpp:135
real epsilon
The constant in the cubic equation of state.
Definition: CubicEOS.hpp:131
real sigma
The constant in the cubic equation of state.
Definition: CubicEOS.hpp:132
real Psi
The constant in the cubic equation of state.
Definition: CubicEOS.hpp:134
real Omega
The constant in the cubic equation of state.
Definition: CubicEOS.hpp:133
The specifications for configuting a cubic equation of state.
Definition: CubicEOS.hpp:158
BipModel bipmodel
The function that calculates the binary interaction parameters in .
Definition: CubicEOS.hpp:161
Vec< Substance > substances
The substances in the fluid phase and their attributes.
Definition: CubicEOS.hpp:159
EquationModel eqmodel
The cubic equation of state model to be used.
Definition: CubicEOS.hpp:160
The properties calculated by evaluating a cubic equation of state.
Definition: CubicEOS.hpp:41
real Gres
The residual molar Gibbs energy of the phase (in J/mol).
Definition: CubicEOS.hpp:45
real Hres
The residual molar enthalpy of the phase (in J/mol).
Definition: CubicEOS.hpp:46
StateOfMatter som
The state of matter of the fluid phase.
Definition: CubicEOS.hpp:51
ArrayXr Vi
Species partial molar volumes (in m3/mol).
Definition: CubicEOS.hpp:49
real Cpres
The residual molar heat capacity at constant pressure of the phase (in J/(mol*K)).
Definition: CubicEOS.hpp:47
real VP
The pressure derivative of the molar volume constant temperature (in m3/(mol*Pa)).
Definition: CubicEOS.hpp:44
ArrayXr ln_phi
The ln fugacity coefficients of the species in the phase.
Definition: CubicEOS.hpp:50
real V
The molar volume of the phase (in m3/mol).
Definition: CubicEOS.hpp:42
real VT
The temperature derivative of the molar volume at constant pressure (in m3/(mol*K)).
Definition: CubicEOS.hpp:43
real Cvres
The residual molar heat capacity at constant volume of the phase (in J/(mol*K)).
Definition: CubicEOS.hpp:48
The attributes of a substance in a fluid phase required by a cubic equation of state.
Definition: CubicEOS.hpp:32
real omega
The acentric factor of the substance in the fluid phase.
Definition: CubicEOS.hpp:36
real Tcr
The critical temperature of the substance in the fluid phase (in K).
Definition: CubicEOS.hpp:34
String formula
The chemical formula of the substance in the fluid phase.
Definition: CubicEOS.hpp:33
real Pcr
The critical pressure of the substance in the fluid phase (in Pa).
Definition: CubicEOS.hpp:35