Skip to content

Vapor Compression Chiller

DWSIM Plus

Available with a DWSIM Plus (Patreon) subscription.

Vapor compression chiller: a refrigeration cycle with one to three compression stages and optional flash economizers between stages. The evaporator removes heat from the process stream and the condenser rejects it to a cooling fluid stream; the unit also sizes the compressors and both heat exchangers. Ports: process inlet and outlet, cooling fluid inlet and outlet, and a shaft power energy inlet.

DWSIM.UnitOperations.VaporCompressionChiller.VaporCompressionChillerUnitOperation
Assembly DWSIM.UnitOperations.VaporCompressionChiller.dll · Object ← BaseClass ← UnitOpBaseClass ← VaporCompressionChillerUnitOperation

At a glance

Vapor Compression Chiller in the example flowsheet

Port Index Connected in the example
Inlet, material 0 Chilled water in
Inlet, material 1 Cooling water in
Inlet, energy 2 Compressor power
Outlet, material 0 Chilled water out
Outlet, material 1 Cooling water out

Example

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

# The refrigerant is one of the flowsheet compounds, flashed with the first property
# package (or the one named in RefrigerantPropertyPackage).
fs = (Flowsheet.Create("ChillerExample")
      .WithCompounds("Water", "Propane")
      .WithPropertyPackage(PropertyPackages.PengRobinson))

chilled_in = (fs.AddMaterialStream("Chilled water in")
              .At(Q.Celsius(12.0), Q.Bar(3.0))
              .SetCompoundMassFlow("Water", 10.0))      # kg/s
cooling_in = (fs.AddMaterialStream("Cooling water in")
              .At(Q.Celsius(30.0), Q.Bar(3.0))
              .SetCompoundMassFlow("Water", 15.0))
chilled_out = fs.AddMaterialStream("Chilled water out")
cooling_out = fs.AddMaterialStream("Cooling water out")
shaft = fs.AddEnergyStream("Compressor power")

chiller = (fs.AddVaporCompressionChiller("VCC-1")
           .WithStages(1)
           .WithIsentropicEfficiencies(0.75)
           .WithMechanicalEfficiencies(0.95)
           .WithCompressorTypes(CompressorType.Reciprocating)
           .WithEvaporatorSpec(EvaporatorSpec.Temperature)
           .WithEvaporatorTemperature(Q.Celsius(2.0))
           .WithCondenserSpec(CondenserSpec.ApproachDeltaT)
           .WithCondenserApproachDeltaT(8.0)             # K above the cooling water inlet
           .ConnectFeed(chilled_in, 0).ConnectProduct(chilled_out, 0)
           .ConnectFeed(cooling_in, 1).ConnectProduct(cooling_out, 1)
           .ConnectEnergyFeed(shaft, 2))
refrigerant = Dictionary[str, float]()
refrigerant["Propane"] = 1.0                            # mole fractions
chiller.Object.RefrigerantComposition = refrigerant
chiller.Object.ProcessOutletTemperature = 273.15 + 7.0  # K

fs.AutoLayout()
fs.Solve()

o = chiller.Object
t_evap = 273.15 + 2.0
t_cond = 273.15 + 30.0 + 8.0
print(f"Evaporator duty    = {o.EvaporatorDuty / 1000:.1f} kW")
print(f"Compressor power   = {shaft.EnergyFlowKW:.1f} kW")
print(f"Condenser duty     = {o.CondenserDuty / 1000:.1f} kW")
print(f"COP                = {o.COP:.2f} (Carnot {t_evap / (t_cond - t_evap):.2f})")
print(f"Refrigerant flow   = {o.RefrigerantMolarFlow * 44.097 / 1000:.3f} kg/s propane")
print(f"Cooling water out  = {cooling_out.TemperatureK - 273.15:.2f} C")

Output

Evaporator duty    = 225.7 kW
Compressor power   = 51.1 kW
Condenser duty     = 276.7 kW
COP                = 4.42 (Carnot 7.64)
Refrigerant flow   = 0.823 kg/s propane
Cooling water out  = 34.10 C

DWSIM 10.2.11.0, generated 2026-10-08.

Properties

IDs accepted by GetPropertyValue, SetPropertyValue, the sensitivity analysis, the optimizer, the Adjust block and dynamic events. Units are SI; pass another unit system to GetPropertyValue to get them converted.

