An interface to the CoolProp database for retrieving high-accuracy fluid properties like density, enthalpy, and critical points.

Install

mkdir -p .claude/skills/coolprop-db && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/19557" && unzip -o skill.zip -d .claude/skills/coolprop-db && rm skill.zip

Installs to .claude/skills/coolprop-db

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Query thermodynamic properties for 100+ fluids from CoolProp database
69 charsno explicit “when” trigger
Beginner

Key capabilities

  • Query thermodynamic properties for pure and pseudo-pure fluids
  • Calculate transport properties like viscosity and thermal conductivity
  • Determine saturation properties and phase behavior
  • Retrieve critical and triple point data
  • Perform calculations using Helmholtz energy equations

How it works

The skill interfaces with the CoolProp library to compute fluid properties using high-accuracy Helmholtz energy formulations validated against NIST data.

Inputs & outputs

You give it
Fluid name and state parameters (e.g., Temperature, Pressure)
You get back
Thermodynamic or transport property values

When to use coolprop-db

  • Calculate water enthalpy at pressure
  • Determine refrigerant critical points
  • Lookup fluid viscosity data
  • Model thermodynamic systems
  • Verify fluid property state

About this skill

CoolProp Database Skill

Query thermodynamic and transport properties for over 100 pure and pseudo-pure fluids using the CoolProp open-source thermophysical property library.

Overview

CoolProp is a comprehensive thermophysical property database that provides:

  • Pure Fluids: Water, air, ammonia, carbon dioxide, and 100+ others
  • Refrigerants: R134a, R410A, R32, R404A, R407C, R507A, and many more
  • Industrial Fluids: Methane, ethane, propane, butane, nitrogen, oxygen, argon
  • Transport Properties: Viscosity, thermal conductivity, surface tension
  • Thermodynamic Properties: Enthalpy, entropy, density, specific heat
  • Phase Information: Saturation properties, two-phase behavior, critical points

CoolProp uses high-accuracy equations of state (Helmholtz energy formulations) and is validated against NIST REFPROP data.

Installation

Python

pip install CoolProp

Verify Installation

import CoolProp
print(CoolProp.__version__)
print(CoolProp.get_global_param_string("version"))

Core API Functions

PropsSI - Primary Property Query Function

from CoolProp.CoolProp import PropsSI

# Syntax: PropsSI(output, input1_name, input1_value, input2_name, input2_value, fluid)
value = PropsSI('D', 'T', 298.15, 'P', 101325, 'Water')

Props1SI - Single Input Properties

from CoolProp.CoolProp import Props1SI

# For properties requiring only fluid name
T_crit = Props1SI('Tcrit', 'Water')  # Critical temperature
P_crit = Props1SI('Pcrit', 'Water')  # Critical pressure

Property Codes (Input/Output Parameters)

Thermodynamic Properties

CodePropertySI UnitDescription
TTemperatureKAbsolute temperature
PPressurePaAbsolute pressure
DDensitykg/m³Mass density
HEnthalpyJ/kgSpecific enthalpy
SEntropyJ/kg/KSpecific entropy
UInternal EnergyJ/kgSpecific internal energy
QQuality-Vapor mass fraction (0-1)
DmolarMolar Densitymol/m³Molar density
HmolarMolar EnthalpyJ/molMolar enthalpy
SmolarMolar EntropyJ/mol/KMolar entropy

Transport Properties

CodePropertySI UnitDescription
VViscosityPa·sDynamic viscosity
LThermal ConductivityW/m/KThermal conductivity
CSpecific Heat (const P)J/kg/KCp at constant pressure
OSpecific Heat (const V)J/kg/KCv at constant volume
PRANDTLPrandtl Number-Pr = μ·Cp/k
ISurface TensionN/mLiquid-vapor interface

Phase Properties

CodePropertySI UnitDescription
PhasePhase Index-0=Liquid, 3=Supercritical, 5=Gas, 6=Two-phase
QQuality-0=Saturated liquid, 1=Saturated vapor

Critical/Triple Point Properties (Use with Props1SI)

CodePropertySI UnitDescription
TcritCritical TemperatureKCritical point temperature
PcritCritical PressurePaCritical point pressure
TtripleTriple Point TempKTriple point temperature
PtripleTriple Point PressPaTriple point pressure
MMolar Masskg/molMolecular weight
ACENTRICAcentric Factor-Pitzer acentric factor

Common Fluids

Water and Air

  • Water - Pure water (H₂O)
  • Air - Dry air (pseudo-pure mixture)

Common Refrigerants

  • R134a - HFC, common in automotive AC
  • R410A - HFC blend, residential AC/heat pumps
  • R32 - HFC, lower GWP alternative
  • R404A - HFC blend, commercial refrigeration
  • R407C - HFC blend, AC systems
  • R507A - HFC blend, low-temperature refrigeration
  • R22 - HCFC (being phased out)
  • R717 - Ammonia (NH₃)
  • R744 - Carbon dioxide (CO₂)

