Class MultilayerThermalCalculator
- All Implemented Interfaces:
Serializable
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 Summary
FieldsModifier and TypeFieldDescriptionprivate doubleAmbient temperature [K].private booleanEnable transient thermal mass effects.private doubleFluid temperature [K].private doubleInner (fluid-side) heat transfer coefficient [W/(m²·K)].private doubleInner radius (pipe bore) [m].private List<RadialThermalLayer> List of thermal layers from inside to outside.private doubleOuter (ambient-side) heat transfer coefficient [W/(m²·K)].private doubleCached overall U-value based on inner surface [W/(m²·K)].private static final longprivate booleanFlag indicating if U-value needs recalculation. -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.MultilayerThermalCalculator(double innerRadius) Construct with pipe inner radius. -
Method Summary
Modifier and TypeMethodDescriptionaddCustomLayer(String name, double thickness, double thermalConductivity, double density, double specificHeat) Add a custom thermal layer.addLayer(double thickness, RadialThermalLayer.MaterialType material) Add a thermal layer to the outside of existing layers.doublecalculateCooldownTime(double targetTemperature) Calculate cooldown time from current state to a target temperature.private doublecalculateEquivalentSoilThickness(double pipeOuterRadius, double burialDepth) Calculate equivalent soil thickness for buried pipe thermal model.doubleCalculate heat loss per unit length.doublecalculateHydrateCooldownTime(double hydrateTemperature) Calculate cooldown time to hydrate formation temperature.doublecalculateInnerHTCDittusBoelter(double velocity, double density, double viscosity, double thermalConductivity, double prandtl, boolean isHeating) Calculate inner heat transfer coefficient using Dittus-Boelter correlation.doublecalculateInterfaceTemperature(int layerIndex, boolean atOuterSurface) Calculate steady-state temperature at the interface between two layers.doubleCalculate overall heat transfer coefficient (U-value) based on inner surface area.doubleCalculate total thermal resistance per unit length.voidClear all layers.voidcreateBareSubseaPipe(double pipeInnerDiameter, double wallThickness) Create a typical uninsulated subsea pipe.voidcreateBuriedOnshorePipe(double pipeInnerDiameter, double wallThickness, double burialDepth, RadialThermalLayer.MaterialType soilType) Create a buried onshore pipe configuration.voidcreateInsulatedSubseaPipe(double pipeInnerDiameter, double wallThickness, double insulationThickness) Create a typical insulated subsea pipe with PU foam.voidcreateSubseaPipeConfig(double pipeInnerDiameter, double wallThickness, double insulationThickness, double concreteThickness, RadialThermalLayer.MaterialType insulationMaterial) Create a standard subsea pipeline thermal configuration.doubleGet ambient temperature.doubleGet fluid temperature.doubleGet inner heat transfer coefficient.doubleGet inner radius.Get the list of thermal layers.intGet number of layers.doubleGet outer heat transfer coefficient.doubleGet the current outer radius (including all layers).Get a summary string of the thermal configuration.doubleGet total mass per unit length of all layers.doubleGet total thermal mass per unit length of all layers.voidinitializeLayerTemperatures(double temperature) Initialize all layers to a specified temperature.voidInitialize layer temperatures with linear interpolation between fluid and ambient.booleanCheck if thermal mass effects are enabled.voidsetAmbientTemperature(double temperature) Set ambient temperature.voidsetEnableThermalMass(boolean enable) Enable or disable thermal mass effects.voidsetFluidTemperature(double temperature) Set fluid temperature.voidsetInnerHTC(double htc) Set inner (fluid-side) heat transfer coefficient.voidsetInnerRadius(double radius) Set inner radius (pipe bore).voidsetOuterHTC(double htc) Set outer (ambient-side) heat transfer coefficient.toString()voidupdateTransient(double dt) Perform transient thermal calculation for one time step.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
layers
List of thermal layers from inside to outside. -
innerHTC
private double innerHTCInner (fluid-side) heat transfer coefficient [W/(m²·K)]. -
outerHTC
private double outerHTCOuter (ambient-side) heat transfer coefficient [W/(m²·K)]. -
innerRadius
private double innerRadiusInner radius (pipe bore) [m]. -
fluidTemperature
private double fluidTemperatureFluid temperature [K]. -
ambientTemperature
private double ambientTemperatureAmbient temperature [K]. -
enableThermalMass
private boolean enableThermalMassEnable transient thermal mass effects. -
overallUValue
private double overallUValueCached overall U-value based on inner surface [W/(m²·K)]. -
uValueDirty
private boolean uValueDirtyFlag 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
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 identifierthickness- 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:
- Steel wall
- FBE corrosion coating
- Insulation (if specified)
- 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
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 numberisHeating- True if fluid is being heated, false if cooled- Returns:
- Heat transfer coefficient in W/(m²·K)
-
getSummary
Get a summary string of the thermal configuration.- Returns:
- Multi-line summary
-
toString
-