Learn R Programming

IAPWS95

The goal of IAPWS95 is to provide thermodynamic and transport properties of Water for general and scientifc use.

IAPWS95 calculates thermodynamic and transport properties of water as function of different combinations of Temperature, Density, Pressure, Enthalphy and Entropy. It is dedicated to scientists and engineers who analyze thermal and hydraulic experimental data or are involved with projects and equipment development, like turbines or nuclear reactors. This Vignette shows too few examples, but each function is documented with examples. The name IAPWS95 comes from the "IAPWS Formulation 1995 for the Thermodynamic Properties of Ordinary Water Substance for General and Scientific Use", a formulation developed by "The International Association for the Properties of Water and Steam", revised in 2014. http://www.iapws.org IAPWS-95 formulation is based on the fundamental equation of Helmholtz free energy as a function of temperature and density, f = f(T, ρ). Other thermodynamic properties are obtained by differentiation and algebraic manipulation without the use of any other information. IAPWS-95 defines accurately the thermodynamic properties of the fluid phases of ordinary water substance, with complete thermodynamic consistency among these properties, over a wide range of states (pressures up to 1000 MPa and temperatures from the melting and sublimation temperatures to 1273 K). In this package the lower temperature limit is the triple point temperature, 273.16 K. The definition of properties includes those on the liquid–vapor equilibrium line. The transport properties programmed were based on different IAPWS Releases: "Release on the IAPWS Formulation 2011 for the Thermal Conductivity of Ordinary Water Substance"; "Release on the IAPWS Formulation 2008 for the Viscosity of Ordinary Water Substance"; "Revised Release on Surface Tension of Ordinary Water Substance" (2014). The melting pressure was based on the "Revised Release on the Pressure along the Melting and Sublimation Curves of Ordinary Water Substance" (2011). The vapor pressure is based on Wagner and Pruß equation (1993), valid from the triple point temperature (273.16 K) to the critical temperature (647.096 K). ...

Installation

You can install IAPWS95 from github with:

# install.packages("devtools")
devtools::install_github("IAPWS95")

Example

This is a basic example which shows you how to obtain the water pressure as Function of Temperature and Pressure:

## basic example code: Pressure as Function of Temperature and Density
T <- 500.
D <- 838.025
p <- IAPWS95::pTD(T,D)
#> [1] 10.0003858
p
#> [1] 10.0003858

Copy Link

Version

Install

install.packages('IAPWS95')

Monthly Downloads

226

Version

1.2.4

License

MIT + file LICENSE

Maintainer

Shawn Way

Last Published

September 11th, 2023

Functions in IAPWS95 (1.2.4)

CvfT

Specific Isochoric Heat Capacity of Fluid Phase, Function of Temperature
CvgT

Specific Isochoric Heat Capacity of Gas Phase, Function of Temperature
DTh

Density, Function of Temperature and Enthalpy
DTpcteTab

Table of Densities, Function of Temperature for Fixed Pressure
Dfs

Saturated Liquid Density, Function of Entropy
Dfp

Saturated Liquid Density, Funtion of Pressure
DTs

Density, Function of Temperature and Entropy
DCrit

Water Critical Density
DTp

Density, Function of Temperature and Pressure
DfT

Saturated Liquid Density, Function of Temperature
Dph

Density, Function of Pressure and Enthalpy
Dgs

Saturated Gas Density, Function of Entropy
DgT

Saturated Gas Density, Function of Temperature
Dgp

Saturated Gas Density, Function of Pressure
DfTr

Liquid Water Density at Triple Point
DgTr

Water Gas Density at Triple Point
Dhs

Density, Function of Enthalpy and Entropy
PrandtTD

Prandt Number, Function of Temperature and Density
KapaTD

Isothermal Compressibility, Function of Temperature and Density
DpTcteTab

Table of Densities, Function of Pressure for a Fixed Temperature
JTcTD

Joule-Thomson Coefficient, Function of Temperature and Density
FugaTp

Fugacity, Function of Temperature and Pressure
dpdTTD

Pressure Derivative with Respect to Temperature, Function of Temperature and Density
TSatD

Saturation Temperature, Function of Density
dpdDTp

Pressure Derivative with respect to Density, Function of Temperature and Pressure
pCrit

Water Critical Pressure
dpdTTp

Pressure Derivative with respect to Temperature, Function of Temperature and Pressure
TSatp

Saturation Temperature, Function of pressure
hpTcteTab

Table of Enthalpies, Function of Pressure for Fixed Temperature
errorCodes

Error Codes
KViscTD

Kinematic Viscosity, Function of Temperature and Density
GibbsTp

Specific Gibbs Energy, Function of Temperature and Pressure
Dps

Density, Function of Pressure and Entropy
TDh

Temperature, Function of Density and Enthalpy
TCrit

Water Critical Temperature
phirD

First Derivative of the Residual-Gas part of the Dimensionless Helmholtz Energy Equation with respect to Density, Function of Temperature and Density
pMeltT

Melting Pressure, Function of Temperature
phirDD

Second Derivative of the Residual-Gas Part of the Dimensionless Helmholtz Energy Equation with respect to Density, Function of Temperature and Density
Tph

Temperature, Function of Pressure and Enthalpy
Tps

Temperature, Function of Pressure and Entropy
TDp

Temperature, Function of Density and Pressure
ThrcTD

Isothermal Throttling Coefficient, Function of Temperature and Density
Ths

Temperature, Function of Enthalpy and Entropy
dpdDTD

