WATER_density_rho(): water density according to a temperature a salinity

About:
Calculate the density of water.

\begin{equation} \rho = 1000 \times \left(1 - \frac{T+288.9414}{508929.2\times \left(T+68.12963 \right)}\times \left(T-3.9863 \right)^2\right) \end{equation}



  • $a_1 = 0.824493$
  • $a_2 = 0.0040899$
  • $a_3 = 0.000076438$
  • $a_4 = 0.00000082467$
  • $a_5 = 0.0000000053675$
  • \begin{equation} A = a_1 - a_2\times T + a_3\times T^2 -a_4 \times T^3 + a_5\times T^4 \end{equation}
  • $b_1 = 0.005724$
  • $b_2 = 0.00010227$
  • $b_3 = 0.0000016546$
  • \begin{equation} B = -b_1 + b_2 \times T - b_3\times T^2 \end{equation} \begin{equation} C = 0.00048314 \end{equation} \begin{equation} \rho_{salinity} = \rho + A\times s + B\times s^{3/2} + C\times s^2 \end{equation} 
     Where,
    • $T$, temperature - $^oC$;
    • $\rho$, density of pure water - $\frac{kg}{m^3}$;
    • $s$, water salinity - $\frac{g}{kg}$;
    • $\rho_{salinity}$, density of water - $\frac{kg}{m^3}$

    more information about water density please see Wikipedia.

    Module: WaterProperties
    Function: WATER_density_rho(t,s)
    Definition of variables:
    • t, temperature - ÂșC;
    • s, salinity - g/kg
    Sample code:
    from WaterProperties import *
    
    t = 25 #oC
    s = 2.5 #g/kg
    rho = WATER_density_rho(t,s)
    
    print("rho:",rho,"kg/m3")
    
    Result:
    rho: 998.959606051 kg/m3