Skip to content

Refrigeration Cycle

In this tutorial you will simulate a complete vapor-compression refrigeration cycle using propane (R-290) in DWSIM's Classic UI. This combines a compressor, condenser, expansion valve, and evaporator into a closed-loop thermodynamic cycle.

What you will learn

  • How to model a complete thermodynamic cycle with four unit operations
  • How to specify saturated vapor (pressure + vapor fraction) on a stream
  • How to read compressor work, condenser duty, and evaporator duty
  • How to verify cycle closure and compute the COP

Prerequisites

Process Overview

The vapor-compression cycle is the basis of refrigerators, air conditioners, and chillers. Propane (R-290) is an environmentally friendly natural refrigerant: zero ozone depletion, very low global warming potential.

The cycle operates between two pressures:

  • Low pressure (~2.45 bar): evaporation T ~ -20 °C
  • High pressure (~12.5 bar): condensation T ~ 32 °C

Coefficient of Performance (COP) = Q_evap / W_comp. Typical R-290 cycle: COP 2-5.

Process Flow Diagram

graph LR
    S1["1<br/>Sat. Vapor<br/>2.45 bar"] --> COMP["C-1<br/>Compressor<br/>η=80%"]
    COMP --> S2["2<br/>Superheated<br/>12.5 bar"]
    S2 --> COND["CD-1<br/>Condenser<br/>305 K"]
    COND --> S3["3<br/>Subcooled Liquid"]
    S3 --> VALVE["V-1<br/>Expansion Valve"]
    VALVE --> S4["4<br/>Two-Phase<br/>2.45 bar"]
    S4 --> EVAP["EV-1<br/>Evaporator<br/>253 K"]
    EVAP --> S5["5<br/>Sat. Vapor"]

Key Design Parameters

Parameter Value Unit
Refrigerant Propane (R-290) -
Property Package Peng-Robinson -
Evaporation pressure 2.45 × 10⁵ Pa
Condensation pressure 12.5 × 10⁵ Pa
Condenser outlet temperature 305 (32 °C) K
Evaporator outlet temperature 253 (-20 °C) K
Compressor adiabatic efficiency 80 %

Step-by-Step in the Classic UI

1. Set up the simulation

File > New Chemical Process Model:

  • Compounds: Propane
  • Property Package: Peng-Robinson
  • Click Finish

Why Peng-Robinson for propane?

PR is the industry standard for hydrocarbon refrigerants: a cubic EOS that is accurate for non-polar pure compounds across a wide T,P range, including the saturation dome. This is critical for refrigeration cycles that cross the two-phase region.

2. Define State 1 (saturated vapor at low pressure)

Drag a Material Stream, name it 1_evap_out. In the editor:

  • Specification Type: change from Temperature and Pressure to Pressure and Vapor Fraction
  • Pressure: 2.45 bar (245000 Pa)
  • Vapor Fraction: 1.0 (saturated vapor)
  • Molar Flow: 1 mol/s
  • Composition: Propane = 1.0

DWSIM calculates the saturation temperature (~253 K).

Why specify Pressure + Vapor Fraction?

When the stream is at saturation (V/L equilibrium), specifying T+P would over-determine the state on the saturation curve. Pressure + Vapor Fraction places the stream exactly on the dome (e.g., VF=1 = saturated vapor, VF=0 = saturated liquid).

Saturated vapor at low pressure

3. Insert the Compressor

Drag a Compressor from the Object Palette to the canvas, rename C-1. In the editor:

  • Calculation Mode: Adiabatic
  • Outlet Pressure: 12.5 bar (1250000 Pa)
  • Adiabatic Efficiency: 80 %
  • Connections: Inlet = 1_evap_out, Outlet = create 2_comp_out, Energy = create W_comp

4. Insert the Condenser (Cooler)

Drag a Cooler named CD-1:

  • Outlet Temperature: 305 K, ΔP: 0, Efficiency: 100%
  • Inlet: 2_comp_out, Outlet: create 3_cond_out, Energy: create Q_cond

5. Insert the Expansion Valve

Drag a Valve named V-1:

  • Calculation Mode: Pressure Specification
  • Outlet Pressure: 2.45 bar
  • Inlet: 3_cond_out, Outlet: create 4_valve_out

(The valve is isenthalpic by default - no efficiency setting.)

Why isenthalpic valve?

Throttling through an expansion valve is approximately constant-enthalpy because changes in kinetic and potential energy are negligible and there is no shaft work or heat transfer. The valve drops the pressure and flashes part of the liquid.

