Files
CoolProp/wrappers/Python
Ian Bell 4fee9a154a Python wrapper can now output phase envelopes
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()
2014-09-07 00:53:45 +02:00
..
2014-08-03 14:00:46 +02:00