PropertyPlot Not Solving for States Correctly #2321
Replies: 1 comment
-
Some time ago I created a small package for seamless integration of fluid property diagrams with matplotlib interface (and being able to label the isolines and some other reasons) using CoolProp: https://fluprodia.readthedocs.io/en/latest/usage.html. The API let's you select which isolines to calculate and once calculated you can create logp,h T,s h,s... diagrams. All data are availble through the For example for water: from fluprodia import FluidPropertyDiagram
import matplotlib.pyplot as plt
import numpy as np
diagram = FluidPropertyDiagram(fluid='H2O')
diagram.set_unit_system(T='°C', h='kJ/kg', p='bar')
Q = np.linspace(0, 1, 11)
T = np.arange(25, 501, 25)
p = np.geomspace(0.01, 1000, 6) * 1e5
v = np.geomspace(0.001, 10, 5)
s = np.linspace(1000, 10000, 10)
h = np.linspace(0, 3600, 19)
diagram.set_isolines(Q=Q, T=T, p=p, v=v, s=s, h=h)
diagram.calc_isolines()
fig, ax = plt.subplots(1, figsize=(8, 5))
diagram.draw_isolines(diagram_type='logph', fig=fig, ax=ax, x_min=0, x_max=3000, y_min=0.01, y_max=1000)
plt.tight_layout()
fig.savefig('logph_diagram_H2O.png', dpi=300)
fig, ax = plt.subplots(1, figsize=(8, 5))
diagram.draw_isolines(diagram_type='Ts', fig=fig, ax=ax, x_min=0, x_max=8000, y_min=0, y_max=700)
plt.tight_layout()
fig.savefig('Ts_diagram_H2O.png', dpi=300) If somebody is interested in investing some time and if it is desired, this may also be integrated into CoolProp?! Best |
Beta Was this translation helpful? Give feedback.
-
My property plots for R120 and R744 are erroring out. The plots on this page looks complete while mine looks like:
Code:
Ideas?
Beta Was this translation helpful? Give feedback.
All reactions