This page serves as a teaser of the functionality of CoolProp. These examples are written in the Python programming language. For more information see:
Sample Props Code¶
To use the
PropsSI function, import it and do some calls, do something like this
# Import the things you need In : from CoolProp.CoolProp import PropsSI # Print some information on the currently used version of coolprop In : import CoolProp; print(CoolProp.__version__, CoolProp.__gitrevision__) (u'6.1.0', u'7864c2614ce5a0ef972386ee7f39859f0d3f8038') # Density of carbon dioxide at 100 bar and 25C In : PropsSI('D', 'T', 298.15, 'P', 100e5, 'CO2') Out: 817.6273812375758 # Saturated vapor enthalpy [J/kg] of R134a at 25C In : PropsSI('H', 'T', 298.15, 'Q', 1, 'R134a') Out: 412333.95323186804
All the possible input and output parameters are listed in the High-Level API documentation
To understand more about what is going on under the hood, go to Pure and Pseudo-Pure fluid properties documentation.
Sample HAPropsSI Code¶
To use the
HAPropsSI function, import it and do some calls, do something like this
# import the things you need In : from CoolProp.HumidAirProp import HAPropsSI # Enthalpy (J per kg dry air) as a function of temperature, pressure, # and relative humidity at STP In : h = HAPropsSI('H','T',298.15,'P',101325,'R',0.5); print h 50423.4503908 # Temperature of saturated air at the previous enthalpy In : T = HAPropsSI('T','P',101325,'H',h,'R',1.0); print T 290.962089195 # Temperature of saturated air - order of inputs doesn't matter In : T = HAPropsSI('T','H',h,'R',1.0,'P',101325); print T 290.962089195
Or go to the Humid Air Properties documentation.