Class TubingPerformance

All Implemented Interfaces:
Serializable, Runnable, PipeLineInterface, ProcessEquipmentInterface, TwoPortInterface, SimulationInterface, NamedInterface

public class TubingPerformance extends Pipeline
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:
  • 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

      private TubingPerformance.CorrelationType correlationType
    • temperatureModel

      private TubingPerformance.TemperatureModel 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

      public TubingPerformance(String name)
      Constructor for TubingPerformance.
      Parameters:
      name - equipment name
    • TubingPerformance

      public TubingPerformance(String name, StreamInterface inletStream)
      Constructor with inlet stream.
      Parameters:
      name - equipment name
      inletStream - inlet stream
  • Method Details

    • run

      public void run(UUID id)

      In this method all thermodynamic and unit operations will be calculated in a steady state calculation.

      Specified by:
      run in interface SimulationInterface
      Overrides:
      run in class Pipeline
      Parameters:
      id - UUID
    • calculatePressureDrop

      private double calculatePressureDrop(SystemInterface system, ThermodynamicOperations ops)
      Calculate pressure drop using selected correlation.
      Parameters:
      system - thermodynamic system
      ops - thermodynamic operations
      Returns:
      pressure drop in bar
    • calculateBeggsBrill

      private double calculateBeggsBrill(SystemInterface system, ThermodynamicOperations ops)
      Calculate pressure drop using Beggs-Brill correlation.
      Parameters:
      system - thermodynamic system
      ops - 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 fraction
      nFr - Froude number
      angle - inclination angle (degrees from horizontal)
      Returns:
      liquid holdup
    • calculateHagedornBrown

      private double calculateHagedornBrown(SystemInterface system, ThermodynamicOperations ops)
      Calculate pressure drop using Hagedorn-Brown correlation.
      Parameters:
      system - thermodynamic system
      ops - 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

      private double calculateGray(SystemInterface system, ThermodynamicOperations ops)
      Calculate pressure drop using Gray correlation (gas wells).
      Parameters:
      system - thermodynamic system
      ops - thermodynamic operations
      Returns:
      pressure drop in bar
    • calculateHasanKabir

      private double calculateHasanKabir(SystemInterface system, ThermodynamicOperations ops)
      Calculate pressure drop using Hasan-Kabir mechanistic model.
      Parameters:
      system - thermodynamic system
      ops - thermodynamic operations
      Returns:
      pressure drop in bar
    • calculateDunsRos

      private double calculateDunsRos(SystemInterface system, ThermodynamicOperations ops)
      Calculate pressure drop using Duns-Ros correlation.
      Parameters:
      system - thermodynamic system
      ops - 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 number
      eps - 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

      public TubingPerformance.CorrelationType getCorrelationType()
      Get VLP correlation type.
      Returns:
      correlation type
    • setCorrelationType

      public void setCorrelationType(TubingPerformance.CorrelationType correlationType)
      Set VLP correlation type.
      Parameters:
      correlationType - correlation to use
    • getTemperatureModel

      public TubingPerformance.TemperatureModel getTemperatureModel()
      Get temperature model.
      Returns:
      temperature model
    • setTemperatureModel

      public void setTemperatureModel(TubingPerformance.TemperatureModel temperatureModel)
      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