MCPHub LabRegistryequinor/neqsim
equinor

equinor/neqsim

Built by equinor 104 stars

What is equinor/neqsim?

NeqSim is a library for calculation of fluid behavior, phase equilibrium and process simulation

How to use equinor/neqsim?

1. Install a compatible MCP client (like Claude Desktop). 2. Open your configuration settings. 3. Add equinor/neqsim using the following command: npx @modelcontextprotocol/equinor-neqsim 4. Restart the client and verify the new tools are active.
🛡️ Scoped (Restricted)
npx @modelcontextprotocol/equinor-neqsim --scope restricted
🔓 Unrestricted Access
npx @modelcontextprotocol/equinor-neqsim

Key Features

Native MCP Protocol Support
Real-time Tool Activation & Execution
Verified High-performance Implementation
Secure Resource & Context Handling

Optimized Use Cases

Extending AI models with custom local capabilities
Automating system workflows via natural language
Connecting external data sources to LLM context windows

equinor/neqsim FAQ

Q

Is equinor/neqsim safe?

Yes, equinor/neqsim follows the standardized Model Context Protocol security patterns and only executes tools with explicit user-granted permissions.

Q

Is equinor/neqsim up to date?

equinor/neqsim is currently active in the registry with 104 stars on GitHub, indicating its reliability and community support.

Q

Are there any limits for equinor/neqsim?

Usage limits depend on the specific implementation of the MCP server and your system resources. Refer to the official documentation below for technical details.

Official Documentation

View on GitHub
<h1> <img src="https://github.com/equinor/neqsim/blob/master/docs/wiki/neqsimlogocircleflatsmall.png" alt="NeqSim Logo" width="120" valign="middle">&nbsp;NeqSim </h1> <p align="center"> <strong>Open-source process engineering toolkit — thermodynamics, process simulation, and AI-assisted design in one library.</strong> </p> <p align="center"> <a href="https://github.com/equinor/neqsim/actions/workflows/verify_build.yml?query=branch%3Amaster"><img src="https://github.com/equinor/neqsim/actions/workflows/verify_build.yml/badge.svg?branch=master" alt="CI Build"></a> <a href="https://search.maven.org/search?q=g:%22com.equinor.neqsim%22%20AND%20a:%22neqsim%22"><img src="https://img.shields.io/maven-central/v/com.equinor.neqsim/neqsim.svg?label=Maven%20Central" alt="Maven Central"></a> <a href="https://codecov.io/gh/equinor/neqsim"><img src="https://codecov.io/gh/equinor/neqsim/branch/master/graph/badge.svg" alt="Coverage"></a> <a href="https://github.com/equinor/neqsim/security/code-scanning"><img src="https://github.com/equinor/neqsim/actions/workflows/codeql.yml/badge.svg?branch=master" alt="CodeQL"></a> <a href="LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-blue.svg" alt="License"></a> </p> <p align="center"> <a href="#-quick-start">Quick Start</a> · <a href="#-what-can-you-do-with-neqsim">Use Cases</a> · <a href="#-use-neqsim-in-java">Java</a> · <a href="#-use-neqsim-in-python">Python</a> · <a href="#-agentic-engineering--mcp-server">AI / MCP</a> · <a href="https://equinor.github.io/neqsim/">Docs</a> · <a href="https://github.com/equinor/neqsim/discussions">Community</a> </p>

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

DomainWhat NeqSim provides
Thermodynamics60+ equation-of-state models (SRK, PR, CPA, GERG-2008, …), flash calculations (TP, PH, PS, dew, bubble), phase envelopes
Physical propertiesDensity, viscosity, thermal conductivity, surface tension, diffusion coefficients
Process simulation33+ equipment types — separators, compressors, heat exchangers, valves, distillation columns, pumps, reactors
Pipeline & flowSteady-state and transient multiphase pipe flow (Beggs & Brill, two-fluid model), pipe networks
PVT simulationCME, CVD, differential liberation, separator tests, swelling tests, saturation pressure
SafetyDepressurization/blowdown, PSV sizing (API 520/521), source term generation, safety envelopes
StandardsISO 6976 (gas quality), NORSOK, DNV, API, ASME compliance checks
Mechanical designWall thickness, weight estimation, cost analysis for pipelines, vessels, wells (SURF)
Field developmentProduction forecasting, concept screening, NPV/IRR economics, Monte Carlo uncertainty

