Class ThermalDesignCalculator

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

public class ThermalDesignCalculator extends Object
Thermal-hydraulic design calculator for shell and tube heat exchangers.

Calculates tube-side and shell-side heat transfer coefficients, overall heat transfer coefficient U, pressure drops, and performs zone-by-zone analysis for two-phase services. Integrates correlations from HeatTransferCoefficientCalculator with shell-and-tube geometry from ShellAndTubeDesignCalculator.

Supported methods:

  • Tube side: Gnielinski (turbulent), Dittus-Boelter (fallback), plus condensation and evaporation correlations
  • Shell side: Kern method (simple), Bell-Delaware method (detailed)
  • Overall U: Resistance-in-series model including fouling and tube wall
  • Pressure drops: Fanning/Kern correlations
  • Zone analysis: Divide into sensible/condensing/boiling zones
Version:
1.0
Author:
NeqSim Development Team
See Also:
  • Field Details

    • tubeODm

      private double tubeODm
    • tubeIDm

      private double tubeIDm
    • tubeLengthm

      private double tubeLengthm
    • tubeCount

      private int tubeCount
    • tubePasses

      private int tubePasses
    • tubePitchm

      private double tubePitchm
    • triangularPitch

      private boolean triangularPitch
    • shellIDm

      private double shellIDm
    • baffleSpacingm

      private double baffleSpacingm
    • baffleCount

      private int baffleCount
    • baffleCut

      private double baffleCut
    • tubeWallConductivity

      private double tubeWallConductivity
    • tubeDensity

      private double tubeDensity
    • tubeViscosity

      private double tubeViscosity
    • tubeCp

      private double tubeCp
    • tubeConductivity

      private double tubeConductivity
    • tubeMassFlowRate

      private double tubeMassFlowRate
    • tubeHeating

      private boolean tubeHeating
    • shellDensity

      private double shellDensity
    • shellViscosity

      private double shellViscosity
    • shellCp

      private double shellCp
    • shellConductivity

      private double shellConductivity
    • shellMassFlowRate

      private double shellMassFlowRate
    • shellViscosityWall

      private double shellViscosityWall
    • foulingTube

      private double foulingTube
    • foulingShell

      private double foulingShell
    • tubeSideHTC

      private double tubeSideHTC
    • shellSideHTC

      private double shellSideHTC
    • overallU

      private double overallU
    • tubeSidePressureDrop

      private double tubeSidePressureDrop
    • shellSidePressureDrop

      private double shellSidePressureDrop
    • tubeSideVelocity

      private double tubeSideVelocity
    • shellSideVelocity

      private double shellSideVelocity
    • tubeSideRe

      private double tubeSideRe
    • shellSideRe

      private double shellSideRe
    • Jc

      private double Jc
    • Jl

      private double Jl
    • Jb

      private double Jb
    • Js

      private double Js
    • Jr

      private double Jr
    • shellSideMethod

      private ThermalDesignCalculator.ShellSideMethod shellSideMethod
    • tubeToBaffleClearance

      private double tubeToBaffleClearance
    • shellToBaffleClearance

      private double shellToBaffleClearance
    • bypassArea

      private double bypassArea
    • hasSealing

      private boolean hasSealing
    • sealingPairs

      private int sealingPairs
  • Constructor Details

    • ThermalDesignCalculator

      public ThermalDesignCalculator()
      Creates a new ThermalDesignCalculator with default parameters.
  • Method Details

    • calculate

      public void calculate()
      Performs the full thermal-hydraulic calculation.

      Calculates tube-side HTC, shell-side HTC, overall U, and pressure drops.

    • calculateTubeSide

      private void calculateTubeSide()
      Calculates tube-side heat transfer coefficient using Gnielinski or Dittus-Boelter correlation.
    • calculateShellSide

      private void calculateShellSide()
      Calculates shell-side heat transfer coefficient using the selected method.
    • calculateShellSideKern

      private void calculateShellSideKern()
      Calculates shell-side HTC using the Kern method.
    • calculateShellSideBellDelaware

      private void calculateShellSideBellDelaware()
      Calculates shell-side HTC using the Bell-Delaware method with correction factors.
    • calculateOverallU

      private void calculateOverallU()
      Calculates the overall heat transfer coefficient based on outside tube area.

      Resistance model:

      1/U_o = 1/h_o + R_fo + (d_o * ln(d_o/d_i))/(2*k_w) + (d_o/d_i)*(R_fi + 1/h_i)
      
    • calculateTubeSidePressureDrop

      private void calculateTubeSidePressureDrop()
      Calculates tube-side pressure drop.

      Includes straight-tube friction and return losses:

      dP_tube = N_p * (f * L / d_i * rho * v ^ 2 / 2 + 2.5 * rho * v ^ 2 / 2)
      
    • calculateShellSidePressureDrop

      private void calculateShellSidePressureDrop()
      Calculates shell-side pressure drop.
    • calculateShellSidePressureDropKern

      private void calculateShellSidePressureDropKern()
      Kern shell-side pressure drop calculation.
    • calculateShellSidePressureDropBellDelaware

      private void calculateShellSidePressureDropBellDelaware()
      Bell-Delaware shell-side pressure drop with correction factors.
    • calculateZones

      Performs zone-by-zone analysis for a phase-changing service.

      Divides the exchanger into zones based on fluid phase: desuperheating, condensing, subcooling (or preheating, boiling, superheating). Computes effective U and required area for each zone.

      Parameters:
      zones - array of zone definitions with fluid properties per zone
      Returns:
      array of zone results
    • calcDarcyFriction

      static double calcDarcyFriction(double Re)
      Calculates Darcy friction factor using Swamee-Jain for turbulent, 64/Re for laminar.
      Parameters:
      Re - Reynolds number
      Returns:
      Darcy friction factor
    • toMap

      public Map<String,Object> toMap()
      Returns all computed results as a map.
      Returns:
      map of result keys and values
    • toJson

      public String toJson()
      Converts all computed results to a JSON string.
      Returns:
      JSON string with pretty printing
    • getTubeSideHTC

      public double getTubeSideHTC()
      Gets the tube-side heat transfer coefficient.
      Returns:
      tube-side HTC (W/(m2*K))
    • getShellSideHTC

      public double getShellSideHTC()
      Gets the shell-side heat transfer coefficient.
      Returns:
      shell-side HTC (W/(m2*K))
    • getOverallU

      public double getOverallU()
      Gets the overall heat transfer coefficient based on outside area.
      Returns:
      overall U (W/(m2*K))
    • getTubeSidePressureDrop

      public double getTubeSidePressureDrop()
      Gets the tube-side pressure drop.
      Returns:
      pressure drop (Pa)
    • getTubeSidePressureDropBar

      public double getTubeSidePressureDropBar()
      Gets the tube-side pressure drop in bar.
      Returns:
      pressure drop (bar)
    • getShellSidePressureDrop

      public double getShellSidePressureDrop()
      Gets the shell-side pressure drop.
      Returns:
      pressure drop (Pa)
    • getShellSidePressureDropBar

      public double getShellSidePressureDropBar()
      Gets the shell-side pressure drop in bar.
      Returns:
      pressure drop (bar)
    • getTubeSideVelocity

      public double getTubeSideVelocity()
      Gets the tube-side velocity.
      Returns:
      velocity (m/s)
    • getShellSideVelocity

      public double getShellSideVelocity()
      Gets the shell-side velocity.
      Returns:
      velocity (m/s)
    • getTubeSideRe

      public double getTubeSideRe()
      Gets the tube-side Reynolds number.
      Returns:
      Reynolds number
    • getShellSideRe

      public double getShellSideRe()
      Gets the shell-side Reynolds number.
      Returns:
      Reynolds number
    • setTubeODm

      public void setTubeODm(double tubeODm)
      Sets tube outer diameter.
      Parameters:
      tubeODm - tube OD (m)
    • setTubeIDm

      public void setTubeIDm(double tubeIDm)
      Sets tube inner diameter.
      Parameters:
      tubeIDm - tube ID (m)
    • setTubeLengthm

      public void setTubeLengthm(double tubeLengthm)
      Sets tube length.
      Parameters:
      tubeLengthm - tube length (m)
    • setTubeCount

      public void setTubeCount(int tubeCount)
      Sets tube count.
      Parameters:
      tubeCount - number of tubes
    • setTubePasses

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

      public void setTubePitchm(double tubePitchm)
      Sets tube pitch.
      Parameters:
      tubePitchm - tube pitch (m)
    • setTriangularPitch

      public void setTriangularPitch(boolean triangularPitch)
      Sets whether tube layout is triangular.
      Parameters:
      triangularPitch - true for triangular, false for square
    • setShellIDm

      public void setShellIDm(double shellIDm)
      Sets shell inside diameter.
      Parameters:
      shellIDm - shell ID (m)
    • setBaffleSpacingm

      public void setBaffleSpacingm(double baffleSpacingm)
      Sets baffle spacing.
      Parameters:
      baffleSpacingm - baffle spacing (m)
    • setBaffleCount

      public void setBaffleCount(int baffleCount)
      Sets baffle count.
      Parameters:
      baffleCount - number of baffles
    • setBaffleCut

      public void setBaffleCut(double baffleCut)
      Sets baffle cut fraction.
      Parameters:
      baffleCut - baffle cut as fraction (e.g., 0.25)
    • setTubeWallConductivity

      public void setTubeWallConductivity(double conductivity)
      Sets tube wall thermal conductivity.
      Parameters:
      conductivity - thermal conductivity (W/(m*K))
    • setTubeSideFluid

      public void setTubeSideFluid(double density, double viscosity, double cp, double conductivity, double massFlowRate, boolean heating)
      Sets all tube-side fluid properties.
      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 tube fluid is being heated
    • setShellSideFluid

      public void setShellSideFluid(double density, double viscosity, double cp, double conductivity, double massFlowRate)
      Sets all shell-side fluid properties.
      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 the tube-side fouling resistance.
      Parameters:
      fouling - fouling resistance (m2*K/W)
    • setFoulingShell

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

      public void setShellSideMethod(ThermalDesignCalculator.ShellSideMethod method)
      Sets the shell-side analysis method.
      Parameters:
      method - KERN or BELL_DELAWARE
    • getShellSideMethod

      public ThermalDesignCalculator.ShellSideMethod getShellSideMethod()
      Gets the shell-side analysis method.
      Returns:
      method KERN or BELL_DELAWARE
    • setShellViscosityWall

      public void setShellViscosityWall(double viscosity)
      Sets the shell-side viscosity at wall temperature for viscosity correction.
      Parameters:
      viscosity - viscosity at wall temperature (Pa*s), or negative to use bulk value
    • setHasSealing

      public void setHasSealing(boolean hasSealing)
      Sets whether sealing strips are installed.
      Parameters:
      hasSealing - true if sealing strips present
    • setSealingPairs

      public void setSealingPairs(int sealingPairs)
      Sets the number of sealing strip pairs.
      Parameters:
      sealingPairs - number of pairs
    • setTubeToBaffleClearance

      public void setTubeToBaffleClearance(double clearance)
      Sets the tube-to-baffle clearance.
      Parameters:
      clearance - clearance (m)
    • setShellToBaffleClearance

      public void setShellToBaffleClearance(double clearance)
      Sets the shell-to-baffle clearance.
      Parameters:
      clearance - clearance (m)
    • setBypassArea

      public void setBypassArea(double area)
      Sets the bypass area between bundle and shell.
      Parameters:
      area - bypass area (m2)