Class TubingPerformance
java.lang.Object
neqsim.util.NamedBaseClass
neqsim.process.SimulationBaseClass
neqsim.process.equipment.ProcessEquipmentBaseClass
neqsim.process.equipment.TwoPortEquipment
neqsim.process.equipment.pipeline.Pipeline
neqsim.process.equipment.pipeline.TubingPerformance
- All Implemented Interfaces:
Serializable, Runnable, PipeLineInterface, ProcessEquipmentInterface, TwoPortInterface, SimulationInterface, NamedInterface
Tubing Performance model for vertical lift performance (VLP) calculations.
This class provides GAP-level VLP modeling capabilities with multiple multiphase flow correlations and temperature models for wellbore flow. It calculates pressure drop in production tubing accounting for gravity, friction, and acceleration.
VLP Correlations
- BEGGS_BRILL - All inclinations, most widely used
- HAGEDORN_BROWN - Vertical oil wells, slug/bubble flow
- GRAY - Gas wells, mist/annular flow
- HASAN_KABIR - Mechanistic, all patterns
- DUNS_ROS - Gas-liquid, all patterns
Temperature Models
- ISOTHERMAL - Constant temperature throughout
- LINEAR_GRADIENT - Linear from BH to surface
- RAMEY - Ramey (1962) steady-state geothermal
- HASAN_KABIR - Full energy balance
Example Usage
// Create tubing model
TubingPerformance tubing = new TubingPerformance("tubing");
tubing.setInletStream(feedStream);
tubing.setDiameter(0.1); // 100 mm ID
tubing.setLength(3000.0); // 3000 m TVD
tubing.setInclination(90.0); // Vertical
tubing.setRoughness(0.00005); // 50 microns
tubing.setCorrelationType(TubingPerformance.CorrelationType.BEGGS_BRILL);
tubing.run();
double outletPressure = tubing.getOutletStream().getPressure("bara");
double pressureDrop = tubing.getPressureDrop();
- Author:
- NeqSim development team
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumVLP correlation types.static enumTemperature profile models. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate doubleprivate doubleprivate doubleprivate doubleprivate doubleprivate double(package private) static org.apache.logging.log4j.Loggerprivate intprivate doubleprivate doubleprivate doubleprivate doubleprivate static final longprivate doubleprivate doubleFields inherited from class Pipeline
equilibriumHeatTransfer, equilibriumMassTransfer, fileName, flowPattern, legHeights, legPositions, numberOfLegs, numberOfNodesInLeg, outerHeatTransferCoeffs, outerTemperature, pipe, pipeDiameters, pipelineMechanicalDesign, pipeWallRoughness, system, times, wallHeatTransferCoeffsFields inherited from class TwoPortEquipment
inStream, outStreamFields inherited from class ProcessEquipmentBaseClass
conditionAnalysisMessage, energyStream, hasController, isSolved, properties, reportFields inherited from class SimulationBaseClass
calcIdentifier, calculateSteadyState, timeFields inherited from class NamedBaseClass
name -
Constructor Summary
ConstructorsConstructorDescriptionTubingPerformance(String name) Constructor for TubingPerformance.TubingPerformance(String name, StreamInterface inletStream) Constructor with inlet stream. -
Method Summary
Modifier and TypeMethodDescriptionprivate doublecalculateBeggsBrill(SystemInterface system, ThermodynamicOperations ops) Calculate pressure drop using Beggs-Brill correlation.private doublecalculateBeggsBrillHoldup(double lambdaL, double nFr, double angle) Calculate Beggs-Brill liquid holdup.private doublecalculateDunsRos(SystemInterface system, ThermodynamicOperations ops) Calculate pressure drop using Duns-Ros correlation.private doublecalculateFrictionFactor(double Re, double eps, double d) Calculate Darcy friction factor using Colebrook-White equation.private doublecalculateGray(SystemInterface system, ThermodynamicOperations ops) Calculate pressure drop using Gray correlation (gas wells).private doublecalculateHagedornBrown(SystemInterface system, ThermodynamicOperations ops) Calculate pressure drop using Hagedorn-Brown correlation.private doublecalculateHasanKabir(SystemInterface system, ThermodynamicOperations ops) Calculate pressure drop using Hasan-Kabir mechanistic model.private doublecalculateHBHoldup(double vsL, double vsG, double rhoL, double rhoG, double muL, double d) Calculate Hagedorn-Brown holdup.private doublecalculateHKTemperature(double inletTemp) Calculate Hasan-Kabir energy balance temperature.private doublecalculateOutletTemperature(double inletTemp) Calculate outlet temperature based on selected model.private doublecalculatePressureDrop(SystemInterface system, ThermodynamicOperations ops) Calculate pressure drop using selected correlation.private doublecalculateRameyTemperature(double inletTemp) Calculate Ramey (1962) steady-state temperature.private doublecalculateTemperatureAtDepth(double depth) Calculate temperature at a given depth using selected model.double[][]generateVLPCurve(double[] flowRates) Generate VLP curve (required BHP vs flow rate).Get VLP correlation type.doubleGet tubing inner diameter.doubleGet inclination angle.doubleGet tubing length.doubleGet calculated pressure drop.doubleGet pipe roughness.Get temperature model.doubleGet wellhead pressure.voidIn this method all thermodynamic and unit operations will be calculated in a steady state calculation.voidsetBottomholeTemperature(double temp) Set bottomhole temperature.voidsetCorrelationType(TubingPerformance.CorrelationType correlationType) Set VLP correlation type.voidsetDiameter(double diameter) Set tubing inner diameter.voidsetFormationThermalConductivity(double k) Set formation thermal conductivity.voidsetGeothermalGradient(double gradient) Set geothermal gradient.voidsetInclination(double inclination) Set inclination angle.voidsetLength(double length) Set tubing length (measured depth or TVD depending on use).voidsetNumberOfSegments(int n) Set number of segments for numerical integration.voidsetOverallHeatTransferCoefficient(double u) Set overall heat transfer coefficient.voidsetProductionTime(double days) Set production time for Ramey model.voidsetRoughness(double roughness) Set pipe roughness.voidsetSurfaceTemperature(double temp) Set surface temperature.voidsetTemperatureModel(TubingPerformance.TemperatureModel temperatureModel) Set temperature model.voidsetWellheadPressure(double pressure) Set wellhead pressure for VLP calculations.Methods inherited from class Pipeline
displayResult, getCapacityDuty, getCapacityMax, getEntropyProduction, getMechanicalDesign, getOutletPressure, getPipe, getSuperficialVelocity, getTimes, initMechanicalDesign, runTransient, setEquilibriumHeatTransfer, setEquilibriumMassTransfer, setHeightProfile, setInitialFlowPattern, setLegPositions, setNumberOfLegs, setNumberOfNodesInLeg, setOuterTemperatures, setOutputFileName, setPipeDiameters, setPipeOuterHeatTransferCoefficients, setPipeWallHeatTransferCoefficients, setPipeWallRoughness, setTimeSeries, toJson, toJsonMethods inherited from class TwoPortEquipment
getInletPressure, getInletStream, getInletTemperature, getMassBalance, getOutletPressure, getOutletStream, getOutletTemperature, setInletPressure, setInletStream, setInletTemperature, setOutletPressure, setOutletStream, setOutletTemperature, validateSetupMethods inherited from class ProcessEquipmentBaseClass
copy, equals, getConditionAnalysisMessage, getController, getEnergyStream, getExergyChange, getMassBalance, getMinimumFlow, getPressure, getPressure, getProperty, getReport_json, getResultTable, getSpecification, getTemperature, getTemperature, getThermoSystem, hashCode, isActive, isActive, isSetEnergyStream, reportResults, run_step, runConditionAnalysis, setController, setEnergyStream, setEnergyStream, setFlowValveController, setMinimumFlow, setPressure, setRegulatorOutSignal, setSpecification, setTemperature, solvedMethods inherited from class SimulationBaseClass
getCalculateSteadyState, getCalculationIdentifier, getTime, increaseTime, isRunInSteps, setCalculateSteadyState, setCalculationIdentifier, setRunInSteps, setTimeMethods inherited from class NamedBaseClass
getName, getTagName, setName, setTagNameMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface NamedInterface
getName, getTagName, setName, setTagNameMethods inherited from interface ProcessEquipmentInterface
getExergyChange, getFluid, getRestCapacity, needRecalculationMethods inherited from interface SimulationInterface
getCalculateSteadyState, getCalculationIdentifier, getTime, increaseTime, isRunInSteps, run, run_step, run_step, runTransient, setCalculateSteadyState, setCalculationIdentifier, setRunInSteps, setTime, solvedMethods inherited from interface TwoPortInterface
getInletPressure, getInletStream, getInletTemperature, getInStream, getOutletPressure, getOutletStream, getOutletTemperature, getOutStream, setInletPressure, setInletStream, setInletTemperature, setOutletPressure, setOutletStream, setOutletTemperature
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
logger
static org.apache.logging.log4j.Logger logger -
diameter
private double diameter -
length
private double length -
inclination
private double inclination -
roughness
private double roughness -
wellheadPressure
private double wellheadPressure -
pressureDrop
private double pressureDrop -
correlationType
-
temperatureModel
-
surfaceTemperature
private double surfaceTemperature -
bottomholeTemperature
private double bottomholeTemperature -
geothermalGradient
private double geothermalGradient -
formationThermalConductivity
private double formationThermalConductivity -
overallHeatTransferCoefficient
private double overallHeatTransferCoefficient -
productionTime
private double productionTime -
numberOfSegments
private int numberOfSegments
-
-
Constructor Details
-
TubingPerformance
Constructor for TubingPerformance.- Parameters:
name- equipment name
-
TubingPerformance
Constructor with inlet stream.- Parameters:
name- equipment nameinletStream- inlet stream
-
-
Method Details
-
run
In this method all thermodynamic and unit operations will be calculated in a steady state calculation.
- Specified by:
runin interfaceSimulationInterface- Overrides:
runin classPipeline- Parameters:
id- UUID
-
calculatePressureDrop
Calculate pressure drop using selected correlation.- Parameters:
system- thermodynamic systemops- thermodynamic operations- Returns:
- pressure drop in bar
-
calculateBeggsBrill
Calculate pressure drop using Beggs-Brill correlation.- Parameters:
system- thermodynamic systemops- thermodynamic operations- Returns:
- pressure drop in bar
-
calculateBeggsBrillHoldup
private double calculateBeggsBrillHoldup(double lambdaL, double nFr, double angle) Calculate Beggs-Brill liquid holdup.- Parameters:
lambdaL- input liquid fractionnFr- Froude numberangle- inclination angle (degrees from horizontal)- Returns:
- liquid holdup
-
calculateHagedornBrown
Calculate pressure drop using Hagedorn-Brown correlation.- Parameters:
system- thermodynamic systemops- thermodynamic operations- Returns:
- pressure drop in bar
-
calculateHBHoldup
private double calculateHBHoldup(double vsL, double vsG, double rhoL, double rhoG, double muL, double d) Calculate Hagedorn-Brown holdup.- Parameters:
vsL- superficial liquid velocity (m/s)vsG- superficial gas velocity (m/s)rhoL- liquid density (kg/m³)rhoG- gas density (kg/m³)muL- liquid viscosity (Pa·s)d- pipe diameter (m)- Returns:
- liquid holdup fraction (dimensionless)
-
calculateGray
Calculate pressure drop using Gray correlation (gas wells).- Parameters:
system- thermodynamic systemops- thermodynamic operations- Returns:
- pressure drop in bar
-
calculateHasanKabir
Calculate pressure drop using Hasan-Kabir mechanistic model.- Parameters:
system- thermodynamic systemops- thermodynamic operations- Returns:
- pressure drop in bar
-
calculateDunsRos
Calculate pressure drop using Duns-Ros correlation.- Parameters:
system- thermodynamic systemops- thermodynamic operations- Returns:
- pressure drop in bar
-
calculateFrictionFactor
private double calculateFrictionFactor(double Re, double eps, double d) Calculate Darcy friction factor using Colebrook-White equation.- Parameters:
Re- Reynolds numbereps- absolute roughness (m)d- diameter (m)- Returns:
- Darcy friction factor
-
calculateOutletTemperature
private double calculateOutletTemperature(double inletTemp) Calculate outlet temperature based on selected model.- Parameters:
inletTemp- inlet temperature (°C)- Returns:
- outlet temperature (°C)
-
calculateTemperatureAtDepth
private double calculateTemperatureAtDepth(double depth) Calculate temperature at a given depth using selected model.- Parameters:
depth- depth from surface (m)- Returns:
- temperature at depth (°C)
-
calculateRameyTemperature
private double calculateRameyTemperature(double inletTemp) Calculate Ramey (1962) steady-state temperature.- Parameters:
inletTemp- inlet temperature (°C)- Returns:
- outlet temperature (°C)
-
calculateHKTemperature
private double calculateHKTemperature(double inletTemp) Calculate Hasan-Kabir energy balance temperature.- Parameters:
inletTemp- inlet temperature (°C)- Returns:
- outlet temperature (°C)
-
generateVLPCurve
public double[][] generateVLPCurve(double[] flowRates) Generate VLP curve (required BHP vs flow rate).- Parameters:
flowRates- array of flow rates to calculate (MSm³/day for gas)- Returns:
- 2D array: [0] = flow rates, [1] = required BHP
-
getDiameter
public double getDiameter()Get tubing inner diameter.- Returns:
- diameter in meters
-
setDiameter
public void setDiameter(double diameter) Set tubing inner diameter.- Parameters:
diameter- diameter in meters
-
getLength
public double getLength()Get tubing length.- Returns:
- length in meters
-
setLength
public void setLength(double length) Set tubing length (measured depth or TVD depending on use).- Parameters:
length- length in meters
-
getInclination
public double getInclination()Get inclination angle.- Returns:
- inclination in degrees from horizontal (90 = vertical)
-
setInclination
public void setInclination(double inclination) Set inclination angle.- Parameters:
inclination- degrees from horizontal (90 = vertical)
-
getRoughness
public double getRoughness()Get pipe roughness.- Returns:
- roughness in meters
-
setRoughness
public void setRoughness(double roughness) Set pipe roughness.- Parameters:
roughness- roughness in meters
-
getWellheadPressure
public double getWellheadPressure()Get wellhead pressure.- Returns:
- wellhead pressure in bara
-
setWellheadPressure
public void setWellheadPressure(double pressure) Set wellhead pressure for VLP calculations.- Parameters:
pressure- wellhead pressure in bara
-
getPressureDrop
public double getPressureDrop()Get calculated pressure drop.- Returns:
- pressure drop in bar
-
getCorrelationType
Get VLP correlation type.- Returns:
- correlation type
-
setCorrelationType
Set VLP correlation type.- Parameters:
correlationType- correlation to use
-
getTemperatureModel
Get temperature model.- Returns:
- temperature model
-
setTemperatureModel
Set temperature model.- Parameters:
temperatureModel- model to use
-
setSurfaceTemperature
public void setSurfaceTemperature(double temp) Set surface temperature.- Parameters:
temp- temperature in °C
-
setBottomholeTemperature
public void setBottomholeTemperature(double temp) Set bottomhole temperature.- Parameters:
temp- temperature in °C
-
setGeothermalGradient
public void setGeothermalGradient(double gradient) Set geothermal gradient.- Parameters:
gradient- gradient in °C/m
-
setFormationThermalConductivity
public void setFormationThermalConductivity(double k) Set formation thermal conductivity.- Parameters:
k- conductivity in W/m·K
-
setOverallHeatTransferCoefficient
public void setOverallHeatTransferCoefficient(double u) Set overall heat transfer coefficient.- Parameters:
u- coefficient in W/m²·K
-
setProductionTime
public void setProductionTime(double days) Set production time for Ramey model.- Parameters:
days- production time in days
-
setNumberOfSegments
public void setNumberOfSegments(int n) Set number of segments for numerical integration.- Parameters:
n- number of segments
-