Skip to content

CoolProp

Pure and pseudo-pure fluids (refrigerants, water, cryogens, light hydrocarbons) from the reference equations of state and transport correlations of the CoolProp library.

DWSIM.Thermodynamics.PropertyPackages.CoolPropPropertyPackage
Assembly DWSIM.Thermodynamics.dll · Object ← PropertyPackage ← CoolPropPropertyPackage
Name in the flowsheet CoolProp · FluentAPI PropertyPackages.CoolProp

Scope

The package takes its properties from CoolProp, an open-source C++ library of reference equations of state and transport correlations for pure and pseudo-pure fluids. It is meant for streams of a single fluid where the accuracy of a reference equation matters: refrigeration and heat-pump cycles, organic Rankine cycles, cryogenic gases, CO2, water and steam, and the light hydrocarbons. The literature source of the equation of each fluid is listed in the CoolProp documentation (http://www.coolprop.org).

The package supports the 123 fluids of its list, among them:

Group Fluids
Refrigerants R-11 to R-507A, including R-134a, R-32, R-410A, R-404A, R-1234yf, R-1234ze(E)
Permanent gases and cryogens air, nitrogen, oxygen, argon, hydrogen (normal, ortho, para), helium, neon
Inorganics water, heavy water, CO2, CO, ammonia, H2S, SO2, N2O, SF6
Hydrocarbons methane to n-dodecane, olefins, cyclic and aromatic hydrocarbons
Others alcohols, ethers, siloxanes (MM, MDM, D4 to D6), methyl esters

A compound is supported when its name is a CoolProp name or alias of one of these fluids, or its CAS number matches one; any other compound present in a stream stops the calculation with an error. The refrigerants, siloxanes and other CoolProp fluids are in the CoolProp compound database of DWSIM (coolprop.xml), under the names CoolProp uses (R134a, R1234yf, ...).

For a pure fluid every property is the CoolProp value: saturation pressure, liquid and vapor density, enthalpy, entropy, heat capacities, viscosity, thermal conductivity and surface tension. Enthalpy and entropy are on the reference state of each CoolProp fluid (for most refrigerants the IIR convention, h = 200 kJ/kg and s = 1 kJ/(kg K) for the saturated liquid at 0 °C), so they differ from the scale of the other packages by a constant.

For a mixture, DWSIM combines the pure-fluid values with mass-fraction averages (enthalpy, entropy, heat capacities and density, and the compressibility factor that follows from it). The phase equilibrium treats both phases as ideal: Raoult's law with the CoolProp vapor pressure of each compound.

Limitations

  • Mixtures are approximate: no interaction between unlike molecules enters the phase equilibrium or the properties. For refrigerant blends use the pseudo-pure entries (R-404A, R-407C, R-410A, R-507A); for other mixtures use an equation of state such as Peng-Robinson.
  • Outside the temperature and pressure limits of a fluid the package extrapolates the CoolProp value, or falls back on the Rackett liquid density and the estimation methods of DWSIM, and writes a warning.
  • For pure water with the industrial formulation, use Steam Tables (IAPWS-IF97).

Example

This code runs on every build of this site, and the output below is what it printed.

fs = (Flowsheet.Create("CoolPropExample")
      .WithCompounds("R134a")
      .WithPropertyPackage(PropertyPackages.CoolProp))

# saturated liquid and saturated vapor at 0 C: given the temperature and the vapor
# fraction, the flash finds the saturation pressure
liquid = (fs.AddMaterialStream("Saturated liquid")
          .WithTemperature(Q.Celsius(0.0)).WithVaporFraction(0.0)
          .SetCompoundMassFlow("R134a", 1.0))
vapor = (fs.AddMaterialStream("Saturated vapor")
         .WithTemperature(Q.Celsius(0.0)).WithVaporFraction(1.0)
         .SetCompoundMassFlow("R134a", 1.0))

fs.Solve()

sl, sv = liquid.Object.Phases[0].Properties, vapor.Object.Phases[0].Properties
print(f"Saturation pressure at 0 C       = {sl.pressure / 1e5:.4f} bar")
print(f"Saturated liquid / vapor density = {sl.density:.1f} / {sv.density:.3f} kg/m3")
print(f"Saturated liquid / vapor h       = {sl.enthalpy:.2f} / {sv.enthalpy:.2f} kJ/kg")
print(f"Latent heat at 0 C               = {sv.enthalpy - sl.enthalpy:.2f} kJ/kg")
print(f"Liquid viscosity                 = {sl.viscosity * 1000.0:.4f} mPa s")

Output

Saturation pressure at 0 C       = 2.9280 bar
Saturated liquid / vapor density = 1294.8 / 14.428 kg/m3
Saturated liquid / vapor h       = 200.00 / 398.60 kJ/kg
Latent heat at 0 C               = 198.60 kJ/kg
Liquid viscosity                 = 0.2665 mPa s

DWSIM 10.2.11.0, generated 2026-10-08.

Property methods

How the package calculates each property, as it reports it in PropertyMethodsInfo (the property package editor shows the same list).

Property Method
Vapor fugacity Ideal
Liquid fugacity Vapor Pressure
Vapor enthalpy, entropy, Cp/Cv CoolProp
Liquid enthalpy, entropy, Cp/Cv CoolProp
Vapor density CoolProp
Liquid density CoolProp (Rackett outside the limits of the fluid)
Vapor viscosity CoolProp
Liquid viscosity CoolProp
Vapor thermal conductivity CoolProp
Liquid thermal conductivity CoolProp
Surface tension CoolProp (Experimental / Brock-Bird outside the limits of the fluid)
Solid density Experimental Data / User-Defined
Solid enthalpy, entropy, Cp/Cv Experimental Solid Cp / From Liquid Phase Enthalpy + Enthalpy of Fusion

Default flash algorithm: Universal.

Configuration saved with the flowsheet

The package writes its settings to the simulation file (SaveData) and reads them back on load (LoadData). The elements below are the ones this package adds to those of every property package, as written for the example.

This package adds no elements of its own.

Settings common to every property package, as saved for the example
Element Value
Type 61 characters
ComponentName CoolProp
ComponentDescription
Tag CoolProp
UseHenryConstants true
AutoEstimateMissingNRTLUNIQUACParameters true
UseImmiscibleListForLiquid2InitialEstimates true
SingleCompoundCheckThreshold 0.99999
OverrideKvalFugCoeff false
OverrideEnthalpyCalculation false
OverrideEntropyCalculation false
LiquidDensityCalculationMode_Subcritical Rackett_and_ExpData
LiquidDensityCalculationMode_Supercritical Rackett_and_ExpData
LiquidDensity_CorrectExpDataForPressure true
LiquidDensity_UsePenelouxVolumeTranslation true
LiquidViscosityCalculationMode_Subcritical ExpData
LiquidViscosityCalculationMode_Supercritical Letsou_Stiel
LiquidViscosity_CorrectExpDataForPressure true
LiquidViscosity_MixingRule MoleAverage
VaporPhaseFugacityCalculationMode Ideal
SolidPhaseFugacityCalculationMethod FromLiquidFugacity
SolidPhaseFugacity_UseIdealLiquidPhaseFugacity false
SolidPhaseEnthalpy_UsesCp false
EnthalpyEntropyCpCvCalculationMode LeeKesler
LiquidEnthalpyEntropyCpCvCalculationMode_EOS EOS
LiquidFugacity_UsePoyntingCorrectionFactor true
ActivityCoefficientModels_IgnoreMissingInteractionParameters false
IgnoreVaporFractionLimit false
IgnoreSalinityLimit false
CalculateAdditionalMaterialStreamProperties true
FlashCalculationApproach NestedLoops
DisplayMissingCompoundPropertiesWarning false
ForcedSolids []
PropertyOverrides {}
FlashSettings 36 Setting entries

Learn more

API members

Public members declared by this class. Inherited members are documented on the base classes.

Constructors

CoolPropPropertyPackage()
public CoolPropPropertyPackage()
Public Sub New()

CoolPropPropertyPackage(bool)
Parameter Type Description
comode Boolean
public CoolPropPropertyPackage(bool comode)
Public Sub New(comode As Boolean)

Properties

MobileCompatible
public override bool MobileCompatible { get; }
Public Overrides ReadOnly Property MobileCompatible As Boolean

Popular
public override bool Popular { get; }
Public Overrides ReadOnly Property Popular As Boolean

Methods

AUX_CONDTG(double, double)
Parameter Type Description
T Double
P Double
public override double AUX_CONDTG(double T, double P)
Public Overrides Function AUX_CONDTG(T As Double, P As Double) As Double

AUX_CONDTL(double, int)
Parameter Type Description
T Double
phaseid Int32
public override double AUX_CONDTL(double T, int phaseid = 3)
Public Overrides Function AUX_CONDTL(T As Double, phaseid As Integer = 3) As Double

AUX_CPi(string, double)
Parameter Type Description
sub1 String
T Double
public override double AUX_CPi(string sub1, double T)
Public Overrides Function AUX_CPi(sub1 As String, T As Double) As Double

AUX_HFUSi(string, double)
Parameter Type Description
sub1 String
T Double
public override object AUX_HFUSi(string sub1, double T)
Public Overrides Function AUX_HFUSi(sub1 As String, T As Double) As Object

AUX_LIQ_Cpi(ICompoundConstantProperties, double)
Parameter Type Description
cprop ICompoundConstantProperties
T Double
public override double AUX_LIQ_Cpi(ICompoundConstantProperties cprop, double T)
Public Overrides Function AUX_LIQ_Cpi(cprop As ICompoundConstantProperties, T As Double) As Double

AUX_LIQDENS(double, Array, double, double, bool)
Parameter Type Description
T Double
Vx Array
P Double
Pvp Double
FORCE_EOS Boolean
public override double AUX_LIQDENS(double T, Array Vx, double P = 0, double Pvp = 0, bool FORCE_EOS = false)
Public Overrides Function AUX_LIQDENS(T As Double, Vx As Array, P As Double = 0, Pvp As Double = 0, FORCE_EOS As Boolean = False) As Double

AUX_LIQDENS(double, double, double, int, bool)
Parameter Type Description
T Double
P Double
Pvp Double
phaseid Int32
FORCE_EOS Boolean
public override double AUX_LIQDENS(double T, double P = 0, double Pvp = 0, int phaseid = 3, bool FORCE_EOS = false)
Public Overrides Function AUX_LIQDENS(T As Double, P As Double = 0, Pvp As Double = 0, phaseid As Integer = 3, FORCE_EOS As Boolean = False) As Double

AUX_LIQDENSi(ICompound, double)
Parameter Type Description
subst ICompound
T Double
public override double AUX_LIQDENSi(ICompound subst, double T)
Public Overrides Function AUX_LIQDENSi(subst As ICompound, T As Double) As Double

AUX_LIQDENSi(ICompoundConstantProperties, double)
Parameter Type Description
cprop ICompoundConstantProperties
T Double
public override double AUX_LIQDENSi(ICompoundConstantProperties cprop, double T)
Public Overrides Function AUX_LIQDENSi(cprop As ICompoundConstantProperties, T As Double) As Double

AUX_LIQTHERMCONDi(ICompoundConstantProperties, double)
Parameter Type Description
cprop ICompoundConstantProperties
T Double
public override double AUX_LIQTHERMCONDi(ICompoundConstantProperties cprop, double T)
Public Overrides Function AUX_LIQTHERMCONDi(cprop As ICompoundConstantProperties, T As Double) As Double

AUX_LIQVISCi(string, double, double)
Parameter Type Description
sub1 String
T Double
P Double
public override double AUX_LIQVISCi(string sub1, double T, double P)
Public Overrides Function AUX_LIQVISCi(sub1 As String, T As Double, P As Double) As Double

AUX_PVAPi(int, double)
Parameter Type Description
index Int32
T Double
public override double AUX_PVAPi(int index, double T)
Public Overrides Function AUX_PVAPi(index As Integer, T As Double) As Double

AUX_PVAPi(string, double)
Parameter Type Description
sub1 String
T Double
public override double AUX_PVAPi(string sub1, double T)
Public Overrides Function AUX_PVAPi(sub1 As String, T As Double) As Double

AUX_SURFTi(ICompoundConstantProperties, double)
Parameter Type Description
constprop ICompoundConstantProperties
T Double
public override double AUX_SURFTi(ICompoundConstantProperties constprop, double T)
Public Overrides Function AUX_SURFTi(constprop As ICompoundConstantProperties, T As Double) As Double

AUX_SURFTM(double)
Parameter Type Description
T Double
public override double AUX_SURFTM(double T)
Public Overrides Function AUX_SURFTM(T As Double) As Double

AUX_TSATi(double, int)
Parameter Type Description
PVAP Double
index Int32
public override double AUX_TSATi(double PVAP, int index)
Public Overrides Function AUX_TSATi(PVAP As Double, index As Integer) As Double

AUX_TSATi(double, string)
Parameter Type Description
PVAP Double
subst String
public override double AUX_TSATi(double PVAP, string subst)
Public Overrides Function AUX_TSATi(PVAP As Double, subst As String) As Double

AUX_VAPDENS(double, double)
Parameter Type Description
T Double
P Double
public override double AUX_VAPDENS(double T, double P)
Public Overrides Function AUX_VAPDENS(T As Double, P As Double) As Double

AUX_VAPTHERMCONDi(ICompoundConstantProperties, double, double)
Parameter Type Description
cprop ICompoundConstantProperties
T Double
P Double
public override double AUX_VAPTHERMCONDi(ICompoundConstantProperties cprop, double T, double P)
Public Overrides Function AUX_VAPTHERMCONDi(cprop As ICompoundConstantProperties, T As Double, P As Double) As Double

AUX_VAPVISCi(ICompoundConstantProperties, double, double)
Parameter Type Description
cprop ICompoundConstantProperties
T Double
P Double
public double AUX_VAPVISCi(ICompoundConstantProperties cprop, double T, double P)
Public Function AUX_VAPVISCi(cprop As ICompoundConstantProperties, T As Double, P As Double) As Double

AUX_VAPVISCMIX(double, double, double)
Parameter Type Description
T Double
P Double
MM Double
public double AUX_VAPVISCMIX(double T, double P, double MM)
Public Function AUX_VAPVISCMIX(T As Double, P As Double, MM As Double) As Double

AUX_Z(double[], double, double, PhaseName)
Parameter Type Description
Vx Double[]
T Double
P Double
state PhaseName
public override double AUX_Z(double[] Vx, double T, double P, PhaseName state)
Public Overrides Function AUX_Z(Vx As Double(), T As Double, P As Double, state As PhaseName) As Double

DW_CalcCompPartialVolume(Phase, double, double)
Parameter Type Description
phase Phase
T Double
P Double
public override void DW_CalcCompPartialVolume(Phase phase, double T, double P)
Public Overrides Sub DW_CalcCompPartialVolume(phase As Phase, T As Double, P As Double)

DW_CalcCp_ISOL(Phase, double, double)
Parameter Type Description
Phase1 Phase
T Double
P Double
public override double DW_CalcCp_ISOL(Phase Phase1, double T, double P)
Public Overrides Function DW_CalcCp_ISOL(Phase1 As Phase, T As Double, P As Double) As Double

DW_CalcCv_ISOL(Phase, double, double)
Parameter Type Description
Phase1 Phase
T Double
P Double
public override double DW_CalcCv_ISOL(Phase Phase1, double T, double P)
Public Overrides Function DW_CalcCv_ISOL(Phase1 As Phase, T As Double, P As Double) As Double

DW_CalcEnergyFlowMistura_ISOL(double, double)
Parameter Type Description
T Double
P Double
public override double DW_CalcEnergyFlowMistura_ISOL(double T, double P)
Public Overrides Function DW_CalcEnergyFlowMistura_ISOL(T As Double, P As Double) As Double

DW_CalcEnthalpy(Array, double, double, State): Calculates the enthalpy of a mixture.

Calculates the enthalpy of a mixture.

Parameter Type Description
Vx Array Vector of doubles containing the molar composition of the mixture.
T Double Temperature (K)
P Double Pressure (Pa)
st State State enum indicating the state of the mixture (liquid or vapor).
public override double DW_CalcEnthalpy(Array Vx, double T, double P, State st)
Public Overrides Function DW_CalcEnthalpy(Vx As Array, T As Double, P As Double, st As State) As Double

DW_CalcEnthalpyDeparture(Array, double, double, State): Calculates the enthalpy departure of a mixture.

Calculates the enthalpy departure of a mixture.

Parameter Type Description
Vx Array Vector of doubles containing the molar composition of the mixture.
T Double Temperature (K)
P Double Pressure (Pa)
st State State enum indicating the state of the mixture (liquid or vapor).
public override double DW_CalcEnthalpyDeparture(Array Vx, double T, double P, State st)
Public Overrides Function DW_CalcEnthalpyDeparture(Vx As Array, T As Double, P As Double, st As State) As Double

DW_CalcEntropy(Array, double, double, State): Calculates the entropy of a mixture.

Calculates the entropy of a mixture.

Parameter Type Description
Vx Array Vector of doubles containing the molar composition of the mixture.
T Double Temperature (K)
P Double Pressure (Pa)
st State State enum indicating the state of the mixture (liquid or vapor).
public override double DW_CalcEntropy(Array Vx, double T, double P, State st)
Public Overrides Function DW_CalcEntropy(Vx As Array, T As Double, P As Double, st As State) As Double

DW_CalcEntropyDeparture(Array, double, double, State): Calculates the entropy departure of a mixture.

Calculates the entropy departure of a mixture.

Parameter Type Description
Vx Array Vector of doubles containing the molar composition of the mixture.
T Double Temperature (K)
P Double Pressure (Pa)
st State State enum indicating the state of the mixture (liquid or vapor).
public override double DW_CalcEntropyDeparture(Array Vx, double T, double P, State st)
Public Overrides Function DW_CalcEntropyDeparture(Vx As Array, T As Double, P As Double, st As State) As Double

DW_CalcFugCoeff(Array, double, double, State): Calculates fugacity coefficients for the specified composition at the specified conditions.

Calculates fugacity coefficients for the specified composition at the specified conditions.

Parameter Type Description
Vx Array Vector of doubles containing the molar composition of the mixture.
T Double Temperature in K
P Double Pressure in Pa
st State Mixture state (Liquid or Vapor)
public override double[] DW_CalcFugCoeff(Array Vx, double T, double P, State st)
Public Overrides Function DW_CalcFugCoeff(Vx As Array, T As Double, P As Double, st As State) As Double()

DW_CalcK_ISOL(Phase, double, double)
Parameter Type Description
Phase1 Phase
T Double
P Double
public override double DW_CalcK_ISOL(Phase Phase1, double T, double P)
Public Overrides Function DW_CalcK_ISOL(Phase1 As Phase, T As Double, P As Double) As Double

DW_CalcMassaEspecifica_ISOL(Phase, double, double, double)
Parameter Type Description
Phase1 Phase
T Double
P Double
Pvp Double
public override double DW_CalcMassaEspecifica_ISOL(Phase Phase1, double T, double P, double Pvp = 0)
Public Overrides Function DW_CalcMassaEspecifica_ISOL(Phase1 As Phase, T As Double, P As Double, Pvp As Double = 0) As Double

DW_CalcMM_ISOL(Phase, double, double)
Parameter Type Description
Phase1 Phase
T Double
P Double
public override double DW_CalcMM_ISOL(Phase Phase1, double T, double P)
Public Overrides Function DW_CalcMM_ISOL(Phase1 As Phase, T As Double, P As Double) As Double

DW_CalcPhaseProps(Phase)
Parameter Type Description
Phase Phase
public override void DW_CalcPhaseProps(Phase Phase)
Public Overrides Sub DW_CalcPhaseProps(Phase As Phase)

DW_CalcProp(string, Phase): Provides a wrapper function for CAPE-OPEN CalcProp/CalcSingleProp functions.

Provides a wrapper function for CAPE-OPEN CalcProp/CalcSingleProp functions.

Parameter Type Description
property String The property to be calculated.
phase Phase The phase where the property must be calculated for.
public override void DW_CalcProp(string property, Phase phase)
Public Overrides Sub DW_CalcProp([property] As String, phase As Phase)

DW_CalcPVAP_ISOL(double)
Parameter Type Description
T Double
public override double DW_CalcPVAP_ISOL(double T)
Public Overrides Function DW_CalcPVAP_ISOL(T As Double) As Double

DW_CalcTensaoSuperficial_ISOL(Phase, double, double)
Parameter Type Description
Phase1 Phase
T Double
P Double
public override double DW_CalcTensaoSuperficial_ISOL(Phase Phase1, double T, double P)
Public Overrides Function DW_CalcTensaoSuperficial_ISOL(Phase1 As Phase, T As Double, P As Double) As Double

DW_CalcTwoPhaseProps(Phase, Phase)
Parameter Type Description
Phase1 Phase
Phase2 Phase
public override void DW_CalcTwoPhaseProps(Phase Phase1, Phase Phase2)
Public Overrides Sub DW_CalcTwoPhaseProps(Phase1 As Phase, Phase2 As Phase)

DW_CalcViscosidadeDinamica_ISOL(Phase, double, double)
Parameter Type Description
Phase1 Phase
T Double
P Double
public override double DW_CalcViscosidadeDinamica_ISOL(Phase Phase1, double T, double P)
Public Overrides Function DW_CalcViscosidadeDinamica_ISOL(Phase1 As Phase, T As Double, P As Double) As Double

GetCoolPropName(string)
Parameter Type Description
name String
public string GetCoolPropName(string name)
Public Function GetCoolPropName(name As String) As String

GetListOfSupportedCompounds()
public void GetListOfSupportedCompounds()
Public Sub GetListOfSupportedCompounds()

IsCompoundSupported(double, string)
Parameter Type Description
x Double
compname String
public bool IsCompoundSupported(double x, string compname)
Public Function IsCompoundSupported(x As Double, compname As String) As Boolean

SupportsComponent(ICompoundConstantProperties)
Parameter Type Description
comp ICompoundConstantProperties
public override bool SupportsComponent(ICompoundConstantProperties comp)
Public Overrides Function SupportsComponent(comp As ICompoundConstantProperties) As Boolean

Fields

ClassId
public const string ClassId = "1F5B0263-E936-40d5-BA5B-FFAB11595E43"
Public Const ClassId As String = "1F5B0263-E936-40d5-BA5B-FFAB11595E43"

CompoundAliases
public Dictionary<string, List<string>> CompoundAliases
Public CompoundAliases As Dictionary(Of String, List(Of String))