CoolProp

7.2.0 · active · verified Thu Apr 09

CoolProp is an open-source thermophysical property database that provides functions to calculate thermodynamic and transport properties of various fluids, including refrigerants, pure fluids, pseudo-pure fluids, and humid air. It offers functionality similar to commercial software like REFPROP but is free and open-source. The library currently ships as version 7.2.0 and sees regular releases with performance improvements, bug fixes, and support for newer Python versions.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to use the `PropsSI` function from the CoolProp library to calculate the density of CO2 and the saturated vapor enthalpy of R134a. Inputs are provided in SI units, and outputs are also in SI units.

import CoolProp.CoolProp as CP

# Get density of carbon dioxide at 100 bar and 25 degrees C
density = CP.PropsSI('D', 'T', 298.15, 'P', 100e5, 'CO2')
print(f"Density of CO2: {density:.2f} kg/m^3")

# Get saturated vapor enthalpy of R134a at 25 degrees C
enthalpy = CP.PropsSI('H', 'T', 298.15, 'Q', 1, 'R134a')
print(f"Saturated vapor enthalpy of R134a: {enthalpy:.2f} J/kg")

view raw JSON →