ID Name Unit (SI) Input
Number of Stages yes
Evaporator Temperature K yes
Evaporator Pressure Pa yes
Condenser Temperature K yes
Condenser Pressure Pa yes
Condenser Approach DeltaT K (difference) yes
Isentropic Efficiency Stage 1 yes
Isentropic Efficiency Stage 2 yes
Isentropic Efficiency Stage 3 yes
Mechanical Efficiency Stage 1 yes
Mechanical Efficiency Stage 2 yes
Mechanical Efficiency Stage 3 yes
COP result
Evaporator Duty kW result
Condenser Duty kW result
Total Shaft Power kW result
Refrigerant Molar Flow mol/s result

Learn more

API members

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

Constructors

VaporCompressionChillerUnitOperation()
public VaporCompressionChillerUnitOperation()
Public Sub New()

Properties

ClearanceRatios: Gets or sets the clearance ratio of each stage (fraction, three elements for stages 1 to 3; default 0.05).

Gets or sets the clearance ratio of each stage (fraction, three elements for stages 1 to 3; default 0.05). Used only to size reciprocating compressors (volumetric efficiency and displacement).

public double[] ClearanceRatios { get; set; }
Public Property ClearanceRatios As Double()

ComponentDescription: Gets or sets the CAPE-OPEN component description for this unit operation.

Gets or sets the CAPE-OPEN component description for this unit operation.

public override string ComponentDescription { get; set; }
Public Overrides Property ComponentDescription As String

CompressorSpeeds: Gets or sets the rotational speed of each stage, in rpm (three elements for stages 1 to 3; default 3000).

Gets or sets the rotational speed of each stage, in rpm (three elements for stages 1 to 3; default 3000). Used only to compute the specific speed of centrifugal compressors.

public double[] CompressorSpeeds { get; set; }
Public Property CompressorSpeeds As Double()

CompressorTypes: Gets or sets the compressor type of each stage (three elements for stages 1 to 3; default Centrifugal).

Gets or sets the compressor type of each stage (three elements for stages 1 to 3; default Centrifugal). Centrifugal stages are sized by specific speed; Reciprocating stages by clearance ratio, volumetric efficiency and displacement.

public CompressorType[] CompressorTypes { get; set; }
Public Property CompressorTypes As CompressorType()

CondenserApproachDeltaT: Gets or sets the condenser approach temperature difference, in K (default 5 K): the condensing temperature is the...

Gets or sets the condenser approach temperature difference, in K (default 5 K): the condensing temperature is the cooling fluid inlet temperature plus this value. Used when CondenserSpecification is ApproachDeltaT.

public double CondenserApproachDeltaT { get; set; }
Public Property CondenserApproachDeltaT As Double

CondenserCoolingSideH_Override: Gets or sets the cooling-side film coefficient of the condenser, in W/(m2.K).

Gets or sets the cooling-side film coefficient of the condenser, in W/(m2.K). Zero (default) uses an internal estimate.

public double CondenserCoolingSideH_Override { get; set; }
Public Property CondenserCoolingSideH_Override As Double

CondenserFoulingResistance: Gets or sets the condenser fouling resistance, in m2.K/W (default 0.0002).

Gets or sets the condenser fouling resistance, in m2.K/W (default 0.0002).

public double CondenserFoulingResistance { get; set; }
Public Property CondenserFoulingResistance As Double

CondenserHXType: Gets or sets the condenser heat exchanger type (ShellAndTube or Plate; default ShellAndTube).

Gets or sets the condenser heat exchanger type (ShellAndTube or Plate; default ShellAndTube). Reported with the condenser sizing results.

public HeatExchangerType CondenserHXType { get; set; }
Public Property CondenserHXType As HeatExchangerType

CondenserPressure: Gets or sets the refrigerant condensing pressure, in Pa (default 12e5 Pa).

Gets or sets the refrigerant condensing pressure, in Pa (default 12e5 Pa). Used when CondenserSpecification is FixedPressure.

public double CondenserPressure { get; set; }
Public Property CondenserPressure As Double

CondenserSpecification: Gets or sets how the condenser pressure is specified: FixedTemperature computes it as the refrigerant bubble point...

Gets or sets how the condenser pressure is specified: FixedTemperature computes it as the refrigerant bubble point pressure at CondenserTemperature; FixedPressure uses CondenserPressure directly; ApproachDeltaT uses the bubble point pressure at the cooling fluid inlet temperature plus CondenserApproachDeltaT. Default FixedTemperature.

public CondenserSpec CondenserSpecification { get; set; }
Public Property CondenserSpecification As CondenserSpec

CondenserTemperature: Gets or sets the refrigerant condensing temperature, in K (default 318.15 K).

