Title: | Industrial Formulation for Properties of Ordinary Water and Steam |
---|---|
Description: | Implementation of some methods for fast calculation of thermophysical properties of ordinary water and steam as they formulated by International Association for the Properties of Water and Steam (IAPWS). |
Authors: | Yuri Possokhov [aut, cre] |
Maintainer: | Yuri Possokhov <[email protected]> |
License: | GPL-3 |
Version: | 0.0.1 |
Built: | 2024-10-08 04:47:17 UTC |
Source: | https://github.com/omega1x/wsif97 |
Implementation of some methods for fast calculation of thermophysical properties of water and steam as they formulated by International Association for the Properties of Water and Steam (IAPWS).
The package is inspired by Java IF97 library and iapws python-module and tries to bring similar functionality to R-community without unwanted external dependencies. The package grows in functionality smoothly as needed in conjunction with analytic requirements of the author's company.
Unlike most others the package contains
vectorized functions aimed for speed by using Rcpp-package
and
by avoiding double cycling. For actual information about the package
see package README.md.
Yuri Possokhov, [email protected].
Maintainer: Yuri Possokhov <[email protected]>
IAPWS R7-97 (2012), Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam. August 2007.
IAPWS SR5-05 (2016), Revised Supplementary Release on Backward Equations for Specific Volume as a Function of Pressure and Temperature v(p,T) for Region 3 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam. June 2014.
IAPWS AN5-13(2016), Advisory Note No. 5: Industrial Calculation of the Thermodynamic Properties of Seawater. September 2013.
## Calculate density of ordinary water at different temperatures ## and pressures: t <- c(300,300,500,300,700,700,1500,1500,2000,0) # [K] p <- c(3,80,3,.35e-2,.35e-2,30,.5,30,30,0) # [MPa] density <- tpr(t, p) # [kg/m^3] print(density)
## Calculate density of ordinary water at different temperatures ## and pressures: t <- c(300,300,500,300,700,700,1500,1500,2000,0) # [K] p <- c(3,80,3,.35e-2,.35e-2,30,.5,30,30,0) # [MPa] density <- tpr(t, p) # [kg/m^3] print(density)
Calculate specific isobaric heat capacity as a function of temperature and pressure in accordance with IAPWS R7-97 formulation.
tpcp(T, p)
tpcp(T, p)
T |
absolute temperature in validity range 273.15 – 2273.15, [K].
Type: |
p |
absolute pressure in validity range 0 – 100 MPa, [MPa].
Type: |
Vectors T
and p
both must have the same length. Default
recycling rules
are not applicable in this context.
The accuracy of calculation for this property in Region 3 depends
on accuracy of specific volume in this region. See details for
tpv
.
specific isobaric heat capacity, [], or the next error code:
-10
Fail to determine region in temperature-pressure space into which the entire range of validity of IAPWS R7-97 is divided. Possibly values of one or both arguments are out of bounds or in undeterminable subspace.
-20
Fail to determine subregion inside Region 3 in accordance with IAPWS SR5-05. Possibly values of one or both arguments are in undeterminable subspace or near singularity.
Type: NumericVector
IAPWS R7-97 (2012), Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam. August 2007.
IAPWS SR5-05 (2016), Revised Supplementary Release on Backward Equations for Specific Volume as a Function of Pressure and Temperature v(p,T) for Region 3 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam. June 2014.
Other properties in temperature-pressure space:
tpcv()
,
tpe()
,
tph()
,
tpi()
,
tpr()
,
tps()
,
tpu()
,
tpv()
,
tpw()
t <- c(300,300,500,300,700,700,1500,1500,2000,0) # [K] p <- c(3,80,3,.35e-2,.35e-2,30,.5,30,30,0) # [MPa] tpcp(t, p)
t <- c(300,300,500,300,700,700,1500,1500,2000,0) # [K] p <- c(3,80,3,.35e-2,.35e-2,30,.5,30,30,0) # [MPa] tpcp(t, p)
Calculate specific isochoric heat capacity as a function of temperature and pressure in accordance with IAPWS R7-97 formulation.
tpcv(T, p)
tpcv(T, p)
T |
absolute temperature in validity range 273.15 – 2273.15, [K].
Type: |
p |
absolute pressure in validity range 0 – 100 MPa, [MPa].
Type: |
Vectors T
and p
both must have the same length. Default
recycling rules
are not applicable in this context.
The accuracy of calculation for this property in Region 3 depends
on accuracy of specific volume in this region. See details for
tpv
.
specific isochoric heat capacity, [], or the next error code:
-10
Fail to determine region in temperature-pressure space into which the entire range of validity of IAPWS R7-97 is divided. Possibly values of one or both arguments are out of bounds or in undeterminable subspace.
-20
Fail to determine subregion inside Region 3 in accordance with IAPWS SR5-05. Possibly values of one or both arguments are in undeterminable subspace or near singularity.
Type: NumericVector
IAPWS R7-97 (2012), Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam. August 2007.
IAPWS SR5-05 (2016), Revised Supplementary Release on Backward Equations for Specific Volume as a Function of Pressure and Temperature v(p,T) for Region 3 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam. June 2014.
Other properties in temperature-pressure space:
tpcp()
,
tpe()
,
tph()
,
tpi()
,
tpr()
,
tps()
,
tpu()
,
tpv()
,
tpw()
t <- c(300,300,500,300,700,700,1500,1500,2000,0) # [K] p <- c(3,80,3,.35e-2,.35e-2,30,.5,30,30,0) # [MPa] tpcv(t, p)
t <- c(300,300,500,300,700,700,1500,1500,2000,0) # [K] p <- c(3,80,3,.35e-2,.35e-2,30,.5,30,30,0) # [MPa] tpcv(t, p)
Calculate cubic expansion coefficient as a function of temperature and pressure in accordance with IAPWS R7-97 formulation.
tpe(T, p)
tpe(T, p)
T |
absolute temperature in validity range 273.15 – 2273.15, [K].
Type: |
p |
absolute pressure in validity range 0 – 100 MPa, [MPa].
Type: |
Vectors T
and p
both must have the same length. Default
recycling rules
are not applicable in this context.
The accuracy of calculation for this property in Region 3 depends
on accuracy of specific volume in this region. See details for
tpv
.
cubic expansion coefficient, [], or the next error code:
-10
Fail to determine region in temperature-pressure space into which the entire range of validity of IAPWS R7-97 is divided. Possibly values of one or both arguments are out of bounds or in undeterminable subspace.
-20
Fail to determine subregion inside Region 3 in accordance with IAPWS SR5-05. Possibly values of one or both arguments are in undeterminable subspace or near singularity.
Type: NumericVector
IAPWS R7-97 (2012), Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam. August 2007.
IAPWS SR5-05 (2016), Revised Supplementary Release on Backward Equations for Specific Volume as a Function of Pressure and Temperature v(p,T) for Region 3 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam. June 2014.
IAPWS AN5-13(2016), Advisory Note No. 5: Industrial Calculation of the Thermodynamic Properties of Seawater. September 2013.//'
Other properties in temperature-pressure space:
tpcp()
,
tpcv()
,
tph()
,
tpi()
,
tpr()
,
tps()
,
tpu()
,
tpv()
,
tpw()
t <- c(300,300,500,300,700,700,1500,1500,2000,0) # [K] p <- c(3,80,3,.35e-2,.35e-2,30,.5,30,30,0) # [MPa] tpe(t, p)
t <- c(300,300,500,300,700,700,1500,1500,2000,0) # [K] p <- c(3,80,3,.35e-2,.35e-2,30,.5,30,30,0) # [MPa] tpe(t, p)
Calculate specific enthalpy as a function of temperature and pressure in accordance with IAPWS R7-97 formulation.
tph(T, p)
tph(T, p)
T |
absolute temperature in validity range 273.15 – 2273.15, [K].
Type: |
p |
absolute pressure in validity range 0 – 100 MPa, [MPa].
Type: |
Vectors T
and p
both must have the same length. Default
recycling rules
are not applicable in this context.
The accuracy of calculation for this property in Region 3 depends
on accuracy of specific volume in this region. See details for
tpv
.
specific enthalpy, [], or the next error code:
-10
Fail to determine region in temperature-pressure space into which the entire range of validity of IAPWS R7-97 is divided. Possibly values of one or both arguments are out of bounds or in undeterminable subspace.
-20
Fail to determine subregion inside Region 3 in accordance with IAPWS SR5-05. Possibly values of one or both arguments are in undeterminable subspace or near singularity.
Type: NumericVector
IAPWS R7-97 (2012), Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam. August 2007.
IAPWS SR5-05 (2016), Revised Supplementary Release on Backward Equations for Specific Volume as a Function of Pressure and Temperature v(p,T) for Region 3 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam. June 2014.
Other properties in temperature-pressure space:
tpcp()
,
tpcv()
,
tpe()
,
tpi()
,
tpr()
,
tps()
,
tpu()
,
tpv()
,
tpw()
t <- c(300,300,500,300,700,700,1500,1500,2000,0) # [K] p <- c(3,80,3,.35e-2,.35e-2,30,.5,30,30,0) # [MPa] tph(t, p)
t <- c(300,300,500,300,700,700,1500,1500,2000,0) # [K] p <- c(3,80,3,.35e-2,.35e-2,30,.5,30,30,0) # [MPa] tph(t, p)
Calculate isothermal compressibility as a function of temperature and pressure in accordance with IAPWS R7-97 formulation.
tpi(T, p)
tpi(T, p)
T |
absolute temperature in validity range 273.15 – 2273.15, [K].
Type: |
p |
absolute pressure in validity range 0 – 100 MPa, [MPa].
Type: |
Vectors T
and p
both must have the same length. Default
recycling rules
are not applicable in this context.
The accuracy of calculation for this property in Region 3 depends
on accuracy of specific volume in this region. See details for
tpv
.
isothermal compressibility, [], or the next error code:
-10
Fail to determine region in temperature-pressure space into which the entire range of validity of IAPWS R7-97 is divided. Possibly values of one or both arguments are out of bounds or in undeterminable subspace.
-20
Fail to determine subregion inside Region 3 in accordance with IAPWS SR5-05. Possibly values of one or both arguments are in undeterminable subspace or near singularity.
Type: NumericVector
IAPWS R7-97 (2012), Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam. August 2007.
IAPWS SR5-05 (2016), Revised Supplementary Release on Backward Equations for Specific Volume as a Function of Pressure and Temperature v(p,T) for Region 3 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam. June 2014.
IAPWS AN5-13(2016), Advisory Note No. 5: Industrial Calculation of the Thermodynamic Properties of Seawater. September 2013.
Other properties in temperature-pressure space:
tpcp()
,
tpcv()
,
tpe()
,
tph()
,
tpr()
,
tps()
,
tpu()
,
tpv()
,
tpw()
t <- c(300,300,500,300,700,700,1500,1500,2000,0) # [K] p <- c(3,80,3,.35e-2,.35e-2,30,.5,30,30,0) # [MPa] tpi(t, p)
t <- c(300,300,500,300,700,700,1500,1500,2000,0) # [K] p <- c(3,80,3,.35e-2,.35e-2,30,.5,30,30,0) # [MPa] tpi(t, p)
Calculate mass density as a function of temperature and pressure in accordance with IAPWS R7-97 formulation.
tpr(T, p)
tpr(T, p)
T |
absolute temperature in validity range 273.15 – 2273.15, [K].
Type: |
p |
absolute pressure in validity range 0 – 100 MPa, [MPa].
Type: |
Vectors T
and p
both must have the same length. Default
recycling rules
are not applicable in this context.
The accuracy of calculation for this property in Region 3 depends
on accuracy of specific volume in this region. See details for
tpv
.
mass density, [], or the next error code:
-10
Fail to determine region in temperature-pressure space into which the entire range of validity of IAPWS R7-97 is divided. Possibly values of one or both arguments are out of bounds or in undeterminable subspace.
-20
Fail to determine subregion inside Region 3 in accordance with IAPWS SR5-05. Possibly values of one or both arguments are in undeterminable subspace or near singularity.
Type: NumericVector
IAPWS R7-97 (2012), Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam. August 2007.
IAPWS SR5-05 (2016), Revised Supplementary Release on Backward Equations for Specific Volume as a Function of Pressure and Temperature v(p,T) for Region 3 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam. June 2014.
Other properties in temperature-pressure space:
tpcp()
,
tpcv()
,
tpe()
,
tph()
,
tpi()
,
tps()
,
tpu()
,
tpv()
,
tpw()
t <- c(300,300,500,300,700,700,1500,1500,2000,0) # [K] p <- c(3,80,3,.35e-2,.35e-2,30,.5,30,30,0) # [MPa] tpr(t, p)
t <- c(300,300,500,300,700,700,1500,1500,2000,0) # [K] p <- c(3,80,3,.35e-2,.35e-2,30,.5,30,30,0) # [MPa] tpr(t, p)
Calculate specific entropy as a function of temperature and pressure in accordance with IAPWS R7-97 formulation.
tps(T, p)
tps(T, p)
T |
absolute temperature in validity range 273.15 – 2273.15, [K].
Type: |
p |
absolute pressure in validity range 0 – 100 MPa, [MPa].
Type: |
Vectors T
and p
both must have the same length. Default
recycling rules
are not applicable in this context.
The accuracy of calculation for this property in Region 3 depends
on accuracy of specific volume in this region. See details for
tpv
.
specific entropy, [], or the next error code:
-10
Fail to determine region in temperature-pressure space into which the entire range of validity of IAPWS R7-97 is divided. Possibly values of one or both arguments are out of bounds or in undeterminable subspace.
-20
Fail to determine subregion inside Region 3 in accordance with IAPWS SR5-05. Possibly values of one or both arguments are in undeterminable subspace or near singularity.
Type: NumericVector
IAPWS R7-97 (2012), Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam. August 2007.
IAPWS SR5-05 (2016), Revised Supplementary Release on Backward Equations for Specific Volume as a Function of Pressure and Temperature v(p,T) for Region 3 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam. June 2014.
Other properties in temperature-pressure space:
tpcp()
,
tpcv()
,
tpe()
,
tph()
,
tpi()
,
tpr()
,
tpu()
,
tpv()
,
tpw()
t <- c(300,300,500,300,700,700,1500,1500,2000,0) # [K] p <- c(3,80,3,.35e-2,.35e-2,30,.5,30,30,0) # [MPa] tps(t, p)
t <- c(300,300,500,300,700,700,1500,1500,2000,0) # [K] p <- c(3,80,3,.35e-2,.35e-2,30,.5,30,30,0) # [MPa] tps(t, p)
Calculate specific internal energy as a function of temperature and pressure in accordance with IAPWS R7-97 formulation.
tpu(T, p)
tpu(T, p)
T |
absolute temperature in validity range 273.15 – 2273.15, [K].
Type: |
p |
absolute pressure in validity range 0 – 100 MPa, [MPa].
Type: |
Vectors T
and p
both must have the same length. Default
recycling rules
are not applicable in this context.
The accuracy of calculation for this property in Region 3 depends
on accuracy of specific volume in this region. See details for
tpv
.
specific internal energy, [], or the next error code:
-10
Fail to determine region in temperature-pressure space into which the entire range of validity of IAPWS R7-97 is divided. Possibly values of one or both arguments are out of bounds or in undeterminable subspace.
-20
Fail to determine subregion inside Region 3 in accordance with IAPWS SR5-05. Possibly values of one or both arguments are in undeterminable subspace or near singularity.
Type: NumericVector
IAPWS R7-97 (2012), Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam. August 2007.
IAPWS SR5-05 (2016), Revised Supplementary Release on Backward Equations for Specific Volume as a Function of Pressure and Temperature v(p,T) for Region 3 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam. June 2014.
Other properties in temperature-pressure space:
tpcp()
,
tpcv()
,
tpe()
,
tph()
,
tpi()
,
tpr()
,
tps()
,
tpv()
,
tpw()
t <- c(300,300,500,300,700,700,1500,1500,2000,0) # [K] p <- c(3,80,3,.35e-2,.35e-2,30,.5,30,30,0) # [MPa] tpu(t, p)
t <- c(300,300,500,300,700,700,1500,1500,2000,0) # [K] p <- c(3,80,3,.35e-2,.35e-2,30,.5,30,30,0) # [MPa] tpu(t, p)
Calculate specific volume as a function of temperature and pressure in accordance with IAPWS R7-97 formulation.
tpv(T, p)
tpv(T, p)
T |
absolute temperature in validity range 273.15 – 2273.15, [K].
Type: |
p |
absolute pressure in validity range 0 – 100 MPa, [MPa].
Type: |
Vectors T
and p
both must have the same length. Default
recycling rules
are not applicable in this context.
In current version numerical consistency of the specific volume in Region 3 of IAPWS R7-97 is considered sufficient enough for most applications. That is why no additional iteration procedures are used for reaching higher accuracy in this region.
specific volume, [], or the next error code:
-10
Fail to determine region in temperature-pressure space into which the entire range of validity of IAPWS R7-97 is divided. Possibly values of one or both arguments are out of bounds or in undeterminable subspace.
-20
Fail to determine subregion inside Region 3 in accordance with IAPWS SR5-05. Possibly values of one or both arguments are in undeterminable subspace or near singularity.
Type: NumericVector
IAPWS R7-97 (2012), Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam. August 2007.
IAPWS SR5-05 (2016), Revised Supplementary Release on Backward Equations for Specific Volume as a Function of Pressure and Temperature v(p,T) for Region 3 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam. June 2014.
Other properties in temperature-pressure space:
tpcp()
,
tpcv()
,
tpe()
,
tph()
,
tpi()
,
tpr()
,
tps()
,
tpu()
,
tpw()
t <- c(300,300,500,300,700,700,1500,1500,2000,0) # [K] p <- c(3,80,3,.35e-2,.35e-2,30,.5,30,30,0) # [MPa] tpv(t, p)
t <- c(300,300,500,300,700,700,1500,1500,2000,0) # [K] p <- c(3,80,3,.35e-2,.35e-2,30,.5,30,30,0) # [MPa] tpv(t, p)
Calculate speed of sound as a function of temperature and pressure in accordance with IAPWS R7-97 formulation.
tpw(T, p)
tpw(T, p)
T |
absolute temperature in validity range 273.15 – 2273.15, [K].
Type: |
p |
absolute pressure in validity range 0 – 100 MPa, [MPa].
Type: |
Vectors T
and p
both must have the same length. Default
recycling rules
are not applicable in this context.
The accuracy of calculation for this property in Region 3 depends
on accuracy of specific volume in this region. See details for
tpv
.
speed of sound, [], or the next error code:
-10
Fail to determine region in temperature-pressure space into which the entire range of validity of IAPWS R7-97 is divided. Possibly values of one or both arguments are out of bounds or in undeterminable subspace.
-20
Fail to determine subregion inside Region 3 in accordance with IAPWS SR5-05. Possibly values of one or both arguments are in undeterminable subspace or near singularity.
Type: NumericVector
IAPWS R7-97 (2012), Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam. August 2007.
IAPWS SR5-05 (2016), Revised Supplementary Release on Backward Equations for Specific Volume as a Function of Pressure and Temperature v(p,T) for Region 3 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam. June 2014.
Other properties in temperature-pressure space:
tpcp()
,
tpcv()
,
tpe()
,
tph()
,
tpi()
,
tpr()
,
tps()
,
tpu()
,
tpv()
t <- c(300,300,500,300,700,700,1500,1500,2000,0) # [K] p <- c(3,80,3,.35e-2,.35e-2,30,.5,30,30,0) # [MPa] tpw(t, p)
t <- c(300,300,500,300,700,700,1500,1500,2000,0) # [K] p <- c(3,80,3,.35e-2,.35e-2,30,.5,30,30,0) # [MPa] tpw(t, p)