Modelica.Media.Interfaces.PartialSimpleIdealGasMedium.setState_psX is wrong.
redeclare replaceable function setState_psX
"Return thermodynamic state from p, s, and X or Xi"
extends Modelica.Icons.Function;
input AbsolutePressure p "Pressure";
input SpecificEntropy s "Specific entropy";
input MassFraction X[:]=reference_X "Mass fractions";
output ThermodynamicState state "Thermodynamic state record";
algorithm
state := ThermodynamicState(p=p, T=Modelica.Math.exp(s/cp_const +
Modelica.Math.log(reference_T) + R_gas*Modelica.Math.log(p/reference_p)));
end setState_psX;
state := ThermodynamicState(p=p, T=Modelica.Math.exp(s/cp_const +
Modelica.Math.log(reference_T) + R_gas/cp_const*Modelica.Math.log(p/reference_p)));
is correct (or T=reference_T*Modelica.Math.exp(1/cp_const*(s + R_gas*Modelica.Math.log(p/reference_p))) )
Modelica.Media.Interfaces.PartialSimpleIdealGasMedium.setState_psXis wrong.is correct (or
T=reference_T*Modelica.Math.exp(1/cp_const*(s + R_gas*Modelica.Math.log(p/reference_p))))