Skip to content

Commit

Permalink
Merge pull request #6 from gdmiron/master
Browse files Browse the repository at this point in the history
Bugfix in cp_ft calculation
  • Loading branch information
gdmiron authored Aug 11, 2019
2 parents bf68c5e + 497cf4b commit 2d38d8b
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions ThermoFun/Substances/EmpiricalCpIntegration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,17 @@ auto thermoPropertiesEmpCpIntegration(Reaktoro_::Temperature TK, Reaktoro_::Pres
// }

// get Cp interval -> this has to go!!!!
for (unsigned i=0; i<thermo_parameters.temperature_intervals.size(); i++)
for (size_t i=0; i<thermo_parameters.temperature_intervals.size(); i++)
{
if ((thermo_parameters.temperature_intervals[i][0] <= TK) && (thermo_parameters.temperature_intervals[i][1] > 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)
Expand Down

0 comments on commit 2d38d8b

Please sign in to comment.