diff --git a/ThermoFun/Substances/EmpiricalCpIntegration.cpp b/ThermoFun/Substances/EmpiricalCpIntegration.cpp index 405f6c57..ad1d01c1 100644 --- a/ThermoFun/Substances/EmpiricalCpIntegration.cpp +++ b/ThermoFun/Substances/EmpiricalCpIntegration.cpp @@ -44,13 +44,17 @@ auto thermoPropertiesEmpCpIntegration(Reaktoro_::Temperature TK, Reaktoro_::Pres // } // get Cp interval -> this has to go!!!! - for (unsigned i=0; i TK)) - { - k = i; - break; - } + if (thermo_parameters.temperature_intervals[i].size() > 0) { + if ((thermo_parameters.temperature_intervals[i][0] <= TK) && (thermo_parameters.temperature_intervals[i][1] > TK)) + { + k = i; + break; + } } + else { + k = 0; + } } if (k<0)