Class LiftCurveGenerator

java.lang.Object
neqsim.process.util.optimizer.LiftCurveGenerator
All Implemented Interfaces:
Serializable

public class LiftCurveGenerator extends Object implements Serializable
Generates lift curves (VLP tables) for reservoir simulator integration.

This class generates flow rate vs. pressure tables for use in Eclipse and other reservoir simulators. It sweeps through specified THP (outlet pressure) values and calculates the required BHP (inlet pressure) for each flow rate.

Modes of Operation

  • BHP calculation mode - Given flow rates and THP values, calculate required BHP
  • Flow calculation mode - Given BHP and THP values, calculate achievable flow rate

Example Usage

// Create process system with pipeline
ProcessSystem process = new ProcessSystem();
process.add(inlet);
process.add(pipe);

// Create generator
LiftCurveGenerator generator = new LiftCurveGenerator(process, "inlet", "pipeline");
generator.setMaxVelocity(20.0); // m/s constraint

// Define operating envelope
double[] flowRates = {1000, 5000, 10000, 20000, 30000}; // kg/hr
double[] thpValues = {20, 40, 60, 80}; // bara

// Generate table
LiftCurveTable table = generator.generateTable(flowRates, thpValues, "bara", "kg/hr");

// Export to Eclipse format
String eclipseFormat = table.toEclipseFormat();
Version:
1.0
Author:
ESOL
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Serialization version UID.
      See Also:
    • logger

      private static final org.apache.logging.log4j.Logger logger
      Logger object for class.
    • optimizer

      private FlowRateOptimizer optimizer
      The underlying flow rate optimizer.
    • processSystem

      private ProcessSystem processSystem
      ProcessSystem being analyzed (if in process system mode).
    • processModel

      private ProcessModel processModel
      ProcessModel being analyzed (if in process model mode).
    • baseFluid

      private SystemInterface baseFluid
      Base fluid for calculations.
    • maxVelocity

      private double maxVelocity
      Maximum velocity constraint in m/s.
    • checkConstraints

      private boolean checkConstraints
      Whether to check capacity constraints.
    • tableName

      private String tableName
      Table name for generated tables.
  • Constructor Details

    • LiftCurveGenerator

      public LiftCurveGenerator(ProcessSystem processSystem, String inletStreamName, String outletStreamName)
      Creates a lift curve generator for a ProcessSystem.
      Parameters:
      processSystem - the process system to analyze
      inletStreamName - name of the inlet stream
      outletStreamName - name of the outlet stream
    • LiftCurveGenerator

      public LiftCurveGenerator(ProcessModel processModel, String inletStreamName, String outletStreamName)
      Creates a lift curve generator for a ProcessModel.
      Parameters:
      processModel - the process model to analyze
      inletStreamName - name of the inlet stream
      outletStreamName - name of the outlet stream
  • Method Details

    • generateTable

      public LiftCurveTable generateTable(double[] flowRates, double[] thpValues, String pressureUnit, String flowRateUnit)
      Generates a lift curve table with BHP values for given flow rates and THP values.

      For each combination of flow rate and THP, this method calculates the required BHP (inlet pressure) to achieve that operating point. If the point is infeasible (e.g., due to constraint violations), the BHP is set to NaN.

      Parameters:
      flowRates - array of flow rates to evaluate
      thpValues - array of THP (outlet pressure) values
      pressureUnit - unit for pressure values
      flowRateUnit - unit for flow rates
      Returns:
      generated lift curve table
    • generateFlowRateTable

      public LiftCurveTable generateFlowRateTable(double[] bhpValues, double[] thpValues, String pressureUnit, String flowRateUnit)
      Generates a lift curve table by calculating flow rates for given BHP and THP combinations.

      This is the inverse of generateTable(double[], double[], String, String) - for each combination of BHP (inlet pressure) and THP (outlet pressure), it calculates the achievable flow rate.

      Parameters:
      bhpValues - array of BHP (inlet pressure) values
      thpValues - array of THP (outlet pressure) values
      pressureUnit - unit for pressure values
      flowRateUnit - unit for output flow rates
      Returns:
      generated table with flow rates instead of BHP
    • generateTableAutoRange

      public LiftCurveTable generateTableAutoRange(int numFlowPoints, int numPressurePoints, double minTHP, double maxTHP, String pressureUnit, String flowRateUnit)
      Generates a table with automatic range determination based on equipment limits.
      Parameters:
      numFlowPoints - number of flow rate points
      numPressurePoints - number of pressure points
      minTHP - minimum THP value
      maxTHP - maximum THP value
      pressureUnit - pressure unit
      flowRateUnit - flow rate unit
      Returns:
      generated table
    • getMaxVelocity

      public double getMaxVelocity()
      Gets the maximum velocity constraint.
      Returns:
      maximum velocity in m/s
    • setMaxVelocity

      public void setMaxVelocity(double maxVelocity)
      Sets the maximum velocity constraint.
      Parameters:
      maxVelocity - maximum velocity in m/s
    • isCheckConstraints

      public boolean isCheckConstraints()
      Checks if constraints are being checked.
      Returns:
      true if checking constraints
    • setCheckConstraints

      public void setCheckConstraints(boolean checkConstraints)
      Sets whether to check constraints.
      Parameters:
      checkConstraints - true to check constraints
    • getTableName

      public String getTableName()
      Gets the table name for generated tables.
      Returns:
      table name
    • setTableName

      public void setTableName(String tableName)
      Sets the table name for generated tables.
      Parameters:
      tableName - table name
    • getOptimizer

      public FlowRateOptimizer getOptimizer()
      Gets the underlying optimizer.
      Returns:
      the optimizer
    • setOptimizerParameters

      public void setOptimizerParameters(int maxIterations, double tolerance)
      Sets optimizer parameters.
      Parameters:
      maxIterations - maximum iterations
      tolerance - convergence tolerance
    • setFlowRateLimits

      public void setFlowRateLimits(double minFlowRate, double maxFlowRate)
      Sets flow rate limits for the optimizer.
      Parameters:
      minFlowRate - minimum flow rate in kg/hr
      maxFlowRate - maximum flow rate in kg/hr