Pressure Derivative with respect to Density, Function of Temperature and Density
dDdTTp

Density Derivative with respect to Temperature, Function of Temperature and Pressure
TDs

Temperature, Function of Density and Entropy
hps

Enthalpy, Function of Pressure and Entropy
phi0DD

Second Derivative of the Ideal-Gas Part of the Dimensionless Helmholtz Energy Equation with respect to Density, Function of Density
phi0D

First Derivative of the Ideal-Gas part of the Dimensionless Helmholtz Energy Equation with respect to Density, Function of Density
phirTT

Second Derivative of the Residual-Gas Part of the Dimensionless Helmholtz Energy Equation with respect to Temperature, Function of Temperature and Density
Rwater

Water Specific Gas Constant
sTpcteTab

Table of Entropies, Function of Temperature for a Fixed Pressure
sCrit

Water Critical Entropy
ufT

Saturated Liquid Specific Internal Energy, Function of Temperature
ugT

Saturated Gas Specific Internal Energy, Function of Temperature
satTabT

Table of Saturation Densities, Enthalpies and Entropies, Function of Temperature
wTp

Speed of Sound, Function of Temperature and Pressure
wfT

Speed of Sound of Fluid Phase, Function of Temperature
spTcteTab

Table of Entropies, Function of Pressure for Fixed Temperature
hfT

Saturated Liquid Enthalpy, Function of Temperature
hgT

Saturated Gas Enthalpy, Function of Temperature
sph

Entropy, Function of Pressure and Enthalpy
SigmaT

Surface Tension, Function of Temperature
ViscTD

Dynamic Viscosity, Function of Temperature and Density
TSats

Saturation Temperature, Function of Entropy
Vp

Vapor pressure, Function of Temperature
dDdTTD

Density Derivative with respect to Temperature, Function of Temperature and Density
ZTD

Compressibility Factor, Function of Temperature and Density
TTr

Water Temperature at Triple Point
hCrit

Water Critical Enthalpy
wgT

Speed of Sound of Gas Phase, Function of Temperature
hTD

Specific Enthalpy, Function of Temperature and Density
fTp

Helmholtz Free Energy, Function of Temperature and Pressure
fTD

Helmholtz Free Energy, Function of Temperature and Density
pSatD

Saturation Pressure, Function of Density
pSatT

Saturation Pressure, Function of Temperature
phirDT

Second Derivative of the Residual-Gas Part of the Dimensionless Helmholtz Energy Equation with respect to Density and Temperature, Function of Temperature and Density
phi0T

First Derivative of the Ideal-Gas Part of the Dimensionless Helmholtz Energy Equation with respect to Temperature, Function of Temperature and Density
phi0DT

Second Derivative of the Ideal-Gas Part of the Dimensionless Helmholtz Energy Equation with respect to Density and Temperature
phi0TT

Second Derivative of the Ideal-Gas Part of the Dimensionless Helmholtz Energy Equation with respect to Temperature, Function of Temperature and Density
hTp

Specific Enthalpy, Function of Temperature and Pressure
satTabp

Table of Saturation Densities, Enthalpies and Entropies, Function of Pressure
phir

Residual-Gas Part of the Dimensionless Helmholtz Energy Equation, Function of Temperature and Density
pTr

Water Pressure at Triple Point
phi0

Ideal-Gas part of the Dimensionless Helmholtz Energy Equation, Function of Temperature and Density
hTpcteTab

Table of Enthalpies, Function of Temperature and Fixed Pressure
pTD

Pressure, Function of Temperature and Density
pSats

Saturation Pressure, Function of Entropy
sfT

Saturated Liquid Entropy, Function of Temperature
phirT

First Derivative of the Residual-Gas Part of the Dimensionless Helmholtz Energy Equation with respect to Temperature, Function of Temperature and Density
satTabpT

Table of Saturation Pressures, Function of Temperature
sfTr

Liquid Water Entropy at Triple Point
sTD

Specific Entropy, Function of Temperature and Density
uTD

Specific Internal Energy, Function of Temperature and Density
sTp

Specific Entropy, Function of Temperature and Pressure
uTp

Specific Internal Energy, Function of Temperature and Pressure
satTabvT

Table of Saturation Volumes, Enthalpies and Entropies, Function of of Temperature
satTabTp

Table of Saturation Temperatures, Function of Pressure
satTabhT

Table of Saturation Liquid Phase Enthalpies, Function of Temperature
vTp

Specific Volume, Function of Temperature and Pressure
wTD

Speed of Sound, Function of Temperature and Density
satTabvp

Table of Saturation Volumes, Enthalpies and Entropies, Function of Pressure
sgT

Saturated Gas Entropy, Function of Temperature
sgTr

Water Gas Entropy at Triple Point
CpgT

Specific Isobaric Heat Capacity of Gas Phase, Function of Temperature
CvTD

Specific Isochoric Heat Capacity, Function of Temperature and Density
CndTD

Thermal Conductivity, Function of Temperature and Density
CpTD

Specific Isobaric Heat Capacity, Function of Temperature and Density
CpfT

Specific Isobaric Heat Capacity of Fluid Phase, Function of Temperature
CpTp

Specific Isobaric Heat Capacity, Function of Temperature and Pressure
BT

Second Virial Coefficient (B), Function of Temperature
CvTp

Specific Isochoric Heat Capacity, Function of Temperature and Pressure
CT

Third Virial Coefficient (C), Function of Temperature