MaximaLabs
All guides
Reference model

How to simulate wellhead compression: what the reservoir gives and what it costs to move

A gas well is not a feed whose flow you type in. The rate is an OUTCOME of how hard the facility pulls on the reservoir, and this example starts there. The **well** runs the Vogel inflow-performance relationship: at a 250 bar reservoir pressure and a 5e-5 mol/s/Pa productivity index its absolute open flow is `J x p_r / 1.8` = **694 mol/s**, and the fraction of that you actually get follows `1 - 0.2(p_wf/p_r) - 0.8(p_wf/p_r)^2`. Holding 180 bar at the bottomhole delivers **306 mol/s, 44% of open flow**. Squeeze to 150 bar and it rises to 411; back off to 240 and it collapses to 49. The curve is deliberately not a straight line — that curvature is why compression pays for itself, and why the last increment of drawdown buys less than the first. **Compression is where the stage count earns its keep.** Taking that gas from 30 to 150 bar in ONE stage lands the discharge at **508 K (235 C)** — past what reciprocating machine valves and lube oil tolerate, before any efficiency argument. Split it into three with intercooling to 313 K and the discharge is **362 K**; four stages give 349 K. The temperature, not the power, is what sets the stage count on a real machine. **Read the reported duty carefully.** `duty` on this unit is the NET of the compression work and the intercooler heat removed, summed into one number — it goes from +2094 kW at one stage to -384 kW at three, not because compression got cheaper but because there is now intercooling to subtract. It is not shaft power, and this example does not present it as such.

WELL
COMP
Export
  1. 1
    Open the ready-made model

    Open the "Wellhead compression: what the reservoir gives and what it costs to move" model in the MaximaLabs workspace — no install, no license. It loads live on the canvas, ready to edit and run.

  2. 2
    Confirm the thermodynamics

    This process is modeled with the PENG-ROBINSON property package over methane, ethane, propane, co2 — already selected, so the phase equilibrium and enthalpy are physically consistent from the first run.

  3. 3
    Review the flowsheet

    The flowsheet chains WELL, COMP. Every block is a real, solvable unit op you can reconfigure on the canvas.

  4. 4
    Run the simulation

    Click Run. The deterministic solver converges the material and energy balances (recycles included) and fills the live stream table — the AI never invents a number.

  5. 5
    Read the results and iterate

    Inspect the converged streams, tweak a spec, and re-run — or ask the AI copilot to explain a result or diagnose a failed solve in plain English.

What you'll build
Thermodynamics
PENG-ROBINSON
Components
methane, ethane, propane, co2
Unit operations
WELLCOMP
Open this model in the workspace

Opens live on the canvas — free, no install.

Explore the model & flowsheet

Frequently asked questions

What does the Wellhead compression: what the reservoir gives and what it costs to move model simulate?
A gas well is not a feed whose flow you type in. The rate is an OUTCOME of how hard the facility pulls on the reservoir, and this example starts there. The **well** runs the Vogel inflow-performance relationship: at a 250 bar reservoir pressure and a 5e-5 mol/s/Pa productivity index its absolute open flow is `J x p_r / 1.8` = **694 mol/s**, and the fraction of that you actually get follows `1 - 0.2(p_wf/p_r) - 0.8(p_wf/p_r)^2`. Holding 180 bar at the bottomhole delivers **306 mol/s, 44% of open flow**. Squeeze to 150 bar and it rises to 411; back off to 240 and it collapses to 49. The curve is deliberately not a straight line — that curvature is why compression pays for itself, and why the last increment of drawdown buys less than the first. **Compression is where the stage count earns its keep.** Taking that gas from 30 to 150 bar in ONE stage lands the discharge at **508 K (235 C)** — past what reciprocating machine valves and lube oil tolerate, before any efficiency argument. Split it into three with intercooling to 313 K and the discharge is **362 K**; four stages give 349 K. The temperature, not the power, is what sets the stage count on a real machine. **Read the reported duty carefully.** `duty` on this unit is the NET of the compression work and the intercooler heat removed, summed into one number — it goes from +2094 kW at one stage to -384 kW at three, not because compression got cheaper but because there is now intercooling to subtract. It is not shaft power, and this example does not present it as such.
Which thermodynamic method does it use?
The PENG-ROBINSON property package, over methane, ethane, propane, co2 — already selected. You can switch the method on the canvas before running.
Which unit operations are in the flowsheet?
It chains WELL, COMP. Every block is a real, solvable unit operation you can reconfigure, add to, or remove.
Do I need to install software or buy a license?
No. Wellhead compression: what the reservoir gives and what it costs to move runs entirely in your browser on MaximaLabs — free, no install, no license. Open the model to load it live and run the deterministic solver.

