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_capsuleparity 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_MMreturns g/mol andget_condreturns kW/m/K (both 1000x the SI value the core reports);get_rho/get_T/get_visc/get_speed_soundare SI; cachedp_is kPa,T_/rho_are SI;Props()and everything reached via.pASare SI.