Neqsim
NeqSim is a library for calculation of fluid behavior, phase equilibrium and process simulation
Install / Use
npx skills add equinor/neqsimInstalls into whichever agent you are using.
README
What is NeqSim?
NeqSim (Non-Equilibrium Simulator) is a comprehensive Java library for fluid property estimation, process simulation, and engineering design. It covers the full process engineering workflow, from thermodynamic modeling and PVT analysis through equipment sizing, pipeline flow, safety studies, and field development economics.
Developed at NTNU and maintained by Equinor, NeqSim is used for real-world oil & gas, carbon capture, hydrogen, and energy applications.
Use it from Java, Python, Jupyter notebooks, .NET, MATLAB, or let an AI agent drive it via natural language.
Key capabilities
| Domain | What NeqSim provides | |--------|---------------------| | Thermodynamics | 60+ equation-of-state models (SRK, PR, CPA, GERG-2008, and more), flash calculations (TP, PH, PS, dew, bubble), phase envelopes | | Physical properties | Density, viscosity, thermal conductivity, surface tension, diffusion coefficients | | Process simulation | 33+ equipment types: separators, compressors, heat exchangers, valves, distillation columns, pumps, reactors | | Pipeline & flow | Steady-state and transient multiphase pipe flow (Beggs & Brill, two-fluid model), pipe networks | | PVT simulation | CME, CVD, differential liberation, separator tests, swelling tests, saturation pressure | | Safety | Depressurization/blowdown, PSV sizing (API 520/521), source term generation, safety envelopes | | Standards | ISO 6976 (gas quality), NORSOK, DNV, API, ASME compliance checks | | Mechanical design | Wall thickness, weight estimation, cost analysis for pipelines, vessels, wells (SURF) | | Field development | Production forecasting, concept screening, NPV/IRR economics, Monte Carlo uncertainty |
See the full documentation, Java Wiki, or ask questions in Discussions.
Quick Start
Python - try it in 30 seconds
A Python wrapper is available on pip. Install using pip install neqsim.
See neqsim-python for more details.
Java - add to your project
Maven Central (simplest - no authentication needed):
<dependency>
<groupId>com.equinor.neqsim</groupId>
<artifactId>neqsim</artifactId>
<version>3.17.0</version>
</dependency>
import neqsim.thermo.system.SystemSrkEos;
import neqsim.thermodynamicoperations.ThermodynamicOperations;
SystemSrkEos fluid = new SystemSrkEos(273.15 + 25.0, 60.0);
fluid.addComponent("methane", 0.85);
fluid.addComponent("ethane", 0.10);
fluid.addComponent("propane", 0.05);
fluid.setMixingRule("classic");
ThermodynamicOperations ops = new ThermodynamicOperations(fluid);
ops.TPflash();
fluid.initProperties();
System.out.println("Density: " + fluid.getDensity("kg/m3") + " kg/m3");
AI agent - describe your problem in plain English
@solve.task hydrate formation temperature for wet gas at 100 bara
The agent scopes the task, builds a NeqSim simulation, validates results, and generates a Word + HTML report with no coding required.
What can you do with NeqSim?
<details> <summary><strong>Calculate fluid properties</strong></summary>from neqsim import jneqsim
fluid = jneqsim.thermo.system.SystemSrkEos(273.15 + 15.0, 100.0)
fluid.addComponent("methane", 0.90)
fluid.addComponent("CO2", 0.05)
fluid.addComponent("nitrogen", 0.05)
fluid.setMixingRule("classic")
ops = jneqsim.thermodynamicoperations.ThermodynamicOperations(fluid)
ops.TPflash()
fluid.initProperties()
print(f"Density: {fluid.getDensity('kg/m3'):.2f} kg/m3")
print(f"Molar mass: {fluid.getMolarMass('kg/mol'):.4f} kg/mol")
print(f"Phases: {fluid.getNumberOfPhases()}")
</details>
<details>
<summary><strong>Simulate a process flowsheet</strong></summary>
from neqsim import jneqsim
fluid = jneqsim.thermo.system.SystemSrkEos(273.15 + 30.0, 80.0)
fluid.addComponent("methane", 0.80)
fluid.addComponent("ethane", 0.12)
fluid.addComponent("propane", 0.05)
fluid.addComponent("n-butane", 0.03)
fluid.setMixingRule("classic")
Stream = jneqsim.process.equipment.stream.Stream
Separator = jneqsim.process.equipment.separator.Separator
Compressor = jneqsim.process.equipment.compressor.Compressor
ProcessSystem = jneqsim.process.processmodel.ProcessSystem
feed = Stream("Feed", fluid)
feed.setFlowRate(50000.0, "kg/hr")
separator = Separator("HP Separator", feed)
compressor = Compressor("Export Compressor", separator.getGasOutStream())
compressor.setOutletPressure(150.0, "bara")
process = ProcessSystem()
process.add(feed)
process.add(separator)
process.add(compressor)
process.run()
print(f"Compressor power: {compressor.getPower('kW'):.0f} kW")
print(f"Gas out temp: {compressor.getOutletStream().getTemperature() - 273.15:.1f} C")
</details>
<details>
<summary><strong>Predict hydrate formation temperature</strong></summary>
from neqsim import jneqsim
fluid = jneqsim.thermo.system.SystemSrkEos(273.15 + 5.0, 80.0)
fluid.addComponent("methane", 0.90)
fluid.addComponent("ethane", 0.06)
fluid.addComponent("propane", 0.03)
fluid.addComponent("water", 0.01)
fluid.setMixingRule("classic")
fluid.setMultiPhaseCheck(True)
ops = jneqsim.thermodynamicoperations.ThermodynamicOperations(fluid)
ops.hydrateFormationTemperature()
print(f"Hydrate T: {fluid.getTemperature() - 273.15:.2f} C")
</details>
<details>
<summary><strong>Run pipeline pressure-drop calculations</strong></summary>
from neqsim import jneqsim
fluid = jneqsim.thermo.system.SystemSrkEos(273.15 + 40.0, 120.0)
fluid.addComponent("methane", 0.95)
fluid.addComponent("ethane", 0.05)
fluid.setMixingRule("classic")
Stream = jneqsim.process.equipment.stream.Stream
PipeBeggsAndBrills = jneqsim.process.equipment.pipeline.PipeBeggsAndBrills
feed = Stream("Inlet", fluid)
feed.setFlowRate(200000.0, "kg/hr")
pipe = PipeBeggsAndBrills("Export Pipeline", feed)
pipe.setPipeWallRoughness(5e-5)
pipe.setLength(50000.0) # 50 km
pipe.setDiameter(0.508) # 20 inch
pipe.setNumberOfIncrements(20)
pipe.run()
outlet = pipe.getOutletStream()
print(f"Outlet pressure: {outlet.getPressure():.1f} bara")
print(f"Outlet temp: {outlet.getTemperature() - 273.15:.1f} C")
</details>
<details>
<summary><strong>More examples</strong></summary>
Explore 30+ Jupyter notebooks in examples/notebooks/:
- Phase envelope calculation
- TEG dehydration process
- Vessel depressurization / blowdown
- Heat exchanger thermal-hydraulic design
- Production bottleneck analysis
- Risk simulation and visualization
- Data reconciliation and parameter estimation
- Reservoir-to-export integrated workflows
- Multiphase transient pipe flow
Agentic Engineering & MCP Server
LLMs reason well but hallucinate physics. NeqSim is exact on thermodynamics but needs context. Together, they form a complete engineering system. The LLM reasons. NeqSim computes. Provenance proves it.
MCP Server - give any LLM access to rigorous thermodynamics
The NeqSim MCP Server lets any MCP-compatible client (VS Code Copilot, Claude Desktop, Cursor, etc.) run real calculations. Install in seconds:
# Docker (no Java needed)
docker pull ghcr.io/equinor/neqsim-mcp-server:latest
| Ask the LLM | MCP Tool |
|---|---|
| "Dew point of 85% methane, 10% ethane, 5% propane at 50 bara?" | runFlash |
| "How does density change from 0 to 50 C at 80 bara?" | runBatch |
| "Phase envelope for this natural gas" | getPhaseEnvelope |
| "Simulate gas through a separator then compressor to 120 bara" | runProcess |
Every response includes provenance metadata (EOS model, convergence, assumptions, limitations). See the [MCP Server docs](n
Related Skills
node-connect
385.5kDiagnose OpenClaw Android, iOS, or macOS node pairing, QR/setup code, route, auth, and connection failures.
blender-python-addon
40.5kBlender Python add-on rules for operators, panels, properties, registration, testing, and API-safe scripting
flutter-development-guidelines-cursorrules-prompt-file
40.5kCursor rules for Flutter development with MVVM architecture, Riverpod state management, Material widgets, and Dart style guidelines.
commit-push-pr
140.7kCommit, push, and open a PR
