Skip to content

Commit

Permalink
seuif97 in Rust
Browse files Browse the repository at this point in the history
  • Loading branch information
thermalogic committed Aug 14, 2023
1 parent eb4461e commit 07ae5ef
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion demo_using_lib/Diagram_T-S.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,31 @@
isoh = np.linspace(100, 3600, 27)
isop = np.array([Pt, 0.001, 0.002, 0.004, 0.01, 0.02, 0.05, 0.1, 0.2, 0.5,
1.0, 2.0, 5.0, 10.0, 15, 20.0, 22, 25, 28, 30, 35, 40, 45, 50.0, 60, 80, 100.0])

# Calculating isoenthalpic lines isoh(200, 3600)kJ/kg
for h in isoh:
T = np.array([ph(p, h, OT) for p in isop])
S = np.array([ph(p, h, OS) for p in isop])
if any(np.isnan(S)):
i_nan = np.where(np.isnan(S))
il = (list(i_nan[0]))
T = np.delete(T, il)
S = np.delete(S, il)
plt.plot(S, T, 'g', lw=0.5)

# Calculating isobar lines isop(611.657e-6,100)MPa
for p in isop:
T = np.array([ph(p, h, OT) for h in isoh])
S = np.array([ph(p, h, OS) for h in isoh])
if any(np.isnan(S)):
i_nan = np.where(np.isnan(S))
il = (list(i_nan[0]))
T = np.delete(T, il)
S = np.delete(S, il)
plt.plot(S, T, 'b', lw=0.5)

# saturate water to wet steam
for p in [ Pt,0.001, 0.002]:
for p in [Pt, 0.001, 0.002]:
s = ph(p, 100, OS)
t = ph(p, 100, OT)
s_sat_water = px(p, 0.0, OS)
Expand Down
Binary file modified img/T-S.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 07ae5ef

Please sign in to comment.