CoolProp.State module#

Frozen State compatibility shim for the nanobind-based CoolProp.

PDSim (and other downstream code) cimport/import this module exactly as they did the legacy Cython State. Every call is forwarded through the CoolProp._capi PyCapsule that the nanobind core exports; there is no Cython AbstractState anywhere. The shim is link-free – the C-ABI function table is fetched from the already-imported core at import time – so it contains no CoolProp C++ and does not duplicate the core in the wheel.

Unit convention (the legacy one, pinned by dev/state_capsule parity test):
  • the kPa/kJ getters: get_p = p/1000, get_h/u/s/cp/cp0/ cv = …/1000, get_dpdT = first_partial_deriv(iP,iT,iDmolar)/1000;

  • get_MM returns g/mol and get_cond returns kW/m/K (both 1000x the SI value the core reports);

  • get_rho/get_T/get_visc/get_speed_sound are SI; cached p_ is kPa, T_/rho_ are SI;

  • Props() and everything reached via .pAS are SI.