{"id":1971,"library":"CoolProp","title":"CoolProp","description":"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.","status":"active","version":"7.2.0","language":"en","source_language":"en","source_url":"https://github.com/CoolProp/CoolProp","tags":["thermodynamics","fluid properties","engineering","physics","science","refrigerants"],"install":[{"cmd":"pip install CoolProp","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"Required for the Python wrapper.","package":"python","optional":false}],"imports":[{"note":"Standard import for accessing most core CoolProp functions, like PropsSI.","symbol":"CP","correct":"import CoolProp.CoolProp as CP"},{"note":"Direct import for the high-level SI unit interface function.","symbol":"PropsSI","correct":"from CoolProp.CoolProp import PropsSI"},{"note":"For calculating humid air properties.","symbol":"HAPropsSI","correct":"from CoolProp.HumidAirProp import HAPropsSI"}],"quickstart":{"code":"import CoolProp.CoolProp as CP\n\n# Get density of carbon dioxide at 100 bar and 25 degrees C\ndensity = CP.PropsSI('D', 'T', 298.15, 'P', 100e5, 'CO2')\nprint(f\"Density of CO2: {density:.2f} kg/m^3\")\n\n# Get saturated vapor enthalpy of R134a at 25 degrees C\nenthalpy = CP.PropsSI('H', 'T', 298.15, 'Q', 1, 'R134a')\nprint(f\"Saturated vapor enthalpy of R134a: {enthalpy:.2f} J/kg\")","lang":"python","description":"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."},"warnings":[{"fix":"Review your code and calculations, especially for methanol properties or where high precision for ancillary functions is critical, to ensure compatibility with the updated models.","message":"CoolProp v7.0.0 introduced significant changes, including new superancillary functions for pure fluids and a revised Equation of State (EOS) for methanol to align with REFPROP. These changes can lead to different numerical results for properties calculated using previous versions.","severity":"breaking","affected_versions":">=7.0.0"},{"fix":"Avoid using n-dimensional inputs; ensure your code passes scalar values or uses appropriate iteration/vectorization outside of CoolProp's direct calls if parallel calculations are needed.","message":"The n-dimensional input functionality for Python was removed in CoolProp v6.4.1 due to an excessive number of bugs. Attempting to use this feature will likely result in errors.","severity":"deprecated","affected_versions":">=6.4.1"},{"fix":"Set the REFPROP path using `CoolProp.set_config_string(CoolProp.ALTERNATIVE_REFPROP_PATH, 'C:\\path\\to\\REFPROP')` early in your script. Note that REFPROP is a separate, paid product.","message":"Integrating with the commercial REFPROP library requires setting specific configuration variables (`ALTERNATIVE_REFPROP_PATH` or `ALTERNATIVE_REFPROP_LIBRARY_PATH`) to point to your REFPROP installation. Failure to correctly set these paths will prevent CoolProp from using REFPROP's backend and can lead to `ValueError` exceptions.","severity":"gotcha","affected_versions":"All versions supporting REFPROP integration"},{"fix":"Ensure your `pip` is up-to-date (`pip install --upgrade pip`). If issues persist, try `pip install Cython` first, or consult the CoolProp documentation for manual build instructions. Version 7.2.0 updated the build system to `scikit-build-core` for better reliability.","message":"Historically, some users encountered installation issues (e.g., `ERROR: Command errored out with exit status 1`) with `pip install CoolProp` on certain Python versions (e.g., 3.8, 3.9) due to build system complexities.","severity":"gotcha","affected_versions":"<7.2.0 (especially 3.8-3.9)"},{"fix":"The best solution is to correct the underlying code causing the warning. If necessary for debugging, you can suppress these warnings using Python's `warnings` module, e.g., `import warnings; warnings.filterwarnings('ignore', category=UserWarning)`.","message":"CoolProp can issue non-fatal warning messages via Python's `warnings` module for improper function usage or deprecated features. These can be verbose.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-09T00:00:00.000Z","next_check":"2026-07-08T00:00:00.000Z"}