mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-02-09 13:25:12 -05:00
Fixed some errors with two-phase Trho inputs
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user