MATLAB: Error calculating specific heat and constant pressure

gas propertiesreal gasSimscape Fluidsspecific heat

I get an error when compiling my Simscape model using a real gas specification.
Elements of Specific heat at constant pressure table must be greater than (Temperature) * (Specific volume) * (Isothermal bulk modulus) * (Isobaric thermal expansion coefficient)^2.
I verified my real gas data using the expression:
cv_TLU2 = cp_TLU2 - repmat(T_TLU2(:), 1, n) .* alpha_TLU2.^2 .* beta_TLU2 ./ rho_TLU2;
In all cases the value that I get from this is positive and also in all cases Cp is greater than the product "(Temperature) * (Specific volume) * (Isothermal bulk modulus) * (Isobaric thermal expansion coefficient)^2".
In fact I checked the output of that expression against known Cv data for this gas and it it matches exactly so I can't understand how Simscape finds an error with this.

Best Answer

This has been resolved. The wrong units were used to generate the Isobaric Thermal Expansion array.