Hydrocarbons

  • Methane, Ethane, Propane, n-Butane, IsoButane
  • n-Pentane, Isopentane, n-Hexane, n-Heptane, n-Octane
  • n-Nonane, n-Decane

Cryogenic Gases

  • Nitrogen, Oxygen, Argon, Helium, Neon, Hydrogen

Industrial Gases

  • CO2 - Carbon dioxide
  • CO - Carbon monoxide
  • H2S - Hydrogen sulfide
  • SO2 - Sulfur dioxide
  • Ammonia - NH₃

Query Examples

Example 1: Water Properties at Standard Conditions

from CoolProp.CoolProp import PropsSI

# Water at 25°C (298.15 K) and 1 atm (101325 Pa)
T = 298.15  # K
P = 101325  # Pa

density = PropsSI('D', 'T', T, 'P', P, 'Water')  # kg/m³
enthalpy = PropsSI('H', 'T', T, 'P', P, 'Water')  # J/kg
entropy = PropsSI('S', 'T', T, 'P', P, 'Water')  # J/kg/K
viscosity = PropsSI('V', 'T', T, 'P', P, 'Water')  # Pa·s
cp = PropsSI('C', 'T', T, 'P', P, 'Water')  # J/kg/K

print(f"Water at {T-273.15}°C and {P/1000:.1f} kPa:")
print(f"  Density: {density:.2f} kg/m³")
print(f"  Enthalpy: {enthalpy/1000:.2f} kJ/kg")
print(f"  Entropy: {entropy/1000:.4f} kJ/kg·K")
print(f"  Viscosity: {viscosity*1000:.4f} mPa·s")
print(f"  Cp: {cp/1000:.4f} kJ/kg·K")

Example 2: Refrigerant Saturation Properties

from CoolProp.CoolProp import PropsSI

# R134a saturation properties at 25°C
T_sat = 298.15  # K
fluid = 'R134a'

# Get saturation pressure at this temperature
P_sat = PropsSI('P', 'T', T_sat, 'Q', 0, fluid)  # Pa

# Saturated liquid properties (Q=0)
rho_liquid = PropsSI('D', 'T', T_sat, 'Q', 0, fluid)
h_liquid = PropsSI('H', 'T', T_sat, 'Q', 0, fluid)
s_liquid = PropsSI('S', 'T', T_sat, 'Q', 0, fluid)

# Saturated vapor properties (Q=1)
rho_vapor = PropsSI('D', 'T', T_sat, 'Q', 1, fluid)
h_vapor = PropsSI('H', 'T', T_sat, 'Q', 1, fluid)
s_vapor = PropsSI('S', 'T', T_sat, 'Q', 1, fluid)

# Latent heat
h_fg = h_vapor - h_liquid

print(f"{fluid} at {T_sat-273.15}°C:")
print(f"  Saturation pressure: {P_sat/1000:.2f} kPa")
print(f"  Liquid density: {rho_liquid:.2f} kg/m³")
print(f"  Vapor density: {rho_vapor:.2f} kg/m³")
print(f"  Latent heat: {h_fg/1000:.2f} kJ/kg")

Example 3: Pressure-Enthalpy (P-H) State Point

from CoolProp.CoolProp import PropsSI

# Find temperature at known pressure and enthalpy
P = 500000  # 5 bar = 500 kPa
h = 250000  # 250 kJ/kg

T = PropsSI('T', 'P', P, 'H', h, 'R134a')
Q = PropsSI('Q', 'P', P, 'H', h, 'R134a')

print(f"R134a at {P/1000:.0f} kPa and {h/1000:.0f} kJ/kg:")
print(f"  Temperature: {T-273.15:.2f}°C")
print(f"  Quality: {Q:.4f} (0=liquid, 1=vapor)")

Example 4: Critical and Triple Point Data

from CoolProp.CoolProp import Props1SI

fluids = ['Water', 'CO2', 'Nitrogen', 'R134a']

for fluid in fluids:
    T_crit = Props1SI('Tcrit', fluid)
    P_crit = Props1SI('Pcrit', fluid)
    T_triple = Props1SI('Ttriple', fluid)
    M = Props1SI('M', fluid)

    print(f"\n{fluid}:")
    print(f"  Critical point: {T_crit-273.15:.2f}°C, {P_crit/1e6:.2f} MPa")
    print(f"  Triple point: {T_triple-273.15:.2f}°C")
    print(f"  Molar mass: {M*1000:.2f} g/mol")

Example 5: Viscosity Temperature Dependence

from CoolProp.CoolProp import PropsSI
import numpy as np

# Calculate water viscosity from 0°C to 100°C at atmospheric pressure
P = 101325  # Pa
temperatures = np.linspace(273.15, 373.15, 11)  # 0 to 100°C

print("Water viscosity vs temperature:")
print("T(°C)    μ(mPa·s)")
for T in temperatures:
    mu = PropsSI('V', 'T', T, 'P', P, 'Water') * 1000  # Convert to mPa·s
    print(f"{T-273.15:5.0f}    {mu:.4f}")

Example 6: Two-Phase Properties

from CoolProp.CoolProp import PropsSI

