Skip to content

Commit

Permalink
Fix testing disabling saturarion properties if convergence problem
Browse files Browse the repository at this point in the history
  • Loading branch information
jjgomera committed Apr 20, 2021
1 parent 0a687f6 commit f252e01
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions iapws/humidAir.py
Expand Up @@ -686,8 +686,14 @@ def f(T):

# Saturation related properties
A_sat = self._eq(self.T, self.P)
self.xa_sat = A_sat*MW/Ma/(1-A_sat*(1-MW/Ma))
self.RH = (1-self.xa)/(1-self.xa_sat)
if A_sat:
self.xa_sat = A_sat*MW/Ma/(1-A_sat*(1-MW/Ma))
self.RH = (1-self.xa)/(1-self.xa_sat)
else:
self.xa_sat = None
self.RH = None
self.msg = "Saturation state don't converge"
self.status = 3

def derivative(self, z, x, y):
"""
Expand Down

0 comments on commit f252e01

Please sign in to comment.