CoolProp computes thermophysical properties of real fluids: water and steam, refrigerants, common gases and liquids, and incompressible mixtures. All values are SI: temperature in K, pressure in Pa, enthalpy in J/kg, entropy in J/kg/K, density in kg/m³, and quality (vapor fraction) from 0 to 1.
There are two ways to call it:
| You want | Use | Charged |
|---|---|---|
| One state, now | the coolprop utility | Counts toward monthly utility calls |
| A grid, a curve, or many states | the coolprop job | Wallet, by runtime |
One state (utility)
Give the fluid and two state inputs, or a single temperature or pressure for a saturation point:
from cognichem_client import CogniChem
client = CogniChem.from_env()
result = client.utils.run("coolprop", {
"fluid": "Water",
"inputs": {"T": 373.15, "P": 101325},
"properties": ["D", "H", "Cpmass", "viscosity"],
})
print(result.data)Leave out properties to get the standard set: T, P, D, H, S, U, Cpmass, viscosity, conductivity, and Q.
Tables and curves (job)
Set mode and its problem_spec:
mode | problem_spec | You get |
|---|---|---|
tp_grid | t_min, t_max, n_t, p_min, p_max, n_p | Properties on a temperature × pressure grid |
saturation | along (T or P), min, max, n | The saturation curve |
isobar | p, t_min, t_max, n_t | Properties against temperature at one pressure |
isotherm | t, p_min, p_max, n_p | Properties against pressure at one temperature |
batch_states | states: each with a fluid and two of T, P, H, S, D, Q | A table of separate states |
payload = {
"mode": "tp_grid",
"fluid": "R134a",
"problem_spec": {"t_min": 250, "t_max": 350, "n_t": 21, "p_min": 1e5, "p_max": 2e6, "n_p": 20},
}
job = client.jobs.submit(job_name="r134a-grid-1", job_type="coolprop", payload=payload)
status = client.jobs.wait(job.process_id)
client.jobs.result(job.process_id, save_path=".") # properties.csv + summary.jsonThe result's table port is properties.csv, which a workflow step can take as input.
Notes
fluidis any name CoolProp accepts (for exampleWater,CarbonDioxide,R134a,Nitrogen).backendisHEOS(the default, for pure fluids and mixtures) orINCOMP(incompressible liquids and brines).- Grid size, curve length, and state count are capped per job; see the CoolProp tool page.
- For chemical equilibrium, kinetics, or ideal-gas mixtures, use Cantera.