🚀 Quick Start

Python — try it now

pip install neqsim
from neqsim import jneqsim

# Create a natural gas fluid
fluid = jneqsim.thermo.system.SystemSrkEos(273.15 + 25.0, 60.0)  # 25°C, 60 bara
fluid.addComponent("methane", 0.85)
fluid.addComponent("ethane", 0.10)
fluid.addComponent("propane", 0.05)
fluid.setMixingRule("classic")

# Run a flash calculation
ops = jneqsim.thermodynamicoperations.ThermodynamicOperations(fluid)
ops.TPflash()
fluid.initProperties()

print(f"Gas density:    {fluid.getPhase('gas').getDensity('kg/m3'):.2f} kg/m³")
print(f"Gas viscosity:  {fluid.getPhase('gas').getViscosity('kg/msec'):.6f} kg/(m·s)")
print(f"Z-factor:       {fluid.getPhase('gas').getZ():.4f}")

Java — add to your project

Maven Central (simplest — no authentication needed):

<dependency>
  <groupId>com.equinor.neqsim</groupId>
  <artifactId>neqsim</artifactId>
  <version>3.6.1</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/m³");

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 — 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/m³")
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
</details>

🤖 Agentic Engineering & MCP Server

LLMs are excellent at engineering reasoning but hallucinate physics. NeqSim is exact on thermodynamics but needs context. Together, they form a complete engineering system.

Separation of Concerns: Reasoning vs. Physics

How NeqSim compares for engineering workflows

AspectManual CodingCommercial SimulatorsAgentic NeqSim
Learning curveSteep (learn API)Moderate (learn GUI)Low (natural language)
Standards complianceManual lookupSome built-inAgent loads applicable standards
ReproducibilityGood (code)Poor (GUI state lost)Excellent (notebook + task folder)
Report generationManualManual exportAutomated Word + HTML
Physics rigorFull controlVendor-validatedFull (same NeqSim engine)

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:

Ask the LLMWhat happens
"Dew point of 85% methane, 10% ethane, 5% propane at 50 bara?"Flash calculation via NeqSim
"Get density, viscosity, and thermal conductivity at 25°C, 80 bara"Physical property lookup
"Simulate gas through a separator then compressor to 120 bara"Full process simulation

AI task-solving workflow

With VS Code + GitHub Copilot Chat:

@solve.task hydrate formation temperature for wet gas at 100 bara

Without Copilot (script-based):

pip install -e devtools/
python devtools/new_task.py "hydrate formation temperature" --type A

The workflow creates a task folder, researches the topic, builds and runs simulations, validates results, and generates a professional report. See the step-by-step tutorial or the full workflow reference.


☕ Use NeqSim in Java

Add as a Maven dependency

From Maven Central (simplest):

<dependency>
  <groupId>com.equinor.neqsim</groupId>
  <artifactId>neqsim</artifactId>
  <version>3.6.1</version>
</dependency>

From GitHub Packages (latest snapshots):

<details> <summary>Show GitHub Packages setup</summary>
  1. Configure authentication in your Maven settings.xml:
<servers>
  <server>
    <id>github</id>
    <username>YOUR_GITHUB_USERNAME</username>
    <password>${env.GITHUB_TOKEN}</password>
  </server>
</servers>
  1. Add to your pom.xml:
<repositories>
  <repository>
    <id>github</id>
    <url>https://maven.pkg.github.com/equinor/neqsim</url>
  </repository>
</repositories>
</details>

Java code example — process simulation

