Class TopsidePipingMechanicalDesignCalculator
java.lang.Object
neqsim.process.mechanicaldesign.pipeline.PipeMechanicalDesignCalculator
neqsim.process.mechanicaldesign.pipeline.TopsidePipingMechanicalDesignCalculator
- All Implemented Interfaces:
Serializable
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 Summary
FieldsModifier and TypeFieldDescriptionprivate doubleAcoustic power level in W.private doubleActual flow velocity in m/s.private doubleLikelihood of failure from AIV (0-1).private doubleAllowable stress per ASME B31.3 in MPa.private doubleAnchor force in kN.List of applied standards.private doubleCalculated support spacing in meters.private booleanIs clean service (no solids).private booleanContains CO2.private doubleCombined stress in MPa.private doubleC-factor for erosional velocity (typically 100-150).private doubleErosional velocity per API RP 14E in m/s.private doubleFlow-induced vibration screening number.private doubleFlexibility factor.private doubleFree thermal expansion in mm.private doubleGas density in kg/m3.private doubleGas viscosity in Pa-s.private doubleInstallation temperature in Celsius.private doubleInsulation density in kg/m3 (mineral wool ~80, PUF ~40).private doubleLiquid density in kg/m3.private doubleLiquid volume fraction (0-1).private doubleLiquid viscosity in Pa-s.private doubleLock-in velocity range lower bound in m/s.private doubleLock-in velocity range upper bound in m/s.private doubleFlow rate in kg/s.private doubleMaximum allowed deflection in mm.private doubleMaximum recommended gas velocity in m/s.private doubleMaximum recommended liquid velocity in m/s.private doubleMaximum recommended multiphase velocity in m/s.private doubleMixture density in kg/m3.private doubleSecond moment of area in m4.private doubleNoise velocity limit in m/s.private doubleOccasional stress (wind, earthquake) in MPa.private doubleOperating temperature in Celsius.private doubleNatural frequency of pipe span in Hz.private doubleExpansion loop length required in meters.private doubleSand content in kg/m3.private doubleSection modulus in m3.private static final longSerialization version UID.private StringService type string.private booleanContains H2S.private booleanStress check passed.private doubleStress intensity factor for fittings.private booleanSupport spacing check passed.private doubleSustained stress (pressure + weight) in MPa.private doubleThermal expansion stress in MPa.private doublePipe weight per unit length in kg/m (including contents and insulation).private booleanVelocity check passed.private booleanVibration check passed.private doubleVolumetric flow rate in m3/s.private doubleVortex shedding frequency in Hz.Fields inherited from class PipeMechanicalDesignCalculator
ASME_B31_3, ASME_B31_4, ASME_B31_8, DNV_OS_F101 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublecalculateAcousticPowerLevel(double upstreamPressure, double downstreamPressure, double temperature, double molecularWeight) Calculate acoustic power level for AIV screening.doubleCalculate actual flow velocity.doublecalculateAIVLikelihoodOfFailure(double branchDiameter, double mainPipeDiameter) Calculate likelihood of failure from AIV.doubleCalculate allowable stress per ASME B31.3.doubleCalculate combined stress for design check.doubleCalculate erosional velocity per API RP 14E.doublecalculateErosionalVelocityWithSand(double sandRate) Calculate erosional velocity with sand correction.doublecalculateFIVScreening(double spanLength) Calculate flow-induced vibration (FIV) screening number.doubleCalculate minimum pipe diameter for given flow.doubleCalculate second moment of area (moment of inertia) for pipe cross-section.intcalculateNumberOfSupports(double pipeLength) Calculate number of supports required.doublecalculateOccasionalStress(double windLoad, double supportSpacing) Calculate occasional stress per ASME B31.3.doubleCalculate pipe support spacing based on deflection and stress limits.doubleCalculate support spacing per ASME B31.3 simplified method.doublecalculateSustainedStress(double supportSpacing) Calculate sustained stress per ASME B31.3.doublecalculateThermalExpansionStress(double anchoredLength) Calculate thermal expansion stress per ASME B31.3.doubleCalculate total pipe weight per meter including contents and insulation.doublecalculateWindLoad(double windSpeed) Calculate wind load on pipe.booleanCheck for lock-in risk between vortex shedding and pipe natural frequency.booleanCheck if velocity is within acceptable limits.doubleGet actual velocity.doubleGet allowable stress.doubleGet anchor force.Get list of applied standards.doubleGet erosional C-factor.doubleGet erosional velocity.doubleGet free thermal expansion.doubleGet gas density.doubleGet installation temperature.doubleGet insulation density.doubleGet liquid density.doubleGet liquid fraction.doubleGet mass flow rate.doubleGet maximum gas velocity limit.doubleGet maximum liquid velocity limit.doubleGet mixture density.doubleGet operating temperature.doubleGet required loop length.Get service type.doubleGet calculated support spacing.booleanCheck if CO2 service.booleanCheck if sour service.booleanCheck if stress check passed.booleanCheck if velocity check passed.booleanCheck if vibration check passed.booleanPerform complete design verification.voidsetCo2Service(boolean co2Service) Set CO2 service flag.voidsetErosionalCFactor(double erosionalCFactor) Set erosional C-factor.voidsetGasDensity(double gasDensity) Set gas density.voidsetInstallationTemperature(double installationTemperature) Set installation temperature.voidsetInsulationDensity(double insulationDensity) Set insulation density.voidsetLiquidDensity(double liquidDensity) Set liquid density.voidsetLiquidFraction(double liquidFraction) Set liquid fraction.voidsetMassFlowRate(double massFlowRate) Set mass flow rate.voidsetMaxGasVelocity(double maxGasVelocity) Set maximum gas velocity limit.voidsetMaxLiquidVelocity(double maxLiquidVelocity) Set maximum liquid velocity limit.voidsetMixtureDensity(double mixtureDensity) Set mixture density.voidsetOperatingTemperature(double operatingTemperature) Set operating temperature.voidsetServiceType(String serviceType) Set service type.voidsetSourService(boolean sourService) Set sour service flag.toJson()Convert results to JSON string.toMap()Convert all results to a Map for JSON serialization.Methods inherited from class PipeMechanicalDesignCalculator
calculateAllowableSpanLength, calculateCollapsePressure, calculateExpansionLoopLength, calculateExternalPressure, calculateHoopStress, calculateInsulationThickness, calculateJointsAndWelds, calculateLaborManhours, calculateLongitudinalStress, calculateMAOP, calculateMinimumBendRadius, calculateMinimumWallThickness, calculateProjectCost, calculatePropagationBucklingPressure, calculateRequiredConcreteThickness, calculateSafetyMargin, calculateSubmergedWeight, calculateSupportSpacing, calculateTestPressure, calculateVonMisesStress, calculateWeightsAndAreas, estimateFatigueLife, generateBillOfMaterials, generateDesignReport, getAmbientTemperature, getAnchorSpacing, getBurialDepth, getCoatingPricePerM2, getCoatingThickness, getCoatingType, getCollapsePressure, getConcreteCoatingThickness, getContingencyPercentage, getCorrosionAllowance, getDesignCode, getDesignFactor, getDesignPressure, getDesignTemperature, getFabricationTolerance, getFatigueLife, getFieldWeldCost, getFlangeClass, getHoopStress, getInnerDiameter, getInstallationMethod, getInsulationThickness, getInsulationType, getJointFactor, getLocationClass, getMaop, getMaop, getMaterialGrade, getMinimumWallThickness, getNominalWallThickness, getNumberOfFieldWelds, getNumberOfFlangePairs, getNumberOfJoints, getNumberOfSupports, getNumberOfValves, getOuterDiameter, getPipelineLength, getPoissonsRatio, getSmts, getSmys, getSteelDensity, getSteelPricePerKg, getSteelWeightPerMeter, getSubmergedWeightPerMeter, getThermalExpansion, getTotalDirectCost, getTotalDryWeightPerMeter, getTotalExternalSurfaceArea, getTotalLaborManhours, getTotalPipelineWeight, getTotalProjectCost, getValveType, getVonMisesStress, getWaterDepth, getWeldJointEfficiency, getYoungsModulus, isDesignSafe, loadDesignFactorsFromDatabase, loadFromDatabase, loadMaterialFromDatabase, selectFlangeClass, selectStandardPipeSize, setAmbientTemperature, setAnchorSpacing, setBurialDepth, setCoatingPricePerM2, setCoatingThickness, setCoatingType, setConcreteCoatingThickness, setContingencyPercentage, setCorrosionAllowance, setCorrosionAllowance, setDesignCode, setDesignFactor, setDesignPressure, setDesignPressure, setDesignTemperature, setFabricationTolerance, setFieldWeldCost, setFlangeClass, setInstallationMethod, setInsulationThickness, setInsulationType, setJointFactor, setLocationClass, setMaterialGrade, setNominalWallThickness, setNominalWallThickness, setNumberOfFlangePairs, setNumberOfValves, setOuterDiameter, setOuterDiameter, setPipelineLength, setPoissonsRatio, setSmts, setSmys, setSteelDensity, setSteelPricePerKg, setThermalExpansion, setValveType, setWaterDepth, setWeldJointEfficiency, setYoungsModulus, toCompactJson
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version UID.- See Also:
-
actualVelocity
private double actualVelocityActual flow velocity in m/s. -
erosionalVelocity
private double erosionalVelocityErosional velocity per API RP 14E in m/s. -
erosionalCFactor
private double erosionalCFactorC-factor for erosional velocity (typically 100-150). -
maxGasVelocity
private double maxGasVelocityMaximum recommended gas velocity in m/s. -
maxLiquidVelocity
private double maxLiquidVelocityMaximum recommended liquid velocity in m/s. -
maxMultiphaseVelocity
private double maxMultiphaseVelocityMaximum recommended multiphase velocity in m/s. -
insulationDensity
private double insulationDensityInsulation density in kg/m3 (mineral wool ~80, PUF ~40). -
noiseVelocityLimit
private double noiseVelocityLimitNoise velocity limit in m/s. -
massFlowRate
private double massFlowRateFlow rate in kg/s. -
volumetricFlowRate
private double volumetricFlowRateVolumetric flow rate in m3/s. -
mixtureDensity
private double mixtureDensityMixture density in kg/m3. -
gasDensity
private double gasDensityGas density in kg/m3. -
liquidDensity
private double liquidDensityLiquid density in kg/m3. -
liquidFraction
private double liquidFractionLiquid volume fraction (0-1). -
gasViscosity
private double gasViscosityGas viscosity in Pa-s. -
liquidViscosity
private double liquidViscosityLiquid viscosity in Pa-s. -
acousticPowerLevel
private double acousticPowerLevelAcoustic power level in W. -
aivLikelihoodOfFailure
private double aivLikelihoodOfFailureLikelihood of failure from AIV (0-1). -
fivScreeningNumber
private double fivScreeningNumberFlow-induced vibration screening number. -
pipeNaturalFrequency
private double pipeNaturalFrequencyNatural frequency of pipe span in Hz. -
vortexSheddingFrequency
private double vortexSheddingFrequencyVortex shedding frequency in Hz. -
lockInVelocityLower
private double lockInVelocityLowerLock-in velocity range lower bound in m/s. -
lockInVelocityUpper
private double lockInVelocityUpperLock-in velocity range upper bound in m/s. -
calculatedSupportSpacing
private double calculatedSupportSpacingCalculated support spacing in meters. -
maxAllowedDeflection
private double maxAllowedDeflectionMaximum allowed deflection in mm. -
totalWeightPerMeter
private double totalWeightPerMeterPipe weight per unit length in kg/m (including contents and insulation). -
momentOfInertia
private double momentOfInertiaSecond moment of area in m4. -
sectionModulus
private double sectionModulusSection modulus in m3. -
sustainedStress
private double sustainedStressSustained stress (pressure + weight) in MPa. -
thermalExpansionStress
private double thermalExpansionStressThermal expansion stress in MPa. -
occasionalStress
private double occasionalStressOccasional stress (wind, earthquake) in MPa. -
combinedStress
private double combinedStressCombined stress in MPa. -
allowableStress
private double allowableStressAllowable stress per ASME B31.3 in MPa. -
stressIntensificationFactor
private double stressIntensificationFactorStress intensity factor for fittings. -
flexibilityFactor
private double flexibilityFactorFlexibility factor. -
installationTemperature
private double installationTemperatureInstallation temperature in Celsius. -
operatingTemperature
private double operatingTemperatureOperating temperature in Celsius. -
freeExpansion
private double freeExpansionFree thermal expansion in mm. -
requiredLoopLength
private double requiredLoopLengthExpansion loop length required in meters. -
anchorForce
private double anchorForceAnchor force in kN. -
serviceType
Service type string. -
cleanService
private boolean cleanServiceIs clean service (no solids). -
sourService
private boolean sourServiceContains H2S. -
co2Service
private boolean co2ServiceContains CO2. -
sandContent
private double sandContentSand content in kg/m3. -
appliedStandards
-
velocityCheckPassed
private boolean velocityCheckPassedVelocity check passed. -
vibrationCheckPassed
private boolean vibrationCheckPassedVibration check passed. -
stressCheckPassed
private boolean stressCheckPassedStress check passed. -
supportCheckPassed
private boolean supportCheckPassedSupport spacing check passed. -
STANDARD_PIPE_DIMENSIONS
-
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 baradownstreamPressure- downstream pressure in baratemperature- temperature in CelsiusmolecularWeight- 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 metersmainPipeDiameter- 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/msupportSpacing- 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
Convert all results to a Map for JSON serialization.- Overrides:
toMapin classPipeMechanicalDesignCalculator- Returns:
- map of all calculated values
-
toJson
Convert results to JSON string.- Overrides:
toJsonin classPipeMechanicalDesignCalculator- 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:
getSupportSpacingin classPipeMechanicalDesignCalculator- 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
-
setServiceType
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
-
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
-