This function computes the density as a function of temperature.
The function is based on the IDA implementation in therpro.nmf
, which
implements
d := 1000.12 + 1.43711e-2*T_degC - 5.83576e-3*T_degC^2 + 1.5009e-5*T_degC^3;
This has been converted to Kelvin, which resulted in the above expression. In addition, below 5 °C and above 100 °C, the density is replaced by a linear function to avoid inflection points. This linear extension is such that the density is once continuously differentiable.
therpro.nmf
,
but converted from Celsius to Kelvin and linearly extended.