mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-01-22 04:18:02 -05:00
import CoolProp
import matplotlib.pyplot as plt
HEOS = CoolProp.AbstractState('HEOS','Methane&Ethane')
for x0 in [0.2, 0.4, 0.6, 0.8]:
HEOS.set_mole_fractions([x0, 1-x0])
try:
HEOS.build_phase_envelope("dummy")
except: pass
PE = HEOS.get_phase_envelope_data()
plt.plot(PE.T, PE.p)
plt.xlabel('Temperature [K]')
plt.ylabel('Pressure [Pa]')
plt.tight_layout()
plt.show()