Class OilGasProcessSimulationOptimization
java.lang.Object
neqsim.process.examples.OilGasProcessSimulationOptimization
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classResult class for maximum production optimization.static classData class to hold process input parameters.static classData class to hold process output results. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate doubleDesign speed for compressor 27-KA-01 in RPM.private doubleMaximum allowable speed for compressor 27-KA-01 in RPM.Default input parameters for simulation.private static final org.apache.logging.log4j.LoggerLogger for this class.private ProcessSystemThe process system object.private SystemInterfaceThe well fluid used for simulation. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigureCompressorCharts(double designSpeed, double maxSpeed) Configures compressor charts for the export compressor (27-KA-01).Creates the oil and gas separation process system.private voidCreates the well fluid using Peng-Robinson EOS with the fluid characterization from the reference paper.Gets the input parameters.Gets the process system.Retrieves simulation results from the process.Gets the well fluid.static voidMain method to demonstrate the simulation and optimization.Optimizes for maximum production (feed rate) while respecting separator capacity constraints.Performs a simple optimization to minimize total power consumption.Runs the simulation with the current input parameters.Runs the simulation with custom input parameters.voidSets the input parameters.voidUpdates the process model with the given input parameters.
-
Field Details
-
logger
private static final org.apache.logging.log4j.Logger loggerLogger for this class. -
wellFluid
The well fluid used for simulation. -
oilProcess
The process system object. -
inputParameters
Default input parameters for simulation. -
compressor27KA01DesignSpeed
private double compressor27KA01DesignSpeedDesign speed for compressor 27-KA-01 in RPM. -
compressor27KA01MaxSpeed
private double compressor27KA01MaxSpeedMaximum 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
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
public OilGasProcessSimulationOptimization.ProcessOutputResults runSimulation(OilGasProcessSimulationOptimization.ProcessInputParameters params) Runs the simulation with custom input parameters.- Parameters:
params- the input parameters to use- Returns:
- ProcessOutputResults containing simulation results
-
optimizePowerConsumption
public OilGasProcessSimulationOptimization.ProcessInputParameters optimizePowerConsumption(OilGasProcessSimulationOptimization.ProcessInputParameters baseParams) 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
public OilGasProcessSimulationOptimization.MaxProductionResult optimizeMaxProduction(OilGasProcessSimulationOptimization.ProcessInputParameters baseParams) 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
-
getWellFluid
-
main
Main method to demonstrate the simulation and optimization.- Parameters:
args- command line arguments (not used)
-