Skip to content

Phase Envelope

In this tutorial you will generate a pressure-temperature (PT) phase envelope for a natural gas mixture using DWSIM's Classic UI Utilities menu. The phase envelope shows bubble-point and dew-point curves, the critical point, and the regions where the mixture exists as liquid, vapor, or two phases.

What you will learn

  • What a phase envelope is and why it matters for process design
  • How to access the Phase Envelope utility from the Utilities menu
  • How to read bubble-point, dew-point, cricondentherm, and cricondenbar from the chart
  • How to export the envelope data for external analysis

Prerequisites

Process Overview

A phase envelope is essential for natural gas processing, pipeline design, and any application where the phase state at given T and P is critical. Pipeline operators must keep gas single-phase (above the dew point) to avoid liquid dropout and slug flow.

For pure components, the phase boundary is a single curve (the vapor pressure curve). For mixtures, bubble and dew curves enclose a two-phase region with the critical point inside.

Key Design Parameters

Parameter Value
Compounds Methane (80%), Ethane (10%), Propane (5%), n-Butane (3%), n-Pentane (2%)
Property Package Peng-Robinson
Composition basis Molar

Step-by-Step in the Classic UI

1. Set up the simulation

File > New Chemical Process Model:

  • Compounds: Methane, Ethane, Propane, N-butane, N-pentane
  • Property Package: Peng-Robinson
  • Click Finish

Why Peng-Robinson?

Peng-Robinson is the industry standard for hydrocarbon mixtures, light gases, and high-pressure equilibria. As a cubic EOS it is fast to evaluate and gives reliable bubble/dew curves and critical points for natural gas and petroleum fractions. Avoid PR for highly polar or hydrogen-bonding systems (water-alcohol, electrolytes), where activity-coefficient models are more appropriate.

2. Create a material stream with the gas composition

Drag a Material Stream, name it NatGas. The stream conditions are arbitrary for envelope generation; what matters is composition.

In the Object Editor:

  • T = 300 K, P = 1 atm, Molar Flow = 1 mol/s
  • Composition (Mole Fraction):
    • Methane: 0.80
    • Ethane: 0.10
    • Propane: 0.05
    • N-butane: 0.03
    • N-pentane: 0.02

Press Enter, then F6 ON → Solve to make sure the stream is calculated.

3. Open the Phase Envelope utility

In the FlowsheetForm menu: Utilities > Phase Envelope.

A dialog opens letting you choose:

  • Source stream: select NatGas from the dropdown
  • Property Package: defaults to the stream's package; can override here
  • Pressure range: leave at default (e.g., 1 to 200 bar) or customize
  • Temperature range: leave at default

Click Calculate.

Phase Envelope utility setup

4. View the chart

The utility computes the bubble and dew curves and displays them on a PT chart. Key points are labeled:

  • Bubble curve (left side, increasing pressure with temperature)
  • Dew curve (right side, decreasing then increasing)
  • Critical point at the top of the loop
  • Cricondentherm (rightmost point - max T)
  • Cricondenbar (topmost point - max P)

Phase envelope for natural gas

5. Read specific values

Hover the mouse over a point on either curve to see the exact T and P. Use the Lookup panel (if visible) or the Export Data button to save the curve points to CSV/clipboard.

You can also right-click the chart for options like Add Hydrate Curve (if the package supports it), Save Image, or Copy to Clipboard.

6. Save and revisit

Save the simulation (File > Save). The phase envelope chart is associated with the stream and can be reopened from the same Utilities menu.

To compare envelopes, you can create additional streams with different compositions, calculate envelopes for each, and overlay them in a single chart (right-click chart → Add Series).

Results and Validation

Variable Expected Range
Critical temperature 190 - 220 K
Critical pressure 45 - 55 bar
Cricondentherm 250 - 300 K
Cricondenbar 55 - 70 bar

Expected results

The envelope should be a closed curve. For this methane-rich gas, the critical temperature is well below ambient, meaning the gas is supercritical at typical pipeline conditions (300 K, 70 bar).

