Class PressureBoundaryOptimizer.LiftCurveTable

java.lang.Object
neqsim.process.util.optimizer.PressureBoundaryOptimizer.LiftCurveTable
All Implemented Interfaces:
Serializable
Enclosing class:
PressureBoundaryOptimizer

public static class PressureBoundaryOptimizer.LiftCurveTable extends Object implements Serializable
Lift curve table containing maximum flow rates for pressure combinations.

This table represents the maximum achievable flow rate for each combination of inlet pressure (row) and outlet pressure (column). It is designed for integration with reservoir simulators like Eclipse, which use VFP (Vertical Flow Performance) tables to couple reservoir and surface network models.

Table Structure

The table is organized as a 2D matrix where:

  • Rows - Inlet pressures (e.g., wellhead or reservoir pressures)
  • Columns - Outlet pressures (e.g., export or delivery pressures)
  • Cells - Maximum feasible flow rate at that pressure combination

Additionally, the table stores:

  • Power matrix - Total compressor power at each operating point (kW)
  • Bottleneck matrix - Name of limiting equipment at each point

Eclipse VFP Format

The toEclipseFormat() method generates output compatible with Eclipse VFPPROD keyword. Infeasible points are marked with "1*" (Eclipse default value marker).

Example Usage

// Generate table
LiftCurveTable table = optimizer.generateLiftCurveTable(new double[] {50.0, 60.0, 70.0}, // inlet
                                                                                         // pressures
    new double[] {90.0, 100.0, 110.0}, // outlet pressures
    "bara");

// Access data
double maxFlow = table.getFlowRate(0, 1); // Pin=50, Pout=100
double power = table.getPower(0, 1); // Power at that point
String bottleneck = table.getBottleneck(0, 1); // Limiting equipment

// Export formats
System.out.println(table.toEclipseFormat()); // Eclipse VFP format
System.out.println(table.toJson()); // JSON format

// Statistics
int feasible = table.countFeasiblePoints();
System.out.println(table); // Summary string
Version:
1.0
Author:
ESOL
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • tableName

      private final String tableName
    • inletPressures

      private final double[] inletPressures
    • outletPressures

      private final double[] outletPressures
    • flowRates

      private final double[][] flowRates
    • powers

      private final double[][] powers
    • bottlenecks

      private final String[][] bottlenecks
    • pressureUnit

      private final String pressureUnit
    • rateUnit

      private final String rateUnit
  • Constructor Details

    • LiftCurveTable

      public LiftCurveTable(String tableName, double[] inletPressures, double[] outletPressures, double[][] flowRates, double[][] powers, String[][] bottlenecks, String pressureUnit, String rateUnit)
      Creates a lift curve table.
      Parameters:
      tableName - the table name
      inletPressures - inlet pressure values
      outletPressures - outlet pressure values
      flowRates - 2D array of flow rates [inlet][outlet]
      powers - 2D array of power values [inlet][outlet]
      bottlenecks - 2D array of bottleneck equipment names
      pressureUnit - the pressure unit
      rateUnit - the rate unit
  • Method Details

    • copyMatrix

      private double[][] copyMatrix(double[][] matrix)
    • copyMatrix

      private String[][] copyMatrix(String[][] matrix)
    • getTableName

      public String getTableName()
      Gets the table name.
      Returns:
      the table name
    • getInletPressures

      public double[] getInletPressures()
      Gets the inlet pressures.
      Returns:
      copy of inlet pressure array
    • getOutletPressures

      public double[] getOutletPressures()
      Gets the outlet pressures.
      Returns:
      copy of outlet pressure array
    • getFlowRate

      public double getFlowRate(int inletIndex, int outletIndex)
      Gets the flow rate at a specific inlet/outlet index.
      Parameters:
      inletIndex - the inlet pressure index
      outletIndex - the outlet pressure index
      Returns:
      the flow rate
    • getPower

      public double getPower(int inletIndex, int outletIndex)
      Gets the power at a specific inlet/outlet index.
      Parameters:
      inletIndex - the inlet pressure index
      outletIndex - the outlet pressure index
      Returns:
      the power in kW
    • getBottleneck

      public String getBottleneck(int inletIndex, int outletIndex)
      Gets the bottleneck equipment at a specific inlet/outlet index.
      Parameters:
      inletIndex - the inlet pressure index
      outletIndex - the outlet pressure index
      Returns:
      the bottleneck equipment name
    • countFeasiblePoints

      public int countFeasiblePoints()
      Counts feasible points in the table.
      Returns:
      number of feasible points (non-NaN flow rates)
    • toEclipseFormat

      public String toEclipseFormat()
      Formats the table in Eclipse VFP format.

      The format follows Eclipse VFP table conventions with inlet pressure as rows and outlet pressure as columns.

      Returns:
      Eclipse format string
    • toJson

      public String toJson()
      Converts the table to JSON format.
      Returns:
      JSON string representation
    • toString

      public String toString()
      Overrides:
      toString in class Object