Gets or sets the refrigerant condensing temperature, in K (default 318.15 K). Used when CondenserSpecification is FixedTemperature.

public double CondenserTemperature { get; set; }
Public Property CondenserTemperature As Double

CondenserU_Override: Gets or sets a user overall heat transfer coefficient for condenser sizing, in W/(m2.K).

Gets or sets a user overall heat transfer coefficient for condenser sizing, in W/(m2.K). Zero (default) computes it from the film coefficients and fouling resistance.

public double CondenserU_Override { get; set; }
Public Property CondenserU_Override As Double

EconomizerMask: Gets or sets the bit mask of flash economizers between stages: bit 0 (value 1) places an economizer after stage 1...

Gets or sets the bit mask of flash economizers between stages: bit 0 (value 1) places an economizer after stage 1, bit 1 (value 2) after stage 2. An economizer is used only when a later stage exists. Default 0 (none).

public int EconomizerMask { get; set; }
Public Property EconomizerMask As Integer

EvaporatorFoulingResistance: Gets or sets the evaporator fouling resistance, in m2.K/W (default 0.0002).

Gets or sets the evaporator fouling resistance, in m2.K/W (default 0.0002).

public double EvaporatorFoulingResistance { get; set; }
Public Property EvaporatorFoulingResistance As Double

EvaporatorHXType: Gets or sets the evaporator heat exchanger type (ShellAndTube or Plate; default ShellAndTube).

Gets or sets the evaporator heat exchanger type (ShellAndTube or Plate; default ShellAndTube). Reported with the evaporator sizing results.

public HeatExchangerType EvaporatorHXType { get; set; }
Public Property EvaporatorHXType As HeatExchangerType

EvaporatorPressure: Gets or sets the refrigerant evaporating pressure, in Pa (default 2e5 Pa).

Gets or sets the refrigerant evaporating pressure, in Pa (default 2e5 Pa). Used when EvaporatorSpecification is Pressure.

public double EvaporatorPressure { get; set; }
Public Property EvaporatorPressure As Double

EvaporatorProcessSideH_Override: Gets or sets the process-side film coefficient of the evaporator, in W/(m2.K).

Gets or sets the process-side film coefficient of the evaporator, in W/(m2.K). Zero (default) uses an estimate of 2000 W/(m2.K).

public double EvaporatorProcessSideH_Override { get; set; }
Public Property EvaporatorProcessSideH_Override As Double

EvaporatorSpecification: Gets or sets how the evaporator pressure is specified: Temperature computes it as the refrigerant dew point pressure...

Gets or sets how the evaporator pressure is specified: Temperature computes it as the refrigerant dew point pressure at EvaporatorTemperature; Pressure uses EvaporatorPressure directly. Default Temperature.

public EvaporatorSpec EvaporatorSpecification { get; set; }
Public Property EvaporatorSpecification As EvaporatorSpec

EvaporatorTemperature: Gets or sets the refrigerant evaporating temperature, in K (default 258.15 K).

Gets or sets the refrigerant evaporating temperature, in K (default 258.15 K). Used when EvaporatorSpecification is Temperature.

public double EvaporatorTemperature { get; set; }
Public Property EvaporatorTemperature As Double

EvaporatorU_Override: Gets or sets a user overall heat transfer coefficient for evaporator sizing, in W/(m2.K).

Gets or sets a user overall heat transfer coefficient for evaporator sizing, in W/(m2.K). Zero (default) computes it from the film coefficients and fouling resistance.

public double EvaporatorU_Override { get; set; }
Public Property EvaporatorU_Override As Double

