I have already checked those examples (UDRGM Example: Ideal Gas Equation of State), where the Cp and Enthalpy are given like this:
double IDEAL_specific_heat(cell_t cell, Thread *thread, double Temp, double density, double Pabs, double yi[])
{
double cp = 1004.16; /* (J/Kg/K) */
return cp; /* (J/Kg/K) */
}
double IDEAL_enthalpy(cell_t cell, Thread *thread, double Temp, double density, double Pabs, double yi[])
{
Temp = C_T(cell,thread); /* Cell Static Temperature (K) */ <- I had to add this line because the imported Temp was not the right one
double cp = IDEAL_specific_heat(cell, thread, Temp, density, Pabs, yi); /* (J/Kg/K) */
double h = Temp * cp;
return h; /* (J/Kg) */
}
And I have the same error when I add that new line, the temperature in the fluid domain tends to 0 and therefore there is an error with the enthalpy calculation.