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¶

| 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¶
-
User guide
-
FluentAPI
API members¶
Public members declared by this class. Inherited members are documented on the base classes.
Constructors¶
VaporCompressionChillerUnitOperation()
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).
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.
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.
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.
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.
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.
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).
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.
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.
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.
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.
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.
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).
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).
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.
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.
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).
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.
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.
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.
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.
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.
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.
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.
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.
ObjectClass: Gets the simulation object class category (Exchangers).
Gets the simulation object class category (Exchangers).
Parameters: Parameter storage dictionary for serialization.
Parameter storage dictionary for serialization.
Prefix: Gets the default name prefix for this unit operation ('VCC-').
Gets the default name prefix for this unit operation ("VCC-").
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.
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.
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.
Methods¶
Calculate(object): Calculates the object.
Calculates the object.
| Parameter | Type | Description |
|---|---|---|
args |
Object |
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.
CloseEditForm(): Closes the editor of this object, if it is open.
Closes the editor of this object, if it is open.
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.
DeCalculate(): Decalculates the object.
Decalculates the object.
DisplayEditForm(): Opens the editor of this object.
Opens the editor of this object. A host that has no editor for it does nothing.
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. |
GetDisplayDescription(): Returns the description string for this unit operation type.
Returns the description string for this unit operation type.
GetDisplayName(): Returns the display name for this unit operation type.
Returns the display name for this unit operation type.
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.
GetPreferredGraphicObjectHeight(): Returns the preferred height of the flowsheet graphic object, in pixels.
Returns the preferred height of the flowsheet graphic object, in pixels.
GetPreferredGraphicObjectWidth(): Returns the preferred width of the flowsheet graphic object, in pixels.
Returns the preferred width of the flowsheet graphic object, in pixels.
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. |
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. |
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. |
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. |
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. |
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. |
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). |
SaveData(): Serializes the unit operation, with Parameters written as a Parameters element.
Serializes the unit operation, with Parameters written as a Parameters element.
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. |
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.
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.