Pure Component Helmholtz EoS¶
The Helmholtz Equation of State (EoS) classes serve as a common core for pure component property packages where very accurate and thermodynamically consistent pure component properties are required. This contains general information. Thermodynamic properties for all Helmholtz EoS packages are calculated by the core class only the parameters differ between specific component implementation. Specific implementations may also contain additional properties such as viscosity and thermal conductivity. For specific property packages details see the pages below.
The basic Helmholtz EoS is described “Revised Release on the IAPWS Formulation 1995 for the Thermodynamic Properties of Ordinary Water Substance for General and Scientific Use.”. The Helmholtz EoS as used in the IAPWS95 contains nonanalytic terms to improve accuracy near the critical point. These terms, however cause a singularity at the critical point and can causes computational difficulty, so the nonanalytic where omitted in the IDAES implementation.
The IDAES implementation is of the Helmholtz EoS makes use of external function for many of the properties. Solving the VLE and changing state variables require solution of nonlinear equations with multiple solutions, so solving then externally provides a method of decomposition where it can be guaranteed that the nonlinear equations associated with the Helmholtz EoS are solved correctly. The external functions provide first and second derivatives, and are compatible with advanced optimization solvers. Phase change does cause problems to be nonsmooth, but, as a practical matter, problem using the IDAES implementation of the Helmholtz EoS, still seem to solve well even with phase change.
Units¶
The iapws95 property module uses SI units (m, kg, s, J, mol) for all public variables and expressions. Temperature is in K. Note that this means molecular weight is in the unusual unit of kg/mol.
A few expressions intended used internally and all external function calls use units of kg, kJ, kPa, and K. These generally are not needed by the end user.
Phase Presentation¶
The property package wrapper can present fluid phase information to the IDAES framework in different ways. For specifics on how to set the options see a specific implementation page.
The PhaseType.MIX
option causes to modeling framework to view water and
steam as a single mixed liquid and vapor phase. This generally reduces model
complexity. Phase equilibrium is still calculated and vapor_frac
and
individual phase properties are available, just are they would be with the
twophase presentation. The mixedphase presentation can be used with most
standard unit models that do not provide phase separation. If phase separation
is required, either use the twophase presentation or create a custom model.
The PhaseType.LG
option appears to the IDAES framework to be two phases “Vap”
and “Liq”. This option requires one of two unit model options to be set. You
can use the total material balance option for unit models, to specify that only
one material balance equation should be written not one per phase. The other
possible option is to specify has_phase_equlibrium=True
. This will
write a material balance per phase, but will add a phase generation term to the
model. For Helmholtz EoS packages, it is generally recommended that specifying
total material balances is best because it results in a problem with fewer
variables, and phase equilibrium is always calculated by the property package.
There are two single phase options PhaseType.L
and PhaseType.G
; these
present a single phase “Liq” or “Vap” to the framework. The vapor fraction will
also always return 0 or 1 as appropriate. These options can be used when the phase
of a fluid is know for certain to only be liquid or only be vapor. For the
temperaturepressurevapor fraction formulation, this eliminates the
complementarity constraint, but for the enthalpypressure formulation, where the
vapor fraction is always calculated, the single phase options probably do not
provide any real benefit.
State Variables¶
There is a choice of state variables, pressureenthalpy and temperaturepressurevapor fraction. In general the enthalpypressure form is preferable. Both the pressure and enthalpy variables are smooth and sufficient to define the fluid state. For systems where twophases may be present, it is expected that pressureenthalpy is the best choice of state variables.
The temperaturepressurevapor fraction form is more convenient, since temperature is directly measurable and more familiar than enthalpy. Complementarity constraints are used to deal with the vapor fraction variable, but the additional complimentary constraints may make the problem less robust. Temperaturepressure is often a good choice of state variables where there is only a single known phase.
PressureEnthalpy Formulation¶
The advantage of this choice of state variables is that it is more robust when phase changes occur, and is especially useful when it is not known if a phase change will occur. The disadvantage of this choice of state variables is that for equations like heat transfer equations that are highly dependent on temperature, a model could be harder to solve near regions with phase change. Temperature is a nonsmooth function with nonsmoothness when transitioning from the singlephase to the twophase region. Temperature also has a zero derivative with respect to enthalpy in the twophase region, so near the twophase region solving a constraint that specifies a specific temperature may be difficult.
The variables for this form are flow_mol
(mol/s), pressure
(Pa), and
enth_mol
(J/mol).
Since temperature and vapor fraction are not state variables in this formulation, they are provided by expressions, and cannot be fixed. For example, to set a temperature to a specific value, a constraint could be added which says the temperature expression equals a fixed value.
These expressions are specific to the PH formulation:
temperature
Expression that calculates temperature by calling an ExternalFunction of enthalpy and pressure. This expression is nonsmooth in the transition from singlephase to twophase and has a zero derivative with respect to enthalpy in the twophase region.
vapor_frac
Expression that calculates vapor fraction by calling an ExternalFunction of enthalpy and pressure. This expression is nonsmooth in the transition from singlephase to twophase and has a zero derivative with respect to enthalpy in the singlephase region, where the value is 0 (liquid) or 1 (vapor).
TemperaturePressureVapor Fraction¶
This formulation uses temperature (K), pressure (Pa), and vapor fraction as state variables. When a single phase option is given, the vapor fraction is fixed to the appropriate value and the complementarity constraint is deactivated.
A complementarity constraint is required for the TPx formulation when twophases may be present. First, two expressions are defined below where \(P^\) is pressure under saturation pressure and \(P^+\) is pressure over saturation pressure. The \(\max()\) function is provided as an IDAES utility which provides a smooth max expression.
With the “pressure over” and “pressure under” expressions a complementarity constraint can be written. If the pressure under saturation is more than zero, only vapor exists. If the pressure over saturation is greater than zero only a liquid exists. If both are about zero two phases can exist. The saturation pressure function maxes out at the critical pressure and any temperature above the critical temperature will yield a saturation pressure that is the critical pressure, so supercritical fluids will be classified as liquids as is the convention for this property package.
Assuming the vapor fraction (\(x\)) is positive and noting that only one of \(P^+\) and \(P^\) can be nonzero (approximately), the complementarity equation above requires \(x\) to be 0 when \(P^+\) is not zero (liquid) or \(x\) to be 1 when \(P^\) is not zero (vapor). When both \(P^+\) and \(P^\) are about 0, the complementarity constraint says nothing about x, but it basically reduces another constraint, that \(P=P_{\text{sat}}\). When two phases are present \(x\) is found by the unit model energy balance, where the temperature will be \(T_{\text{sat}}\) (because \(P=P_{\text{sat}}\)).
An alternative approach is sometimes useful to simplify the problem when it is certain that there are two phases. The complementarity constraint can be deactivated and a \(P=P_{\text{sat}}\) or \(T=T_{\text{sat}}\) constraint can be added.
Using the TPx formulation requires better initial guesses than the PH form. It is not strictly necessary but it is best to try to get an initial guess that is in the correct phase region for the expected result model.
Expressions¶
Unless otherwise noted, the property expressions are common to both the
TPx and PH formulations. For phase specific properties, valid phase indexes
are "Liq"
and "Vap"
. Even when using the mixed phase version of the
property package, both liquid and vapor properties are available.
Expression 
Description 


