wrapper to extract d from state
function density_pTX input SI.Pressure p; input SI.Temp_K T; input MassFraction X[:] "mass fraction m_NaCl/m_Sol"; input FixedPhase phase = 0 "2 for two-phase, 1 for one-phase, 0 if not known"; input Real[nX_gas + 1] n_g_norm_start = fill(0.5, nX_gas + 1) "start value, all gas in gas phase, all water liquid"; output SI.Density d; end density_pTX;