Skip to the content.

NeqSim Documentation

NeqSim (Non-Equilibrium Simulator) is a comprehensive Java library for thermodynamic, physical property, and process simulation. This documentation covers all major packages and provides detailed guides for developing applications.


Quick Start

import neqsim.thermo.system.SystemSrkEos;
import neqsim.thermodynamicoperations.ThermodynamicOperations;

// Create a natural gas fluid
SystemInterface gas = new SystemSrkEos(298.15, 50.0);
gas.addComponent("methane", 0.90);
gas.addComponent("ethane", 0.05);
gas.addComponent("propane", 0.03);
gas.addComponent("CO2", 0.02);
gas.setMixingRule("classic");

// Perform flash calculation
ThermodynamicOperations ops = new ThermodynamicOperations(gas);
ops.TPflash();

// Get properties
System.out.println("Density: " + gas.getDensity("kg/m3") + " kg/m³");
System.out.println("Compressibility: " + gas.getZ());

Package Documentation

Core Thermodynamics

Package Documentation Description
neqsim.thermo thermo/ Thermodynamic systems, phases, components, equations of state, mixing rules, fluid characterization
neqsim.thermodynamicoperations thermodynamicoperations/ Flash calculations, phase envelopes, saturation operations
neqsim.physicalproperties physical_properties/ Transport properties: viscosity, thermal conductivity, diffusivity, interfacial tension

Process Simulation

Package Documentation Description
neqsim.process process/ Process equipment, unit operations, controllers, process systems, safety systems
neqsim.fluidmechanics fluidmechanics/ Pipeline flow, pressure drop, two-phase flow, flow nodes

PVT and Reservoir

Package Documentation Description
neqsim.pvtsimulation pvtsimulation/ PVT experiments: CME, CVD, DL, separator tests, swelling tests
neqsim.blackoil blackoil/ Black oil model, PVT tables, Rs, Bo, Bg correlations

Flow Assurance

Package Documentation Description
neqsim.pvtsimulation.flowassurance pvtsimulation/flowassurance/ Asphaltene stability, De Boer screening, CPA-based onset calculations

Chemical Reactions

Package Documentation Description
neqsim.chemicalreactions chemicalreactions/ Chemical equilibrium, reaction kinetics

Quality Standards

Package Documentation Description
neqsim.standards standards/ ISO 6976, ISO 6578, ISO 15403, ASTM D6377, sales contracts
neqsim.statistics statistics/ Parameter fitting, Monte Carlo simulation, data analysis

Utilities

Package Documentation Description
neqsim.util util/ Database access, unit conversion, serialization, exceptions
neqsim.mathlib mathlib/ Mathematical utilities, nonlinear solvers

Documentation Structure

docs/
├── README.md                      # This file - main index
├── modules.md                     # Module overview
│
├── thermo/                        # Thermodynamic package
│   ├── README.md                  # Package overview
│   ├── system/                    # EoS implementations
│   ├── phase/                     # Phase modeling
│   ├── component/                 # Component properties
│   ├── mixingrule/                # Mixing rules
│   └── characterization/          # Plus fraction handling
│
├── thermodynamicoperations/       # Flash operations
│   └── README.md
│
├── physical_properties/           # Transport properties
│   └── README.md
│
├── process/                       # Process simulation
│   ├── README.md                  # Package overview
│   ├── equipment/                 # Equipment documentation
│   ├── processmodel/              # ProcessSystem, modules
│   └── safety/                    # Safety systems
│
├── fluidmechanics/               # Pipe flow
│   └── README.md
│
├── pvtsimulation/                # PVT experiments
│   ├── README.md
│   └── flowassurance/            # Flow assurance (asphaltene, wax, hydrates)
│       ├── README.md
│       ├── asphaltene_modeling.md
│       ├── asphaltene_cpa_calculations.md
│       ├── asphaltene_deboer_screening.md
│       ├── asphaltene_parameter_fitting.md
│       ├── asphaltene_method_comparison.md
│       └── asphaltene_validation.md
│
├── blackoil/                     # Black oil model
│   └── README.md
│
├── chemicalreactions/            # Reactions
│   └── README.md
│
├── standards/                    # Quality standards
│   └── README.md
│
├── statistics/                   # Statistics package
│   └── README.md
│
├── util/                         # Utilities
│   └── README.md
│
├── mathlib/                      # Math utilities
│   └── README.md
│
├── safety/                       # Safety system guides
│   ├── ESD_BLOWDOWN_SYSTEM.md
│   ├── HIPPS_SUMMARY.md
│   ├── hipps_implementation.md
│   ├── sis_logic_implementation.md
│   ├── fire_blowdown_capabilities.md
│   ├── psv_dynamic_sizing_example.md
│   └── alarm_system_guide.md
│
├── simulation/                   # Process simulation guides
│   ├── advanced_process_logic.md
│   ├── graph_based_process_simulation.md
│   ├── parallel_process_simulation.md
│   ├── recycle_acceleration_guide.md
│   ├── well_simulation_guide.md
│   └── turboexpander_compressor_model.md
│
├── integration/                  # Integration guides
│   ├── ai_platform_integration.md
│   ├── ml_integration.md
│   ├── mpc_integration.md
│   ├── REAL_TIME_INTEGRATION_GUIDE.md
│   └── dexpi-reader.md
│
├── development/                  # Developer guides
│   ├── DEVELOPER_SETUP.md
│   └── contributing-structure.md
│
├── examples/                     # Code examples
│   └── ...
│
└── wiki/                         # Additional wiki pages
    └── ...

