Class ShellAndTubeDesignCalculator

java.lang.Object
neqsim.process.mechanicaldesign.heatexchanger.ShellAndTubeDesignCalculator

public class ShellAndTubeDesignCalculator extends Object
Shell and tube heat exchanger design calculator per TEMA standards.

This calculator performs detailed mechanical design for shell and tube heat exchangers following TEMA (Tubular Exchanger Manufacturers Association) standards. It calculates:

  • Tube bundle geometry (tube count, length, passes)
  • Shell dimensions and type selection
  • Baffle configuration and spacing
  • Thermal-hydraulic performance estimates
  • Weight and cost estimates

TEMA Classes

  • Class R: Severe service (refineries, petrochemical)
  • Class C: Moderate service (chemical, process)
  • Class B: General service (HVAC, commercial)

Usage Example

ShellAndTubeDesignCalculator calc = new ShellAndTubeDesignCalculator();
calc.setTemaDesignation("AES");
calc.setTemaClass(TEMAClass.R);
calc.setRequiredArea(150.0); // m2
calc.setShellSidePressure(30.0); // bara
calc.setTubeSidePressure(15.0); // bara
calc.setDesignTemperature(200.0); // °C
calc.calculate();

System.out.println("Shell ID: " + calc.getShellInsideDiameter() + " mm");
System.out.println("Tube count: " + calc.getTubeCount());
System.out.println("Total weight: " + calc.getTotalWeight() + " kg");
Version:
1.0
Author:
NeqSim Development Team
See Also:
  • Field Details

    • temaDesignation

      private String temaDesignation
    • temaClass

      private TEMAStandard.TEMAClass temaClass
    • requiredArea

      private double requiredArea
    • shellSidePressure

      private double shellSidePressure
    • tubeSidePressure

      private double tubeSidePressure
    • designTemperature

      private double designTemperature
    • shellMaterial

      private String shellMaterial
    • tubeMaterial

      private String tubeMaterial
    • corrosionAllowanceShell

      private double corrosionAllowanceShell
    • corrosionAllowanceTube

      private double corrosionAllowanceTube
    • tubeSize

    • tubeWallThickness

      private double tubeWallThickness
    • tubeLength

      private double tubeLength
    • tubePasses

      private int tubePasses
    • pitchPattern

      private TEMAStandard.TubePitchPattern pitchPattern
    • tubePitchRatio

      private double tubePitchRatio
    • baffleType

      private TEMAStandard.BaffleType baffleType
    • baffleCut

      private double baffleCut
    • baffleCount

      private int baffleCount
    • shellInsideDiameter

      private double shellInsideDiameter
    • shellOutsideDiameter

      private double shellOutsideDiameter
    • shellWallThickness

      private double shellWallThickness
    • tubeCount

      private int tubeCount
    • actualArea

      private double actualArea
    • baffleSpacing

      private double baffleSpacing
    • tubePitch

      private double tubePitch
    • shellWeight

      private double shellWeight
    • tubeWeight

      private double tubeWeight
    • tubesheetWeight

      private double tubesheetWeight
    • headWeight

      private double headWeight
    • baffleWeight

      private double baffleWeight
    • totalDryWeight

      private double totalDryWeight
    • operatingWeight

      private double operatingWeight
    • materialCost

      private double materialCost
    • fabricationCost

      private double fabricationCost
    • totalCost

      private double totalCost
    • tubesheetThicknessUHX

      private double tubesheetThicknessUHX
    • nozzleReinforcementArea

      private double nozzleReinforcementArea
    • nozzleReinforcementAdequate

      private boolean nozzleReinforcementAdequate
    • mawpShellSide

      private double mawpShellSide
    • mawpTubeSide

      private double mawpTubeSide
    • hydroTestPressureShell

      private double hydroTestPressureShell
    • hydroTestPressureTube

      private double hydroTestPressureTube
    • shellJointEfficiency

      private double shellJointEfficiency
    • shellMaterialGrade

      private String shellMaterialGrade
    • tubeMaterialGrade

      private String tubeMaterialGrade
    • shellAllowableStress

      private double shellAllowableStress
    • tubeAllowableStress

      private double tubeAllowableStress
    • tubeThermalConductivity

      private double tubeThermalConductivity
    • shellSmys

      private double shellSmys
    • tubeSmys

      private double tubeSmys
    • sourServiceAssessment

      private boolean sourServiceAssessment
    • shellNACECompliant

      private boolean shellNACECompliant
    • tubeNACECompliant

      private boolean tubeNACECompliant
    • h2sPartialPressure

      private double h2sPartialPressure
    • sourServiceRequired

      private boolean sourServiceRequired
    • shellMaxHardnessHV

      private int shellMaxHardnessHV
    • tubeMaxHardnessHV

      private int tubeMaxHardnessHV
    • appliedStandards

      private List<String> appliedStandards
    • naceIssues

      private List<String> naceIssues
    • nozzleDiameter

      private double nozzleDiameter
    • nozzleWallThickness

      private double nozzleWallThickness
    • thermalCalculator

      private ThermalDesignCalculator thermalCalculator
    • hasThermalData

      private boolean hasThermalData
    • tubeSideDensity

      private double tubeSideDensity
    • tubeSideViscosity

      private double tubeSideViscosity
    • tubeSideCp

      private double tubeSideCp
    • tubeSideConductivity

      private double tubeSideConductivity
    • tubeSideMassFlowRate

      private double tubeSideMassFlowRate
    • tubeSideHeating

      private boolean tubeSideHeating
    • shellSideDensity

      private double shellSideDensity
    • shellSideViscosity

      private double shellSideViscosity
    • shellSideCp

      private double shellSideCp
    • shellSideConductivity

      private double shellSideConductivity
    • shellSideMassFlowRate

      private double shellSideMassFlowRate
    • foulingTube

      private double foulingTube
    • foulingShell

      private double foulingShell
    • shellSideMethod

      private ThermalDesignCalculator.ShellSideMethod shellSideMethod
    • vibrationResult

      private VibrationAnalysis.VibrationResult vibrationResult
  • Constructor Details

    • ShellAndTubeDesignCalculator

      public ShellAndTubeDesignCalculator()
      Creates a new ShellAndTubeDesignCalculator with default parameters.
    • ShellAndTubeDesignCalculator

      public ShellAndTubeDesignCalculator(ProcessEquipmentInterface equipment)
      Creates a calculator from existing heat exchanger equipment.
      Parameters:
      equipment - heat exchanger equipment
  • Method Details

    • calculate

      public void calculate()
      Performs the complete TEMA-based design calculation.
    • calculateTubeBundle

      private void calculateTubeBundle()
      Calculates tube bundle parameters.
    • calculateShellDimensions

      private void calculateShellDimensions(TEMAStandard.TEMAConfiguration config)
      Calculates shell dimensions.
      Parameters:
      config - TEMA configuration
    • calculateBaffles

      private void calculateBaffles()
      Calculates baffle parameters.
    • calculateWeights

      private void calculateWeights(TEMAStandard.TEMAConfiguration config)
      Calculates component weights.
      Parameters:
      config - TEMA configuration
    • estimateTubesheetThickness

      private double estimateTubesheetThickness()
      Estimates tubesheet thickness per TEMA/ASME.
      Returns:
      tubesheet thickness in mm
    • calculateCosts

      private void calculateCosts(TEMAStandard.TEMAConfiguration config)
      Calculates cost estimates.
      Parameters:
      config - TEMA configuration
    • getAllowableStress

      private double getAllowableStress(String material, double temperature)
      Gets allowable stress for material at temperature. Uses database value if loaded, otherwise falls back to simplified ASME Section II tables.
      Parameters:
      material - material name
      temperature - temperature in degrees C
      Returns:
      allowable stress in MPa
    • loadMaterialProperties

      private void loadMaterialProperties()
      Loads material properties from HeatExchangerTubeMaterials database table.
    • loadMaterialFromDB

      private void loadMaterialFromDB(String materialGrade, boolean isShell)
      Loads a single material's properties from the database.
      Parameters:
      materialGrade - the material grade to look up
      isShell - true if this is a shell material, false for tube
    • calculateTubesheetThicknessUHX

      private void calculateTubesheetThicknessUHX()
      Calculates tubesheet thickness per ASME VIII UHX-13 for fixed tubesheet exchangers.
    • calculateNozzleReinforcement

      private void calculateNozzleReinforcement()
      Calculates nozzle reinforcement per ASME VIII UG-37.
    • calculateMAWP

      private void calculateMAWP()
      Back-calculates Maximum Allowable Working Pressure (MAWP) for shell and tube sides.
    • calculateHydroTestPressure

      private void calculateHydroTestPressure()
      Calculates hydrostatic test pressure per ASME VIII UG-99.
    • performNACEAssessment

      private void performNACEAssessment()
      Performs NACE MR0175/ISO 15156 sour service assessment.
    • roundToStandardShellSize

      private double roundToStandardShellSize(double diameter)
      Rounds to standard shell sizes (pipe sizes).
      Parameters:
      diameter - diameter in mm
      Returns:
      standard diameter
    • roundToStandardPlateThickness

      private double roundToStandardPlateThickness(double thickness)
      Rounds to standard plate thickness.
      Parameters:
      thickness - thickness in mm
      Returns:
      standard thickness
    • calculateThermalHydraulic

      private void calculateThermalHydraulic()
      Performs thermal-hydraulic calculations using the ThermalDesignCalculator. Requires fluid properties to have been set via setTubeSideFluidProperties and setShellSideFluidProperties.
    • performVibrationScreening

      private void performVibrationScreening()
      Performs flow-induced vibration screening per TEMA RCB-4.6.
    • setTubeSideFluidProperties

      public void setTubeSideFluidProperties(double density, double viscosity, double cp, double conductivity, double massFlowRate, boolean heating)
      Sets tube-side fluid properties for thermal-hydraulic calculations.
      Parameters:
      density - density (kg/m3)
      viscosity - dynamic viscosity (Pa*s)
      cp - heat capacity (J/(kg*K))
      conductivity - thermal conductivity (W/(m*K))
      massFlowRate - mass flow rate (kg/s)
      heating - true if fluid is being heated
    • setShellSideFluidProperties

      public void setShellSideFluidProperties(double density, double viscosity, double cp, double conductivity, double massFlowRate)
      Sets shell-side fluid properties for thermal-hydraulic calculations.
      Parameters:
      density - density (kg/m3)
      viscosity - dynamic viscosity (Pa*s)
      cp - heat capacity (J/(kg*K))
      conductivity - thermal conductivity (W/(m*K))
      massFlowRate - mass flow rate (kg/s)
    • setFoulingTube

      public void setFoulingTube(double fouling)
      Sets tube-side fouling resistance.
      Parameters:
      fouling - fouling resistance (m2*K/W)
    • setFoulingShell

      public void setFoulingShell(double fouling)
      Sets shell-side fouling resistance.
      Parameters:
      fouling - fouling resistance (m2*K/W)
    • setShellSideMethod

      public void setShellSideMethod(ThermalDesignCalculator.ShellSideMethod method)
      Sets the shell-side thermal analysis method (Kern or Bell-Delaware).
      Parameters:
      method - analysis method
    • getThermalCalculator

      public ThermalDesignCalculator getThermalCalculator()
      Gets the thermal design calculator, available after calculate() when fluid properties are set.
      Returns:
      thermal calculator, or null if no thermal data provided
    • getVibrationResult

      public VibrationAnalysis.VibrationResult getVibrationResult()
      Gets the vibration screening result, available after calculate() when fluid properties are set.
      Returns:
      vibration result, or null if screening was not performed
    • hasThermalData

      public boolean hasThermalData()
      Checks whether thermal-hydraulic data is available.
      Returns:
      true if fluid property data has been supplied
    • setTemaDesignation

      public void setTemaDesignation(String designation)
      Sets TEMA designation (e.g., "AES").
      Parameters:
      designation - TEMA designation
    • getTemaDesignation

      public String getTemaDesignation()
      Gets TEMA designation.
      Returns:
      TEMA designation
    • setTemaClass

      public void setTemaClass(TEMAStandard.TEMAClass temaClass)
      Sets TEMA class.
      Parameters:
      temaClass - TEMA class
    • getTemaClass

      public TEMAStandard.TEMAClass getTemaClass()
      Gets TEMA class.
      Returns:
      TEMA class
    • setRequiredArea

      public void setRequiredArea(double area)
      Sets required heat transfer area in m2.
      Parameters:
      area - required area
    • getRequiredArea

      public double getRequiredArea()
      Gets required area.
      Returns:
      required area in m2
    • getActualArea

      public double getActualArea()
      Gets actual calculated area.
      Returns:
      actual area in m2
    • setShellSidePressure

      public void setShellSidePressure(double pressure)
      Sets shell side design pressure in bara.
      Parameters:
      pressure - pressure
    • setTubeSidePressure

      public void setTubeSidePressure(double pressure)
      Sets tube side design pressure in bara.
      Parameters:
      pressure - pressure
    • setDesignTemperature

      public void setDesignTemperature(double temperature)
      Sets design temperature in °C.
      Parameters:
      temperature - temperature
    • setTubeSize

      public void setTubeSize(TEMAStandard.StandardTubeSize tubeSize)
      Sets tube size.
      Parameters:
      tubeSize - standard tube size
    • setTubeLength

      public void setTubeLength(double length)
      Sets tube length in mm.
      Parameters:
      length - tube length
    • setTubePasses

      public void setTubePasses(int passes)
      Sets number of tube passes.
      Parameters:
      passes - tube passes
    • getShellInsideDiameter

      public double getShellInsideDiameter()
      Gets shell inside diameter in mm.
      Returns:
      shell ID
    • getShellOutsideDiameter

      public double getShellOutsideDiameter()
      Gets shell outside diameter in mm.
      Returns:
      shell OD
    • getShellWallThickness

      public double getShellWallThickness()
      Gets shell wall thickness in mm.
      Returns:
      shell wall thickness
    • getTubeCount

      public int getTubeCount()
      Gets tube count.
      Returns:
      tube count
    • getBaffleCount

      public int getBaffleCount()
      Gets baffle count.
      Returns:
      baffle count
    • getBaffleSpacing

      public double getBaffleSpacing()
      Gets baffle spacing in mm.
      Returns:
      baffle spacing
    • getTotalDryWeight

      public double getTotalDryWeight()
      Gets total dry weight in kg.
      Returns:
      dry weight
    • getOperatingWeight

      public double getOperatingWeight()
      Gets operating weight in kg.
      Returns:
      operating weight
    • getTotalCost

      public double getTotalCost()
      Gets total estimated cost in USD.
      Returns:
      total cost
    • toMap

      public Map<String,Object> toMap()
      Converts results to a map.
      Returns:
      map of results
    • toJson

      public String toJson()
      Converts results to JSON.
      Returns:
      JSON string
    • getTubesheetThicknessUHX

      public double getTubesheetThicknessUHX()
      Gets tubesheet thickness per ASME UHX-13.
      Returns:
      tubesheet thickness in mm
    • getMawpShellSide

      public double getMawpShellSide()
      Gets MAWP for the shell side per ASME UG-27.
      Returns:
      MAWP in bara
    • getMawpTubeSide

      public double getMawpTubeSide()
      Gets MAWP for the tube side.
      Returns:
      MAWP in bara
    • getHydroTestPressureShell

      public double getHydroTestPressureShell()
      Gets hydrostatic test pressure for the shell side per UG-99.
      Returns:
      hydro test pressure in bara
    • getHydroTestPressureTube

      public double getHydroTestPressureTube()
      Gets hydrostatic test pressure for the tube side per UG-99.
      Returns:
      hydro test pressure in bara
    • isNozzleReinforcementAdequate

      public boolean isNozzleReinforcementAdequate()
      Gets whether the nozzle reinforcement is adequate per UG-37.
      Returns:
      true if adequate
    • getNozzleReinforcementArea

      public double getNozzleReinforcementArea()
      Gets the nozzle reinforcement available area.
      Returns:
      available reinforcement area in mm2
    • setShellMaterialGrade

      public void setShellMaterialGrade(String grade)
      Sets the shell material grade for property lookup.
      Parameters:
      grade - material grade (e.g., "SA-516-70")
    • getShellMaterialGrade

      public String getShellMaterialGrade()
      Gets the shell material grade.
      Returns:
      shell material grade
    • setTubeMaterialGrade

      public void setTubeMaterialGrade(String grade)
      Sets the tube material grade for property lookup.
      Parameters:
      grade - material grade (e.g., "SA-179", "SA-213-TP316")
    • getTubeMaterialGrade

      public String getTubeMaterialGrade()
      Gets the tube material grade.
      Returns:
      tube material grade
    • getTubeThermalConductivity

      public double getTubeThermalConductivity()
      Gets the tube thermal conductivity.
      Returns:
      thermal conductivity in W/mK
    • setSourServiceAssessment

      public void setSourServiceAssessment(boolean enabled)
      Enables or disables sour service assessment per NACE MR0175.
      Parameters:
      enabled - true to enable NACE assessment
    • isSourServiceAssessment

      public boolean isSourServiceAssessment()
      Gets whether sour service assessment is enabled.
      Returns:
      true if NACE assessment is enabled
    • setH2sPartialPressure

      public void setH2sPartialPressure(double pressure)
      Sets the H2S partial pressure for sour service determination.
      Parameters:
      pressure - H2S partial pressure in bar
    • getH2sPartialPressure

      public double getH2sPartialPressure()
      Gets H2S partial pressure.
      Returns:
      H2S partial pressure in bar
    • isSourServiceRequired

      public boolean isSourServiceRequired()
      Gets whether sour service is required per NACE MR0175.
      Returns:
      true if H2S levels require sour service materials
    • getNaceIssues

      public List<String> getNaceIssues()
      Gets the list of NACE compliance issues.
      Returns:
      list of issue descriptions
    • getAppliedStandards

      public List<String> getAppliedStandards()
      Gets the list of applied design standards.
      Returns:
      list of standard references
    • setShellJointEfficiency

      public void setShellJointEfficiency(double efficiency)
      Sets shell joint efficiency per ASME VIII.
      Parameters:
      efficiency - joint efficiency (0.65 to 1.0)
    • getShellJointEfficiency

      public double getShellJointEfficiency()
      Gets shell joint efficiency.
      Returns:
      joint efficiency
    • setNozzleDiameter

      public void setNozzleDiameter(double diameter)
      Sets the nozzle diameter for reinforcement calculations.
      Parameters:
      diameter - nozzle diameter in mm
    • setNozzleWallThickness

      public void setNozzleWallThickness(double thickness)
      Sets the nozzle wall thickness.
      Parameters:
      thickness - nozzle wall thickness in mm
    • isShellNACECompliant

      public boolean isShellNACECompliant()
      Gets whether the shell material is NACE compliant.
      Returns:
      true if compliant
    • isTubeNACECompliant

      public boolean isTubeNACECompliant()
      Gets whether the tube material is NACE compliant.
      Returns:
      true if compliant