More guides like this

Reference model

Gas compressor air-cooled aftercooler (fin-fan)

A natural-gas booster compressor followed by an air-cooled (fin-fan) aftercooler — the standard way to reject compression heat where no cooling water is available. The compressor raises the gas from 8 to 24 atm (hot discharge ~150 °C); the air cooler then rejects that heat to ambient air, cooling the gas back to 49 °C. Unlike a plain cooler, the air_cooler op closes the air side: from the process duty and the 35 °C design ambient it solves the air mass flow (a 15 °C air rise) and reports the fan power from the given fan static pressure. Honest scope: screening air-side model (fixed cp_air, ideal-gas air density, no fin/row geometry rating); an air cooler cannot cool below ambient, so the 49 °C target sits safely above the 35 °C air inlet.

Permian Basin, Texas, USA

Associated gas conditioning

Field gas is compressed, chilled below its dew point, and flashed to knock out NGL/condensate — the sales-gas vs. liquids split every midstream gathering plant runs (Peng-Robinson).

Gas plant, Permian Basin, Texas, USA

Natural gas fractionation train

A four-column NGL fractionation train — demethanizer, deethanizer, depropanizer, debutanizer — recovering pipeline-spec sales gas plus ethane, propane, and butane products from wellhead-pressure raw natural gas, after Luyben (Ind. Eng. Chem. Res. 2013, 52, 10741).

Northern Lights, Øygarden, Norway

CO₂ capture + compression

Post-combustion capture recovers 90% of the flue CO₂, then a compressor and after-cooler condition it to pipeline pressure for storage/EOR — the real energy cost after capture.

Gas processing (cold-separator dew-point control)

Cold-separator NGL recovery / dew-point control

A rich natural gas is chilled in the gas/gas exchanger + propane-chiller train (lumped here as one cold box) to -33 degC and let into a cold separator. The heavy hydrocarbons (C3+) drop out as a raw NGL liquid, leaving a leaner sales gas that meets its hydrocarbon dew-point spec — so no more liquid forms as the gas cools in the export pipeline. The cold separator is modelled as an adiabatic flash fed by the chiller, so the single knob (the chill temperature) drives both the NGL recovered and the refrigeration duty: colder recovers more NGL but costs more refrigeration (the built-in sensitivity). Peng-Robinson handles the hydrocarbon VLE; the companion gas-conditioning utilities (hydrate risk, water content, Joule-Thomson choke cooling, and compressor sizing for the sales-gas recompression) quantify the rest of the plant around it.

Gas processing (NGL fractionation train)

Depropanizer (NGL fractionation)

The raw NGL recovered by a cold separator is fractionated: a depropanizer column splits it into a C₃-and-lighter overhead (propane + a little ethane, the LPG product) and a C4+ bottoms (butanes + natural gasoline). The column is solved with the component-flow Naphtali-Sandholm MESH (method "ns"), which carries every component flow as an unknown so the feed-vs-products material balance is an equation the solver closes by construction — the right tool for a sharp C₃/C₄ cut, where a reduced-form column would drag the split off and leak a few percent of a component. Peng-Robinson handles the light-hydrocarbon VLE; the built-in sensitivity sweeps the reflux ratio against the reboiler duty (the classic distillation energy trade-off).

Stop fighting legacy software. Build your first flowsheet in 60 seconds.