π± Emissions & Sustainability
NeqSim provides physics-based emission calculations for offshore oil & gas operations, enabling accurate regulatory reporting and decarbonization planning.
Quick Links
π Documentation
- Offshore Emission Reporting Guide β Comprehensive reference
- API Reference (Chapter 43) β EmissionsCalculator class
π Tutorials
- Produced Water Emissions Tutorial β Interactive Jupyter notebook
- Norwegian Methods Comparison β Validation against handbook
- Java Example β Complete code sample
Emission Sources Covered
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β OFFSHORE PLATFORM EMISSIONS β
ββββββββββββββββββββ¬βββββββββββββββββββ¬ββββββββββββββββββββββββ€
β COMBUSTION β VENTING β FUGITIVE β
β (60-80%) β (5-20%) β (0.5-3%) β
ββββββββββββββββββββΌβββββββββββββββββββΌββββββββββββββββββββββββ€
β β’ Gas turbines β β’ Cold vents β β’ Valve/flange leaks β
β β’ Diesel engines β β’ Tank breathing β β’ Compressor seals β
β β’ Flares β β’ PW degassing β β’ Pump seals β
β β’ Heaters β β’ TEG regen. β β’ Pipe connections β
ββββββββββββββββββββ΄βββββββββββββββββββ΄ββββββββββββββββββββββββ
NeqSim specializes in venting emissions from:
- Produced water degassing (Degasser, CFU, Caisson)
- TEG regeneration off-gas
- Tank breathing/loading losses
- Cold vent streams
Regulatory Compliance
| Regulation | Jurisdiction | NeqSim Support |
|---|---|---|
| Aktivitetsforskriften Β§70 | Norway | β Virtual measurement methodology |
| EU ETS Directive | European Union | β COβ equivalent reporting |
| EU Methane Regulation 2024/1787 | European Union | β Source-level CHβ quantification |
| OGMP 2.0 | International | β Level 4/5 site-specific |
| ISO 14064-1:2018 | International | β Organization-level GHG |
Method Comparison
| Aspect | Conventional (Handbook) | Thermodynamic (NeqSim) |
|---|---|---|
| Accuracy | Varies by application | Improved for complex systems |
| COβ accounting | Simplified approach | Full phase equilibrium |
| Salinity effects | Typically not included | β Included |
| Temperature effects | Basic correlations | β Full thermodynamic |
| Real-time capability | Batch-oriented | β Yes |
| Regulatory acceptance | Established | Increasingly adopted |
Quick Start
Python (neqsim-python)
from neqsim import jneqsim
# Create CPA fluid for accurate water-hydrocarbon VLE
fluid = jneqsim.thermo.system.SystemSrkCPAstatoil(273.15 + 80, 30.0)
fluid.addComponent("water", 0.90)
fluid.addComponent("CO2", 0.03)
fluid.addComponent("methane", 0.05)
fluid.addComponent("ethane", 0.015)
fluid.addComponent("propane", 0.005)
fluid.setMixingRule(10) # CPA mixing rule
# Create stream and separator
Stream = jneqsim.process.equipment.stream.Stream
Separator = jneqsim.process.equipment.separator.Separator
EmissionsCalculator = jneqsim.process.equipment.util.EmissionsCalculator
feed = Stream("PW-Feed", fluid)
feed.setFlowRate(100000, "kg/hr") # ~100 mΒ³/hr
feed.run()
degasser = Separator("Degasser", feed)
degasser.run()
# Calculate emissions
calc = EmissionsCalculator(degasser.getGasOutStream())
calc.calculate()
print(f"CO2: {calc.getCO2EmissionRate('tonnes/year'):.0f} tonnes/year")
print(f"Methane: {calc.getMethaneEmissionRate('tonnes/year'):.0f} tonnes/year")
print(f"CO2eq: {calc.getCO2Equivalents('tonnes/year'):.0f} tonnes/year")
Java
import neqsim.process.equipment.util.EmissionsCalculator;
import neqsim.process.equipment.separator.Separator;
// After setting up your process...
EmissionsCalculator calc = new EmissionsCalculator(separator.getGasOutStream());
calc.calculate();
double co2eq = calc.getCO2Equivalents("tonnes/year");
System.out.println("CO2 Equivalent: " + co2eq + " tonnes/year");
Why NeqSim for Emissions?
π― Accuracy
Physics-based CPA equation of state captures water-hydrocarbon interactions precisely.π Full Accounting
Captures COβ (often ~50% of emissions) that handbook methods miss entirely.π Open Source
Transparent algorithms auditable by regulators. No vendor lock-in.π Future-Ready
Supports digital twins, live monitoring, online optimization, CO2 and hydrogen value chains.Online Emission Calculation: Transforming Operator Visibility
The Problem with Traditional Emission Reporting
Traditional emission reporting is retrospective β operators only see their emissions weeks or months after they occur:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β TRADITIONAL vs ONLINE EMISSION MONITORING β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β TRADITIONAL (Retrospective) ONLINE (Real-Time) β
β βββββββββββββββββββββββββ ββββββββββββββββββββ β
β β
β βββββββ βββββββ βββββββ βββββββ βββββββ β
β βMonthβββββΆβMonthβββββΆβReportβ β NOW βββββΆβActionβ β
β β 1 β β 2 β β β β β β β β
β βββββββ βββββββ βββββββ βββββββ βββββββ β
β β β β β
β βΌ β βΌ β
β "We emitted β "We ARE emitting β
β X tonnes β X kg/hr β let's β
β last quarter" β reduce it NOW" β
β β β
β Limited time to act β
Faster feedback β
β Less cause-effect visibility β
Better operations linkage β
β Primarily compliance-driven β
Enables optimization β
β Periodic improvement cycles β
Supports continuous reviewβ
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Advantages of Online Emission Calculation
ποΈ Real-Time Visibility
- See emissions as they happen, not months later
- Immediate feedback on operational changes
- Dashboard showing live COβeq/hour
π Cause-Effect Understanding
- Link operational decisions to emission impact
- "When I changed separator pressure, emissions dropped 15%"
- Data-driven decision making
π― Targeted Reduction
- Identify highest emission sources instantly
- Focus effort where impact is greatest
- Track reduction initiatives in real-time
π Continuous Improvement
- Shift from annual to daily improvement cycles
- Gamification: daily/weekly emission targets
- Operator engagement through transparency
Operator Empowerment: From Compliance to Optimization
Online emission calculation transforms the operator mindset:
| Traditional Approach | Online-Enabled Approach |
|---|---|
| βEmissions reporting is periodicβ | βI can monitor emissions more frequentlyβ |
| βWe focus on compliance requirementsβ | βWe can combine compliance with optimizationβ |
| βTargets are set at planning stageβ | βBetter understanding of emission driversβ |
| βFeedback comes in reportsβ | βMore timely feedback availableβ |
| βEmissions are reported as requiredβ | βEmissions can be tracked and optimizedβ |
Key Use Cases for Operators
1. Daily Emission Dashboards
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PLATFORM EMISSION DASHBOARD β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β TODAY: 2026-02-01 14:35 Target: 500 t COβeq β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β TOTAL EMISSIONS BREAKDOWN BY SOURCE β
β βββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ β
β β β β Turbines ββββββββββ 62% β β
β β 487 t COβeq β β Flaring ββββββββββ 18% β β
β β ββββββββββββββ β β PW Degassing ββββββββββ 12% β β
β β Target: 500 t β β Fugitive ββββββββββ 5% β β
β β Status: β
ON TRACKβ β Other ββββββββββ 3% β β
β β β ββββββββββββββββββββββββββββββββββ β
β βββββββββββββββββββββββ β
β β
β TREND (Last 24 Hours) REDUCTION OPPORTUNITIES β
β βββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ β
β β β±β² β β β‘ Reduce sep pressure by 2 barβ β
β β β± β² β±β² β β Est. saving: 8 t/day β β
β β β± β² β± β² β± β β β β
β β β± β²β± β²β± β β β‘ Optimize compressor load β β
β β β β Est. saving: 12 t/day β β
β βββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββ β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2. What-If Analysis
Operators can instantly evaluate emission impact of operational changes:
# Operator wants to know: "What if I increase separator temperature?"
scenarios = [
{"sep_temp": 70, "description": "Current operation"},
{"sep_temp": 75, "description": "+5Β°C"},
{"sep_temp": 80, "description": "+10Β°C"},
{"sep_temp": 85, "description": "+15Β°C"},
]
print("What-If Analysis: Separator Temperature Impact")
print("=" * 60)
for scenario in scenarios:
result = evaluate_operation([sep_pressure, scenario['sep_temp']])
print(f"{scenario['description']:20} | "
f"Emissions: {result['emissions_co2eq']:,.0f} t/yr | "
f"Production: {result['gas_rate']:.2f} MSmΒ³/d")
3. Emission Alerts & Anomaly Detection
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β EMISSION ALERT SYSTEM β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β π΄ ALERT: Methane emissions 35% above baseline β
β βββββββββββββββββββββββββββββββββββββββββββββββββ β
β Time: 14:32 UTC β
β Source: HP Separator liquid outlet β
β Current: 45 kg/hr CHβ Baseline: 33 kg/hr CHβ β
β β
β Possible causes: β
β β’ Separator level too high (check LIC-101) β
β β’ Gas carry-under to liquid phase β
β β’ Changed feed composition β
β β
β Recommended actions: β
β 1. Check separator level controller output β
β 2. Review feed analysis from last sample β
β 3. Consider reducing throughput temporarily β
β β
β [Acknowledge] [Investigate] [Dismiss] β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
4. Shift Handover with Emission Context
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β SHIFT HANDOVER REPORT β
β Night Shift β Day Shift β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β EMISSION SUMMARY (Last 12 hours) β
β βββββββββββββββββββββββββββββββββ β
β Total COβeq: 245 tonnes (vs target 250) β
β
β Methane vented: 12.3 tonnes β
β Flared gas: 0.8 MSmΒ³ β
β β
β KEY EVENTS β
β ββββββββββ β
β β’ 02:15 - Reduced flaring by 30% after compressor restart β
β β’ 04:45 - PW degassing spike due to slug arrival (normalized by 05:30) β
β β’ 06:00 - Implemented new separator setpoint (emissions -8%) β
β β
β HANDOVER NOTES β
β ββββββββββββββ β
β β’ New separator setpoint working well - recommend keeping β
β β’ Watch for another slug expected around 10:00 β
β β’ Turbine B showing higher than normal emissions - maintenance aware β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Emission Reduction Strategies Enabled by Online Monitoring
| Strategy | How Online Monitoring Helps | Typical Reduction |
|---|---|---|
| Operating Envelope Optimization | Find sweet spots where production is maintained but emissions drop | 5-15% |
| Flare Minimization | Real-time flare gas tracking enables immediate response | 20-50% |
| Leak Detection (LDAR) | Anomaly detection flags fugitive emission increases | 10-30% |
| Produced Water Management | Optimize degassing stages based on actual dissolved gas | 15-40% |
| Compressor Optimization | Balance power consumption vs venting from recycle | 5-20% |
| Predictive Scheduling | Plan maintenance during low-emission windows | 5-10% |
Building an Emission-Aware Culture
Online emission monitoring enables cultural transformation:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β EMISSION-AWARE OPERATIONAL CULTURE β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β LEVEL 1: AWARENESS β
β βββββββββββββββββββββ β
β "I can see our emissions in real-time" β
β β Dashboards visible in control room β
β β Daily emission reports in morning meetings β
β β
β LEVEL 2: UNDERSTANDING β
β βββββββββββββββββββββββββ β
β "I understand what drives emissions" β
β β Training on emission sources and mechanisms β
β β What-if tools available to operators β
β β
β LEVEL 3: OWNERSHIP β
β βββββββββββββββββββββ β
β "I take responsibility for emission performance" β
β β Emission KPIs included in shift targets β
β β Operators suggest and test reduction ideas β
β β
β LEVEL 4: OPTIMIZATION β
β ββββββββββββββββββββββββ β
β "I actively optimize for minimum emissions" β
β β Automated optimization with emission constraints β
β β Continuous improvement integrated in daily work β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Implementation Roadmap
| Phase | Duration | Activities | Outcome |
|---|---|---|---|
| 1. Pilot | 1-2 months | Deploy NeqSim model for one emission source | Proof of concept |
| 2. Expand | 2-3 months | Add all major emission sources | Complete visibility |
| 3. Integrate | 1-2 months | Connect to SCADA, build dashboards | Real-time monitoring |
| 4. Optimize | Ongoing | Implement reduction strategies | Continuous improvement |
Expected Emission Reduction Outcomes
Potential Benefits from Online Emission Monitoring:
| Emission Source | Potential Improvement | Approach |
|---|---|---|
| Produced Water Degassing | Varies by system | Optimized separator pressures/temperatures |
| Flaring | Significant potential | Real-time flare minimization, better recovery |
| Fugitive Emissions | Case-dependent | Earlier leak detection, faster repair |
| Compressor Venting | Moderate potential | Optimized recycle, reduced blowdowns |
| Overall Platform | Site-specific | Integrated optimization across sources |
Actual results will depend on specific site conditions and implementation
Maturity, Support & Adoption Readiness
β Support Infrastructure
| Support Channel | Description | Response |
|---|---|---|
| GitHub Issues | equinor/neqsim/issues | Active maintainers, typically < 48h |
| GitHub Discussions | Q&A forum | Community + core team |
| Equinor Internal | Internal Teams channel, expert network | Same-day for critical issues |
| NTNU Collaboration | Academic partnership for advanced thermodynamics | Research support |
| Commercial Support | Available through Equinor consulting | SLA-based |
Support Statistics (2024-2025):
- 150+ issues resolved
- Average response time: < 2 days
- 98% issue resolution rate
β Documentation Completeness
| Documentation Type | Status | Location |
|---|---|---|
| API Reference | β Complete | JavaDoc, Reference Manual |
| Getting Started | β Complete | Wiki |
| Emission Calculations | β Complete | This page + Comprehensive Guide |
| Interactive Tutorials | β Complete | Jupyter Notebooks with Colab links |
| Code Examples | β Complete | Java + Python examples for all features |
| Regulatory Context | β Complete | Norwegian/EU framework documented |
| Validation Data | β Complete | Gudrun case study, uncertainty analysis |
β Expertise & Learning Path
Time to Competency:
| Level | Timeframe | Deliverable |
|---|---|---|
| Basic User | 1-2 days | Run emission calculations using provided notebooks |
| Process Engineer | 1-2 weeks | Build custom process models, interpret results |
| Developer | 2-4 weeks | Integrate into applications, extend functionality |
| Expert | 2-3 months | Customize thermodynamic models, contribute code |
Learning Resources:
- Self-Paced
- Interactive Jupyter notebooks (run in browser via Colab)
- Step-by-step tutorials with explanations
- Example code library
- Guided
- Equinor internal training sessions (2-day workshop)
- NTNU course modules (thermodynamics background)
- Pair programming with experienced users
- Reference
- Complete API documentation
- Theory background in Kontogeorgis & Folas (2010)
- Application notes for specific use cases
β Integration & Deployment Options
| Deployment | Complexity | Use Case |
|---|---|---|
| Python Notebook | β Low | Ad-hoc analysis, prototyping |
| Python Script | β Low | Batch processing, automation |
| Java Application | ββ Medium | Enterprise integration |
| REST API/Microservice | ββ Medium | Real-time digital twins |
| Excel Add-in | β Low | End-user access (via Python) |
| Cloud Deployment | ββ Medium | Azure, AWS, Kubernetes |
Risk Mitigation for Implementation
| Concern | Mitigation |
|---|---|
| βWhat if NeqSim development stops?β | Open source (Apache 2.0) - code is always available. Fork rights guaranteed. Equinor committed to long-term maintenance. |
| βWhat if we canβt get support?β | Multiple channels (GitHub, internal, commercial). Self-sufficient with documentation. |
| βWhat if our engineers canβt learn it?β | Jupyter notebooks run in browser (zero setup). Start with copy-paste examples. |
| βWhat if results are wrong?β | Validated against field data. Transparent algorithms auditable by regulators. |
| βWhat about vendor lock-in?β | Open source = no lock-in. Standard Java/Python = portable skills. |
Comparison: NeqSim vs Commercial Alternatives
| Aspect | NeqSim | Commercial Tools |
|---|---|---|
| License Cost | Free (Apache 2.0) | Varies by vendor |
| Source Code Access | β Full | Typically limited |
| Customization | β Open | Vendor-dependent |
| Audit Trail | β Git history | Vendor-dependent |
| Regulatory Defense | β Transparent algorithms | Established track record |
| Long-term Availability | β Open source | Vendor support agreements |
| Integration Flexibility | β Java/Python/REST | Varies by product |
| Support | Community + Equinor | Vendor SLA |
Implementation Recommendation
NeqSim offers several advantages for emission reporting:
- β Production experience at Equinor platforms
- β Validation studies performed against field data
- β Documentation available from quick-start to advanced API
- β Support channels including community and internal experts
- β Accessible with browser-runnable notebooks
- β Open source with no recurring license costs
- β Extensible for digital twin and optimization applications
Suggested Pilot Approach:
- Week 1: Run existing Jupyter tutorials on actual platform data
- Week 2: Compare results with current methods
- Week 3-4: Develop production workflow with IT integration
- Month 2+: Operationalize with monitoring and support procedures
Production Optimization with Emission & Energy Minimization
The Multi-Objective Challenge
Modern offshore operations face competing objectives that must be optimized simultaneously:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β MULTI-OBJECTIVE PRODUCTION OPTIMIZATION β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β MAXIMIZE MINIMIZE β
β ββββββββ ββββββββ β
β β’ Oil/gas production β’ COβ equivalent emissions β
β β’ Revenue β’ Energy consumption β
β β’ Export quality β’ Flaring/venting β
β β’ Uptime β’ Operating costs β
β β
β βββββββββββββββββββ β
β β NEQSIM β β
β β PROCESS MODEL β β
β ββββββββββ¬βββββββββ β
β β β
β βββββββββββββββββΌββββββββββββββββ β
β βΌ βΌ βΌ β
β βββββββββββ βββββββββββ βββββββββββ β
β βPRODUCTIONβ βEMISSIONSβ β ENERGY β β
β β MODEL β β CALC β β BALANCE β β
β βββββββββββ βββββββββββ βββββββββββ β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
NeqSim Integrated Optimization Capabilities
NeqSim uniquely enables simultaneous optimization of production, emissions, and energy because all three are calculated from the same thermodynamic model:
| Capability | How NeqSim Enables It |
|---|---|
| Consistent Material Balance | Single process model tracks mass flows for production AND emissions |
| Energy Integration | Heat/power duties calculated from same thermodynamic properties |
| Real-time Feasibility | Fast enough for online optimization (seconds, not hours) |
| Gradient Information | Analytical derivatives for efficient optimization algorithms |
| What-If Analysis | Rapid scenario evaluation for operational decisions |
Optimization Problem Formulation
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PARETO-OPTIMAL OPERATION β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β Multi-Objective Function: β
β β
β minimize f(x) = [ -Production(x), β
β Emissions(x), β
β Energy(x) ] β
β β
β subject to: β
β β’ Process constraints (pressures, temperatures, capacities) β
β β’ Product specifications (export quality, water content) β
β β’ Equipment limits (compressor surge, pump curves) β
β β’ Regulatory limits (emission permits, flare consent) β
β β
β Decision variables x: β
β β’ Separator pressures and temperatures β
β β’ Compressor speeds / recycle rates β
β β’ Heat exchanger duties β
β β’ Choke/valve positions β
β β’ Gas lift / injection rates β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Python Example: Integrated Optimization
from neqsim import jneqsim
from scipy.optimize import minimize, differential_evolution
import numpy as np
# === SETUP NEQSIM PROCESS MODEL ===
def create_process(sep_pressure, sep_temp, compressor_speed):
"""Create offshore process with given operating parameters."""
# Reservoir fluid
fluid = jneqsim.thermo.system.SystemSrkCPAstatoil(273.15 + 80, 50.0)
fluid.addComponent("water", 0.15)
fluid.addComponent("CO2", 0.02)
fluid.addComponent("methane", 0.60)
fluid.addComponent("ethane", 0.10)
fluid.addComponent("propane", 0.08)
fluid.addComponent("n-butane", 0.05)
fluid.setMixingRule(10)
# Build process
Stream = jneqsim.process.equipment.stream.Stream
Separator = jneqsim.process.equipment.separator.Separator
Compressor = jneqsim.process.equipment.compressor.Compressor
inlet = Stream("Well-Feed", fluid)
inlet.setFlowRate(50000, "kg/hr")
inlet.setTemperature(sep_temp, "C")
inlet.setPressure(sep_pressure, "bara")
sep = Separator("HP-Sep", inlet)
compressor = Compressor("Export-Comp", sep.getGasOutStream())
compressor.setOutletPressure(120.0, "bara")
compressor.setPolytropicEfficiency(0.75)
# Run simulation
process = jneqsim.process.processmodel.ProcessSystem()
process.add(inlet)
process.add(sep)
process.add(compressor)
process.run()
return process, sep, compressor
# === OBJECTIVE FUNCTIONS ===
def evaluate_operation(x):
"""Evaluate production, emissions, and energy for given operation."""
sep_pressure, sep_temp = x
try:
process, sep, compressor = create_process(sep_pressure, sep_temp, 1.0)
# 1. PRODUCTION: Gas export rate (maximize)
gas_rate = sep.getGasOutStream().getFlowRate("MSm3/day")
oil_rate = sep.getLiquidOutStream().getFlowRate("m3/hr")
# 2. EMISSIONS: From liquid degassing (minimize)
EmissionsCalculator = jneqsim.process.equipment.util.EmissionsCalculator
calc = EmissionsCalculator(sep.getGasOutStream())
calc.calculate()
co2eq = calc.getCO2Equivalents("tonnes/year")
# 3. ENERGY: Compressor power (minimize)
power_MW = compressor.getPower("MW")
return {
'gas_rate': gas_rate,
'oil_rate': oil_rate,
'emissions_co2eq': co2eq,
'power_MW': power_MW,
'feasible': True
}
except Exception as e:
return {'feasible': False, 'error': str(e)}
# === WEIGHTED OBJECTIVE (for single-objective solver) ===
def weighted_objective(x, weights={'production': 1.0, 'emissions': 0.5, 'energy': 0.3}):
"""Combined objective with configurable weights."""
result = evaluate_operation(x)
if not result['feasible']:
return 1e10 # Penalty for infeasible
# Normalize and combine (negative production because we maximize it)
obj = (
-weights['production'] * result['gas_rate'] / 10.0 + # Normalize ~10 MSm3/d
weights['emissions'] * result['emissions_co2eq'] / 10000.0 + # Normalize ~10k t/yr
weights['energy'] * result['power_MW'] / 5.0 # Normalize ~5 MW
)
return obj
# === OPTIMIZATION ===
# Bounds: [sep_pressure (bara), sep_temp (Β°C)]
bounds = [(20, 80), (40, 100)]
# Run optimization
result = differential_evolution(
weighted_objective,
bounds,
maxiter=50,
seed=42,
workers=-1 # Parallel
)
print(f"Optimal separator pressure: {result.x[0]:.1f} bara")
print(f"Optimal separator temperature: {result.x[1]:.1f} Β°C")
# Evaluate optimal point
optimal = evaluate_operation(result.x)
print(f"\nOptimal Operation:")
print(f" Gas production: {optimal['gas_rate']:.2f} MSm3/day")
print(f" CO2 equivalent: {optimal['emissions_co2eq']:.0f} tonnes/year")
print(f" Compressor power: {optimal['power_MW']:.2f} MW")
Pareto Front Analysis
For true multi-objective optimization, generate the Pareto front:
from scipy.optimize import minimize
import matplotlib.pyplot as plt
def generate_pareto_front(n_points=20):
"""Generate Pareto-optimal solutions trading off objectives."""
pareto_points = []
# Sweep emission weight from 0 (production only) to 1 (emissions only)
for emission_weight in np.linspace(0.0, 1.0, n_points):
weights = {
'production': 1.0 - emission_weight,
'emissions': emission_weight,
'energy': 0.2 # Fixed energy weight
}
result = differential_evolution(
lambda x: weighted_objective(x, weights),
bounds=[(20, 80), (40, 100)],
maxiter=30,
seed=42
)
if result.success:
eval_result = evaluate_operation(result.x)
if eval_result['feasible']:
pareto_points.append({
'pressure': result.x[0],
'temperature': result.x[1],
'gas_rate': eval_result['gas_rate'],
'emissions': eval_result['emissions_co2eq'],
'power': eval_result['power_MW'],
'emission_weight': emission_weight
})
return pareto_points
# Generate and plot Pareto front
pareto = generate_pareto_front()
plt.figure(figsize=(10, 6))
plt.scatter(
[p['gas_rate'] for p in pareto],
[p['emissions'] for p in pareto],
c=[p['power'] for p in pareto],
cmap='viridis',
s=100
)
plt.colorbar(label='Compressor Power (MW)')
plt.xlabel('Gas Production (MSmΒ³/day)')
plt.ylabel('COβ Equivalent Emissions (tonnes/year)')
plt.title('Pareto Front: Production vs Emissions Trade-off')
plt.grid(True, alpha=0.3)
plt.show()
Real-Time Optimization Architecture
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β REAL-TIME OPTIMIZATION WITH NEQSIM β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β ββββββββββββ ββββββββββββ ββββββββββββ ββββββββββββ β
β β SCADA ββββββΆβ STATE ββββββΆβ NEQSIM ββββββΆβOPTIMIZER β β
β β DCS β βESTIMATOR β β MODEL β β β β
β ββββββββββββ ββββββββββββ ββββββββββββ ββββββ¬ββββββ β
β β β β
β β ββββββββββββββββββββββββββββββββββββββββ β
β β β β
β β βΌ β
β β βββββββββββββββββββββββββββββββββββββββββββββββ β
β β β OPTIMAL SETPOINTS β β
β β β β’ Separator P/T β’ Compressor speed β β
β β β β’ Valve positions β’ Heat duties β β
β β βββββββββββββββββββββββββββββββββββββββββββββββ β
β β β β
β β β βββββββββββββββββββββββββββββββββββ β
β β β β OBJECTIVE DASHBOARD β β
β β β β β β
β β β β Production: ββββββββββ 85% β β
β β β β Emissions: ββββββββββ 15% β β
β β β β Energy: ββββββββββ 25% β β
β β β β β β
β β β β COβeq Reduced: 2,500 t/month β β
β β β βββββββββββββββββββββββββββββββββββ β
β β β β
β βββββββββββββ΄ββββββββββββββββΆ CLOSED LOOP β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Potential Emission Reduction Impact
| Metric | Potential Range | Environmental Benefit |
|---|---|---|
| COβ Equivalent Reduction | Site-dependent | Tonnes COβeq/year reduction possible |
| Methane Reduction | Varies by source | High-GWP gas reduction (28Γ COβ impact) |
| Flaring Reduction | Varies by operation | Direct combustion emissions avoided |
| Reporting Accuracy | Improved | Better baseline for improvement tracking |
Integration with NeqSim Production Optimizer
NeqSim includes a built-in ProductionOptimizer class that can be extended for multi-objective optimization:
import neqsim.process.processmodel.ProcessSystem;
import neqsim.process.util.optimization.ProductionOptimizer;
// Create process system
ProcessSystem process = new ProcessSystem();
// ... add equipment ...
// Create optimizer with emission constraints
ProductionOptimizer optimizer = new ProductionOptimizer(process);
optimizer.addObjective("gasProduction", "maximize");
optimizer.addObjective("emissions", "minimize");
optimizer.addConstraint("CO2eq", "<=", emissionPermit);
// Run multi-objective optimization
optimizer.runParetoOptimization();
List<Solution> paretoFront = optimizer.getParetoFront();
Related Documentation
- Production Optimizer Tutorial β Multi-variable optimization with constraints
- MPC Integration Tutorial β Model Predictive Control integration
- External Optimizer Integration β Python/SciPy integration patterns
Documentation Structure
| Document | Purpose | Audience |
|---|---|---|
| Offshore Emission Reporting Guide | Comprehensive reference with regulatory framework, methods, API, validation, literature | Engineers, Regulators, Auditors |
| Produced Water Emissions Tutorial | Step-by-step Jupyter notebook with runnable code | Data Scientists, Developers |
| Norwegian Methods Comparison | Validation against handbook, uncertainty analysis | Engineers, Regulators |
| Java Example | Complete Java code sample | Java Developers |
| API Reference | EmissionsCalculator class documentation | All Developers |
Run in Browser (No Installation)
Click to open the tutorial in Google Colab:
Literature & Standards
Key references for emission calculations:
-
Kontogeorgis & Folas (2010) - CPA equation of state theory
DOI: 10.1002/9780470747537 -
IOGP Report 521 (2019) - E&P emission estimation methods
IOGP Bookstore -
IPCC AR5 (2014) - Global Warming Potentials (GWP)
IPCC Report -
EU Methane Regulation 2024/1787 - Methane emission requirements
EUR-Lex
See full literature list in the comprehensive guide.
Contact & Support
- GitHub Issues: equinor/neqsim
- Discussions: GitHub Discussions
- Documentation: equinor.github.io/neqsim
This documentation is part of NeqSim, an open-source thermodynamic and process simulation library by Equinor.