import neqsim.thermo.system.SystemSrkEos;
import neqsim.process.equipment.stream.Stream;
import neqsim.process.equipment.separator.Separator;
import neqsim.process.equipment.compressor.Compressor;
import neqsim.process.processmodel.ProcessSystem;

// Define fluid
SystemSrkEos fluid = new 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");

// Build flowsheet
Stream feed = new Stream("Feed", fluid);
feed.setFlowRate(50000.0, "kg/hr");

Separator separator = new Separator("HP Sep", feed);
Compressor compressor = new Compressor("Comp", separator.getGasOutStream());
compressor.setOutletPressure(150.0);

ProcessSystem process = new ProcessSystem();
process.add(feed);
process.add(separator);
process.add(compressor);
process.run();

System.out.println("Power: " + compressor.getPower("kW") + " kW");

Learn more


🐍 Use NeqSim in Python

pip install neqsim

NeqSim Python gives you direct access to the full Java API via the jneqsim gateway. All Java classes are available — thermodynamics, process equipment, PVT, standards, everything.

from neqsim import jneqsim

# All Java classes accessible through jneqsim
SystemSrkEos = jneqsim.thermo.system.SystemSrkEos
ProcessSystem = jneqsim.process.processmodel.ProcessSystem
Stream = jneqsim.process.equipment.stream.Stream
# ... 200+ classes available

Explore 30+ ready-to-run Jupyter notebooks in examples/notebooks/.

Other language bindings

LanguageRepository
Pythonpip install neqsim
MATLABequinor/neqsimmatlab
.NET (C#)equinor/neqsimcapeopen

🏗️ Develop & Contribute

Clone and build

git clone https://github.com/equinor/neqsim.git
cd neqsim
./mvnw install        # Linux/macOS
mvnw.cmd install      # Windows

Run tests

./mvnw test                                    # all tests
./mvnw test -Dtest=SeparatorTest               # single class
./mvnw test -Dtest=SeparatorTest#testTwoPhase  # single method
./mvnw checkstyle:check spotbugs:check pmd:check  # static analysis

Open in VS Code

The repository includes a ready-to-use dev container — just open the repo in VS Code with container support:

git clone https://github.com/equinor/neqsim.git
cd neqsim
code .

Architecture

NeqSim is built on seven modules:

ModulePackagePurpose
Thermodynamicsthermo/60+ EOS implementations, flash calculations, phase equilibria
Physical propertiesphysicalproperties/Density, viscosity, thermal conductivity, surface tension
Fluid mechanicsfluidmechanics/Single- and multiphase pipe flow, pipeline networks
Process equipmentprocess/equipment/33+ unit operations (separators, compressors, HX, valves, ...)
Chemical reactionschemicalreactions/Equilibrium and kinetic reaction models
Parameter fittingstatistics/Regression, parameter estimation, Monte Carlo
Process simulationprocess/Flowsheet assembly, dynamic simulation, recycle/adjuster coordination

For details see docs/modules.md.

Contributing

We welcome contributions of all kinds — bug fixes, new models, examples, documentation, and notebook recipes.

All tests and ./mvnw checkstyle:check must pass before a PR is merged.


📚 Documentation & Resources

ResourceLink
User documentationequinor.github.io/neqsim
Reference manual indexREFERENCE_MANUAL_INDEX.md (350+ pages)
JavaDoc APIJavaDoc
Jupyter notebooksexamples/notebooks/ (30+ examples)
Discussion forumGitHub Discussions
ReleasesGitHub Releases
NeqSim homepageequinor.github.io/neqsimhome

Authors

Even Solbraa (esolbraa@gmail.com), Marlene Louise Lund

NeqSim development was initiated at NTNU. A number of master and PhD students have contributed to its development — we greatly acknowledge their contributions.

License

Apache-2.0

Global Ranking

8.5
Trust ScoreMCPHub Index

Based on codebase health & activity.

Manual Config

{ "mcpServers": { "equinor-neqsim": { "command": "npx", "args": ["equinor-neqsim"] } } }