xopto.materials.density.water module

class McCutcheon(t: float = 293)[source]

Bases: xopto.materials.density.base.Density

Density of water as given in: Water density as function of temperature and salt concentration McCutcheon, S.C., Martin, J.L, Barnwell, T.O. Jr. 1993. Water Quality in Maidment, D.R. (Editor). Handbook of Hydrology, McGraw-Hill, New York, NY (p. 11.3).

The density of water \rho follows the folowing temperature T (C o) dependence. \rho = 1000(1 - (T + 288.9414)/(508929.2*(T + 68.12963))*(T - 3.9863)^2)

Water density \rho' as a function of temperature and salinity
:math: kg/m 3 as a function of temperature and salinity s in g/kg.

\rho &= \rho + As + Bs^{3/2} + Cs^2

A &= 8.24493 10^{-1} - 4.0899 10^{-3}T + 7.6438 10^{-5}T^2 - 8.2467 10^{-7}T^3 + 5.3675 10^{-9}T^4

B &= -5.724 10^{-3} + 1.0227 10^{-4}T - 1.6546 10^{-6}T^2

C &= 4.8314 10^{-4}

Parameters

t (float) – Temperature of the medium (K).

check_salinity(salinity: float)[source]

Check if the salinity is within valid range and display a warning if not.

Parameters

salinity (float) – Salinity from 0.0 to 0.035.

is_valid_salinity(salinity: float)bool[source]

Check if the salinity is within the valid range.

Parameters

salinity (float or np.ndarray) – Water salinity from 0.0 to 1.0.

Returns

valid – True if the salinity is within the valid range.

Return type

bool

material = 'water'