NeqSim Examples
This section contains tutorials, code examples, and Jupyter notebooks demonstrating NeqSim capabilities.
Jupyter Notebook Tutorials
Interactive Python notebooks using NeqSim through neqsim-python:
| Notebook | Description | View Options |
|---|---|---|
| AIPlatformIntegration | AI/ML platform integration patterns | Markdown | nbviewer | Colab |
| ESP Pump Tutorial | Electric submersible pump modeling | Markdown | nbviewer | Colab |
| FieldDevelopmentWorkflow | Concept screening, MCDA, economics | Markdown | nbviewer | Colab |
| GraphBasedProcessSimulation | Flowsheet topology analysis | Markdown | nbviewer | Colab |
| MPC Integration Tutorial | Model Predictive Control integration | Markdown | nbviewer | Colab |
| NeqSim Python Optimization | Python/SciPy optimizer integration | Markdown | nbviewer | Colab |
| NetworkSolverTutorial | Pipeline network pressure/flow solving | Markdown | nbviewer | Colab |
| ProductionOptimizer Tutorial | Multi-variable, Pareto, constraints | Markdown | nbviewer | Colab |
| PVT Simulation and Tuning | Fluid characterization, EoS tuning | Markdown | nbviewer | Colab |
| TVP RVP Study | True/Reid vapor pressure calculation | Markdown | nbviewer | Colab |
| TwoFluidPipe Tutorial | Multiphase flow, slug tracking, terrain effects, heat transfer | Markdown | nbviewer | Colab |
| Looped Pipeline Network | Hardy Cross looped network solver, ring mains, parallel pipelines | Markdown | nbviewer | Colab |
| Advanced Risk Framework | Risk simulation, Monte Carlo, SIS/SIF, bow-tie analysis | Markdown | nbviewer | Colab |
Java Examples
Example Java code demonstrating NeqSim APIs:
| Example | Description |
|---|---|
| EclipseE300ExportImportExample | Java example |
| FlowRegimeDebug | Debug flow regime detection |
| FlowRegimeDetectionExample | Multiphase flow regime identification |
| MultiphaseModelPressureDropComparison | Compare pressure drop models (Beggs-Brill, etc.) |
| RealTimeIntegrationExample | Real-time data integration patterns |
| SlugTrackingComparisonExample | Compare slug tracking methods |
| TransientPipelineLiquidAccumulationExample | Transient liquid holdup simulation |
| TwoFluidPipeExample | Two-fluid model pipeline example |
| TwoFluidPipelineLiquidAccumulationExample | Liquid accumulation with two-fluid model |
| TwoFluidPipeSlugTrackingExample | Slug tracking with two-fluid model |
| TwoFluidVsDriftFluxComparisonExample | Compare two-fluid vs drift-flux models |
| WellToOilStabilizationExample | Complete well-to-stabilization process |
Other Tutorials
Additional documentation and guides:
- Comparesimulations Quickstart
- Production Optimization Guide
- Selective Logic Execution
- Transient Slug Separator Control Example
๐ฑ Emissions & Sustainability
Virtual measurement and reporting of offshore emissions using thermodynamic models. Compliant with Norwegian regulations (Aktivitetsforskriften ยง70).
๐ See the full Emissions Documentation Hub for comprehensive guides, regulatory references, and API documentation.
| Document | Description | Run Options |
|---|---|---|
| Produced Water Emissions Tutorial | Complete guide to emission calculations from produced water. Covers CPA setup, multi-stage degassing, Norwegian handbook comparison, salinity effects, validation. | Jupyter | nbviewer | Colab |
| Norwegian Emission Methods Comparison | NeqSim vs Norwegian handbook. Validation from Gudrun (GFMW 2023), uncertainty analysis, regulatory context. | Markdown only |
| Offshore Emission Reporting Guide | Comprehensive reference: regulatory framework, calculation methods, API, validation, literature. | Emissions Hub |
| Java Example | Complete Java code sample for offshore emission reporting. | View Source |
Topics Covered in Notebook:
- โ Simple flash calculation setup
- โ Multi-stage degassing (Degasser โ CFU โ Caisson)
- โ Norwegian handbook method (f_CH4=14, f_nmVOC=3.5)
- โ Method comparison and validation
- โ Salinity effects on gas solubility
- โ Binary interaction parameters (kij)
- โ COโ equivalent and GWP calculations
- โ TEG regeneration emissions example
- โ Troubleshooting diagnostics
Running the Notebooks
Prerequisites
- Install neqsim-python:
pip install neqsim - Or use Google Colab (click the Colab links above) - no installation needed!
Local Jupyter Setup
# Create a virtual environment
python -m venv neqsim-env
source neqsim-env/bin/activate # On Windows: neqsim-env\Scripts\activate
# Install dependencies
pip install neqsim jupyter matplotlib pandas numpy
# Start Jupyter
jupyter notebook
Then open any of the .ipynb files from this directory.