Topic Guides

Specialized guides for advanced features and use cases:

Safety and Emergency Systems

Guide Description
ESD_BLOWDOWN_SYSTEM.md Emergency shutdown and blowdown systems
HIPPS_SUMMARY.md High Integrity Pressure Protection Systems
hipps_implementation.md HIPPS implementation details
hipps_safety_logic.md HIPPS safety logic
INTEGRATED_SAFETY_SYSTEMS.md Integrated safety systems overview
layered_safety_architecture.md Layered safety architecture
sis_logic_implementation.md SIS logic implementation
SAFETY_SIMULATION_ROADMAP.md Safety simulation roadmap

Process Logic and Control

Guide Description
process_logic_framework.md Process logic framework
ProcessLogicEnhancements.md Logic enhancements
advanced_process_logic.md Advanced process logic
alarm_system_guide.md Alarm system guide
alarm_triggered_logic_example.md Alarm-triggered logic
mpc_integration.md MPC integration

Dynamic Simulation

Guide Description
fire_blowdown_capabilities.md Fire and blowdown simulation
fire_heat_transfer_enhancements.md Fire heat transfer
psv_dynamic_sizing_example.md PSV dynamic sizing
rupture_disk_dynamic_behavior.md Rupture disk behavior
turboexpander_compressor_model.md Turboexpander modeling

Well and Reservoir

Guide Description
well_simulation_guide.md Well simulation guide
well_and_choke_simulation.md Choke simulation
field_development_engine.md Field development

PVT and Characterization

Guide Description
pvt_workflow.md PVT workflow
blackoil_pvt_export.md Black oil PVT export
whitson_pvt_reader.md Whitson PVT reader
fluid_characterization_mathematics.md Characterization math

Advanced Features

Guide Description
parallel_process_simulation.md Parallel simulation
recycle_acceleration_guide.md Recycle convergence
graph_based_process_simulation.md Graph-based simulation
differentiable_thermodynamics.md Auto-differentiation
equipment_factory.md Equipment factory
dexpi-reader.md DEXPI P&ID reader

Integration

Guide Description
ai_platform_integration.md AI/ML integration
ml_integration.md Machine learning
REAL_TIME_INTEGRATION_GUIDE.md Real-time systems
QRA_INTEGRATION_GUIDE.md QRA integration

Development

Guide Description
DEVELOPER_SETUP.md Development environment setup
contributing-structure.md Contributing guidelines

Equations of State Quick Reference

EoS Class Application
SRK SystemSrkEos General hydrocarbon systems
PR SystemPrEos General hydrocarbon systems
PR-1978 SystemPrEos1978 Improved liquid densities
SRK-CPA SystemSrkCPAstatoil Associating fluids (water, alcohols, glycols)
PC-SAFT SystemPCSAFT Polymers, associating fluids
GERG-2008 SystemGERG2008Eos Natural gas reference
EOS-CG SystemEOSCGEos CO₂-rich systems (CCS)
UMR-PRU SystemUMRPRUMCEos Wide-range hydrocarbon systems

Process Equipment Quick Reference

Category Equipment Class
Separation 2-phase separator Separator
  3-phase separator ThreePhaseSeparator
  Distillation column DistillationColumn
Heat Transfer Heater Heater
  Cooler Cooler
  Heat exchanger HeatExchanger
Compression Compressor Compressor
  Pump Pump
  Expander Expander
Flow Control Valve ThrottlingValve
  Mixer Mixer, StaticMixer
  Splitter Splitter
Well/Reservoir Well SimpleWell
  Choke ChokeValve

Getting Help


Version Compatibility