Class HeatExchangerMechanicalDesign

java.lang.Object
neqsim.process.mechanicaldesign.MechanicalDesign
neqsim.process.mechanicaldesign.heatexchanger.HeatExchangerMechanicalDesign
All Implemented Interfaces:
Serializable

public class HeatExchangerMechanicalDesign extends MechanicalDesign
Mechanical design for a generic heat exchanger. Provides detailed sizing estimates for supported exchanger configurations and selects a preferred option based on configurable criteria.

The implementation supports both full two-stream heat exchangers and single-stream heaters or coolers that only know their process-side conditions. When the utility side is described through UtilityStreamSpecification the sizing routine derives approximate UA and approach temperatures before computing a simplified geometric layout.

See Also:
  • Field Details

    • serialVersionUID

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

      private static final double DEFAULT_OVERALL_HEAT_TRANSFER_COEFFICIENT
      See Also:
    • usedOverallHeatTransferCoefficient

      private double usedOverallHeatTransferCoefficient
    • calculatedUA

      private double calculatedUA
    • logMeanTemperatureDifference

      private double logMeanTemperatureDifference
    • approachTemperature

      private double approachTemperature
    • designPressureMargin

      private double designPressureMargin
      Design pressure margin factor (e.g., 1.10 for 10% margin).
    • designTemperatureMarginC

      private double designTemperatureMarginC
      Design temperature margin above max operating in Celsius.
    • minApproachTemperatureC

      private double minApproachTemperatureC
      Minimum approach temperature in Celsius.
    • dutyMargin

      private double dutyMargin
      Design duty margin factor (e.g., 1.10 for 10% margin).
    • areaMargin

      private double areaMargin
      Area margin factor (e.g., 1.15 for 15% excess area).
    • foulingResistanceShellWater

      private double foulingResistanceShellWater
      Shell side fouling resistance for water service.
    • foulingResistanceShellHC

      private double foulingResistanceShellHC
      Shell side fouling resistance for hydrocarbon service.
    • foulingResistanceTubeWater

      private double foulingResistanceTubeWater
      Tube side fouling resistance for water service.
    • foulingResistanceTubeHC

      private double foulingResistanceTubeHC
      Tube side fouling resistance for hydrocarbon service.
    • maxTubeVelocity

      private double maxTubeVelocity
      Maximum tube side velocity to prevent erosion.
    • minTubeVelocity

      private double minTubeVelocity
      Minimum tube side velocity to prevent excessive fouling.
    • maxShellVelocity

      private double maxShellVelocity
      Maximum shell side velocity.
    • temaClass

      private String temaClass
      TEMA class: "R" (refinery/severe), "C" (commercial), "B" (chemical).
    • temaShellType

      private String temaShellType
      TEMA shell type: "E", "F", "G", "H", "J", "K", "X".
    • temaFrontHeadType

      private String temaFrontHeadType
      TEMA front head type: "A", "B", "C", "N", "D".
    • temaRearHeadType

      private String temaRearHeadType
      TEMA rear head type: "L", "M", "N", "P", "S", "T", "U", "W".
    • tubeOuterDiameterMm

      private double tubeOuterDiameterMm
      Tube outer diameter in mm (standard sizes: 19.05, 25.4 mm).
    • tubeWallThicknessMm

      private double tubeWallThicknessMm
      Tube wall thickness in mm (BWG gauge).
    • maxTubeLengthM

      private double maxTubeLengthM
      Maximum tube length in m.
    • tubePitchRatio

      private double tubePitchRatio
      Tube pitch ratio (pitch/OD), typically 1.25-1.50.
    • tubeLayoutPattern

      private String tubeLayoutPattern
      Tube layout pattern: "triangular", "rotated_triangular", "square", "rotated_square".
    • tubePasses

      private int tubePasses
      Number of tube passes.
    • shellPasses

      private int shellPasses
      Number of shell passes.
    • baffleCutPercent

      private double baffleCutPercent
      Baffle cut as percentage of shell diameter (typically 20-35%).
    • baffleSpacingRatio

      private double baffleSpacingRatio
      Baffle spacing as fraction of shell diameter (typically 0.2-1.0).
    • candidateTypes

      private List<HeatExchangerType> candidateTypes
    • selectionCriterion

    • manualSelection

      private HeatExchangerType manualSelection
    • sizingResults

      private List<HeatExchangerSizingResult> sizingResults
    • selectedSizingResult

      private HeatExchangerSizingResult selectedSizingResult
  • Constructor Details

  • Method Details

    • calcDesign

      public void calcDesign()

      calcDesign.

      Overrides:
      calcDesign in class MechanicalDesign
    • handleTwoStreamThermalData

      private void handleTwoStreamThermalData(HeatExchanger exchanger, double duty)
    • handleSingleStreamThermalData

      private void handleSingleStreamThermalData(Heater heater, UtilityStreamSpecification specification, double duty)
    • finalizeThermalEstimates

      private void finalizeThermalEstimates(double duty)
    • buildSizingResults

      private void buildSizingResults(HeatExchanger exchanger, double duty, boolean useTypeSpecificCoefficient)
    • determineTypesToEvaluate

      private List<HeatExchangerType> determineTypesToEvaluate()
    • selectPreferredResult

      private void selectPreferredResult()
    • applySelectedSizing

      private void applySelectedSizing()
    • setCandidateTypes

      public void setCandidateTypes(List<HeatExchangerType> types)
    • setCandidateTypes

      public void setCandidateTypes(HeatExchangerType... types)
    • getCandidateTypes

      public List<HeatExchangerType> getCandidateTypes()
    • getSelectionCriterion

      public HeatExchangerMechanicalDesign.SelectionCriterion getSelectionCriterion()
    • setSelectionCriterion

      public void setSelectionCriterion(HeatExchangerMechanicalDesign.SelectionCriterion selectionCriterion)
    • getManualSelection

      public HeatExchangerType getManualSelection()
    • setManualSelection

      public void setManualSelection(HeatExchangerType manualSelection)
    • getSizingResults

      public List<HeatExchangerSizingResult> getSizingResults()
    • getSelectedSizingResult

      public HeatExchangerSizingResult getSelectedSizingResult()
    • getSelectedType

      public HeatExchangerType getSelectedType()
    • getSizingSummary

      public String getSizingSummary()
    • getCalculatedUA

      public double getCalculatedUA()
      Returns:
      Calculated UA (W/K) based on the available duty and temperature approach information.
    • getLogMeanTemperatureDifference

      public double getLogMeanTemperatureDifference()
      Returns:
      Log-mean temperature difference used for the simplified sizing (K).
    • getApproachTemperature

      public double getApproachTemperature()
      Returns:
      Minimum temperature difference between the hot and cold streams (K).
    • getUsedOverallHeatTransferCoefficient

      public double getUsedOverallHeatTransferCoefficient()
      Returns:
      Overall heat-transfer coefficient used during the calculation (W/(m^2*K)).
    • determineDuty

      private double determineDuty(ProcessEquipmentInterface equipment)
    • determineTwoStreamTemperatures

      private double[] determineTwoStreamTemperatures(HeatExchanger exchanger)
    • determineSingleStreamTemperatures

      private double[] determineSingleStreamTemperatures(Heater heater, UtilityStreamSpecification spec, double duty)
    • calculateLmtd

      private double calculateLmtd(double deltaT1, double deltaT2)
    • getDesignPressureMargin

      public double getDesignPressureMargin()
      Gets the design pressure margin factor.
      Returns:
      design pressure margin (e.g., 1.10 for 10% margin)
    • setDesignPressureMargin

      public void setDesignPressureMargin(double margin)
      Sets the design pressure margin factor.
      Parameters:
      margin - margin factor (e.g., 1.10 for 10%)
    • getDesignTemperatureMarginC

      public double getDesignTemperatureMarginC()
      Gets the design temperature margin in Celsius.
      Returns:
      temperature margin in Celsius
    • setDesignTemperatureMarginC

      public void setDesignTemperatureMarginC(double marginC)
      Sets the design temperature margin in Celsius.
      Parameters:
      marginC - temperature margin in Celsius
    • getMinApproachTemperatureC

      public double getMinApproachTemperatureC()
      Gets the minimum approach temperature.
      Returns:
      minimum approach temperature in Celsius
    • setMinApproachTemperatureC

      public void setMinApproachTemperatureC(double tempC)
      Sets the minimum approach temperature.
      Parameters:
      tempC - minimum approach temperature in Celsius
    • getDutyMargin

      public double getDutyMargin()
      Gets the duty margin factor.
      Returns:
      duty margin factor
    • setDutyMargin

      public void setDutyMargin(double margin)
      Sets the duty margin factor.
      Parameters:
      margin - duty margin factor
    • getAreaMarginFactor

      public double getAreaMarginFactor()
      Gets the area margin factor.
      Returns:
      area margin factor
    • setAreaMarginFactor

      public void setAreaMarginFactor(double margin)
      Sets the area margin factor.
      Parameters:
      margin - area margin factor
    • getFoulingResistanceShellWater

      public double getFoulingResistanceShellWater()
      Gets the shell side fouling resistance for water service.
      Returns:
      fouling resistance in m²K/W
    • setFoulingResistanceShellWater

      public void setFoulingResistanceShellWater(double resistance)
      Sets the shell side fouling resistance for water service.
      Parameters:
      resistance - fouling resistance in m²K/W
    • getFoulingResistanceShellHC

      public double getFoulingResistanceShellHC()
      Gets the shell side fouling resistance for hydrocarbon service.
      Returns:
      fouling resistance in m²K/W
    • setFoulingResistanceShellHC

      public void setFoulingResistanceShellHC(double resistance)
      Sets the shell side fouling resistance for hydrocarbon service.
      Parameters:
      resistance - fouling resistance in m²K/W
    • getFoulingResistanceTubeWater

      public double getFoulingResistanceTubeWater()
      Gets the tube side fouling resistance for water service.
      Returns:
      fouling resistance in m²K/W
    • setFoulingResistanceTubeWater

      public void setFoulingResistanceTubeWater(double resistance)
      Sets the tube side fouling resistance for water service.
      Parameters:
      resistance - fouling resistance in m²K/W
    • getFoulingResistanceTubeHC

      public double getFoulingResistanceTubeHC()
      Gets the tube side fouling resistance for hydrocarbon service.
      Returns:
      fouling resistance in m²K/W
    • setFoulingResistanceTubeHC

      public void setFoulingResistanceTubeHC(double resistance)
      Sets the tube side fouling resistance for hydrocarbon service.
      Parameters:
      resistance - fouling resistance in m²K/W
    • calculateTotalFoulingResistance

      public double calculateTotalFoulingResistance(boolean shellServiceWater, boolean tubeServiceWater)
      Calculates the overall fouling resistance for given service types.
      Parameters:
      shellServiceWater - true if shell side is water service
      tubeServiceWater - true if tube side is water service
      Returns:
      total fouling resistance in m²K/W
    • getMaxTubeVelocity

      public double getMaxTubeVelocity()
      Gets the maximum tube side velocity.
      Returns:
      maximum velocity in m/s
    • setMaxTubeVelocity

      public void setMaxTubeVelocity(double velocity)
      Sets the maximum tube side velocity.
      Parameters:
      velocity - maximum velocity in m/s
    • getMinTubeVelocity

      public double getMinTubeVelocity()
      Gets the minimum tube side velocity.
      Returns:
      minimum velocity in m/s
    • setMinTubeVelocity

      public void setMinTubeVelocity(double velocity)
      Sets the minimum tube side velocity.
      Parameters:
      velocity - minimum velocity in m/s
    • getMaxShellVelocity

      public double getMaxShellVelocity()
      Gets the maximum shell side velocity.
      Returns:
      maximum velocity in m/s
    • setMaxShellVelocity

      public void setMaxShellVelocity(double velocity)
      Sets the maximum shell side velocity.
      Parameters:
      velocity - maximum velocity in m/s
    • getTemaClass

      public String getTemaClass()
      Gets the TEMA class.
      Returns:
      TEMA class ("R", "C", or "B")
    • setTemaClass

      public void setTemaClass(String temaClass)
      Sets the TEMA class.
      Parameters:
      temaClass - TEMA class ("R" refinery, "C" commercial, "B" chemical)
    • getTemaShellType

      public String getTemaShellType()
      Gets the TEMA shell type.
      Returns:
      TEMA shell type code
    • setTemaShellType

      public void setTemaShellType(String shellType)
      Sets the TEMA shell type.
      Parameters:
      shellType - TEMA shell type ("E", "F", "G", "H", "J", "K", "X")
    • getTemaFrontHeadType

      public String getTemaFrontHeadType()
      Gets the TEMA front head type.
      Returns:
      TEMA front head type code
    • setTemaFrontHeadType

      public void setTemaFrontHeadType(String headType)
      Sets the TEMA front head type.
      Parameters:
      headType - TEMA front head type ("A", "B", "C", "N", "D")
    • getTemaRearHeadType

      public String getTemaRearHeadType()
      Gets the TEMA rear head type.
      Returns:
      TEMA rear head type code
    • setTemaRearHeadType

      public void setTemaRearHeadType(String headType)
      Sets the TEMA rear head type.
      Parameters:
      headType - TEMA rear head type
    • getTemaDesignation

      public String getTemaDesignation()
      Gets the full TEMA designation (e.g., "AES").
      Returns:
      TEMA designation string
    • getTubeOuterDiameterMm

      public double getTubeOuterDiameterMm()
      Gets the tube outer diameter.
      Returns:
      tube OD in mm
    • setTubeOuterDiameterMm

      public void setTubeOuterDiameterMm(double diameterMm)
      Sets the tube outer diameter.
      Parameters:
      diameterMm - tube OD in mm
    • getTubeWallThicknessMm

      public double getTubeWallThicknessMm()
      Gets the tube wall thickness.
      Returns:
      tube wall thickness in mm
    • setTubeWallThicknessMm

      public void setTubeWallThicknessMm(double thicknessMm)
      Sets the tube wall thickness.
      Parameters:
      thicknessMm - tube wall thickness in mm
    • getMaxTubeLengthM

      public double getMaxTubeLengthM()
      Gets the maximum tube length.
      Returns:
      maximum tube length in m
    • setMaxTubeLengthM

      public void setMaxTubeLengthM(double lengthM)
      Sets the maximum tube length.
      Parameters:
      lengthM - maximum tube length in m
    • getTubePitchRatio

      public double getTubePitchRatio()
      Gets the tube pitch ratio.
      Returns:
      tube pitch ratio (pitch/OD)
    • setTubePitchRatio

      public void setTubePitchRatio(double ratio)
      Sets the tube pitch ratio.
      Parameters:
      ratio - tube pitch ratio (typically 1.25-1.50)
    • getTubeLayoutPattern

      public String getTubeLayoutPattern()
      Gets the tube layout pattern.
      Returns:
      tube layout pattern
    • setTubeLayoutPattern

      public void setTubeLayoutPattern(String pattern)
      Sets the tube layout pattern.
      Parameters:
      pattern - layout pattern ("triangular", "rotated_triangular", "square", "rotated_square")
    • getTubePasses

      public int getTubePasses()
      Gets the number of tube passes.
      Returns:
      number of tube passes
    • setTubePasses

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

      public int getShellPasses()
      Gets the number of shell passes.
      Returns:
      number of shell passes
    • setShellPasses

      public void setShellPasses(int passes)
      Sets the number of shell passes.
      Parameters:
      passes - number of shell passes
    • getBaffleCutPercent

      public double getBaffleCutPercent()
      Gets the baffle cut percentage.
      Returns:
      baffle cut as percentage of shell diameter
    • setBaffleCutPercent

      public void setBaffleCutPercent(double percent)
      Sets the baffle cut percentage.
      Parameters:
      percent - baffle cut as percentage (typically 20-35)
    • getBaffleSpacingRatio

      public double getBaffleSpacingRatio()
      Gets the baffle spacing ratio.
      Returns:
      baffle spacing as fraction of shell diameter
    • setBaffleSpacingRatio

      public void setBaffleSpacingRatio(double ratio)
      Sets the baffle spacing ratio.
      Parameters:
      ratio - baffle spacing as fraction of shell diameter (0.2-1.0)
    • loadProcessDesignParameters

      public void loadProcessDesignParameters()
      Loads heat exchanger design parameters from the database.
    • validateTubeVelocity

      public boolean validateTubeVelocity(double actualVelocity)
      Validates that tube side velocity is within acceptable limits.
      Parameters:
      actualVelocity - actual tube side velocity in m/s
      Returns:
      true if velocity is within acceptable range
    • validateShellVelocity

      public boolean validateShellVelocity(double actualVelocity)
      Validates that shell side velocity is within acceptable limits.
      Parameters:
      actualVelocity - actual shell side velocity in m/s
      Returns:
      true if velocity is acceptable
    • validateApproachTemperature

      public boolean validateApproachTemperature(double actualApproach)
      Validates that approach temperature meets minimum requirements.
      Parameters:
      actualApproach - actual approach temperature in Celsius
      Returns:
      true if approach temperature is acceptable
    • validateTubeLength

      public boolean validateTubeLength(double actualLengthM)
      Validates that tube length is within acceptable limits.
      Parameters:
      actualLengthM - actual tube length in meters
      Returns:
      true if tube length is acceptable
    • calculateCleanU

      public double calculateCleanU(double shellHTC, double tubeHTC, double wallThicknessMm, double wallConductivity)
      Calculates the clean overall heat transfer coefficient (without fouling).
      Parameters:
      shellHTC - shell side heat transfer coefficient in W/(m²K)
      tubeHTC - tube side heat transfer coefficient in W/(m²K)
      wallThicknessMm - tube wall thickness in mm
      wallConductivity - tube wall thermal conductivity in W/(mK), typically 45 for CS
      Returns:
      clean U-value in W/(m²K)
    • calculateFouledU

      public double calculateFouledU(double cleanU, boolean shellServiceWater, boolean tubeServiceWater)
      Calculates the fouled overall heat transfer coefficient.
      Parameters:
      cleanU - clean U-value in W/(m²K)
      shellServiceWater - true if shell side is water service
      tubeServiceWater - true if tube side is water service
      Returns:
      fouled U-value in W/(m²K)
    • validateDesign

      Performs comprehensive validation of heat exchanger design.
      Returns:
      HeatExchangerValidationResult with status and any issues found