Skip to content

Commit

Permalink
minor enhancements
Browse files Browse the repository at this point in the history
  • Loading branch information
yoelcortes committed May 31, 2024
1 parent b169c65 commit cfecfd9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions thermosteam/_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,8 @@ def _create_energy_departure_equations(self):
def _update_energy_departure_coefficient(self, coefficients):
source = self.source
if source is None: return
if not source._get_energy_departure_coefficient:
raise NotImplementedError(f'{source!r} has no method `_get_energy_departure_coefficient`')
coeff = source._get_energy_departure_coefficient(self)
if coeff is None: return
key, value = coeff
Expand Down
1 change: 1 addition & 0 deletions thermosteam/equilibrium/vle.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def xV_iter(
Ks[:] = pcf_Psat_over_P * f_gamma(x, T, *gamma_args) / f_phi(y, T, P)
V = binary.solve_phase_fraction_Rashford_Rice(z, Ks, xV[-1], z_light, z_heavy)
update_xV(xV, V, Ks, z)
Ks[Ks < 1e-16] = 1e-16
xVlogK[-n:] = np.log(Ks)
return xVlogK

Expand Down
2 changes: 1 addition & 1 deletion thermosteam/utils/abstract_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class AbstractMethodType:
@property
def __name__(self): return "AbstractMethod"
def __new__(self): return AbstractMethod
def __call__(self, *args, **kwargs): return NotImplemented
def __call__(self): return NotImplemented
def __bool__(self): return False
def __repr__(self): return "AbstractMethod"

Expand Down

0 comments on commit cfecfd9

Please sign in to comment.