Class TopsidePipingMechanicalDesignCalculator

java.lang.Object
neqsim.process.mechanicaldesign.pipeline.PipeMechanicalDesignCalculator
neqsim.process.mechanicaldesign.pipeline.TopsidePipingMechanicalDesignCalculator
All Implemented Interfaces:
Serializable

public class TopsidePipingMechanicalDesignCalculator extends PipeMechanicalDesignCalculator
Calculator for topside piping mechanical design based on industry standards.

This class provides methods to calculate wall thickness, velocity limits, support spacing, vibration analysis, and stress analysis for topside (offshore platform and onshore facility) piping according to various design codes including:

  • ASME B31.3 - Process Piping
  • API RP 14E - Erosional Velocity
  • Energy Institute Guidelines - Acoustic Induced Vibration (AIV)
  • NORSOK L-002 - Piping System Layout, Design and Structural Analysis
Version:
1.0
Author:
ASMF
See Also:
  • Field Details

    • serialVersionUID

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

      private double actualVelocity
      Actual flow velocity in m/s.
    • erosionalVelocity

      private double erosionalVelocity
      Erosional velocity per API RP 14E in m/s.
    • erosionalCFactor

      private double erosionalCFactor
      C-factor for erosional velocity (typically 100-150).
    • maxGasVelocity

      private double maxGasVelocity
      Maximum recommended gas velocity in m/s.
    • maxLiquidVelocity

      private double maxLiquidVelocity
      Maximum recommended liquid velocity in m/s.
    • maxMultiphaseVelocity

      private double maxMultiphaseVelocity
      Maximum recommended multiphase velocity in m/s.
    • insulationDensity

      private double insulationDensity
      Insulation density in kg/m3 (mineral wool ~80, PUF ~40).
    • noiseVelocityLimit

      private double noiseVelocityLimit
      Noise velocity limit in m/s.
    • massFlowRate

      private double massFlowRate
      Flow rate in kg/s.
    • volumetricFlowRate

      private double volumetricFlowRate
      Volumetric flow rate in m3/s.
    • mixtureDensity

      private double mixtureDensity
      Mixture density in kg/m3.
    • gasDensity

      private double gasDensity
      Gas density in kg/m3.
    • liquidDensity

      private double liquidDensity
      Liquid density in kg/m3.
    • liquidFraction

      private double liquidFraction
      Liquid volume fraction (0-1).
    • gasViscosity

      private double gasViscosity
      Gas viscosity in Pa-s.
    • liquidViscosity

      private double liquidViscosity
      Liquid viscosity in Pa-s.
    • acousticPowerLevel

      private double acousticPowerLevel
      Acoustic power level in W.
    • aivLikelihoodOfFailure

      private double aivLikelihoodOfFailure
      Likelihood of failure from AIV (0-1).
    • fivScreeningNumber

      private double fivScreeningNumber
      Flow-induced vibration screening number.
    • pipeNaturalFrequency

      private double pipeNaturalFrequency
      Natural frequency of pipe span in Hz.
    • vortexSheddingFrequency

      private double vortexSheddingFrequency
      Vortex shedding frequency in Hz.
    • lockInVelocityLower

      private double lockInVelocityLower
      Lock-in velocity range lower bound in m/s.
    • lockInVelocityUpper

      private double lockInVelocityUpper
      Lock-in velocity range upper bound in m/s.
    • calculatedSupportSpacing

      private double calculatedSupportSpacing
      Calculated support spacing in meters.
    • maxAllowedDeflection

      private double maxAllowedDeflection
      Maximum allowed deflection in mm.
    • totalWeightPerMeter

      private double totalWeightPerMeter
      Pipe weight per unit length in kg/m (including contents and insulation).
    • momentOfInertia

      private double momentOfInertia
      Second moment of area in m4.
    • sectionModulus

      private double sectionModulus
      Section modulus in m3.
    • sustainedStress

      private double sustainedStress
      Sustained stress (pressure + weight) in MPa.
    • thermalExpansionStress

      private double thermalExpansionStress
      Thermal expansion stress in MPa.
    • occasionalStress

      private double occasionalStress
      Occasional stress (wind, earthquake) in MPa.
    • combinedStress

      private double combinedStress
      Combined stress in MPa.
    • allowableStress

      private double allowableStress
      Allowable stress per ASME B31.3 in MPa.
    • stressIntensificationFactor

      private double stressIntensificationFactor
      Stress intensity factor for fittings.
    • flexibilityFactor

      private double flexibilityFactor
      Flexibility factor.
    • installationTemperature

      private double installationTemperature
      Installation temperature in Celsius.
    • operatingTemperature

      private double operatingTemperature
      Operating temperature in Celsius.
    • freeExpansion

      private double freeExpansion
      Free thermal expansion in mm.
    • requiredLoopLength

      private double requiredLoopLength
      Expansion loop length required in meters.
    • anchorForce

      private double anchorForce
      Anchor force in kN.
    • serviceType

      private String serviceType
      Service type string.
    • cleanService

      private boolean cleanService
      Is clean service (no solids).
    • sourService

      private boolean sourService
      Contains H2S.
    • co2Service

      private boolean co2Service
      Contains CO2.
    • sandContent

      private double sandContent
      Sand content in kg/m3.
    • appliedStandards

      private List<String> appliedStandards
      List of applied standards.
    • velocityCheckPassed

      private boolean velocityCheckPassed
      Velocity check passed.
    • vibrationCheckPassed

      private boolean vibrationCheckPassed
      Vibration check passed.
    • stressCheckPassed

      private boolean stressCheckPassed
      Stress check passed.
    • supportCheckPassed

      private boolean supportCheckPassed
      Support spacing check passed.
    • STANDARD_PIPE_DIMENSIONS

      private static final Map<String,double[]> STANDARD_PIPE_DIMENSIONS
    • ASME_B31_3_ALLOWABLE_STRESSES

      private static final Map<String,double[]> ASME_B31_3_ALLOWABLE_STRESSES
  • Constructor Details

    • TopsidePipingMechanicalDesignCalculator

      public TopsidePipingMechanicalDesignCalculator()
      Default constructor.
  • Method Details

    • calculateErosionalVelocity

      public double calculateErosionalVelocity()
      Calculate erosional velocity per API RP 14E.

      Formula: Ve = C / sqrt(rhom), where:

      • Ve = erosional velocity in m/s
      • C = empirical constant (100 for continuous service, 150 for intermittent)
      • rhom = gas/liquid mixture density in kg/m3
      Returns:
      erosional velocity in m/s
    • calculateErosionalVelocityWithSand

      public double calculateErosionalVelocityWithSand(double sandRate)
      Calculate erosional velocity with sand correction.
      Parameters:
      sandRate - sand production rate in kg/day
      Returns:
      erosional velocity in m/s
    • calculateActualVelocity

      public double calculateActualVelocity()
      Calculate actual flow velocity.
      Returns:
      actual velocity in m/s
    • checkVelocityLimits

      public boolean checkVelocityLimits()
      Check if velocity is within acceptable limits.
      Returns:
      true if velocity is acceptable
    • calculateMinimumDiameter

      public double calculateMinimumDiameter()
      Calculate minimum pipe diameter for given flow.
      Returns:
      minimum diameter in meters
    • calculateAcousticPowerLevel

      public double calculateAcousticPowerLevel(double upstreamPressure, double downstreamPressure, double temperature, double molecularWeight)
      Calculate acoustic power level for AIV screening.
      Parameters:
      upstreamPressure - upstream pressure in bara
      downstreamPressure - downstream pressure in bara
      temperature - temperature in Celsius
      molecularWeight - molecular weight in kg/kmol
      Returns:
      acoustic power level in Watts
    • calculateAIVLikelihoodOfFailure

      public double calculateAIVLikelihoodOfFailure(double branchDiameter, double mainPipeDiameter)
      Calculate likelihood of failure from AIV.
      Parameters:
      branchDiameter - branch diameter in meters
      mainPipeDiameter - main pipe diameter in meters
      Returns:
      likelihood of failure (0.0-1.0)
    • calculateFIVScreening

      public double calculateFIVScreening(double spanLength)
      Calculate flow-induced vibration (FIV) screening number.
      Parameters:
      spanLength - pipe span length between supports in meters
      Returns:
      FIV screening number
    • checkLockInRisk

      public boolean checkLockInRisk()
      Check for lock-in risk between vortex shedding and pipe natural frequency.
      Returns:
      true if lock-in risk exists
    • calculateSupportSpacing

      public double calculateSupportSpacing()
      Calculate pipe support spacing based on deflection and stress limits.
      Returns:
      recommended support spacing in meters
    • calculateSupportSpacingASME

      public double calculateSupportSpacingASME()
      Calculate support spacing per ASME B31.3 simplified method.
      Returns:
      support spacing in meters
    • calculateNumberOfSupports

      public int calculateNumberOfSupports(double pipeLength)
      Calculate number of supports required.
      Parameters:
      pipeLength - total pipe length in meters
      Returns:
      number of supports
    • calculateAllowableStress

      public double calculateAllowableStress()
      Calculate allowable stress per ASME B31.3.
      Returns:
      allowable stress in MPa
    • calculateSustainedStress

      public double calculateSustainedStress(double supportSpacing)
      Calculate sustained stress per ASME B31.3.
      Parameters:
      supportSpacing - span between supports in meters
      Returns:
      sustained stress in MPa
    • calculateThermalExpansionStress

      public double calculateThermalExpansionStress(double anchoredLength)
      Calculate thermal expansion stress per ASME B31.3.
      Parameters:
      anchoredLength - length between anchors in meters
      Returns:
      thermal expansion stress in MPa
    • calculateOccasionalStress

      public double calculateOccasionalStress(double windLoad, double supportSpacing)
      Calculate occasional stress per ASME B31.3.
      Parameters:
      windLoad - wind load in N/m
      supportSpacing - support spacing in meters
      Returns:
      occasional stress in MPa
    • calculateCombinedStress

      public double calculateCombinedStress()
      Calculate combined stress for design check.
      Returns:
      combined stress in MPa
    • calculateMomentOfInertia

      public double calculateMomentOfInertia()
      Calculate second moment of area (moment of inertia) for pipe cross-section.
      Returns:
      moment of inertia in m4
    • calculateTotalWeight

      public double calculateTotalWeight()
      Calculate total pipe weight per meter including contents and insulation.
      Returns:
      total weight in kg/m
    • calculateWindLoad

      public double calculateWindLoad(double windSpeed)
      Calculate wind load on pipe.
      Parameters:
      windSpeed - wind speed in m/s
      Returns:
      wind load in N/m
    • performDesignVerification

      public boolean performDesignVerification()
      Perform complete design verification.
      Returns:
      true if all checks pass
    • toMap

      public Map<String,Object> toMap()
      Convert all results to a Map for JSON serialization.
      Overrides:
      toMap in class PipeMechanicalDesignCalculator
      Returns:
      map of all calculated values
    • toJson

      public String toJson()
      Convert results to JSON string.
      Overrides:
      toJson in class PipeMechanicalDesignCalculator
      Returns:
      JSON string
    • getActualVelocity

      public double getActualVelocity()
      Get actual velocity.
      Returns:
      actual velocity in m/s
    • getErosionalVelocity

      public double getErosionalVelocity()
      Get erosional velocity.
      Returns:
      erosional velocity in m/s
    • getErosionalCFactor

      public double getErosionalCFactor()
      Get erosional C-factor.
      Returns:
      C-factor
    • setErosionalCFactor

      public void setErosionalCFactor(double erosionalCFactor)
      Set erosional C-factor.
      Parameters:
      erosionalCFactor - C-factor (typically 100-150)
    • getMaxGasVelocity

      public double getMaxGasVelocity()
      Get maximum gas velocity limit.
      Returns:
      max gas velocity in m/s
    • setMaxGasVelocity

      public void setMaxGasVelocity(double maxGasVelocity)
      Set maximum gas velocity limit.
      Parameters:
      maxGasVelocity - max gas velocity in m/s
    • getMaxLiquidVelocity

      public double getMaxLiquidVelocity()
      Get maximum liquid velocity limit.
      Returns:
      max liquid velocity in m/s
    • setMaxLiquidVelocity

      public void setMaxLiquidVelocity(double maxLiquidVelocity)
      Set maximum liquid velocity limit.
      Parameters:
      maxLiquidVelocity - max liquid velocity in m/s
    • getMassFlowRate

      public double getMassFlowRate()
      Get mass flow rate.
      Returns:
      mass flow rate in kg/s
    • setMassFlowRate

      public void setMassFlowRate(double massFlowRate)
      Set mass flow rate.
      Parameters:
      massFlowRate - mass flow rate in kg/s
    • getMixtureDensity

      public double getMixtureDensity()
      Get mixture density.
      Returns:
      mixture density in kg/m3
    • setMixtureDensity

      public void setMixtureDensity(double mixtureDensity)
      Set mixture density.
      Parameters:
      mixtureDensity - mixture density in kg/m3
    • getLiquidFraction

      public double getLiquidFraction()
      Get liquid fraction.
      Returns:
      liquid volume fraction (0-1)
    • setLiquidFraction

      public void setLiquidFraction(double liquidFraction)
      Set liquid fraction.
      Parameters:
      liquidFraction - liquid volume fraction (0-1)
    • getSupportSpacing

      public double getSupportSpacing()
      Get calculated support spacing.
      Overrides:
      getSupportSpacing in class PipeMechanicalDesignCalculator
      Returns:
      support spacing in meters
    • getAllowableStress

      public double getAllowableStress()
      Get allowable stress.
      Returns:
      allowable stress in MPa
    • getInstallationTemperature

      public double getInstallationTemperature()
      Get installation temperature.
      Returns:
      installation temperature in Celsius
    • setInstallationTemperature

      public void setInstallationTemperature(double installationTemperature)
      Set installation temperature.
      Parameters:
      installationTemperature - installation temperature in Celsius
    • getOperatingTemperature

      public double getOperatingTemperature()
      Get operating temperature.
      Returns:
      operating temperature in Celsius
    • setOperatingTemperature

      public void setOperatingTemperature(double operatingTemperature)
      Set operating temperature.
      Parameters:
      operatingTemperature - operating temperature in Celsius
    • getFreeExpansion

      public double getFreeExpansion()
      Get free thermal expansion.
      Returns:
      free expansion in mm
    • getRequiredLoopLength

      public double getRequiredLoopLength()
      Get required loop length.
      Returns:
      required expansion loop leg length in meters
    • getAnchorForce

      public double getAnchorForce()
      Get anchor force.
      Returns:
      anchor force in kN
    • getServiceType

      public String getServiceType()
      Get service type.
      Returns:
      service type string
    • setServiceType

      public void setServiceType(String serviceType)
      Set service type.
      Parameters:
      serviceType - service type string
    • isVelocityCheckPassed

      public boolean isVelocityCheckPassed()
      Check if velocity check passed.
      Returns:
      true if passed
    • isVibrationCheckPassed

      public boolean isVibrationCheckPassed()
      Check if vibration check passed.
      Returns:
      true if passed
    • isStressCheckPassed

      public boolean isStressCheckPassed()
      Check if stress check passed.
      Returns:
      true if passed
    • getAppliedStandards

      public List<String> getAppliedStandards()
      Get list of applied standards.
      Returns:
      list of standard references
    • setLiquidDensity

      public void setLiquidDensity(double liquidDensity)
      Set liquid density.
      Parameters:
      liquidDensity - liquid density in kg/m3
    • getLiquidDensity

      public double getLiquidDensity()
      Get liquid density.
      Returns:
      liquid density in kg/m3
    • setGasDensity

      public void setGasDensity(double gasDensity)
      Set gas density.
      Parameters:
      gasDensity - gas density in kg/m3
    • getGasDensity

      public double getGasDensity()
      Get gas density.
      Returns:
      gas density in kg/m3
    • setSourService

      public void setSourService(boolean sourService)
      Set sour service flag.
      Parameters:
      sourService - true if H2S present
    • isSourService

      public boolean isSourService()
      Check if sour service.
      Returns:
      true if H2S present
    • setCo2Service

      public void setCo2Service(boolean co2Service)
      Set CO2 service flag.
      Parameters:
      co2Service - true if CO2 present
    • isCo2Service

      public boolean isCo2Service()
      Check if CO2 service.
      Returns:
      true if CO2 present
    • getInsulationDensity

      public double getInsulationDensity()
      Get insulation density.
      Returns:
      insulation density in kg/m3
    • setInsulationDensity

      public void setInsulationDensity(double insulationDensity)
      Set insulation density.
      Parameters:
      insulationDensity - insulation density in kg/m3