The ideal gas constant for moist air is computed from the gas phase composition.
The first entry in composition vector X is the steam mass fraction of the gas phase.
This function assumed a fully gas mixture thus remains valid for a relative humidity bellow or equal to 1.
function gasConstant_X
extends Modelica.Icons.Function;
input SI.MassFraction X[:] "Gas phase composition";
output SI.SpecificHeatCapacity R "Ideal gas constant";
end gasConstant_X;