Understanding the Results

The phase envelope reveals key design constraints:

  • Cricondentherm: max temperature at which liquid can exist
  • Cricondenbar: max pressure at which vapor can exist
  • Pipeline design: operating point must stay outside the envelope (single-phase vapor) to avoid liquid dropout

Why bubble and dew curves?

The bubble curve is computed by tracking the locus of points where the first vapor bubble appears under a (P, T) sweep; the dew curve tracks where the first liquid drop forms. The two curves meet at the critical point. Together they bound the two-phase region of the multi-component mixture and tell you, for any (T, P), whether the system is liquid, vapor, or two-phase.

Peng-Robinson is the standard EOS for hydrocarbon mixtures and gives reliable phase envelopes for natural gas.

Automating This Tutorial

Files in this repository

from DWSIM.Automation.FluentAPI import Flowsheet, PropertyPackages, Q

fs = (Flowsheet.Create("PhaseEnvelopeTutorial")
      .WithCompounds("Methane", "Ethane", "Propane",
                     "N-butane", "N-pentane")
      .WithPropertyPackage(PropertyPackages.PengRobinson))

gas = (fs.AddMaterialStream("NatGas")
       .At(Q.Kelvin(300.0), Q.Pascal(101325.0))
       .WithMolarFlow(1.0.MolPerSecond())
       .SetCompoundMolarFlow("Methane", 0.80)
       .SetCompoundMolarFlow("Ethane", 0.10)
       .SetCompoundMolarFlow("Propane", 0.05)
       .SetCompoundMolarFlow("N-butane", 0.03)
       .SetCompoundMolarFlow("N-pentane", 0.02))

fs.Solve()
envelope = gas.GeneratePhaseEnvelope()
print(f"Critical T: {envelope.CriticalTemperatureK:.1f} K")
print(f"Critical P: {envelope.CriticalPressurePa/1e5:.2f} bar")
{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{
  "name":"dwsim.stream.phase_envelope",
  "arguments":{"flowsheet_id":"<ID>","name":"NatGas"}
}}

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 "PhaseEnvelopeTutorial"
- Add Methane, Ethane, Propane, N-butane and N-pentane as
  compounds; set the property package to "PengRobinson"
- Add a material stream named "NatGas" at 300 K and 101325 Pa
  with a molar flow of 1 mol/s and mole-fraction composition
  Methane = 0.80, Ethane = 0.10, Propane = 0.05, N-butane = 0.03,
  N-pentane = 0.02
- Solve the flowsheet
- Generate the phase envelope of the NatGas stream
- Report the critical temperature (K) and the critical pressure
  (bar) of the mixture

Exercises

  1. Add 1% CO2 and 1% N2 to the mixture (reduce methane to 78%). How does the envelope shape change?
  2. Increase the pentane content to 10% (reduce methane to 72%). How does the cricondentherm shift?
  3. Generate envelopes for a lean gas (95% methane, 5% ethane) and a rich gas (70% methane + heavier). Compare the two-phase regions side by side.

Further Reading

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

  • Robert A. Heidemann & Ahmed M. Khalil. (1980). The calculation of critical points. AIChE Journal
  • B. Widom. (1965). Equation of State in the Neighborhood of the Critical Point. The Journal of Chemical Physics. doi:10.1063/1.1696618
  • G. G. Simeoni et al.. (2010). The Widom line as the crossover between liquid-like and gas-like behaviour in supercritical fluids. Nature Physics. doi:10.1038/nphys1683
  • Curtis H. Whitson & Michael R. Brule. (2000). Phase Behavior (SPE Monograph Series Vol. 20). Society of Petroleum Engineers
  • Michael Michelsen & Jorgen Mollerup. (2007). Thermodynamic Models: Fundamentals and Computational Aspects. Tie-Line Publications

Next Steps

You have completed the intermediate track in the Classic UI! You can now model distillation columns, heat exchangers, reactors, recycle loops, and phase envelopes.

Continue to the Advanced Track for complete industrial process simulations, starting with Refrigeration Cycle.