Class ProducedWaterDegassingSystem

java.lang.Object
neqsim.process.equipment.util.ProducedWaterDegassingSystem
All Implemented Interfaces:
Serializable

public class ProducedWaterDegassingSystem extends Object implements Serializable
High-level model for produced water degassing systems with emissions calculation.

This class simplifies the setup of multi-stage degassing processes for produced water treatment, automatically calculating greenhouse gas emissions at each stage. Based on the methodology from "Virtual Measurement of Emissions from Produced Water Using an Online Process Simulator" (GFMW 2023).

Norwegian Regulatory Context

This implementation supports compliance with:

  • Aktivitetsforskriften Section 70: Measurement and calculation requirements
  • Norwegian offshore emission handbook: Replaces conventional solubility factor method
  • Norwegian Environment Agency annual emission reporting

Thermodynamic Model

Uses SRK-CPA (Cubic Plus Association) equation of state with:

  • Tuned binary interaction parameters (kij) for water-gas systems
  • Electrolyte handling for saline produced water
  • Validated uncertainty: +/-3.6% for total gas, +/-1% for CO2/CH4 composition

Typical Process

Water from Separator -> Degasser (3-5 barg) -> CFU (1 barg) -> Caisson (atm) -> Sea
                             |                    |               |
                        Gas to Flare         Gas to Vent     Gas to Atmosphere

Usage Example


// Quick setup for a typical 3-stage system
ProducedWaterDegassingSystem system = new ProducedWaterDegassingSystem("Platform PW");
system.setWaterFlowRate(100.0, "m3/hr");
system.setWaterTemperature(80.0, "C");
system.setInletPressure(30.0, "bara");

// Set degassing stage pressures
system.setDegasserPressure(4.0, "bara");
system.setCFUPressure(1.0, "bara");

// Set dissolved gas composition (from PVT analysis)
system.setDissolvedGasComposition(new String[] {"CO2", "methane", "ethane", "propane"},
    new double[] {0.51, 0.44, 0.04, 0.01} // mole fractions
);

// Optional: Apply tuned kij parameters from lab calibration
system.setTunedInteractionParameters(true);

// Run and get emissions
system.run();
System.out.println(system.getEmissionsReport());

// Compare with conventional handbook method
System.out.println(system.getMethodComparisonReport());

