Skip to content

Commit

Permalink
Another fix to indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ibell committed Aug 7, 2023
1 parent cafeb7a commit b0b1c7c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions PDSim/flow/flow_models.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -285,14 +285,14 @@ cpdef IsothermalWallTube(mdot,State1,State2,fixed,L,ID,OD=None,HTModel='Twall',T
# Use Newton's method to solve for the
# temperature yielding the outlet enthalpy
T = T2_star
for counter in range(30):
State2.update(dict(T=T, P=p+DELTAP/1000))
r = State2.h - h2
rprime = State2.pAS.first_partial_deriv(constants_header.iHmass, constants_header.iT, constants_header.iP)/1000 # AbstractState has enthalpy in kJ/kg
dT = -r/rprime
T += dT
if abs(r) < 0.02:
break
for counter in range(30):
State2.update(dict(T=T, P=p+DELTAP/1000))
r = State2.h - h2
rprime = State2.pAS.first_partial_deriv(constants_header.iHmass, constants_header.iT, constants_header.iP)/1000 # AbstractState has enthalpy in kJ/kg
dT = -r/rprime
T += dT
if abs(r) < 0.02:
break
else :
raise ValueError("unclear what to do here")

Expand Down

0 comments on commit b0b1c7c

Please sign in to comment.