Molecular weight (kg/mol) 

Critical temperature divided by temperature (unitless) 

Temperature (K) if PH form 

Reduced temperature, temperature divided by critical temperature (unitless) 

Saturation temperature (K) 

Critical temperature divided by saturation temperature (unitless) 

Saturation pressure (Pa) 

Density phase (kg/m^{3}) 

Phase reduced density (\(\delta\)), mass density divided by critical density (unitless) 

Total mixed phase mass density (kg/m^{3}) 

Total mixed phase mole density (kg/m^{3}) 

Total volumetric flow rate (m^{3}/s) 

Mass enthalpy (J/kg) 

Saturation enthalpy of phase, enthalpy at P and T_{sat} (J/mol) 

Molar enthalpy (J/mol) if TPx form 

Molar enthalpy of phase (J/mol) 

molar internal energy (J/mol) 

Molar internal energy of phase (J/mol) 

Molar entropy of phase (J/mol/K) 

Total mixed phase entropy (J/mol/K) 

Constant pressure molar heat capacity of phase (J/mol/K) 

Constant pressure volume heat capacity of phase (J/mol/K) 

Total mixed phase constant pressure heat capacity (J/mol/K) 

Total mixed phase constant volume heat capacity (J/mol/K) 



Speed of sound in phase (m/s) 

