From 6bb1ef1c5c3523f8b85ab9beffd4bcc67b985bad Mon Sep 17 00:00:00 2001 From: cortespea Date: Fri, 5 Jan 2024 08:26:56 -0600 Subject: [PATCH] add special case --- thermosteam/equilibrium/lle.py | 1 + 1 file changed, 1 insertion(+) diff --git a/thermosteam/equilibrium/lle.py b/thermosteam/equilibrium/lle.py index 4284cfc9..73a6155b 100644 --- a/thermosteam/equilibrium/lle.py +++ b/thermosteam/equilibrium/lle.py @@ -80,6 +80,7 @@ def pseudo_equilibrium_outer_loop(Kgammayphi, z, T, n, f_gamma, gamma_args, inne phi = phase_fraction(z, K, phi) except ZeroDivisionError: raise NoEquilibrium + if np.isnan(phi): raise NoEquilibrium if phi > 1: phi = 1 - 1e-16 if phi < 0: phi = 1e-16 Kgammayphi_new[:2*n] = Kgammay