The following examples are written in Python to demonstrate some of the functionalities of CoolProp. Similar calling conventions are used in the wrappers for other programming languages, as can be seen in the “other languages” section below:
To use the Props function, import it and do some calls, do something like this
#import the things you need In : from CoolProp.CoolProp import Props # print the currently used version of coolprop In : import CoolProp; print(CoolProp.__version__) 4.2.5 #Density of carbon dioxide (R744) at 100 bar and 25C In : Props('D','T',298.15,'P',10000,'R744') Out: 817.6273812375756 #Saturated vapor enthalpy [kJ/kg] of R134a at STP In : Props('H','T',298.15,'Q',1,'R134a') Out: 412.3339532318681
Or go to the Fluid Properties documentation.
All the possible input and output parameters are listed in the CoolProp.CoolProp.Props() documentation
To use the HAProps function, import it and do some calls, do something like this
#import the things you need In : from CoolProp.HumidAirProp import HAProps, HAProps_Aux #Enthalpy (kJ per kg dry air) as a function of temperature, pressure, # and relative humidity at STP In : h=HAProps('H','T',298.15,'P',101.325,'R',0.5); print h 50.4249283433 #Temperature of saturated air at the previous enthalpy In : T=HAProps('T','P',101.325,'H',h,'R',1.0); print T 290.962168888 #Temperature of saturated air - order of inputs doesn't matter In : T=HAProps('T','H',h,'R',1.0,'P',101.325); print T 290.962168888
Or go to the Humid Air Properties documentation.