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:
class iapws.iapws08.SeaWater(**kwargs)[source]

Class to model seawater with standard IAPWS-08

Parameters:
  • T (float) – Temperature, [K]
  • P (float) – Pressure, [MPa]
  • S (float) – Salinity, [kg/kg]
  • fast (bool, default False) – Use the Supplementary release SR7-09 to speed up the calculation
  • IF97 (bool, default False) – Use the Advisory Note No. 5 with industrial formulation
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

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
status = 0
msg = 'Undefined'
kwargs = {'IF97': False, 'P': 0.0, 'S': None, 'T': 0.0, 'fast': False}
calculo()[source]

Calculate procedure

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

classmethod _water(T, P)[source]

Get properties of pure water, Table4 pag 8

classmethod _waterIF97(T, P)[source]
classmethod _waterSupp(T, P)[source]

Get properties of pure water using the supplementary release SR7-09, Table4 pag 6

classmethod _saline(T, P, S)[source]

Eq 4

iapws.iapws08._Tb(P, S)[source]

Procedure to calculate the boiling temperature of seawater

Parameters:
  • P (float) – Pressure, [MPa]
  • S (float) – Salinity, [kg/kg]
Returns:

Tb – Boiling temperature, [K]

Return type:

float

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:
  • P (float) – Pressure, [MPa]
  • S (float) – Salinity, [kg/kg]
Returns:

Tf – Freezing temperature, [K]

Return type:

float

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:dict

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:
  • T (float) – Tmperature, [K]
  • P (float) – Pressure, [MPa]
  • S (float) – Salinity, [kg/kg]
Returns:

Posm – Osmotic pressure, [MPa]

Return type:

float

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:
  • T (float) – Temperature, [K]
  • P (float) – Pressure, [MPa]
  • S (float) – Salinity, [kg/kg]
Returns:

k – Thermal conductivity excess relative to that of the pure water, [W/mK]

Return type:

float

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:
  • T (float) – Temperature, [K]
  • S (float) – Salinity, [kg/kg]
Returns:

σ – Surface tension, [N/m]

Return type:

float

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:
  • T (float) – Temperature, [K]
  • mH2SO4 (float) – Molality of sufuric acid, [mol/kg(water)]
  • mNaCl (float) – Molality of sodium chloride, [mol/kg(water)]
Returns:

S – Molal solutility of sodium sulfate, [mol/kg(water)]

Return type:

float

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:dict

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