6. Insert the Evaporator (Heater)

Drag a Heater named EV-1:

  • Outlet Temperature: 253 K, ΔP: 0, Efficiency: 100%
  • Inlet: 4_valve_out, Outlet: create 5_evap_out, Energy: create Q_evap

Complete refrigeration cycle

7. Solve

F6 ON → Solve. All objects turn green.

8. Compute the COP

Click W_comp energy stream → Results: read Energy Flow, e.g. 5.5 kW. Click Q_evap energy stream → Results: read Energy Flow, e.g. 21 kW. Click Q_cond energy stream → Results: read Energy Flow, e.g. 26.5 kW.

COP = Q_evap / W_comp = 21 / 5.5 ≈ 3.8.

Energy balance check: Q_cond ≈ Q_evap + W_comp (within rounding). Cycle closure: temperature of stream 5_evap_out should match 1_evap_out (~253 K).

Energy flows for COP calculation

Results and Validation

Variable Expected Unit
Energy balance: Q_cond = Q_evap + W_comp Within 0.5% kW
Cycle closure: T5 ≈ T1 Within 0.5% K
COP 2 - 7 -

Expected results

Energy balance closes; State 5 matches State 1 in T and P; COP is 2-5.

Understanding the Results

The four processes:

  1. 1→2 (Compression): raises pressure and temperature
  2. 2→3 (Condensation): rejects heat at high pressure → liquid
  3. 3→4 (Expansion): isenthalpic throttling → cold two-phase mixture
  4. 4→5 (Evaporation): absorbs heat at low pressure → vapor

COP > 1 because the compressor's work is leveraged to move a larger amount of heat.

Automating This Tutorial

Files in this repository

See examples/advanced/01_refrigeration_cycle.py in the DWSIM.Tutorials repository for the complete script (adapted from validation test F01).

Build the cycle with dwsim.unitop.add for Compressor, Cooler, Valve, Heater, then dwsim.unitop.connect and dwsim.solve.run.

Output may vary

Results depend on the LLM's reasoning quality and tool-use accuracy. Always verify the simulation matches your intent before relying on the numbers.

Use DWSIM (via the MCP server) to build the following simulation:

- Create a flowsheet called "RefrigerationCycle"
- Add Propane as the only compound; set the property package to "Peng-Robinson"
- Add a material stream named "1_evap_out" specified by pressure and vapor
  fraction: P = 245000 Pa, vapor fraction = 1.0, molar flow = 1 mol/s,
  composition Propane = 1.0
- Add a Compressor "C-1" in adiabatic mode with outlet pressure = 1250000 Pa
  and adiabatic efficiency = 80%; inlet = 1_evap_out, outlet = 2_comp_out,
  energy stream = W_comp
- Add a Cooler "CD-1" with outlet T = 305 K, pressure drop = 0,
  efficiency = 100%; inlet = 2_comp_out, outlet = 3_cond_out,
  energy stream = Q_cond
- Add a Valve "V-1" in pressure-specification mode with outlet pressure
  = 245000 Pa; inlet = 3_cond_out, outlet = 4_valve_out
- Add a Heater "EV-1" with outlet T = 253 K, pressure drop = 0,
  efficiency = 100%; inlet = 4_valve_out, outlet = 5_evap_out,
  energy stream = Q_evap
- Solve the flowsheet
- Report the energy flow (kW) of W_comp, Q_cond and Q_evap, and compute
  the COP as Q_evap / W_comp

Exercises

  1. Change compressor efficiency to 60%. How does COP change?
  2. Increase high pressure to 15 bar. Does COP improve?
  3. Replace propane with Isobutane (R-600a) via Edit > Simulation Settings > Compounds. Compare results.

Further Reading

Selected references from the DWSIM technical bibliography. Click the DOI link to access each paper.

  • ASHRAE. (2020). ASHRAE Handbook - Refrigeration. American Society of Heating, Refrigerating and Air-Conditioning Engineers
  • Wilbert F. Stoecker. (1998). Industrial Refrigeration Handbook. McGraw-Hill
  • Ding-Yu Peng & Donald B. Robinson. (1976). A New Two-Constant Equation of State. Industrial & Engineering Chemistry Fundamentals. doi:10.1021/i160057a011
  • John M. Schultz. (1962). The Polytropic Analysis of Centrifugal Compressors. Journal of Engineering for Power. doi:10.1115/1.3673381

Next Steps

In Ammonia Synthesis, you will build the Haber-Bosch loop.