Fixed some errors with two-phase Trho inputs

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
This commit is contained in:
Ian Bell
2014-08-10 20:38:59 +02:00
parent 36d601490f
commit 86641af670
2 changed files with 4 additions and 1 deletions

View File

@@ -609,7 +609,6 @@ void FlashRoutines::HSU_P_flash(HelmholtzEOSMixtureBackend &HEOS, int other)
HSU_P_flash_singlephase_Brent(HEOS, other, value, Tmin, Tmax);
HEOS._Q = -1;
}
else{throw ValueError("Can't be non homogeneous phase at this point");}
}
else
{

View File

@@ -1017,6 +1017,10 @@ void HelmholtzEOSMixtureBackend::T_phase_determination_pure_or_pseudopure(int ot
default:
throw ValueError(format("bad input for other"));
}
// Update the states
this->SatL->update(DmolarT_INPUTS, HEOS.SatL->rhomolar(), HEOS.SatL->T());
this->SatV->update(DmolarT_INPUTS, HEOS.SatV->rhomolar(), HEOS.SatV->T());
if (Q < -100*DBL_EPSILON){
this->_phase = iphase_liquid; _Q = -1000; return;