Class MultilayerThermalCalculator

java.lang.Object
neqsim.process.equipment.pipeline.MultilayerThermalCalculator
All Implemented Interfaces:
Serializable

public class MultilayerThermalCalculator extends Object implements Serializable
Multi-layer radial heat transfer calculator for pipeline thermal analysis.

Implements OLGA-style thermal model with these features:

  • Multiple concentric layers with different materials
  • Steady-state overall heat transfer coefficient (U-value) calculation
  • Transient heat transfer with thermal mass effects
  • Cooldown time estimation for shutdown scenarios
  • Inner and outer convective boundary conditions

The thermal resistance network approach is used:

T_fluid --- R_inner --- [ Layer 1 ] --- [ Layer 2 ] --- ... --- R_outer --- T_ambient

References:

  • Incropera & DeWitt "Fundamentals of Heat and Mass Transfer" - Chapter 3
  • Bai & Bai "Subsea Pipelines and Risers" - Thermal Design
  • DNV-RP-F110 "Global Buckling of Submarine Pipelines"
  • OLGA 7 User Manual - Heat Transfer Model
Version:
1.0
Author:
ASMF
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • layers

      private List<RadialThermalLayer> layers
      List of thermal layers from inside to outside.
    • innerHTC

      private double innerHTC
      Inner (fluid-side) heat transfer coefficient [W/(m²·K)].
    • outerHTC

      private double outerHTC
      Outer (ambient-side) heat transfer coefficient [W/(m²·K)].
    • innerRadius

      private double innerRadius
      Inner radius (pipe bore) [m].
    • fluidTemperature

      private double fluidTemperature
      Fluid temperature [K].
    • ambientTemperature

      private double ambientTemperature
      Ambient temperature [K].
    • enableThermalMass

      private boolean enableThermalMass
      Enable transient thermal mass effects.
    • overallUValue

      private double overallUValue
      Cached overall U-value based on inner surface [W/(m²·K)].
    • uValueDirty

      private boolean uValueDirty
      Flag indicating if U-value needs recalculation.
  • Constructor Details

    • MultilayerThermalCalculator

      public MultilayerThermalCalculator()
      Default constructor.
    • MultilayerThermalCalculator

      public MultilayerThermalCalculator(double innerRadius)
      Construct with pipe inner radius.
      Parameters:
      innerRadius - Pipe inner radius in meters
  • Method Details

    • addLayer

      public RadialThermalLayer addLayer(double thickness, RadialThermalLayer.MaterialType material)
      Add a thermal layer to the outside of existing layers.

      Layers must be added from inside to outside. The inner radius of the new layer will be automatically set to match the outer radius of the previous layer.

      Parameters:
      thickness - Layer thickness [m]
      material - Material type preset
      Returns:
      The created layer for further customization
    • addCustomLayer

      public RadialThermalLayer addCustomLayer(String name, double thickness, double thermalConductivity, double density, double specificHeat)
      Add a custom thermal layer.
      Parameters:
      name - Layer identifier
      thickness - Layer thickness [m]
      thermalConductivity - Thermal conductivity [W/(m·K)]
      density - Density [kg/m³]
      specificHeat - Specific heat [J/(kg·K)]
      Returns:
      The created layer
    • createSubseaPipeConfig

      public void createSubseaPipeConfig(double pipeInnerDiameter, double wallThickness, double insulationThickness, double concreteThickness, RadialThermalLayer.MaterialType insulationMaterial)
      Create a standard subsea pipeline thermal configuration.

      Typical layers:

      1. Steel wall
      2. FBE corrosion coating
      3. Insulation (if specified)
      4. Concrete weight coating (if specified)
      Parameters:
      pipeInnerDiameter - Pipe inner diameter [m]
      wallThickness - Steel wall thickness [m]
      insulationThickness - Insulation thickness [m] (0 for uninsulated)
      concreteThickness - Concrete coating thickness [m] (0 for none)
      insulationMaterial - Type of insulation material
    • createBareSubseaPipe

      public void createBareSubseaPipe(double pipeInnerDiameter, double wallThickness)
      Create a typical uninsulated subsea pipe.
      Parameters:
      pipeInnerDiameter - Pipe inner diameter [m]
      wallThickness - Steel wall thickness [m]
    • createInsulatedSubseaPipe

      public void createInsulatedSubseaPipe(double pipeInnerDiameter, double wallThickness, double insulationThickness)
      Create a typical insulated subsea pipe with PU foam.
      Parameters:
      pipeInnerDiameter - Pipe inner diameter [m]
      wallThickness - Steel wall thickness [m]
      insulationThickness - Insulation thickness [m]
    • createBuriedOnshorePipe

      public void createBuriedOnshorePipe(double pipeInnerDiameter, double wallThickness, double burialDepth, RadialThermalLayer.MaterialType soilType)
      Create a buried onshore pipe configuration.
      Parameters:
      pipeInnerDiameter - Pipe inner diameter [m]
      wallThickness - Steel wall thickness [m]
      burialDepth - Depth of cover [m]
      soilType - Wet or dry soil
    • calculateEquivalentSoilThickness

      private double calculateEquivalentSoilThickness(double pipeOuterRadius, double burialDepth)
      Calculate equivalent soil thickness for buried pipe thermal model.

      Uses Carslaw & Jaeger solution for isothermal cylinder below isothermal surface.

      Parameters:
      pipeOuterRadius - Pipe outer radius [m]
      burialDepth - Depth to pipe centerline [m]
      Returns:
      Equivalent soil layer thickness [m]
    • getOuterRadius

      public double getOuterRadius()
      Get the current outer radius (including all layers).
      Returns:
      Outer radius in meters
    • calculateTotalThermalResistance

      public double calculateTotalThermalResistance()
      Calculate total thermal resistance per unit length.

      R_total = R_inner + sum(R_layers) + R_outer where:

      • R_inner = 1 / (h_i * 2 * π * r_i)
      • R_layer = ln(r_o/r_i) / (2 * π * k)
      • R_outer = 1 / (h_o * 2 * π * r_o)
      Returns:
      Total thermal resistance in (m·K)/W per unit length
    • calculateOverallUValue

      public double calculateOverallUValue()
      Calculate overall heat transfer coefficient (U-value) based on inner surface area.

      U_i = 1 / (A_i * R_total) = 1 / (2 * π * r_i * R_total)

      Returns:
      U-value in W/(m²·K)
    • calculateHeatLossPerLength

      public double calculateHeatLossPerLength()
      Calculate heat loss per unit length.
      Returns:
      Heat loss in W/m (positive = heat leaving fluid)
    • calculateInterfaceTemperature

      public double calculateInterfaceTemperature(int layerIndex, boolean atOuterSurface)
      Calculate steady-state temperature at the interface between two layers.
      Parameters:
      layerIndex - Layer index (0 = first layer after fluid)
      atOuterSurface - True for outer surface, false for inner
      Returns:
      Temperature in Kelvin
    • initializeLayerTemperatures

      public void initializeLayerTemperatures(double temperature)
      Initialize all layers to a specified temperature.
      Parameters:
      temperature - Initial temperature in Kelvin
    • initializeLayerTemperaturesLinear

      public void initializeLayerTemperaturesLinear()
      Initialize layer temperatures with linear interpolation between fluid and ambient.
    • updateTransient

      public void updateTransient(double dt)
      Perform transient thermal calculation for one time step.

      Uses explicit finite difference scheme for each layer. The heat balance for each layer is:

      m * Cp * dT/dt = Q_in - Q_out
      
      Parameters:
      dt - Time step in seconds
    • calculateCooldownTime

      public double calculateCooldownTime(double targetTemperature)
      Calculate cooldown time from current state to a target temperature.

      Estimates time for pipe wall (first layer) to cool to target, assuming no flow. Uses lumped capacitance approximation.

      Parameters:
      targetTemperature - Target temperature in Kelvin
      Returns:
      Estimated cooldown time in hours
    • calculateHydrateCooldownTime

      public double calculateHydrateCooldownTime(double hydrateTemperature)
      Calculate cooldown time to hydrate formation temperature.
      Parameters:
      hydrateTemperature - Hydrate formation temperature in Kelvin
      Returns:
      Time to reach hydrate temperature in hours
    • getTotalThermalMass

      public double getTotalThermalMass()
      Get total thermal mass per unit length of all layers.
      Returns:
      Thermal mass in J/(K·m)
    • getTotalMassPerLength

      public double getTotalMassPerLength()
      Get total mass per unit length of all layers.
      Returns:
      Mass in kg/m
    • getLayers

      public List<RadialThermalLayer> getLayers()
      Get the list of thermal layers.
      Returns:
      Unmodifiable list of layers
    • getNumberOfLayers

      public int getNumberOfLayers()
      Get number of layers.
      Returns:
      Number of thermal layers
    • clearLayers

      public void clearLayers()
      Clear all layers.
    • getInnerHTC

      public double getInnerHTC()
      Get inner heat transfer coefficient.
      Returns:
      h_inner in W/(m²·K)
    • setInnerHTC

      public void setInnerHTC(double htc)
      Set inner (fluid-side) heat transfer coefficient.

      Typical values:

      • Gas (low pressure): 20-50 W/(m²·K)
      • Gas (high pressure): 100-300 W/(m²·K)
      • Oil: 100-500 W/(m²·K)
      • Water: 500-10000 W/(m²·K)
      • Two-phase: 500-5000 W/(m²·K)
      Parameters:
      htc - Heat transfer coefficient in W/(m²·K)
    • getOuterHTC

      public double getOuterHTC()
      Get outer heat transfer coefficient.
      Returns:
      h_outer in W/(m²·K)
    • setOuterHTC

      public void setOuterHTC(double htc)
      Set outer (ambient-side) heat transfer coefficient.

      Typical values:

      • Still air: 5-10 W/(m²·K)
      • Forced air/wind: 25-100 W/(m²·K)
      • Still water: 50-100 W/(m²·K)
      • Flowing water/current: 100-500 W/(m²·K)
      • Buried (soil contact): Modeled as conduction layer
      Parameters:
      htc - Heat transfer coefficient in W/(m²·K)
    • getInnerRadius

      public double getInnerRadius()
      Get inner radius.
      Returns:
      Inner radius in meters
    • setInnerRadius

      public void setInnerRadius(double radius)
      Set inner radius (pipe bore).
      Parameters:
      radius - Inner radius in meters
    • getFluidTemperature

      public double getFluidTemperature()
      Get fluid temperature.
      Returns:
      Temperature in Kelvin
    • setFluidTemperature

      public void setFluidTemperature(double temperature)
      Set fluid temperature.
      Parameters:
      temperature - Temperature in Kelvin
    • getAmbientTemperature

      public double getAmbientTemperature()
      Get ambient temperature.
      Returns:
      Temperature in Kelvin
    • setAmbientTemperature

      public void setAmbientTemperature(double temperature)
      Set ambient temperature.
      Parameters:
      temperature - Temperature in Kelvin
    • isEnableThermalMass

      public boolean isEnableThermalMass()
      Check if thermal mass effects are enabled.
      Returns:
      True if transient thermal mass is considered
    • setEnableThermalMass

      public void setEnableThermalMass(boolean enable)
      Enable or disable thermal mass effects.
      Parameters:
      enable - True to enable transient thermal mass calculations
    • calculateInnerHTCDittusBoelter

      public double calculateInnerHTCDittusBoelter(double velocity, double density, double viscosity, double thermalConductivity, double prandtl, boolean isHeating)
      Calculate inner heat transfer coefficient using Dittus-Boelter correlation.

      Nu = 0.023 * Re^0.8 * Pr^n where n = 0.4 for heating, 0.3 for cooling h = Nu * k / D

      Parameters:
      velocity - Fluid velocity [m/s]
      density - Fluid density [kg/m³]
      viscosity - Dynamic viscosity [Pa·s]
      thermalConductivity - Fluid thermal conductivity [W/(m·K)]
      prandtl - Prandtl number
      isHeating - True if fluid is being heated, false if cooled
      Returns:
      Heat transfer coefficient in W/(m²·K)
    • getSummary

      public String getSummary()
      Get a summary string of the thermal configuration.
      Returns:
      Multi-line summary
    • toString

      public String toString()
      Overrides:
      toString in class Object