IsentropicEfficiencies: Gets or sets the isentropic efficiency of each compression stage (fraction, three elements for stages 1 to 3...

Gets or sets the isentropic efficiency of each compression stage (fraction, three elements for stages 1 to 3; default 0.75). The actual compression work is the isentropic work divided by this value.

public double[] IsentropicEfficiencies { get; set; }
Public Property IsentropicEfficiencies As Double()

IsPremium: Gets a value indicating whether this unit operation is a premium (DWSIM Patreon) unit operation.

Gets a value indicating whether this unit operation is a premium (DWSIM Patreon) unit operation. Always true; the object palette lists it under the Premium category.

public bool IsPremium { get; }
Public ReadOnly Property IsPremium As Boolean

MechanicalEfficiencies: Gets or sets the mechanical efficiency of each compression stage (fraction, three elements for stages 1 to 3...

Gets or sets the mechanical efficiency of each compression stage (fraction, three elements for stages 1 to 3; default 0.95). The stage shaft power is the actual gas work divided by this value.

public double[] MechanicalEfficiencies { get; set; }
Public Property MechanicalEfficiencies As Double()

MobileCompatible: Gets a value indicating whether this unit operation is compatible with mobile interfaces.

Gets a value indicating whether this unit operation is compatible with mobile interfaces. Always false.

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

NumberOfStages: Gets or sets the number of compression stages (1 to 3; values outside the range are clamped).

Gets or sets the number of compression stages (1 to 3; values outside the range are clamped). Default 1. Interstage pressures are set for an equal pressure ratio per stage.

public int NumberOfStages { get; set; }
Public Property NumberOfStages As Integer

ObjectClass: Gets the simulation object class category (Exchangers).

Gets the simulation object class category (Exchangers).

public override SimulationObjectClass ObjectClass { get; }
Public Overrides Property ObjectClass As SimulationObjectClass

Parameters: Parameter storage dictionary for serialization.

Parameter storage dictionary for serialization.

public Dictionary<string, object> Parameters { get; set; }
Public Property Parameters As Dictionary(Of String, Object)

Prefix: Gets the default name prefix for this unit operation ('VCC-').

Gets the default name prefix for this unit operation ("VCC-").

public string Prefix { get; }
Public ReadOnly Property Prefix As String

ProcessOutletTemperature: Temperature the process stream is to be chilled to [K].

Temperature the process stream is to be chilled to [K]. Zero leaves the duty to be read off the outlet stream, which is what the unit did before it had a specification of its own - and could not be given one, since the outlet is a product the unit itself writes.

public double ProcessOutletTemperature { get; set; }
Public Property ProcessOutletTemperature As Double

RefrigerantComposition: Gets or sets the refrigerant composition as compound name to mole fraction pairs.

Gets or sets the refrigerant composition as compound name to mole fraction pairs. Names must match flowsheet compounds; fractions are normalized when used. Stored as semicolon-delimited "Name:fraction" text.

public Dictionary<string, double> RefrigerantComposition { get; set; }
Public Property RefrigerantComposition As Dictionary(Of String, Double)

RefrigerantPropertyPackage: Gets or sets the tag (name) of the flowsheet property package used for the refrigerant calculations.

Gets or sets the tag (name) of the flowsheet property package used for the refrigerant calculations. Empty (default) uses the first property package in the flowsheet.

public string RefrigerantPropertyPackage { get; set; }
Public Property RefrigerantPropertyPackage As String

Methods

Calculate(object): Calculates the object.

Calculates the object.

Parameter Type Description
args Object
public override void Calculate(object args = null)
Public Overrides Sub Calculate(args As Object = Nothing)

CloneXML(): Creates a deep copy of this object by round-tripping through XML serialization.

Creates a deep copy of this object by round-tripping through XML serialization.

public override object CloneXML()
Public Overrides Function CloneXML() As Object

CloseEditForm(): Closes the editor of this object, if it is open.

Closes the editor of this object, if it is open.

public override void CloseEditForm()
Public Overrides Sub CloseEditForm()

CreateConnectors(): Creates the graphic connector definitions on the flowsheet, or updates their positions if they exist: inlets Process...

Creates the graphic connector definitions on the flowsheet, or updates their positions if they exist: inlets Process In, Cooling Fluid In and Shaft Power In (energy); outlets Process Out and Cooling Fluid Out.

public void CreateConnectors()
Public Sub CreateConnectors()

DeCalculate(): Decalculates the object.

Decalculates the object.

public override void DeCalculate()
Public Overrides Sub DeCalculate()

DisplayEditForm(): Opens the editor of this object.

Opens the editor of this object. A host that has no editor for it does nothing.

public override void DisplayEditForm()
Public Overrides Sub DisplayEditForm()

Draw(object): Draws the unit operation icon on the given SkiaSharp canvas.

Draws the unit operation icon on the given SkiaSharp canvas.

Parameter Type Description
g Object The SkiaSharp canvas.
public void Draw(object g)
Public Sub Draw(g As Object)

GetDisplayDescription(): Returns the description string for this unit operation type.

Returns the description string for this unit operation type.

public override string GetDisplayDescription()
Public Overrides Function GetDisplayDescription() As String

GetDisplayName(): Returns the display name for this unit operation type.

Returns the display name for this unit operation type.

public override string GetDisplayName()
Public Overrides Function GetDisplayName() As String

GetIconBitmapBytes(): Returns the raw bytes of the icon image for this unit operation.

Returns the raw bytes of the icon image for this unit operation.

public override byte[] GetIconBitmapBytes()
Public Overrides Function GetIconBitmapBytes() As Byte()

GetPreferredGraphicObjectHeight(): Returns the preferred height of the flowsheet graphic object, in pixels.

Returns the preferred height of the flowsheet graphic object, in pixels.

public override double GetPreferredGraphicObjectHeight()
Public Overrides Function GetPreferredGraphicObjectHeight() As Double

GetPreferredGraphicObjectWidth(): Returns the preferred width of the flowsheet graphic object, in pixels.

Returns the preferred width of the flowsheet graphic object, in pixels.

public override double GetPreferredGraphicObjectWidth()
Public Overrides Function GetPreferredGraphicObjectWidth() As Double

GetProperties(PropertyType): Get a list of all properties of the object.

Get a list of all properties of the object.

Parameter Type Description
proptype PropertyType Type of the property.
public override string[] GetProperties(PropertyType proptype)
Public Overrides Function GetProperties(proptype As PropertyType) As String()

GetPropertyUnit(string, IUnitsOfMeasure): Gets the units of a property.

Gets the units of a property.

Parameter Type Description
prop String Property identifier.
su IUnitsOfMeasure Units system to use. Null to use the default (SI) system.
public override string GetPropertyUnit(string prop, IUnitsOfMeasure su)
Public Overrides Function GetPropertyUnit(prop As String, su As IUnitsOfMeasure) As String

GetPropertyValue(string, IUnitsOfMeasure): Returns the value of a named property, converting from SI to the current unit system.

Returns the value of a named property, converting from SI to the current unit system. Falls back to extra properties if the property is not found in the base implementation.

Parameter Type Description
prop String The property identifier string.
su IUnitsOfMeasure Optional units-of-measure system used for conversion; uses the shared SI system when Nothing.
public override object GetPropertyValue(string prop, IUnitsOfMeasure su)
Public Overrides Function GetPropertyValue(prop As String, su As IUnitsOfMeasure) As Object

HasEconomizerAfterStage(int): Returns whether EconomizerMask places a flash economizer after the given stage.

Returns whether EconomizerMask places a flash economizer after the given stage.

Parameter Type Description
stage Int32 The 1-based compression stage number.
public bool HasEconomizerAfterStage(int stage)
Public Function HasEconomizerAfterStage(stage As Integer) As Boolean

LoadData(List<XElement>): Restores the unit operation.

Restores the unit operation. The Parameters element, when present, replaces the whole Parameters dictionary after the scalar properties are read, so the stored entries win; files saved without it load as before.

Parameter Type Description
data List<XElement> The XML elements written by SaveData.
public override bool LoadData(List<XElement> data)
Public Overrides Function LoadData(data As List(Of XElement)) As Boolean

PopulateEditorPanel(object): Populates the cross-platform editor panel with controls.

Populates the cross-platform editor panel with controls.

Parameter Type Description
ctner Object The editor panel (layout container) to populate.
public void PopulateEditorPanel(object ctner)
Public Sub PopulateEditorPanel(ctner As Object)

ReturnInstance(string): Creates and returns a new instance for deserialization.

Creates and returns a new instance for deserialization.

Parameter Type Description
typename String The type name to instantiate (not used).
public object ReturnInstance(string typename)
Public Function ReturnInstance(typename As String) As Object

SaveData(): Serializes the unit operation, with Parameters written as a Parameters element.

Serializes the unit operation, with Parameters written as a Parameters element.

public override List<XElement> SaveData()
Public Overrides Function SaveData() As List(Of XElement)

SetPropertyValue(string, object, IUnitsOfMeasure): Sets the value of a property.

Sets the value of a property.

Parameter Type Description
prop String Property identifier.
propval Object Property value to set at the specified units.
su IUnitsOfMeasure Units system to use. Null to use the default (SI) system.
public override bool SetPropertyValue(string prop, object propval, IUnitsOfMeasure su)
Public Overrides Function SetPropertyValue(prop As String, propval As Object, su As IUnitsOfMeasure) As Boolean

UpdateEditForm(): Redraws the editor of this object with the current values, if it is open.

Redraws the editor of this object with the current values, if it is open.

public override void UpdateEditForm()
Public Overrides Sub UpdateEditForm()

Fields

_editorForm: The classic (WinForms) editor window open for this unit operation, if any.

The classic (WinForms) editor window open for this unit operation, if any. Not saved with the flowsheet.

public FormEditorVaporCompressionChiller _editorForm
Public _editorForm As FormEditorVaporCompressionChiller