Neqsim physics explanations

From equinor/neqsim · View interactive version

Neqsim physics explanations is an AI agent skill from the GitHub repository equinor/neqsim. Physics explanations for common NeqSim results. USE WHEN: users ask 'why' about simulation results, when explaining unexpected behavior, or when adding educational context to notebooks and reports. Maps common engineering phenomena to plain-language explanations.

How to use this skill

Skill file

NeqSim Physics Explanations

Reference explanations for common thermodynamic and process phenomena.

Use these to add educational context to simulation results.

Thermodynamic Phenomena

Joule-Thomson Effect

What happens: Gas cools when throttled (expanded through a valve) without doing work.

Why: At moderate pressures, intermolecular attraction dominates — expanding gas

molecules must overcome attractive forces, consuming internal energy, which lowers

temperature. At very high pressures (above the inversion temperature), repulsive

forces dominate and the gas heats up instead.

Typical values: Natural gas JT coefficient: 0.3-0.7 K/bar. CO2: 0.5-1.2 K/bar (higher because stronger intermolecular forces). Hydrogen: negative (heats on expansion at ambient T).

Engineering significance: JT cooling across choke valves can cause hydrate formation,

wax deposition, or auto-refrigeration below material design temperature limits (MDMT).

Retrograde Condensation

What happens: A gas mixture forms liquid when pressure decreases (opposite of

what you'd expect — normally, lowering pressure should vaporize liquid).

Why: For mixtures between the cricondenbar and the cricondentherm on the phase

envelope, the dew point curve has a retrograde region where the mixture enters the

two-phase zone upon depressurization. This occurs because heavier components become

less soluble in the lighter gas phase at intermediate pressures.

Engineering significance: Rich gas/condensate pipelines may form liquid slugs during

depressurization. Separator design must account for liquid dropout at pipeline conditions.

Hydrate Formation

What happens: Water molecules form cage-like crystalline structures around small

gas molecules (methane, ethane, propane, CO2, H2S) at high pressure and low temperature.

Why: At high pressure, gas molecules are forced close to water molecules. Below

a certain temperature (the hydrate equilibrium temperature), the water cages become

thermodynamically stable. The structure type depends on the guest molecule size:

sI (methane, CO2), sII (propane, i-butane), sH (large molecules with help gas).

Prevention: (1) Keep temperature above hydrate equilibrium + margin (typically 3-6 C),

(2) Inject thermodynamic inhibitors (MEG, methanol) to shift equilibrium,

(3) Inject low-dosage hydrate inhibitors (kinetic inhibitors, anti-agglomerants),

(4) Insulate pipelines, (5) Remove free water (dehydration).

Phase Envelope

What happens: The phase envelope shows the boundary between single-phase and

two-phase regions on a P-T diagram.

Key points:

Equation of State Selection

Why SRK vs PR vs CPA matters:

Process Equipment Phenomena

Compressor Power and Efficiency

What the numbers mean:

Separator Performance

What determines separation quality:

Heat Exchanger Duty

What the duty number means:

Pipeline Pressure Drop

What causes it:

Common "Why" Questions

"Why is my density zero?"

You forgot to call fluid.initProperties() after the flash. The flash calculates

phase compositions and fractions, but transport/physical properties (density, viscosity,

thermal conductivity) require a separate initialization step.

"Why does my water content look wrong with SRK?"

SRK (and PR) cannot model hydrogen bonding between water and hydrocarbons. They predict

water solubility in gas that is either too high or too low depending on conditions.

Use CPA (SystemSrkCPAstatoil) with mixing rule 10 for any system containing water.

"Why is my compressor power negative?"

The outlet pressure is set lower than the inlet pressure. A compressor increases

pressure — use ThrottlingValve or Expander for pressure reduction.

"Why doesn't my separator produce two phases?"

The inlet fluid may be entirely in one phase at the separator conditions. Run a

standalone TPflash on the feed fluid at separator P and T to verify. If only one

phase exists, separation isn't physically possible at those conditions.

"Why is the Joule-Thomson coefficient so different for CO2 vs methane?"

CO2 has stronger intermolecular forces (quadrupole moment) than methane, so expanding

CO2 requires more energy to overcome molecular attraction, producing a larger

temperature drop per bar of pressure reduction.

"Why does my hydrate temperature change when I add MEG?"

MEG (mono-ethylene glycol) is a thermodynamic hydrate inhibitor. It lowers the

activity of water, making it harder for water molecules to form the cage structures

around gas molecules. Colligative effect — more inhibitor = lower hydrate T.

Typical shift: 1-3 C per 10 wt% MEG in the aqueous phase.

"Why is retrograde condensation a problem in pipelines?"

Liquid slugs in gas pipelines cause: (1) increased pressure drop, (2) equipment

damage from slug impact on bends and separators, (3) unstable flow delivery to

receiving facilities, (4) potential hydrate formation in the liquid phase.

"Why do I need volume translation on my EOS?"

Standard SRK and PR systematically underpredict liquid density (5-15% error).

Volume translation adds a constant shift to the molar volume prediction without

changing the phase equilibrium (VLE). Use SystemSrkEosvolcor or SystemPrEosvolcor

when accurate liquid density is important (pipeline sizing, tank volumes).

"Why does my three-phase flash not find the water phase?"

Call fluid.setMultiPhaseCheck(true) before the flash. Without this,

the solver only checks for gas/liquid equilibrium and may miss a second liquid

phase (aqueous). This is especially important for CPA systems with water.

"How do I read a phase envelope correctly?"

A PT phase envelope has two branches meeting at the critical point:

At a bubble point, the liquid just starts producing the first tiny bubble of vapor.

At a dew point, the vapor just starts producing the first tiny drop of liquid.

no liquid can form at any pressure.

For lean natural gas, this is also on the dew curve side.

where REDUCING pressure causes MORE liquid (counter-intuitive).

For lean gas (mostly methane), the envelope is narrow and shifted to very low

temperatures (-150 to -30 °C). For rich gas/condensate, the envelope is wider

and extends to higher temperatures.

"Why are NeqSim phase envelope branch labels swapped?"

When using calcPTphaseEnvelope(true, 1.0) (bubblePointFirst=true), the Michelsen

continuation algorithm starts isDewPhase=true regardless of the starting side.

Points traced from the bubble side go into the "dew" list. At the critical point

the flag flips, so the actual dew-side data goes into the "bubble" list. **Always

classify branches by checking which one has the higher max temperature (= dew curve)

rather than trusting the method names.**

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.