Fixed a problem with the VCS equilibrium solver at constant HP or UP

A sign error when limiting the temperature step caused the solver to fail if
the initial temperature was higher than sqrt(Tlow*Thigh).

Cherry-picked from trunk (r1883).
This commit is contained in:
Ray Speth 2012-11-05 19:26:11 +00:00
parent 353fb38b11
commit ba7725fb5b

View file

@ -293,7 +293,7 @@ int vcs_MultiPhaseEquil::equilibrate_HP(doublereal Htarget,
Tnew = sqrt(Tlow*Thigh);
dT = Tnew - Tnow;
if (dT < -200.) {
dT = 200;
dT = -200;
}
if (dT > 200.) {
dT = 200.;