Skip to content

Commit

Permalink
Fix where the Rratio is applied for GERG
Browse files Browse the repository at this point in the history
Appears to be correct in GERG-2008 and not in GERG-2004
  • Loading branch information
ianhbell committed Mar 17, 2024
1 parent 4312b0b commit 441867a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/teqp/models/GERG/GERG.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -357,12 +357,12 @@ class GERG200XAlphaig{
const std::vector<double>& theta0i = c.theta0;
using std::abs;
double Tci = Tc[i];
auto out = forceeval(log(rhomolar/rhoc[i]) + n0i[1] + n0i[1]*Tci/T+ n0i[3]*log(Tci/T));
auto out = forceeval(n0i[1] + n0i[1]*Tci/T+ n0i[3]*log(Tci/T));
if (theta0i[4] != 0) { out += n0i[4]*log(abs(sinh(theta0i[4]*Tci/T))); }
if (theta0i[6] != 0) { out += n0i[6]*log(abs(sinh(theta0i[6]*Tci/T))); }
if (theta0i[5] != 0) { out -= n0i[5]*log(abs(cosh(theta0i[5]*Tci/T))); }
if (theta0i[7] != 0) { out -= n0i[7]*log(abs(cosh(theta0i[7]*Tci/T))); }
return forceeval(Rstar/R*out);
return forceeval(log(rhomolar/rhoc[i]) + Rstar/R*out); // Note that the GERG-2004 manuscript has the wrong location for the ratio Rstar/R and the GERG-2008 manuscript is correct
}

template<typename TType, typename RhoType, typename MoleFractions>
Expand Down

0 comments on commit 441867a

Please sign in to comment.