Mole density of phase (mol/m^{3}) 

Vapor fraction, if PH form 

Phase fraction 

Same as total flow since only water (mol/s) 

Pressure under saturation pressure (kPa) 

Pressure over saturation pressure (kPa) 
ExternalFunctions¶
This provides a list of ExternalFuctions available in the wrapper. These functions do not use SI units and are not usually called directly. If these functions are needed, they should be used with caution. Some of these are used in the property expressions, some are just provided to allow easier testing with a Python framework.
All of these functions provide first and second derivative and are generally
suited to optimization (including the ones that return derivatives of Helmholtz
free energy). Some functions may have nonsmoothness at phase transitions. The
delta_vap
and delta_liq
functions return the same values in the critical
region. They will also return real values when a phase doesn’t exist, but those
values do not necessarily have physical meaning.
There are a few variables that are common to a lot of these functions, so they are summarized here \(\tau\) is the critical temperature divided by the temperature \(\frac{T_c}{T}\), \(\delta\) is density divided by the critical density \(\frac{\rho}{\rho_c}\), and \(\phi\) is Helmholtz free energy divided by the ideal gas constant and temperature \(\frac{f}{RT}\).
Object 
C Function 
Returns 
Arguments 

func_p 
p 
pressure (kPa) 
\(\delta, \tau\) 
func_p_stau 
p_stau 
pressure (kPa) 
s (kJ/kg/K), \(\tau\) 
func_u 
u 
internal energy (kJ/kg) 
\(\delta, \tau\) 
func_s 
s 
entropy (kJ/K/kg) 
\(\delta, \tau\) 
func_h 
h 
enthalpy (kJ/kg) 
\(\delta, \tau\) 
func_hvpt 
hvpt 
vapor enthalpy (kJ/kg) 
P (kPa), \(\tau\) 
func_hlpt 
hlpt 
liquid enthalpy (kJ/kg) 
P (kPa), \(\tau\) 
func_svpt 
svpt 
vapor entropy (kJ/kg/K) 
P (kPa), \(\tau\) 
func_slpt 
slpt 
liquid entropy (kJ/kg/K) 
P (kPa), \(\tau\) 
func_uvpt 
uvpt 
vapor internal energy (kJ/kg) 
P (kPa), \(\tau\) 
func_ulpt 
ulpt 
liquid internal energy (kJ/kg) 
P (kPa), \(\tau\) 
func_tau 
tau 
\(\tau\) (unitless) 
h (kJ/kg), P (kPa) 
func_tau_sp 
tau_sp 
\(\tau\) (unitless) 
s (kJ/kg/K), P (kPa) 
func_tau_up 
tau_up 
\(\tau\) (unitless) 
u (kJ/kg), P (kPa) 
func_vf 
vf 
vapor fraction (unitless) 
h (kJ/kg), P (kPa) 
func_vfs 
vfs 
vapor fraction (unitless) 
s (kJ/kg/K), P (kPa) 
func_vfu 
vfu 
vapor fraction (unitless) 
u (kJ/kg), P (kPa) 
func_g 
g 
Gibbs free energy (kJ/kg) 
\(\delta, \tau\) 
func_f 
f 
Helmholtz free energy (kJ/kg) 
\(\delta, \tau\) 
func_cv 
cv 
const. volume heat capacity (kJ/K/kg) 
\(\delta, \tau\) 
func_cp 
cp 
const. pressure heat capacity (kJ/K/kg) 
\(\delta, \tau\) 
func_w 
w 
speed of sound (m/s) 
\(\delta, \tau\) 
func_delta_liq 
delta_liq 
liquid \(\delta\) (unitless) 
P (kPa), \(\tau\) 
func_delta_vap 
delta_vap 
vapor \(\delta\) (unitless) 
P (kPa), \(\tau\) 
func_delta_sat_l 
delta_sat_l 
sat. liquid \(\delta\) (unitless) 
\(\tau\) 
func_delta_sat_v 
delta_sat_v 
sat. vapor \(\delta\) (unitless) 
\(\tau\) 
func_p_sat 
p_sat 
sat. pressure (kPa) 
\(\tau\) 
func_tau_sat 
tau_sat 
sat. \(\tau\) (unitless) 
P (kPa) 
func_phi0 
phi0 
\(\phi\) idaes gas part (unitless) 
\(\delta, \tau\) 
func_phi0_delta 
phi0_delta 
\(\frac{\partial \phi_0}{\partial \delta}\) 
\(\delta\) 
func_phi0_delta2 
phi0_delta2 
\(\frac{\partial^2 \phi_0}{\partial \delta^2}\) 
\(\delta\) 
func_phi0_tau 
phi0_tau 
\(\frac{\partial \phi_0}{\partial \tau}\) 
\(\tau\) 
func_phi0_tau2 
phi0_tau2 
\(\frac{\partial^2 \phi_0}{\partial \tau^2}\) 
\(\tau\) 
func_phir 
phir 
\(\phi\) real gas part (unitless) 
\(\delta, \tau\) 
func_phir_delta 
phir_delta 
\(\frac{\partial \phi_r}{\partial \delta}\) 
\(\delta, \tau\) 
func_phir_delta2 
phir_delta2 
\(\frac{\partial^2 \phi_r}{\partial \delta^2}\) 
\(\delta, \tau\) 
func_phir_tau 
phir_tau 
\(\frac{\partial \phi_r}{\partial \tau}\) 
\(\delta, \tau\) 
func_phir_tau2 
phir_tau2 
\(\frac{\partial^2 \phi_r}{\partial \tau^2}\) 
\(\delta, \tau\) 
func_phir_delta_tau 
phir_delta_tau 
\(\frac{\partial^2 \phi_r}{\partial \delta \partial \tau}\) 
\(\delta, \tau\) 
Initialization¶
The IAPWS95 property functions do provide initialization functions for general compatibility with the IDAES framework, but as long as the state variables are specified to some reasonable value, initialization is not required. All required solves are handled by external functions.
References¶
Although a general Helmholtz EoS was developed, the equations where taken from the IAPWS95 standard. For specific parameter sources see specific implementation documentation.
International Association for the Properties of Water and Steam (2016). IAPWS R695 (2016), “Revised Release on the IAPWS Formulation 1995 for the Properties of Ordinary Water Substance for General Scientific Use,” URL: http://iapws.org/relguide/IAPWS952016.pdf
Wagner, W., A. Pruss (2002). “The IAPWS Formulation 1995 for the Thermodynamic Properties of Ordinary Water Substance for General and Scientific Use.” J. Phys. Chem. Ref. Data, 31, 387535.
Akasaka, R. (2008). “A Reliable and Useful Method to Determine the Saturation State from Helmholtz Energy Equations of State.” Journal of Thermal Science and Technology, 3(3), 442451.