iapws.iapws08 module
IAPWS standard for Seawater IAPWS08 and related functionality. The module include:
SeaWater
: Global module class with all the functionality integrated
- Other functionality:
_Tb()
: Boiling temperature of seawater_Tf()
: Freezing temperature of seawater_Triple()
: Triple point properties of seawater_OsmoticPressure()
: Osmotic pressure of seawater_ThCond_SeaWater()
: Thermal conductivity of seawater_Tension_SeaWater()
: Surface tension of seawater_solNa2SO4()
: Solubility of sodium sulfate in aqueous mixtures of sodium chloride and sulfuric acid_critNaCl()
: Critical locus of aqueous solutions of sodium chloride
- class iapws.iapws08.SeaWater(**kwargs)[source]
Class to model seawater with standard IAPWS-08
- Parameters:
- Returns:
rho (float) – Density, [kg/m³]
v (float) – Specific volume, [m³/kg]
h (float) – Specific enthalpy, [kJ/kg]
s (float) – Specific entropy, [kJ/kg·K]
u (float) – Specific internal energy, [kJ/kg]
g (float) – Specific Gibbs free energy, [kJ/kg]
a (float) – Specific Helmholtz free energy, [kJ/kg]
cp (float) – Specific isobaric heat capacity, [kJ/kg·K]
cv (float) – Specific isochoric heat capacity, [kJ/kg·K]
gt (float) – Derivative Gibbs energy with temperature, [kJ/kg·K]
gp (float) – Derivative Gibbs energy with pressure, [m³/kg]
gtt (float) – Derivative Gibbs energy with temperature square, [kJ/kg·K²]
gtp (float) – Derivative Gibbs energy with pressure and temperature, [m³/kg·K]
gpp (float) – Derivative Gibbs energy with temperature square, [m³/kg·MPa]
gs (float) – Derivative Gibbs energy with salinity, [kJ/kg]
gsp (float) – Derivative Gibbs energy with salinity and pressure, [m³/kg]
alfav (float) – Thermal expansion coefficient, [1/K]
betas (float) – Isentropic temperature-pressure coefficient, [K/MPa]
xkappa (float) – Isothermal compressibility, [1/MPa]
ks (float) – Isentropic compressibility, [1/MPa]
w (float) – Sound Speed, [m/s]
k (float) – Thermal conductivity, [W/m·K]
sigma (float) – Surface tension, [N/m]
m (float) – Molality of seawater, [mol/kg]
mu (float) – Relative chemical potential, [kJ/kg]
muw (float) – Chemical potential of H2O, [kJ/kg]
mus (float) – Chemical potential of sea salt, [kJ/kg]
osm (float) – Osmotic coefficient, [-]
haline (float) – Haline contraction coefficient, [kg/kg]
Notes
Warning
if input isn’t in limit:261 ≤ T ≤ 353
0 < P ≤ 100
0 ≤ S ≤ 0.12
References
IAPWS, Release on the IAPWS Formulation 2008 for the Thermodynamic Properties of Seawater, http://www.iapws.org/relguide/Seawater.html
IAPWS, Supplementary Release on a Computationally Efficient Thermodynamic Formulation for Liquid Water for Oceanographic Use, http://www.iapws.org/relguide/OceanLiquid.html
IAPWS, Guideline on the Thermal Conductivity of Seawater, http://www.iapws.org/relguide/Seawater-ThCond.html
IAPWS, Guideline on the Surface Tension of Seawater, http://www.iapws.org/relguide/Seawater-Surf.html
IAPWS, Revised Advisory Note No. 3: Thermodynamic Derivatives from IAPWS Formulations, http://www.iapws.org/relguide/Advise3.pdf
IAPWS, Advisory Note No. 5: Industrial Calculation of the Thermodynamic Properties of Seawater, http://www.iapws.org/relguide/Advise5.html
Examples
>>> salt = iapws.SeaWater(T=300, P=1, S=0.04) >>> salt.rho 1026.7785717245113 >>> salt.gs 88.56221805501536 >>> salt.haline 0.7311487666026304
- Attributes:
- P
- T
- a
- alfav
- betas
- cp
- cv
- h
- haline
- k
- ks
- m
- mu
- mus
- muw
- osm
- rho
- s
- sigma
- u
- v
- w
- xkappa
Methods
__call__
(**kwargs)Make instance callable to can add input parameter one to one
calculo
()Calculate procedure
derivative
(z, x, y)Wrapper derivative for custom derived properties where x, y, z can be: P, T, v, u, h, s, g, a
saline
(T, P, S)Eq 4
- status = 0
- msg = 'Undefined'
- T = None
- P = None
- rho = None
- v = None
- s = None
- cp = None
- cv = None
- h = None
- u = None
- a = None
- alfav = None
- betas = None
- xkappa = None
- ks = None
- w = None
- k = None
- sigma = None
- m = None
- mu = None
- muw = None
- mus = None
- osm = None
- haline = None
- kwargs = {'IF97': False, 'P': 0.0, 'S': None, 'T': 0.0, 'fast': False}
- derivative(z, x, y)[source]
Wrapper derivative for custom derived properties where x, y, z can be: P, T, v, u, h, s, g, a
- iapws.iapws08._Tb(P, S)[source]
Procedure to calculate the boiling temperature of seawater
- Parameters:
- Returns:
Tb – Boiling temperature, [K]
- Return type:
References
IAPWS, Advisory Note No. 5: Industrial Calculation of the Thermodynamic Properties of Seawater, http://www.iapws.org/relguide/Advise5.html, Eq 7
- iapws.iapws08._Tf(P, S)[source]
Procedure to calculate the freezing temperature of seawater
- Parameters:
- Returns:
Tf – Freezing temperature, [K]
- Return type:
References
IAPWS, Advisory Note No. 5: Industrial Calculation of the Thermodynamic Properties of Seawater, http://www.iapws.org/relguide/Advise5.html, Eq 12
- iapws.iapws08._Triple(S)[source]
Procedure to calculate the triple point pressure and temperature for seawater
- Parameters:
S (float) – Salinity, [kg/kg]
- Returns:
prop –
Dictionary with the triple point properties:
Tt: Triple point temperature, [K]
Pt: Triple point pressure, [MPa]
- Return type:
References
IAPWS, Advisory Note No. 5: Industrial Calculation of the Thermodynamic Properties of Seawater, http://www.iapws.org/relguide/Advise5.html, Eq 7
- iapws.iapws08._OsmoticPressure(T, P, S)[source]
Procedure to calculate the osmotic pressure of seawater
- Parameters:
- Returns:
Posm – Osmotic pressure, [MPa]
- Return type:
References
IAPWS, Advisory Note No. 5: Industrial Calculation of the Thermodynamic Properties of Seawater, http://www.iapws.org/relguide/Advise5.html, Eq 15
- iapws.iapws08._ThCond_SeaWater(T, P, S)[source]
Equation for the thermal conductivity of seawater
- Parameters:
- Returns:
k – Thermal conductivity excess relative to that of the pure water, [W/mK]
- Return type:
Notes
Raise
NotImplementedError
if input isn’t in limit:273.15 ≤ T ≤ 523.15
0 ≤ P ≤ 140
0 ≤ S ≤ 0.17
Examples
>>> _ThCond_Seawater(293.15, 0.1, 0.035) -0.00418604
References
IAPWS, Guideline on the Thermal Conductivity of Seawater, http://www.iapws.org/relguide/Seawater-ThCond.html
- iapws.iapws08._Tension_SeaWater(T, S)[source]
Equation for the surface tension of seawater
- Parameters:
- Returns:
σ – Surface tension, [N/m]
- Return type:
Notes
Raise
NotImplementedError
if input isn’t in limit:0 ≤ S ≤ 0.131 for 274.15 ≤ T ≤ 365.15
0 ≤ S ≤ 0.038 for 248.15 ≤ T ≤ 274.15
Examples
>>> _Tension_Seawater(253.15, 0.035) -0.07922517961
References
IAPWS, Guideline on the Surface Tension of Seawater, http://www.iapws.org/relguide/Seawater-Surf.html
- iapws.iapws08._solNa2SO4(T, mH2SO4, mNaCl)[source]
Equation for the solubility of sodium sulfate in aqueous mixtures of sodium chloride and sulfuric acid
- Parameters:
- Returns:
S – Molal solutility of sodium sulfate, [mol/kg(water)]
- Return type:
Notes
Raise
NotImplementedError
if input isn’t in limit:523.15 ≤ T ≤ 623.15
0 ≤ mH2SO4 ≤ 0.75
0 ≤ mNaCl ≤ 2.25
Examples
>>> _solNa2SO4(523.15, 0.25, 0.75) 2.68
References
IAPWS, Solubility of Sodium Sulfate in Aqueous Mixtures of Sodium Chloride and Sulfuric Acid from Water to Concentrated Solutions, http://www.iapws.org/relguide/na2so4.pdf
- iapws.iapws08._critNaCl(x)[source]
Equation for the critical locus of aqueous solutions of sodium chloride
- Parameters:
x (float) – Mole fraction of NaCl, [-]
- Returns:
prop –
A dictionary withe the properties:
Tc: critical temperature, [K]
Pc: critical pressure, [MPa]
rhoc: critical density, [kg/m³]
- Return type:
Notes
Raise
NotImplementedError
if input isn’t in limit:0 ≤ x ≤ 0.12
Examples
>>> _critNaCl(0.1) 975.571016
References
IAPWS, Revised Guideline on the Critical Locus of Aqueous Solutions of Sodium Chloride, http://www.iapws.org/relguide/critnacl.html