In [1]:
from pathlib import Path
import sys
notebook_directory_parent = Path.cwd().resolve().parent
if str(notebook_directory_parent) not in sys.path:
sys.path.append(str(notebook_directory_parent))
In [3]:
# Import the things you need
from CoolProp.CoolProp import PropsSI
import CoolProp
In [4]:
# Print some information on the currently used version of coolprop
print(CoolProp.__version__, CoolProp.__gitrevision__)
In [5]:
# Density of carbon dioxide at 100 bar and 25 C
PropsSI('D', 'T', 298.15, 'P', 100e5, 'CO2')
Out[5]:
In [6]:
# Saturated vapor enthalpy [J/kg] of R134a at 25 C
PropsSI('H', 'T', 298.15, 'Q', 1, 'R134a')
Out[6]:
cf. http://www.coolprop.org/coolprop/HighLevelAPI.html#high-level-api
T
is the output property returned
In [7]:
# Saturation temperature of Water at 1 atm in K
PropsSI('T', 'P', 101325, 'Q', 0, 'Water')
Out[7]:
In [8]:
PropsSI('T', 'P', 101325, 'Q', 0, 'N2')
Out[8]:
In [9]:
PropsSI('T', 'P', 101325, 'Q', 0, 'Nitrogen')
Out[9]:
In [ ]: