Class PipeMechanicalDesignCalculator

java.lang.Object
neqsim.process.mechanicaldesign.pipeline.PipeMechanicalDesignCalculator
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
RiserMechanicalDesignCalculator, TopsidePipingMechanicalDesignCalculator

public class PipeMechanicalDesignCalculator extends Object implements Serializable
Calculator for pipeline mechanical design based on industry standards.

This class provides methods to calculate wall thickness, pressure ratings, and stress analysis according to various pipeline design codes including:

  • ASME B31.3 - Process Piping
  • ASME B31.4 - Pipeline Transportation of Liquids
  • ASME B31.8 - Gas Transmission and Distribution
  • DNV-OS-F101 - Submarine Pipeline Systems
  • API 5L - Line Pipe Specifications

Usage Example

PipeMechanicalDesignCalculator calc = new PipeMechanicalDesignCalculator();
calc.setDesignPressure(150.0); // bara
calc.setDesignTemperature(80.0); // Celsius
calc.setOuterDiameter(0.508); // 20 inch
calc.setMaterialGrade("X65");
calc.setDesignCode("ASME_B31_8");
calc.setLocationClass(2);

double wallThickness = calc.calculateMinimumWallThickness();
double maop = calc.calculateMAOP();
Version:
1.0
Author:
Even Solbraa
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Serialization version UID.
      See Also:
    • ASME_B31_3

      public static final String ASME_B31_3
      ASME B31.3 - Process Piping.
      See Also:
    • ASME_B31_4

      public static final String ASME_B31_4
      ASME B31.4 - Liquid Transportation.
      See Also:
    • ASME_B31_8

      public static final String ASME_B31_8
      ASME B31.8 - Gas Transmission.
      See Also:
    • DNV_OS_F101

      public static final String DNV_OS_F101
      DNV-OS-F101 - Submarine Pipelines.
      See Also:
    • designPressure

      private double designPressure
      Design pressure in MPa.
    • designTemperature

      private double designTemperature
      Design temperature in Celsius.
    • outerDiameter

      private double outerDiameter
      Pipe outer diameter in meters.
    • innerDiameter

      private double innerDiameter
      Pipe inner diameter in meters (calculated).
    • nominalWallThickness

      private double nominalWallThickness
      Nominal wall thickness in meters.
    • corrosionAllowance

      private double corrosionAllowance
      Corrosion allowance in meters.
    • fabricationTolerance

      private double fabricationTolerance
      Fabrication tolerance factor (typically 0.875 for seamless).
    • materialGrade

      private String materialGrade
      Material grade (e.g., "X52", "X65", "X70").
    • smys

      private double smys
      Specified Minimum Yield Strength in MPa.
    • smts

      private double smts
      Specified Minimum Tensile Strength in MPa.
    • youngsModulus

      private double youngsModulus
      Young's modulus in MPa.
    • poissonsRatio

      private double poissonsRatio
      Poisson's ratio.
    • thermalExpansion

      private double thermalExpansion
      Thermal expansion coefficient in 1/K.
    • designCode

      private String designCode
      Design code to use.
    • locationClass

      private int locationClass
      Location class (1-4 for ASME B31.8).
    • designFactor

      private double designFactor
      Design factor (F).
    • jointFactor

      private double jointFactor
      Longitudinal joint factor (E).
    • temperatureDerating

      private double temperatureDerating
      Temperature derating factor (T).
    • weldJointEfficiency

      private double weldJointEfficiency
      Weld joint efficiency.
    • pipelineLength

      private double pipelineLength
      Pipeline length in meters.
    • steelDensity

      private double steelDensity
      Steel density in kg/m3.
    • numberOfJoints

      private int numberOfJoints
      Number of pipe joints (12m standard length).
    • numberOfFieldWelds

      private int numberOfFieldWelds
      Number of field welds.
    • coatingType

      private String coatingType
      External coating type (e.g., "3LPE", "FBE", "CTE").
    • coatingThickness

      private double coatingThickness
      External coating thickness in meters.
    • coatingDensity

      private double coatingDensity
      Coating density in kg/m3.
    • insulationType

      private String insulationType
      Insulation type (e.g., "PUF", "mineral wool", "none").
    • insulationThickness

      private double insulationThickness
      Insulation thickness in meters.
    • insulationDensity

      private double insulationDensity
      Insulation density in kg/m3.
    • insulationConductivity

      private double insulationConductivity
      Insulation thermal conductivity in W/(m·K).
    • concreteCoatingThickness

      private double concreteCoatingThickness
      Concrete weight coating thickness in meters.
    • concreteDensity

      private double concreteDensity
      Concrete density in kg/m3.
    • requiredNegativeBuoyancy

      private double requiredNegativeBuoyancy
      Required negative buoyancy in N/m.
    • installationMethod

      private String installationMethod
      Installation method (e.g., "S-lay", "J-lay", "Reel-lay", "Onshore").
    • waterDepth

      private double waterDepth
      Water depth in meters.
    • burialDepth

      private double burialDepth
      Burial depth in meters.
    • ambientTemperature

      private double ambientTemperature
      Ambient temperature in Celsius.
    • seawaterDensity

      private double seawaterDensity
      Seawater density in kg/m3.
    • supportSpacing

      private double supportSpacing
      Pipe support spacing in meters.
    • numberOfSupports

      private int numberOfSupports
      Number of pipe supports.
    • expansionLoopLength

      private double expansionLoopLength
      Expansion loop length in meters.
    • numberOfExpansionLoops

      private int numberOfExpansionLoops
      Number of expansion loops required.
    • anchorSpacing

      private double anchorSpacing
      Anchor spacing in meters.
    • numberOfAnchors

      private int numberOfAnchors
      Number of anchors.
    • flangeClass

      private int flangeClass
      Flange class per ASME B16.5.
    • numberOfFlangePairs

      private int numberOfFlangePairs
      Number of flange pairs.
    • numberOfValves

      private int numberOfValves
      Number of valves.
    • valveType

      private String valveType
      Valve type (e.g., "Ball", "Gate", "Check").
    • minimumWallThickness

      private double minimumWallThickness
      Calculated minimum wall thickness in meters.
    • maop

      private double maop
      Maximum Allowable Operating Pressure in MPa.
    • hoopStress

      private double hoopStress
      Calculated hoop stress in MPa.
    • longitudinalStress

      private double longitudinalStress
      Calculated longitudinal stress in MPa.
    • vonMisesStress

      private double vonMisesStress
      Calculated von Mises stress in MPa.
    • externalPressure

      private double externalPressure
      External pressure at seabed in MPa.
    • collapsePressure

      private double collapsePressure
      Collapse pressure in MPa.
    • propagationBucklingPressure

      private double propagationBucklingPressure
      Propagation buckling pressure in MPa.
    • upheavalBucklingForce

      private double upheavalBucklingForce
      Upheaval buckling force in N.
    • lateralBucklingForce

      private double lateralBucklingForce
      Lateral buckling force in N.
    • allowableSpanLength

      private double allowableSpanLength
      Span length for free spans in meters.
    • fatigueLife

      private double fatigueLife
      Fatigue life in years.
    • minimumBendRadius

      private double minimumBendRadius
      Bending radius for field bends in meters.
    • steelWeightPerMeter

      private double steelWeightPerMeter
      Pipe steel weight per meter in kg/m.
    • coatingWeightPerMeter

      private double coatingWeightPerMeter
      Coating weight per meter in kg/m.
    • insulationWeightPerMeter

      private double insulationWeightPerMeter
      Insulation weight per meter in kg/m.
    • concreteWeightPerMeter

      private double concreteWeightPerMeter
      Concrete weight per meter in kg/m.
    • totalDryWeightPerMeter

      private double totalDryWeightPerMeter
      Total dry weight per meter in kg/m.
    • contentWeightPerMeter

      private double contentWeightPerMeter
      Content weight per meter in kg/m.
    • submergedWeightPerMeter

      private double submergedWeightPerMeter
      Submerged weight per meter in kg/m (negative = buoyant).
    • totalPipelineWeight

      private double totalPipelineWeight
      Total pipeline dry weight in kg.
    • externalSurfaceAreaPerMeter

      private double externalSurfaceAreaPerMeter
      External surface area per meter in m2/m.
    • internalSurfaceAreaPerMeter

      private double internalSurfaceAreaPerMeter
      Internal surface area per meter in m2/m.
    • totalExternalSurfaceArea

      private double totalExternalSurfaceArea
      Total external surface area in m2.
    • steelPricePerKg

      private double steelPricePerKg
      Steel price in USD/kg.
    • coatingPricePerM2

      private double coatingPricePerM2
      Coating price in USD/m2.
    • insulationPricePerM3

      private double insulationPricePerM3
      Insulation price in USD/m3.
    • concretePricePerM3

      private double concretePricePerM3
      Concrete price in USD/m3.
    • fieldWeldCost

      private double fieldWeldCost
      Field weld cost in USD per weld.
    • flangePairCost

      private double flangePairCost
      Flange pair cost in USD.
    • valveCost

      private double valveCost
      Valve cost in USD.
    • supportCost

      private double supportCost
      Support cost in USD each.
    • anchorCost

      private double anchorCost
      Anchor cost in USD each.
    • installationCostPerMeter

      private double installationCostPerMeter
      Installation cost in USD/m (varies by method).
    • testingCostPercentage

      private double testingCostPercentage
      Testing and commissioning cost percentage.
    • engineeringCostPercentage

      private double engineeringCostPercentage
      Engineering and design cost percentage.
    • contingencyPercentage

      private double contingencyPercentage
      Contingency percentage.
    • steelMaterialCost

      private double steelMaterialCost
      Steel material cost in USD.
    • coatingCost

      private double coatingCost
      Coating cost in USD.
    • insulationCost

      private double insulationCost
      Insulation cost in USD.
    • concreteCost

      private double concreteCost
      Concrete coating cost in USD.
    • weldingCost

      private double weldingCost
      Welding cost in USD.
    • flangesAndFittingsCost

      private double flangesAndFittingsCost
      Flanges and fittings cost in USD.
    • valvesCost

      private double valvesCost
      Valves cost in USD.
    • supportsAndAnchorsCost

      private double supportsAndAnchorsCost
      Supports and anchors cost in USD.
    • installationCost

      private double installationCost
      Installation cost in USD.
    • totalDirectCost

      private double totalDirectCost
      Total direct cost in USD.
    • engineeringCost

      private double engineeringCost
      Engineering cost in USD.
    • testingCost

      private double testingCost
      Testing cost in USD.
    • contingencyCost

      private double contingencyCost
      Contingency cost in USD.
    • totalProjectCost

      private double totalProjectCost
      Total project cost in USD.
    • weldingManhoursPerJoint

      private double weldingManhoursPerJoint
      Welding manhours per joint.
    • installationManhoursPerMeter

      private double installationManhoursPerMeter
      Installation manhours per meter.
    • totalLaborManhours

      private double totalLaborManhours
      Total labor manhours.
    • API_5L_GRADES

      private static final Map<String,double[]> API_5L_GRADES
      Map of API 5L material grades to SMYS (MPa).
    • STANDARD_PIPE_SIZES

      private static final Map<String,Double> STANDARD_PIPE_SIZES
      Map of nominal pipe sizes to OD in meters (API 5L / ASME B36.10).
    • FLANGE_CLASS_RATINGS

      private static final Map<Integer,Double> FLANGE_CLASS_RATINGS
      Map of ASME B16.5 flange pressure-temperature ratings at 38°C in MPa.
    • STANDARD_JOINT_LENGTH

      private static final double STANDARD_JOINT_LENGTH
      Standard pipe joint length in meters.
      See Also:
  • Constructor Details

    • PipeMechanicalDesignCalculator

      public PipeMechanicalDesignCalculator()
      Default constructor.
    • PipeMechanicalDesignCalculator

      public PipeMechanicalDesignCalculator(double outerDiameter, double designPressure, double designTemperature)
      Constructor with basic parameters.
      Parameters:
      outerDiameter - pipe outer diameter in meters
      designPressure - design pressure in MPa
      designTemperature - design temperature in Celsius
  • Method Details

    • calculateMinimumWallThickness

      public double calculateMinimumWallThickness()
      Calculate minimum required wall thickness based on selected design code.
      Returns:
      minimum wall thickness in meters
    • calculateMAOP

      public double calculateMAOP()
      Calculate Maximum Allowable Operating Pressure (MAOP).
      Returns:
      MAOP in MPa
    • calculateTestPressure

      public double calculateTestPressure()
      Calculate test pressure for hydrostatic testing.
      Returns:
      test pressure in MPa
    • calculateHoopStress

      public double calculateHoopStress(double pressure)
      Calculate hoop (circumferential) stress.

      Uses the Barlow formula for thin-walled cylinders: σh = P × D / (2 × t)

      Parameters:
      pressure - internal pressure in MPa
      Returns:
      hoop stress in MPa
    • calculateLongitudinalStress

      public double calculateLongitudinalStress(double pressure, double deltaT, boolean restrained)
      Calculate longitudinal (axial) stress.

      For restrained pipe: σL = ν × σh - E × α × ΔT + P × D / (4 × t)

      Parameters:
      pressure - internal pressure in MPa
      deltaT - temperature change from installation in Celsius
      restrained - true if pipe is restrained (buried or anchored)
      Returns:
      longitudinal stress in MPa
    • calculateVonMisesStress

      public double calculateVonMisesStress(double pressure, double deltaT, boolean restrained)
      Calculate von Mises equivalent stress.

      σvm = √(σh² + σL² - σh × σL + 3τ²)

      Parameters:
      pressure - internal pressure in MPa
      deltaT - temperature change from installation in Celsius
      restrained - true if pipe is restrained
      Returns:
      von Mises stress in MPa
    • isDesignSafe

      public boolean isDesignSafe()
      Check if design is within allowable stress limits.
      Returns:
      true if von Mises stress is within 90% of SMYS
    • calculateSafetyMargin

      public double calculateSafetyMargin()
      Calculate safety margin as percentage of SMYS.
      Returns:
      safety margin (e.g., 0.2 means 20% margin)
    • calculateWeightsAndAreas

      public void calculateWeightsAndAreas()
      Calculate all weight and surface area values.

      This method calculates steel weight, coating weight, insulation weight, concrete weight, surface areas, and buoyancy for subsea applications.

    • calculateSubmergedWeight

      public double calculateSubmergedWeight(double contentDensity)
      Calculate submerged weight for subsea pipelines.
      Parameters:
      contentDensity - density of pipe contents in kg/m3
      Returns:
      submerged weight per meter in kg/m (negative = buoyant)
    • calculateRequiredConcreteThickness

      public double calculateRequiredConcreteThickness(double contentDensity, double targetSubmergedWeight)
      Calculate required concrete coating thickness for on-bottom stability.
      Parameters:
      contentDensity - density of pipe contents in kg/m3
      targetSubmergedWeight - target submerged weight in kg/m
      Returns:
      required concrete coating thickness in meters
    • calculateJointsAndWelds

      public void calculateJointsAndWelds()
      Calculate number of pipe joints and welds.
    • calculateSupportSpacing

      public double calculateSupportSpacing(double maxDeflection)
      Calculate pipe support spacing for above-ground pipelines.

      Based on beam deflection limits and stress criteria per ASME B31.3.

      Parameters:
      maxDeflection - maximum allowable deflection in meters
      Returns:
      recommended support spacing in meters
    • calculateExpansionLoopLength

      public double calculateExpansionLoopLength(double deltaT, String loopType)
      Calculate expansion loop length for thermal expansion.
      Parameters:
      deltaT - temperature change from installation in Celsius
      loopType - "U-loop", "Z-loop", or "L-loop"
      Returns:
      required loop leg length in meters
    • calculateMinimumBendRadius

      public double calculateMinimumBendRadius()
      Calculate minimum bend radius for field bends.
      Returns:
      minimum bend radius in meters
    • selectFlangeClass

      public int selectFlangeClass()
      Select appropriate flange class based on design conditions.
      Returns:
      selected flange class per ASME B16.5
    • calculateExternalPressure

      public double calculateExternalPressure()
      Calculate external pressure at seabed.
      Returns:
      external pressure in MPa
    • calculateCollapsePressure

      public double calculateCollapsePressure()
      Calculate collapse pressure per DNV-OS-F101.

      Uses the elastic-plastic collapse formula for combined external pressure and bending.

      Returns:
      collapse pressure in MPa
    • calculatePropagationBucklingPressure

      public double calculatePropagationBucklingPressure()
      Calculate propagation buckling pressure.
      Returns:
      propagation buckling pressure in MPa
    • calculateAllowableSpanLength

      public double calculateAllowableSpanLength(double currentVelocity)
      Calculate allowable free span length for subsea pipelines.
      Parameters:
      currentVelocity - current velocity in m/s
      Returns:
      maximum allowable span length in meters
    • estimateFatigueLife

      public double estimateFatigueLife(double stressRange, double numberOfCycles)
      Estimate fatigue life based on DNV-RP-C203.
      Parameters:
      stressRange - stress range per cycle in MPa
      numberOfCycles - expected number of cycles per year
      Returns:
      estimated fatigue life in years
    • calculateInsulationThickness

      public double calculateInsulationThickness(double inletTemperature, double minArrivalTemperature, double massFlowRate, double specificHeat)
      Calculate insulation thickness for heat loss control.
      Parameters:
      inletTemperature - fluid inlet temperature in Celsius
      minArrivalTemperature - minimum arrival temperature in Celsius
      massFlowRate - mass flow rate in kg/s
      specificHeat - fluid specific heat in J/(kg·K)
      Returns:
      required insulation thickness in meters
    • calculateProjectCost

      public double calculateProjectCost()
      Calculate complete project cost estimate.

      This method calculates all cost components including materials, fabrication, installation, engineering, testing, and contingency.

      Returns:
      total project cost in USD
    • updateInstallationCostPerMeter

      private void updateInstallationCostPerMeter()
      Update installation cost per meter based on installation method.
    • calculateLaborManhours

      public double calculateLaborManhours()
      Calculate labor manhours estimate.
      Returns:
      total labor manhours
    • selectStandardPipeSize

      public String selectStandardPipeSize()
      Select standard nominal pipe size.
      Returns:
      standard NPS size string
    • generateBillOfMaterials

      public List<Map<String,Object>> generateBillOfMaterials()
      Generate Bill of Materials (BOM).
      Returns:
      list of BOM items as maps
    • calculateWallThicknessASMEB318

      private double calculateWallThicknessASMEB318()
      Calculate wall thickness per ASME B31.8 (Gas Transmission).

      t = P × D / (2 × S × F × E × T)

      Returns:
      minimum wall thickness in meters
    • calculateWallThicknessASMEB314

      private double calculateWallThicknessASMEB314()
      Calculate wall thickness per ASME B31.4 (Liquid Transportation).

      Same formula as B31.8 but different design factors.

      Returns:
      minimum wall thickness in meters
    • calculateWallThicknessASMEB313

      private double calculateWallThicknessASMEB313()
      Calculate wall thickness per ASME B31.3 (Process Piping).

      t = P × D / (2 × (S × E + P × Y))

      Returns:
      minimum wall thickness in meters
    • calculateWallThicknessDNV

      private double calculateWallThicknessDNV()
      Calculate wall thickness per DNV-OS-F101 (Submarine Pipelines).

      Uses characteristic material properties with safety factors.

      Returns:
      minimum wall thickness in meters
    • calculateWallThicknessBarlow

      private double calculateWallThicknessBarlow(double safetyFactor)
      Calculate wall thickness using basic Barlow formula.
      Parameters:
      safetyFactor - safety factor to apply
      Returns:
      minimum wall thickness in meters
    • updateMaterialProperties

      private void updateMaterialProperties()
      Update material properties based on material grade.
    • updateDesignFactors

      private void updateDesignFactors()
      Update design factors based on design code and location class.
    • generateDesignReport

      public String generateDesignReport()
      Generate a design summary report.
      Returns:
      formatted design summary string
    • getDesignPressure

      public double getDesignPressure()
      Get design pressure.
      Returns:
      design pressure in MPa
    • setDesignPressure

      public void setDesignPressure(double designPressure)
      Set design pressure.
      Parameters:
      designPressure - design pressure in MPa
    • setDesignPressure

      public void setDesignPressure(double pressure, String unit)
      Set design pressure with unit.
      Parameters:
      pressure - design pressure value
      unit - pressure unit ("MPa", "bar", "bara", "psi")
    • getDesignTemperature

      public double getDesignTemperature()
      Get design temperature.
      Returns:
      design temperature in Celsius
    • setDesignTemperature

      public void setDesignTemperature(double designTemperature)
      Set design temperature.
      Parameters:
      designTemperature - design temperature in Celsius
    • getOuterDiameter

      public double getOuterDiameter()
      Get outer diameter.
      Returns:
      outer diameter in meters
    • setOuterDiameter

      public void setOuterDiameter(double outerDiameter)
      Set outer diameter.
      Parameters:
      outerDiameter - outer diameter in meters
    • setOuterDiameter

      public void setOuterDiameter(double diameter, String unit)
      Set outer diameter with unit.
      Parameters:
      diameter - outer diameter value
      unit - diameter unit ("m", "mm", "inch", "in")
    • getInnerDiameter

      public double getInnerDiameter()
      Get inner diameter.
      Returns:
      inner diameter in meters
    • getNominalWallThickness

      public double getNominalWallThickness()
      Get nominal wall thickness.
      Returns:
      nominal wall thickness in meters
    • setNominalWallThickness

      public void setNominalWallThickness(double nominalWallThickness)
      Set nominal wall thickness.
      Parameters:
      nominalWallThickness - nominal wall thickness in meters
    • setNominalWallThickness

      public void setNominalWallThickness(double thickness, String unit)
      Set nominal wall thickness with unit.
      Parameters:
      thickness - wall thickness value
      unit - thickness unit ("m", "mm", "inch")
    • getCorrosionAllowance

      public double getCorrosionAllowance()
      Get corrosion allowance.
      Returns:
      corrosion allowance in meters
    • setCorrosionAllowance

      public void setCorrosionAllowance(double corrosionAllowance)
      Set corrosion allowance.
      Parameters:
      corrosionAllowance - corrosion allowance in meters
    • setCorrosionAllowance

      public void setCorrosionAllowance(double allowance, String unit)
      Set corrosion allowance with unit.
      Parameters:
      allowance - corrosion allowance value
      unit - unit ("m", "mm")
    • getFabricationTolerance

      public double getFabricationTolerance()
      Get fabrication tolerance factor.
      Returns:
      fabrication tolerance factor
    • setFabricationTolerance

      public void setFabricationTolerance(double fabricationTolerance)
      Set fabrication tolerance factor.
      Parameters:
      fabricationTolerance - fabrication tolerance factor (e.g., 0.875 for seamless pipe)
    • getMaterialGrade

      public String getMaterialGrade()
      Get material grade.
      Returns:
      material grade (e.g., "X65")
    • setMaterialGrade

      public void setMaterialGrade(String materialGrade)
      Set material grade per API 5L.
      Parameters:
      materialGrade - material grade (e.g., "X42", "X52", "X65", "X70", "X80")
    • getSmys

      public double getSmys()
      Get Specified Minimum Yield Strength (SMYS).
      Returns:
      SMYS in MPa
    • setSmys

      public void setSmys(double smys)
      Set Specified Minimum Yield Strength manually.
      Parameters:
      smys - SMYS in MPa
    • getSmts

      public double getSmts()
      Get Specified Minimum Tensile Strength (SMTS).
      Returns:
      SMTS in MPa
    • setSmts

      public void setSmts(double smts)
      Set Specified Minimum Tensile Strength manually.
      Parameters:
      smts - SMTS in MPa
    • getDesignCode

      public String getDesignCode()
      Get design code.
      Returns:
      design code string
    • setDesignCode

      public void setDesignCode(String designCode)
      Set design code.
      Parameters:
      designCode - design code (use constants like ASME_B31_8)
    • getLocationClass

      public int getLocationClass()
      Get location class.
      Returns:
      location class (1-4)
    • setLocationClass

      public void setLocationClass(int locationClass)
      Set location class for ASME B31.8.
      Parameters:
      locationClass - location class 1-4
    • getDesignFactor

      public double getDesignFactor()
      Get design factor.
      Returns:
      design factor
    • setDesignFactor

      public void setDesignFactor(double designFactor)
      Set design factor (overrides automatic calculation).
      Parameters:
      designFactor - design factor
    • getJointFactor

      public double getJointFactor()
      Get longitudinal joint factor.
      Returns:
      joint factor
    • setJointFactor

      public void setJointFactor(double jointFactor)
      Set longitudinal joint factor.
      Parameters:
      jointFactor - joint factor (1.0 for seamless, 0.85 for ERW)
    • getWeldJointEfficiency

      public double getWeldJointEfficiency()
      Get weld joint efficiency.
      Returns:
      weld joint efficiency
    • setWeldJointEfficiency

      public void setWeldJointEfficiency(double weldJointEfficiency)
      Set weld joint efficiency for B31.3.
      Parameters:
      weldJointEfficiency - weld joint efficiency (0-1)
    • getMinimumWallThickness

      public double getMinimumWallThickness()
      Get calculated minimum wall thickness.
      Returns:
      minimum wall thickness in meters
    • getMaop

      public double getMaop()
      Get calculated MAOP.
      Returns:
      MAOP in MPa
    • getMaop

      public double getMaop(String unit)
      Get MAOP in specified unit.
      Parameters:
      unit - pressure unit ("MPa", "bar", "psi")
      Returns:
      MAOP in specified unit
    • getHoopStress

      public double getHoopStress()
      Get calculated hoop stress.
      Returns:
      hoop stress in MPa
    • getVonMisesStress

      public double getVonMisesStress()
      Get calculated von Mises stress.
      Returns:
      von Mises stress in MPa
    • getYoungsModulus

      public double getYoungsModulus()
      Get Young's modulus.
      Returns:
      Young's modulus in MPa
    • setYoungsModulus

      public void setYoungsModulus(double youngsModulus)
      Set Young's modulus.
      Parameters:
      youngsModulus - Young's modulus in MPa
    • getPoissonsRatio

      public double getPoissonsRatio()
      Get Poisson's ratio.
      Returns:
      Poisson's ratio
    • setPoissonsRatio

      public void setPoissonsRatio(double poissonsRatio)
      Set Poisson's ratio.
      Parameters:
      poissonsRatio - Poisson's ratio
    • getThermalExpansion

      public double getThermalExpansion()
      Get thermal expansion coefficient.
      Returns:
      thermal expansion coefficient in 1/K
    • setThermalExpansion

      public void setThermalExpansion(double thermalExpansion)
      Set thermal expansion coefficient.
      Parameters:
      thermalExpansion - thermal expansion coefficient in 1/K
    • getPipelineLength

      public double getPipelineLength()
      Get pipeline length.
      Returns:
      pipeline length in meters
    • setPipelineLength

      public void setPipelineLength(double pipelineLength)
      Set pipeline length.
      Parameters:
      pipelineLength - pipeline length in meters
    • getSteelDensity

      public double getSteelDensity()
      Get steel density.
      Returns:
      steel density in kg/m3
    • setSteelDensity

      public void setSteelDensity(double steelDensity)
      Set steel density.
      Parameters:
      steelDensity - steel density in kg/m3
    • getCoatingType

      public String getCoatingType()
      Get external coating type.
      Returns:
      coating type
    • setCoatingType

      public void setCoatingType(String coatingType)
      Set external coating type.
      Parameters:
      coatingType - coating type (e.g., "3LPE", "FBE", "CTE")
    • getCoatingThickness

      public double getCoatingThickness()
      Get external coating thickness.
      Returns:
      coating thickness in meters
    • setCoatingThickness

      public void setCoatingThickness(double coatingThickness)
      Set external coating thickness.
      Parameters:
      coatingThickness - coating thickness in meters
    • getInsulationType

      public String getInsulationType()
      Get insulation type.
      Returns:
      insulation type
    • setInsulationType

      public void setInsulationType(String insulationType)
      Set insulation type.
      Parameters:
      insulationType - insulation type (e.g., "PUF", "mineral wool", "none")
    • getInsulationThickness

      public double getInsulationThickness()
      Get insulation thickness.
      Returns:
      insulation thickness in meters
    • setInsulationThickness

      public void setInsulationThickness(double insulationThickness)
      Set insulation thickness.
      Parameters:
      insulationThickness - insulation thickness in meters
    • getConcreteCoatingThickness

      public double getConcreteCoatingThickness()
      Get concrete weight coating thickness.
      Returns:
      concrete coating thickness in meters
    • setConcreteCoatingThickness

      public void setConcreteCoatingThickness(double concreteCoatingThickness)
      Set concrete weight coating thickness.
      Parameters:
      concreteCoatingThickness - concrete coating thickness in meters
    • getInstallationMethod

      public String getInstallationMethod()
      Get installation method.
      Returns:
      installation method
    • setInstallationMethod

      public void setInstallationMethod(String installationMethod)
      Set installation method.
      Parameters:
      installationMethod - installation method (e.g., "S-lay", "J-lay", "Reel-lay", "Onshore")
    • getWaterDepth

      public double getWaterDepth()
      Get water depth.
      Returns:
      water depth in meters
    • setWaterDepth

      public void setWaterDepth(double waterDepth)
      Set water depth.
      Parameters:
      waterDepth - water depth in meters
    • getBurialDepth

      public double getBurialDepth()
      Get burial depth.
      Returns:
      burial depth in meters
    • setBurialDepth

      public void setBurialDepth(double burialDepth)
      Set burial depth.
      Parameters:
      burialDepth - burial depth in meters
    • getAmbientTemperature

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

      public void setAmbientTemperature(double ambientTemperature)
      Set ambient temperature.
      Parameters:
      ambientTemperature - ambient temperature in Celsius
    • getFlangeClass

      public int getFlangeClass()
      Get flange class.
      Returns:
      flange class per ASME B16.5
    • setFlangeClass

      public void setFlangeClass(int flangeClass)
      Set flange class.
      Parameters:
      flangeClass - flange class (150, 300, 600, 900, 1500, 2500)
    • getNumberOfFlangePairs

      public int getNumberOfFlangePairs()
      Get number of flange pairs.
      Returns:
      number of flange pairs
    • setNumberOfFlangePairs

      public void setNumberOfFlangePairs(int numberOfFlangePairs)
      Set number of flange pairs.
      Parameters:
      numberOfFlangePairs - number of flange pairs
    • getNumberOfValves

      public int getNumberOfValves()
      Get number of valves.
      Returns:
      number of valves
    • setNumberOfValves

      public void setNumberOfValves(int numberOfValves)
      Set number of valves.
      Parameters:
      numberOfValves - number of valves
    • getValveType

      public String getValveType()
      Get valve type.
      Returns:
      valve type
    • setValveType

      public void setValveType(String valveType)
      Set valve type.
      Parameters:
      valveType - valve type (e.g., "Ball", "Gate", "Check")
    • getAnchorSpacing

      public double getAnchorSpacing()
      Get anchor spacing.
      Returns:
      anchor spacing in meters
    • setAnchorSpacing

      public void setAnchorSpacing(double anchorSpacing)
      Set anchor spacing.
      Parameters:
      anchorSpacing - anchor spacing in meters
    • getSteelPricePerKg

      public double getSteelPricePerKg()
      Get steel price per kg.
      Returns:
      steel price in USD/kg
    • setSteelPricePerKg

      public void setSteelPricePerKg(double steelPricePerKg)
      Set steel price per kg.
      Parameters:
      steelPricePerKg - steel price in USD/kg
    • getCoatingPricePerM2

      public double getCoatingPricePerM2()
      Get coating price per m2.
      Returns:
      coating price in USD/m2
    • setCoatingPricePerM2

      public void setCoatingPricePerM2(double coatingPricePerM2)
      Set coating price per m2.
      Parameters:
      coatingPricePerM2 - coating price in USD/m2
    • getFieldWeldCost

      public double getFieldWeldCost()
      Get field weld cost.
      Returns:
      field weld cost in USD per weld
    • setFieldWeldCost

      public void setFieldWeldCost(double fieldWeldCost)
      Set field weld cost.
      Parameters:
      fieldWeldCost - field weld cost in USD per weld
    • getContingencyPercentage

      public double getContingencyPercentage()
      Get contingency percentage.
      Returns:
      contingency percentage (e.g., 0.15 for 15%)
    • setContingencyPercentage

      public void setContingencyPercentage(double contingencyPercentage)
      Set contingency percentage.
      Parameters:
      contingencyPercentage - contingency percentage (e.g., 0.15 for 15%)
    • getSteelWeightPerMeter

      public double getSteelWeightPerMeter()
      Get steel weight per meter.
      Returns:
      steel weight in kg/m
    • getTotalDryWeightPerMeter

      public double getTotalDryWeightPerMeter()
      Get total dry weight per meter.
      Returns:
      total dry weight in kg/m
    • getSubmergedWeightPerMeter

      public double getSubmergedWeightPerMeter()
      Get submerged weight per meter.
      Returns:
      submerged weight in kg/m (negative = buoyant)
    • getTotalPipelineWeight

      public double getTotalPipelineWeight()
      Get total pipeline weight.
      Returns:
      total pipeline dry weight in kg
    • getTotalExternalSurfaceArea

      public double getTotalExternalSurfaceArea()
      Get total external surface area.
      Returns:
      total external surface area in m2
    • getNumberOfJoints

      public int getNumberOfJoints()
      Get number of pipe joints.
      Returns:
      number of pipe joints
    • getNumberOfFieldWelds

      public int getNumberOfFieldWelds()
      Get number of field welds.
      Returns:
      number of field welds
    • getSupportSpacing

      public double getSupportSpacing()
      Get support spacing.
      Returns:
      support spacing in meters
    • getNumberOfSupports

      public int getNumberOfSupports()
      Get number of supports.
      Returns:
      number of supports
    • getCollapsePressure

      public double getCollapsePressure()
      Get collapse pressure.
      Returns:
      collapse pressure in MPa
    • getFatigueLife

      public double getFatigueLife()
      Get fatigue life.
      Returns:
      fatigue life in years
    • getTotalProjectCost

      public double getTotalProjectCost()
      Get total project cost.
      Returns:
      total project cost in USD
    • getTotalDirectCost

      public double getTotalDirectCost()
      Get total direct cost.
      Returns:
      total direct cost in USD
    • getTotalLaborManhours

      public double getTotalLaborManhours()
      Get total labor manhours.
      Returns:
      total labor manhours
    • toJson

      public String toJson()
      Export mechanical design data to JSON format.

      This method creates a structured JSON representation of the pipeline mechanical design including design parameters, material properties, design factors, and calculated results.

      Returns:
      JSON string representation of the mechanical design
    • toCompactJson

      public String toCompactJson()
      Export mechanical design data to compact JSON format.
      Returns:
      compact JSON string
    • toMap

      public Map<String,Object> toMap()
      Convert mechanical design data to a Map for JSON serialization.
      Returns:
      Map containing design data
    • loadMaterialFromDatabase

      @Deprecated public void loadMaterialFromDatabase(String grade)
      Deprecated.
      Use PipelineMechanicalDesign.loadMaterialFromDatabase(String) instead. The PipelineMechanicalDesign class provides centralized database access via PipelineMechanicalDesignDataSource, following the same pattern as separators.
      Load material properties from database.

      This method queries the NeqSim process design database for material properties based on the specified material grade. Supported tables: MaterialPipeProperties.

      Parameters:
      grade - API 5L material grade (e.g., "X52", "X65", "X70")
    • loadDesignFactorsFromDatabase

      @Deprecated public void loadDesignFactorsFromDatabase(String company)
      Deprecated.
      Use PipelineMechanicalDesign.loadDesignFactorsFromDatabase() instead. The PipelineMechanicalDesign class provides centralized database access via PipelineMechanicalDesignDataSource, following the same pattern as separators.
      Load design factors from database based on company identifier.

      This method queries the TechnicalRequirements_Process table for company-specific design factors.

      Parameters:
      company - company identifier (e.g., "Equinor", "Statoil")
    • loadFromDatabase

      @Deprecated public void loadFromDatabase(String materialGrade, String company)
      Deprecated.
      Use PipelineMechanicalDesign.loadFromDatabase() instead. The PipelineMechanicalDesign class provides centralized database access via PipelineMechanicalDesignDataSource, following the same pattern as separators.
      Load all design data from database.

      This method loads both material properties and design factors from the database.

      Parameters:
      materialGrade - API 5L material grade
      company - company identifier