Class LiftCurveTable
java.lang.Object
neqsim.process.util.optimizer.LiftCurveTable
- All Implemented Interfaces:
Serializable
Represents a lift curve table for reservoir simulator integration.
This class stores flow rate vs. pressure data in a format compatible with Eclipse reservoir simulators. The table contains:
- THP (Tubing Head Pressure / outlet pressure) values as column headers
- Flow rates as row headers
- BHP (Bottom Hole Pressure / inlet pressure) values in the table cells
- NaN values for infeasible operating points
Eclipse Format Example
THP 20 40 60 1 100 120 140 10 110 130 150 20 120 140 NaN
In this format:
- First row "THP" indicates pressure column headers
- Second row contains THP values (20, 40, 60 bara)
- Subsequent rows: first column is flow rate, remaining columns are BHP values
- NaN indicates the operating point is infeasible (e.g., constraint violation)
- Version:
- 1.0
- Author:
- ESOL
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate double[][]BHP (inlet pressure) matrix [flowIndex][thpIndex].private StringOptional comments/metadata.private double[]Flow rate values - row headers.private StringUnit for flow rates.private StringUnit for THP and BHP pressures.private static final longSerialization version UID.private StringTable name/identifier.private double[]THP (outlet pressure) values - column headers. -
Constructor Summary
ConstructorsConstructorDescriptionCreates an empty lift curve table.LiftCurveTable(double[] flowRates, double[] thpValues, double[][] bhpValues) Creates a lift curve table with specified values.LiftCurveTable(int numFlowRates, int numThpValues) Creates a lift curve table with specified dimensions. -
Method Summary
Modifier and TypeMethodDescriptionintCounts the number of feasible (non-NaN) points in the table.private StringformatNumber(double value) Formats a number for output.doublegetBHP(int flowIndex, int thpIndex) Gets the BHP value at specified flow rate and THP indices.double[][]Gets the BHP values matrix.Gets the comments.doubleGets the feasibility percentage.double[]Gets the flow rate values.Gets the flow rate unit.Gets the pressure unit.double[][]Gets the raw data as a 2D array including row/column headers.Gets the table name.double[]Gets the THP values.intGets the total number of points in the table.doubleinterpolateBHP(double flowRate, double thp) Interpolates BHP for given flow rate and THP using bilinear interpolation.voidsetBHP(int flowIndex, int thpIndex, double bhp) Sets the BHP value at specified indices.voidsetBhpValues(double[][] bhpValues) Sets the BHP values matrix.voidsetComments(String comments) Sets the comments.voidsetFlowRates(double[] flowRates) Sets the flow rate values.voidsetFlowRateUnit(String flowRateUnit) Sets the flow rate unit.voidsetPressureUnit(String pressureUnit) Sets the pressure unit.voidsetTableName(String tableName) Sets the table name.voidsetThpValues(double[] thpValues) Sets the THP values.toCSV()Converts the table to CSV format.Converts the table to Eclipse-compatible format.toJson()Converts the table to a JSON representation.toString()
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version UID.- See Also:
-
thpValues
private double[] thpValuesTHP (outlet pressure) values - column headers. -
flowRates
private double[] flowRatesFlow rate values - row headers. -
bhpValues
private double[][] bhpValuesBHP (inlet pressure) matrix [flowIndex][thpIndex]. -
pressureUnit
Unit for THP and BHP pressures. -
flowRateUnit
Unit for flow rates. -
tableName
Table name/identifier. -
comments
Optional comments/metadata.
-
-
Constructor Details
-
LiftCurveTable
public LiftCurveTable()Creates an empty lift curve table. -
LiftCurveTable
public LiftCurveTable(int numFlowRates, int numThpValues) Creates a lift curve table with specified dimensions.- Parameters:
numFlowRates- number of flow rate pointsnumThpValues- number of THP points
-
LiftCurveTable
public LiftCurveTable(double[] flowRates, double[] thpValues, double[][] bhpValues) Creates a lift curve table with specified values.- Parameters:
flowRates- flow rate values (row headers)thpValues- THP values (column headers)bhpValues- BHP values [flowIndex][thpIndex]
-
-
Method Details
-
toEclipseFormat
Converts the table to Eclipse-compatible format.Format:
THP thp1 thp2 thp3 flow1 bhp11 bhp12 bhp13 flow2 bhp21 bhp22 bhp23
- Returns:
- Eclipse format string
-
toCSV
-
toJson
-
getRawDataWithHeaders
public double[][] getRawDataWithHeaders()Gets the raw data as a 2D array including row/column headers.Returns array where:
- [0][0] = 0 (corner)
- [0][1..n] = THP values
- [1..m][0] = flow rates
- [1..m][1..n] = BHP values
- Returns:
- 2D array with headers and data
-
getBHP
public double getBHP(int flowIndex, int thpIndex) Gets the BHP value at specified flow rate and THP indices.- Parameters:
flowIndex- flow rate indexthpIndex- THP index- Returns:
- BHP value, or NaN if infeasible
-
setBHP
public void setBHP(int flowIndex, int thpIndex, double bhp) Sets the BHP value at specified indices.- Parameters:
flowIndex- flow rate indexthpIndex- THP indexbhp- BHP value (or NaN for infeasible)
-
interpolateBHP
public double interpolateBHP(double flowRate, double thp) Interpolates BHP for given flow rate and THP using bilinear interpolation.- Parameters:
flowRate- flow ratethp- THP value- Returns:
- interpolated BHP, or NaN if outside bounds or near infeasible points
-
countFeasiblePoints
public int countFeasiblePoints()Counts the number of feasible (non-NaN) points in the table.- Returns:
- number of feasible points
-
getTotalPoints
public int getTotalPoints()Gets the total number of points in the table.- Returns:
- total points
-
getFeasibilityPercent
public double getFeasibilityPercent()Gets the feasibility percentage.- Returns:
- percentage of feasible points (0-100)
-
formatNumber
Formats a number for output. -
getThpValues
public double[] getThpValues()Gets the THP values.- Returns:
- THP values array
-
setThpValues
public void setThpValues(double[] thpValues) Sets the THP values.- Parameters:
thpValues- THP values array
-
getFlowRates
public double[] getFlowRates()Gets the flow rate values.- Returns:
- flow rate values array
-
setFlowRates
public void setFlowRates(double[] flowRates) Sets the flow rate values.- Parameters:
flowRates- flow rate values array
-
getBhpValues
public double[][] getBhpValues()Gets the BHP values matrix.- Returns:
- BHP values [flowIndex][thpIndex]
-
setBhpValues
public void setBhpValues(double[][] bhpValues) Sets the BHP values matrix.- Parameters:
bhpValues- BHP values [flowIndex][thpIndex]
-
getPressureUnit
-
setPressureUnit
Sets the pressure unit.- Parameters:
pressureUnit- pressure unit
-
getFlowRateUnit
-
setFlowRateUnit
Sets the flow rate unit.- Parameters:
flowRateUnit- flow rate unit
-
getTableName
-
setTableName
-
getComments
-
setComments
-
toString
-