Class OilGasProcessSimulationOptimization

java.lang.Object
neqsim.process.examples.OilGasProcessSimulationOptimization

public class OilGasProcessSimulationOptimization extends Object
Oil and Gas Process Simulation and Optimization Example.

This class implements a comprehensive oil and gas separation process simulation based on the workflow presented in:

  • Andreasen, A. Applied Process Simulation-Driven Oil and Gas Separation Plant Optimization Using Surrogate Modeling and Evolutionary Algorithms. ChemEngineering 2020, 4, 11.

The process consists of:

  • Three-stage oil/gas separation
  • Gas recompression with scrubbers
  • Export gas compression with dew point control
  • Export oil pumping
Version:
1.0
Author:
NeqSim Development Team
  • Field Details

    • logger

      private static final org.apache.logging.log4j.Logger logger
      Logger for this class.
    • wellFluid

      private SystemInterface wellFluid
      The well fluid used for simulation.
    • oilProcess

      private ProcessSystem oilProcess
      The process system object.
    • inputParameters

      Default input parameters for simulation.
    • compressor27KA01DesignSpeed

      private double compressor27KA01DesignSpeed
      Design speed for compressor 27-KA-01 in RPM.
    • compressor27KA01MaxSpeed

      private double compressor27KA01MaxSpeed
      Maximum allowable speed for compressor 27-KA-01 in RPM.
  • Constructor Details

    • OilGasProcessSimulationOptimization

      public OilGasProcessSimulationOptimization()
      Default constructor. Creates the well fluid with default composition.
  • Method Details

    • createWellFluid

      private void createWellFluid()
      Creates the well fluid using Peng-Robinson EOS with the fluid characterization from the reference paper.

      The fluid composition is based on the characterization given in: https://onlinelibrary.wiley.com/doi/abs/10.1002/apj.159

    • createProcess

      public ProcessSystem createProcess()
      Creates the oil and gas separation process system.

      The process includes:

      • Three-stage separation
      • Gas recompression with scrubbers
      • Export gas compression with dew point control
      • Export oil pumping
      Returns:
      the configured ProcessSystem
    • configureCompressorCharts

      public void configureCompressorCharts(double designSpeed, double maxSpeed)
      Configures compressor charts for the export compressor (27-KA-01). This should be called after createProcess() and an initial run to establish operating points.

      The compressor chart is generated based on the current operating point, with speed curves ranging from 70% to 110% of the design speed.

      Parameters:
      designSpeed - the design speed in RPM (e.g., 10000)
      maxSpeed - the maximum allowable speed in RPM (e.g., 11000)
    • updateInput

      Updates the process model with the given input parameters.
      Parameters:
      params - the input parameters to apply
    • getOutput

      Retrieves simulation results from the process.
      Returns:
      ProcessOutputResults containing all simulation results
    • runSimulation

      Runs the simulation with the current input parameters.
      Returns:
      ProcessOutputResults containing simulation results
    • runSimulation

      Runs the simulation with custom input parameters.
      Parameters:
      params - the input parameters to use
      Returns:
      ProcessOutputResults containing simulation results
    • optimizePowerConsumption

      Performs a simple optimization to minimize total power consumption.

      This is a basic grid search optimization that varies key parameters to find the minimum total power consumption.

      Parameters:
      baseParams - the base input parameters to start from
      Returns:
      the optimized input parameters
    • optimizeMaxProduction

      Optimizes for maximum production (feed rate) while respecting separator capacity constraints.

      This optimization finds the highest possible feed rate that does not overload any separator. It reports which separator becomes the bottleneck and at what utilization.

      Parameters:
      baseParams - the base input parameters to start from
      Returns:
      OptimizationResult containing optimal parameters and bottleneck information
    • getInputParameters

      Gets the input parameters.
      Returns:
      the current input parameters
    • setInputParameters

      public void setInputParameters(OilGasProcessSimulationOptimization.ProcessInputParameters inputParameters)
      Sets the input parameters.
      Parameters:
      inputParameters - the input parameters to set
    • getOilProcess

      public ProcessSystem getOilProcess()
      Gets the process system.
      Returns:
      the process system
    • getWellFluid

      public SystemInterface getWellFluid()
      Gets the well fluid.
      Returns:
      the well fluid system interface
    • main

      public static void main(String[] args)
      Main method to demonstrate the simulation and optimization.
      Parameters:
      args - command line arguments (not used)