# R134a at 10 bar with 50% quality
P = 1000000  # 10 bar = 1 MPa
Q = 0.5  # 50% vapor

T = PropsSI('T', 'P', P, 'Q', Q, 'R134a')
h = PropsSI('H', 'P', P, 'Q', Q, 'R134a')
s = PropsSI('S', 'P', P, 'Q', Q, 'R134a')
rho = PropsSI('D', 'P', P, 'Q', Q, 'R134a')

print(f"R134a two-phase at {P/1e6:.1f} MPa, quality = {Q}:")
print(f"  Temperature: {T-273.15:.2f}°C")
print(f"  Enthalpy: {h/1000:.2f} kJ/kg")
print(f"  Entropy: {s/1000:.4f} kJ/kg·K")
print(f"  Density: {rho:.2f} kg/m³")

Temperature and Pressure Effects

Temperature Ranges

  • Each fluid has valid temperature ranges between triple point and maximum temperature
  • Typical range: Triple point temperature < T < 2000 K (varies by fluid)
  • Check limits using Props1SI('Tmin', fluid) and Props1SI('Tmax', fluid)

Pressure Ranges

  • Each fluid has valid pressure ranges
  • Typical range: Triple point pressure < P < 1000 MPa (varies by fluid)
  • Check limits using Props1SI('pmin', fluid) and Props1SI('pmax', fluid)

Phase Regions

  1. Subcooled Liquid: T < T_sat at given P, or P > P_sat at given T
  2. Two-Phase: T = T_sat and 0 < Q < 1
  3. Superheated Vapor: T > T_sat at given P, or P < P_sat at given T
  4. Supercritical: T > T_crit and P > P_crit

Input Pair Restrictions

Not all input pairs are valid in all regions:

  • (T, P): Valid in single-phase regions only (not in two-phase)
  • (P, Q): Valid for two-phase and saturation (0 ≤ Q ≤ 1)
  • (T, Q): Valid for two-phase and saturation (0 ≤ Q ≤ 1)
  • (P, H): Valid in all regions
  • (P, S): Valid in all regions
  • (H, S): Valid in all regions (useful for isentropic processes)

Error Handling

Common Errors and Solutions

Error: "CoolProp error: [PropsSI] Two saturation inputs are not valid"

  • Problem: Trying to use (T, P) in two-phase region
  • Solution: Use (T, Q) or (P, Q) for two-phase states

Error: "CoolProp error: Value is outside range"

  • Problem: Temperature or pressure outside valid range
  • Solution: Check fluid limits with Props1SI('Tmin', fluid), etc.

Error: "CoolProp error: Fluid not found"

  • Problem: Incorrect fluid name or spelling
  • Solution: Use exact fluid names (case-sensitive), check documentation

Error: "Unable to match the inputs"

  • Problem: Invalid input combination or iteration failed
  • Solution: Check that input values are physically reasonable

Safe Query Pattern

fro

---

*Content truncated.*

When not to use it

  • Using non-SI units for inputs
  • Querying without checking phase regions

Prerequisites

CoolProp library

Limitations

  • Requires SI units for all inputs and outputs
  • Requires validation of ranges before querying

How it compares

It provides programmatic access to a complete database of 100+ fluids, replacing manual lookup tables with automated property calculations.

Compared to similar skills

coolprop-db side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
coolprop-db (this skill)08moReviewBeginner
polars227moNo flagsIntermediate
spark-optimization42moNo flagsAdvanced
geopandas77moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

polars

davila7

Fast DataFrame library (Apache Arrow). Select, filter, group_by, joins, lazy evaluation, CSV/Parquet I/O, expression API, for high-performance data analysis workflows.

2268

spark-optimization

wshobson

Optimize Apache Spark jobs with partitioning, caching, shuffle optimization, and memory tuning. Use when improving Spark performance, debugging slow jobs, or scaling data processing pipelines.

431

geopandas

davila7

Python library for working with geospatial vector data including shapefiles, GeoJSON, and GeoPackage files. Use when working with geographic data for spatial analysis, geometric operations, coordinate transformations, spatial joins, overlay operations, choropleth mapping, or any task involving reading/writing/analyzing vector geographic data. Supports PostGIS databases, interactive maps, and integration with matplotlib/folium/cartopy. Use for tasks like buffer analysis, spatial joins between datasets, dissolving boundaries, clipping data, calculating areas/distances, reprojecting coordinate systems, creating maps, or converting between spatial file formats.

727

dask

davila7

Parallel/distributed computing. Scale pandas/NumPy beyond memory, parallel DataFrames/Arrays, multi-file processing, task graphs, for larger-than-RAM datasets and parallel workflows.

87

dataeng-codebase-analyst

juankmvanegas

Analyze existing Data Engineering codebase — data pipeline, reproducibility, artifacts, and operational flow

00

spark-optimization

bika11

Optimize Apache Spark jobs with partitioning, caching, shuffle optimization, and memory tuning. Use when improving Spark performance, debugging slow jobs, or scaling data processing pipelines.

00

Search skills

Search the agent skills registry