Skip to content

Commit

Permalink
Apply bug #77 fixing too in saturation routine
Browse files Browse the repository at this point in the history
  • Loading branch information
jjgomera committed Dec 9, 2024
1 parent 4ed3e83 commit 16b4806
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions iapws/iapws95.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,11 @@ def _phird(tau, delta, coef):
Delta = Tita**2+B*((delta-1)**2)**a
Deltad = (delta-1)*(A*Tita*2/bt*((delta-1)**2)**(0.5/bt-1)
+ 2*B*a*((delta-1)**2)**(a-1))
DeltaBd = b*Delta**(b-1)*Deltad

if Delta == 0:
DeltaBd = 0
else:
DeltaBd = b*Delta**(b-1)*Deltad

fird += n*(Delta**b*(F+delta*Fd)+DeltaBd*delta*F)

Expand Down Expand Up @@ -257,7 +261,12 @@ def _phirt(tau, delta, coef):
F = exp(-C*(delta-1)**2-D*(tau-1)**2)
Ft = -2*D*F*(tau-1)
Delta = Tita**2+B*((delta-1)**2)**a
DeltaBt = -2*Tita*b*Delta**(b-1)

if Delta == 0:
DeltaBt = 0
else:
DeltaBt = -2*Tita*b*Delta**(b-1)

firt += n*delta*(DeltaBt*F+Delta**b*Ft)

return firt
Expand Down Expand Up @@ -441,7 +450,6 @@ class MEoS(_fase):
cp0_cv = None
gamma0 = None


@classmethod
def from_list(cls, p1name, p1val, p2name, p2val):
"""Speed up method using multiprocessing for multiple point calculation
Expand Down

0 comments on commit 16b4806

Please sign in to comment.