Version:
1.1
Author:
ESOL
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • name

      private String name
    • process

      private ProcessSystem process
    • waterFlowRate_kghr

      private double waterFlowRate_kghr
    • waterTemperature_K

      private double waterTemperature_K
    • inletPressure_bara

      private double inletPressure_bara
    • degasserPressure_bara

      private double degasserPressure_bara
    • cfuPressure_bara

      private double cfuPressure_bara
    • caissonPressure_bara

      private double caissonPressure_bara
    • salinity_wtpct

      private double salinity_wtpct
    • dissolvedGasComposition

      private Map<String,Double> dissolvedGasComposition
    • useTunedKijParameters

      private boolean useTunedKijParameters
    • KIJ_WATER_CO2_BASE

      public static final double KIJ_WATER_CO2_BASE
      Water-CO2 kij base parameter (tuned).
      See Also:
    • KIJ_WATER_CO2_TEMP

      public static final double KIJ_WATER_CO2_TEMP
      Water-CO2 kij temperature coefficient.
      See Also:
    • KIJ_WATER_CH4_BASE

      public static final double KIJ_WATER_CH4_BASE
      Water-methane kij base parameter (tuned).
      See Also:
    • KIJ_WATER_CH4_TEMP

      public static final double KIJ_WATER_CH4_TEMP
      Water-methane kij temperature coefficient.
      See Also:
    • KIJ_WATER_C2H6

      public static final double KIJ_WATER_C2H6
      Water-ethane kij parameter.
      See Also:
    • KIJ_WATER_C3H8

      public static final double KIJ_WATER_C3H8
      Water-propane kij parameter.
      See Also:
    • labGWR

      private Double labGWR
    • labGasComposition

      private Map<String,Double> labGasComposition
    • waterInletStream

      private Stream waterInletStream
    • degasserHeater

      private Heater degasserHeater
    • degasser

      private ThreePhaseSeparator degasser
    • cfuHeater

      private Heater cfuHeater
    • cfu

      private ThreePhaseSeparator cfu
    • caissonHeater

      private Heater caissonHeater
    • caisson

      private ThreePhaseSeparator caisson
    • degasserEmissions

      private EmissionsCalculator degasserEmissions
    • cfuEmissions

      private EmissionsCalculator cfuEmissions
    • caissonEmissions

      private EmissionsCalculator caissonEmissions
    • hasRun

      private boolean hasRun
  • Constructor Details

    • ProducedWaterDegassingSystem

      public ProducedWaterDegassingSystem(String name)
      Creates a produced water degassing system.
      Parameters:
      name - system name
  • Method Details

    • initializeDefaultComposition

      private void initializeDefaultComposition()
    • setWaterFlowRate

      public void setWaterFlowRate(double flowRate, String unit)
      Set water flow rate.
      Parameters:
      flowRate - flow rate value
      unit - "kg/hr", "m3/hr", "bbl/day"
    • setWaterTemperature

      public void setWaterTemperature(double temperature, String unit)
      Set water temperature.
      Parameters:
      temperature - temperature value
      unit - "C", "K", "F"
    • setInletPressure

      public void setInletPressure(double pressure, String unit)
      Set inlet pressure (from upstream separator).
      Parameters:
      pressure - pressure in bara
      unit - "bara", "barg", "psia"
    • setDegasserPressure

      public void setDegasserPressure(double pressure, String unit)
      Set degasser pressure.
      Parameters:
      pressure - pressure value
      unit - "bara", "barg", "psia"
    • setCFUPressure

      public void setCFUPressure(double pressure, String unit)
      Set CFU pressure.
      Parameters:
      pressure - pressure value
      unit - "bara", "barg", "psia"
    • setCaissonPressure

      public void setCaissonPressure(double pressure, String unit)
      Set caisson pressure (typically atmospheric).
      Parameters:
      pressure - pressure value
      unit - "bara", "barg", "psia"
    • setSalinity

      public void setSalinity(double salinity, String unit)
      Set water salinity.
      Parameters:
      salinity - salinity value
      unit - "wt%", "ppm", "molal"
    • setDissolvedGasComposition

      public void setDissolvedGasComposition(String[] components, double[] moleFractions)
      Set dissolved gas composition.
      Parameters:
      components - array of component names
      moleFractions - array of mole fractions (should sum to 1.0)
    • setDissolvedGasComposition

      public void setDissolvedGasComposition(Map<String,Double> composition)
      Set dissolved gas composition from a map.
      Parameters:
      composition - map of component name to mole fraction
    • setTunedInteractionParameters

      public void setTunedInteractionParameters(boolean useTuned)
      Enable or disable tuned binary interaction parameters.

      When enabled, uses kij parameters calibrated for high-salinity produced water systems per Kristiansen et al. (2023). These parameters improve prediction accuracy for:

      • Water-CO2 interactions (kij = -0.24 + 0.001121×T)
      • Water-CH4 interactions (kij = -0.72 + 0.002605×T)
      • Water-C2H6 interactions (kij = 0.11)
      • Water-C3H8 interactions (kij = 0.205)
      Parameters:
      useTuned - true to use tuned parameters, false for defaults
    • setLabGWR

      public void setLabGWR(double gwr)
      Set lab-measured Gas-Water Ratio for validation.

      The lab GWR should be measured from a representative water sample at standard conditions. This value is used to validate the model predictions.

      Parameters:
      gwr - Gas-Water Ratio in Sm³ gas per Sm³ water
    • setLabGasComposition

      public void setLabGasComposition(Map<String,Double> composition)
      Set lab-measured gas composition for validation.

      The gas composition should be from analysis of gas released during lab degassing. Component names should match NeqSim naming (e.g., "CO2", "methane", "ethane").

      Parameters:
      composition - map of component name to mole fraction
    • getValidationResults

      public Map<String,Object> getValidationResults()
      Get validation results comparing model predictions to lab data.

      Returns deviation metrics for:

      • GWR: (model - lab) / lab × 100%
      • Component compositions: absolute deviation in mol%

      Per Norwegian handbook, acceptable uncertainty is +/-7.5% for regulatory reporting.

      Returns:
      map of validation metrics, or null if no lab data provided
    • calculateModelGWR

      private double calculateModelGWR()
      Calculate model Gas-Water Ratio.
      Returns:
      GWR in Sm³/Sm³
    • getModelGasComposition

      private Map<String,Double> getModelGasComposition()
      Get model gas composition (combined from all stages).
      Returns:
      mole fractions by component
    • build

      public void build()
      Build the process model.
    • run

      public void run()
      Run the simulation.
    • run

      public void run(UUID id)
      Run the simulation with a specific UUID.
      Parameters:
      id - calculation UUID
    • getTotalCO2EmissionRate

      public double getTotalCO2EmissionRate(String unit)
      Get total CO2 emission rate from all stages.
      Parameters:
      unit - "kg/hr", "tonnes/year", etc.
      Returns:
      total CO2 emission rate
    • getTotalMethaneEmissionRate

      public double getTotalMethaneEmissionRate(String unit)
      Get total methane emission rate from all stages.
      Parameters:
      unit - "kg/hr", "tonnes/year", etc.
      Returns:
      total methane emission rate
    • getTotalNMVOCEmissionRate

      public double getTotalNMVOCEmissionRate(String unit)
      Get total nmVOC emission rate from all stages.
      Parameters:
      unit - "kg/hr", "tonnes/year", etc.
      Returns:
      total nmVOC emission rate
    • getTotalCO2Equivalents

      public double getTotalCO2Equivalents(String unit)
      Get total CO2 equivalents from all stages.
      Parameters:
      unit - "kg/hr", "tonnes/year", etc.
      Returns:
      total CO2 equivalent emission rate
    • getDegasserEmissions

      public EmissionsCalculator getDegasserEmissions()
      Get emissions calculator for degasser.
      Returns:
      degasser emissions calculator
    • getCFUEmissions

      public EmissionsCalculator getCFUEmissions()
      Get emissions calculator for CFU.
      Returns:
      CFU emissions calculator
    • getCaissonEmissions

      public EmissionsCalculator getCaissonEmissions()
      Get emissions calculator for caisson.
      Returns:
      caisson emissions calculator
    • getProcessSystem

      public ProcessSystem getProcessSystem()
      Get the underlying process system.
      Returns:
      process system
    • getEmissionsReport

      public String getEmissionsReport()
      Generate comprehensive emissions report.
      Returns:
      formatted report string
    • getMethodComparisonReport

      public String getMethodComparisonReport()
      Generate comparison report between thermodynamic and conventional methods.

      Shows how the NeqSim thermodynamic calculation compares to the conventional Norwegian handbook method. Highlights CO2 that the conventional method misses.

      Returns:
      formatted comparison report
    • toMap

      public Map<String,Object> toMap()
      Get all results as a map for JSON export.
      Returns:
      map of results
    • applyTunedKijParameters

      private void applyTunedKijParameters(SystemSrkCPAstatoil fluid)
      Apply tuned binary interaction parameters to the fluid.
      Parameters:
      fluid - the fluid system
    • checkRun

      private void checkRun()
    • convertPressure

      private double convertPressure(double pressure, String unit)