Skip to content

Commit e85dc7b

Browse files
committed
Use logspace for plotting region 3/4 boundary in density_temperature_plot()
1 parent d85297b commit e85dc7b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

IAPWS97.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,10 @@ def density_temperature_plot(plt, subplot = 111):
465465
dw = np.array([cowat(tx, px)[0] for tx, px in zip(t, p)])
466466
plt.plot(t, ds, color = 'k', marker = '', linestyle = '-')
467467
plt.plot(t, dw, color = 'k', marker = '', linestyle = '-')
468-
t = np.linspace(350, tcritical, 50)
468+
469+
a = np.log10(tcritical - 350)
470+
dt = np.concatenate((np.zeros(1), np.logspace(-2, a, 100)))
471+
t = tcritical - dt[::-1]
469472
p = np.array([sat(tx) for tx in t])
470473
def f(dx, tx, px): return super(dx, tx)[0] - px
471474
ds = np.array([fsolve(f, 120. + 25. / 200 * (tx - 350.), (tx, px))

0 commit comments

Comments
 (0)