Skip to content

Commit

Permalink
minor enhancement to PH vle spec
Browse files Browse the repository at this point in the history
  • Loading branch information
yoelcortes committed Sep 4, 2022
1 parent 9ccb07f commit f781c9e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions thermosteam/equilibrium/vle.py
Original file line number Diff line number Diff line change
Expand Up @@ -1120,17 +1120,17 @@ def f(V):
self._T = thermal_condition.T = T

y0 = f(0.)
if y0 > 0.:
if y0 > self.H_hat_tol:
self._T = thermal_condition.T = self.mixture.xsolve_T_at_HP(
self._phase_data, H, T, P
)
else:
elif y0 < -self.H_hat_tol:
y1 = f(1.)
if y1 < 0.:
if y1 < -self.H_hat_tol:
self._T = thermal_condition.T = self.mixture.xsolve_T_at_HP(
self._phase_data, H, T, P
)
else:
elif y1 > self.H_hat_tol:
flx.IQ_interpolation(f,
0., 1., y0, y1, self._V, self.V_tol, self.H_hat_tol,
maxiter=self.maxiter,
Expand Down

0 comments on commit f781c9e

Please sign in to comment.