Relative humidity is computed from pressure, temperature and composition with 1.0 as the upper limit at saturation. Water mass fraction is the first entry in the composition vector.
function relativeHumidity_pTX
extends Modelica.Icons.Function;
input SI.Pressure p "Pressure";
input SI.Temperature T "Temperature";
input SI.MassFraction[:] X "Composition";
output Real phi "Relative humidity";
end relativeHumidity_pTX;