Skip to content

Advanced Heat Exchanger

DWSIM Plus

Available with a DWSIM Plus (Patreon) subscription.

DWSIM.UnitOperations.AdvancedHeatExchanger.AdvancedHeatExchanger
Assembly DWSIM.UnitOperations.AdvancedHeatExchanger.dll · Object ← BaseClass ← UnitOpBaseClass ← AdvancedHeatExchanger

At a glance

Advanced Heat Exchanger in the example flowsheet

Port Index Connected in the example
Inlet, material 0 Hot-in
Inlet, material 1 Cold-in
Outlet, material 0 Hot-out
Outlet, material 1 Cold-out

Example

This code runs on every build of this site, and the output below is what it printed.

fs = (Flowsheet.Create("AHXExample")
      .WithCompound("Water")
      .WithPropertyPackage(PropertyPackages.SteamTables))

hot_in = fs.AddMaterialStream("Hot-in").At(Q.Celsius(90.0), Q.Bar(3.0)).WithMassFlow(Q.KgPerSecond(5.0))
cold_in = fs.AddMaterialStream("Cold-in").At(Q.Celsius(20.0), Q.Bar(3.0)).WithMassFlow(Q.KgPerSecond(8.0))
hot_out = fs.AddMaterialStream("Hot-out")
cold_out = fs.AddMaterialStream("Cold-out")

hx = (fs.AddAdvancedHeatExchanger("E-1")
      .WithCalculationMode(AdvHXCalcMode.Simulation)
      .WithOverallU(800.0)                   # W/(m2.K)
      .ConnectFeed(hot_in, 0).ConnectProduct(hot_out, 0)
      .ConnectFeed(cold_in, 1).ConnectProduct(cold_out, 1))

fs.AutoLayout()
fs.Solve()

duty = 5.0 * (hot_in.Object.Phases[0].Properties.enthalpy - hot_out.Object.Phases[0].Properties.enthalpy)
print(f"Hot outlet   = {hot_out.TemperatureK - 273.15:.2f} C")
print(f"Cold outlet  = {cold_out.TemperatureK - 273.15:.2f} C")
print(f"Duty         = {duty:.1f} kW")

Output

Hot outlet   = 47.57 C
Cold outlet  = 46.58 C
Duty         = 888.6 kW

DWSIM 10.2.11.0, generated 2026-10-08.

Calculation modes

Set with CalculationMode (AdvHXCalcMode).

Mode Value What it does
Rating 0 Rating: compute Q, temperatures, and pressure drops from known geometry.
Design 1 Design: size the exchanger to meet a specified outlet temperature.
Simulation 2 Simulation: use a user-specified U; compute Q and outlet temperatures.
FoulingFactor 3 Fouling Factor: back-calculate the fouling resistance from known inlet/outlet temperatures.

Properties

IDs accepted by GetPropertyValue, SetPropertyValue, the sensitivity analysis, the optimizer, the Adjust block and dynamic events. Units are SI; pass another unit system to GetPropertyValue to get them converted.

All 107 properties
ID Name Unit (SI) Input
Calculation Mode result
Flow Direction result
Number of Increments result
Max Iterations result
Tolerance result
Overall Coefficient W/[m2.K] result
Hot Side Outlet Temperature Spec K result
Cold Side Outlet Temperature Spec K result
Kettle Vapor Fraction Spec result
Shell TEMA Type result
Shell Inside Diameter mm result
Shell Number of Passes result
Shells in Series result
Shell Fouling Factor K.m2/W result
Baffle Type result
Baffle Orientation result
Baffle Cut % result
Central Baffle Spacing m result
Inlet Baffle Spacing m result
Outlet Baffle Spacing m result
Sealing Strip Pairs result
Shell-Baffle Diametral Clearance mm result
Shell-Side Fluid result
Kettle Reboiler result
Kettle Shell Inside Diameter mm result
Kettle Liquid Level Above Bundle mm result
Kettle Bundle Bottom Clearance mm result
Kettle Minimum Vapor Space mm result
Kettle Disengagement Coefficient result
Kettle Maximum Heat Flux Fraction result
Kettle Maximum Heat Flux W/m2 result
Tube Outside Diameter mm result
Tube Inside Diameter mm result
Tube Length m result
Tube Fouling Factor K.m2/W result
Number of Tubes per Shell result
Tube Passes per Shell result
Tube Pitch mm result
Tube Layout result
Tube Thermal Conductivity W/[m.K] result
Tube Roughness mm result
Tube-Baffle Diametral Clearance mm result
Tube-Side Fluid result
Shell Inlet Nozzle Diameter mm result
Shell Outlet Nozzle Diameter mm result
Tube Inlet Nozzle Diameter mm result
Tube Outlet Nozzle Diameter mm result
Design Pressure (Shell) Pa result
Design Pressure (Tube) Pa result
Design Temperature (Shell) K result
Design Temperature (Tube) K result
Test Pressure (Shell) Pa result
Test Pressure (Tube) Pa result
Corrosion Allowance mm result
Shell Wall Thickness mm result
Shell Material result
Tube Material result
Tubesheet Joint Type result
Heat Duty kW result
Thermal Efficiency % result
Hot Side Outlet Temperature K result
Cold Side Outlet Temperature K result
LMTD K (difference) result
F Factor result
Overall Coefficient Calc W/[m2.K] result
Heat Transfer Area m² result
Shell-Side Coefficient W/[m2.K] result
Tube-Side Coefficient W/[m2.K] result
Overall Fouling Factor K.m2/W result
Shell-Side Pressure Drop Pa result
Tube-Side Pressure Drop Pa result
Tube Bundle Diameter mm result
Effective Tube Length m result
Heat Transfer Area (Internal) m² result
Heat Transfer Area (External) m² result
Number of Baffles result
Tube-Side Flow Area m² result
Shell-Side Flow Area m² result
Tube-Side Velocity m/s result
Shell-Side Velocity m/s result
Nozzle Shell Inlet Velocity m/s result
Nozzle Shell Outlet Velocity m/s result
Nozzle Tube Inlet Velocity m/s result
Nozzle Tube Outlet Velocity m/s result
Nozzle Shell Inlet rho*v2 Pa result
Nozzle Shell Outlet rho*v2 Pa result
Nozzle Tube Inlet rho*v2 Pa result
Nozzle Tube Outlet rho*v2 Pa result
Shell-Side Volume m³ result
Tube-Side Volume m³ result
Weight (Empty) kg result
Weight (Operating) kg result
Weight (Wet Test) kg result
Kettle Shell Diameter mm result
Kettle Shell to Bundle Ratio result
Kettle Weir Height mm result
Kettle Vapor Space mm result
Kettle Free Surface Area m2 result
Kettle Vapor Velocity m/s result
Kettle Allowable Vapor Velocity m/s result
Kettle Vapor Generated kg/s result
Kettle Vaporized Fraction result
Kettle Pool Temperature K result
Kettle Heat Flux W/m2 result
Kettle Critical Heat Flux W/m2 result
Kettle Heat Flux Ratio result
Kettle Liquid Inventory m3 result

Learn more

API members

Public members declared by this class. Inherited members are documented on the base classes.

Constructors

AdvancedHeatExchanger()
public AdvancedHeatExchanger()
Public Sub New()

Properties

Area: Gets or sets the total heat transfer area from the tube geometry, in m2.

Gets or sets the total heat transfer area from the tube geometry, in m2.

public double Area { get; set; }
Public Property Area As Double

CalculationMode: Gets or sets the calculation mode: Rating (default; duty, outlet temperatures and pressure drops from the geometry)...

Gets or sets the calculation mode: Rating (default; duty, outlet temperatures and pressure drops from the geometry), Design (sizes the tube count and shell diameter to meet an outlet temperature or kettle vapor fraction spec), Simulation (uses the user-specified OverallCoefficient), FoulingFactor (back-calculates the overall fouling factor from both outlet temperature specs).

public AdvHXCalcMode CalculationMode { get; set; }
Public Property CalculationMode As AdvHXCalcMode

ColdSideOutletTemperature: Gets or sets the calculated cold side outlet temperature, in K.

Gets or sets the calculated cold side outlet temperature, in K.

public double ColdSideOutletTemperature { get; set; }
Public Property ColdSideOutletTemperature As Double

ColdSideOutletTemperatureSpec: Gets or sets the specified cold side outlet temperature, in K.

Gets or sets the specified cold side outlet temperature, in K. Used in Design mode when no hot side spec is given, and required in FoulingFactor mode. null when not specified.

public double? ColdSideOutletTemperatureSpec { get; set; }
Public Property ColdSideOutletTemperatureSpec As Double?

ComponentDescription: Gets or sets the CAPE-OPEN component description for this unit operation.

Gets or sets the CAPE-OPEN component description for this unit operation.

public override string ComponentDescription { get; set; }
Public Overrides Property ComponentDescription As String

FlowDir: Gets or sets the flow arrangement of the two fluids: CounterCurrent (default) or CoCurrent.

Gets or sets the flow arrangement of the two fluids: CounterCurrent (default) or CoCurrent.

public FlowDirection FlowDir { get; set; }
Public Property FlowDir As FlowDirection

HotSideOutletTemperature: Gets or sets the calculated hot side outlet temperature, in K.

Gets or sets the calculated hot side outlet temperature, in K.

public double HotSideOutletTemperature { get; set; }
Public Property HotSideOutletTemperature As Double

HotSideOutletTemperatureSpec: Gets or sets the specified hot side outlet temperature, in K.

Gets or sets the specified hot side outlet temperature, in K. Used in Design mode (it takes precedence over the cold side spec) and required in FoulingFactor mode. null when not specified.

public double? HotSideOutletTemperatureSpec { get; set; }
Public Property HotSideOutletTemperatureSpec As Double?

IsPremium: Gets a value indicating that this unit operation is listed in the Premium group of the object palette (always true).

Gets a value indicating that this unit operation is listed in the Premium group of the object palette (always true).

public bool IsPremium { get; }
Public ReadOnly Property IsPremium As Boolean

KettleVaporFractionSpec: Kettle design spec: molar vapor fraction of the shell-side outlet (the vapor generated over the liquid fed).

Kettle design spec: molar vapor fraction of the shell-side outlet (the vapor generated over the liquid fed).

public double? KettleVaporFractionSpec { get; set; }
Public Property KettleVaporFractionSpec As Double?

KettleWarnings: Gets or sets the kettle reboiler warnings of the last calculation (vapor space, heat flux limits and similar).

Gets or sets the kettle reboiler warnings of the last calculation (vapor space, heat flux limits and similar). Empty when the kettle model is off.

public List<string> KettleWarnings { get; set; }
Public Property KettleWarnings As List(Of String)

LMTD: Gets or sets the calculated log mean temperature difference, in K.

Gets or sets the calculated log mean temperature difference, in K.

public double LMTD { get; set; }
Public Property LMTD As Double

LMTD_F: Gets or sets the LMTD correction factor F for the number of shell passes.

Gets or sets the LMTD correction factor F for the number of shell passes. Default 1.

public double LMTD_F { get; set; }
Public Property LMTD_F As Double

MaxIterations: Gets or sets the maximum number of outer iterations of the rating calculation.

Gets or sets the maximum number of outer iterations of the rating calculation. Default 100.

public int MaxIterations { get; set; }
Public Property MaxIterations As Integer

MaxShellPressureDrop: Gets or sets the maximum allowed shell-side pressure drop, in Pa.

Gets or sets the maximum allowed shell-side pressure drop, in Pa. In Design mode (non-kettle), the baffle spacing is increased while the shell-side pressure drop exceeds it. null or zero when not specified.

public double? MaxShellPressureDrop { get; set; }
Public Property MaxShellPressureDrop As Double?

MaxTubePressureDrop: Gets or sets the maximum allowed tube-side pressure drop, in Pa.

Gets or sets the maximum allowed tube-side pressure drop, in Pa. In Design mode, the sizing keeps the smaller exchanger within it, with more tubes than the duty needs or with fewer tube passes; the other modes post a flowsheet warning when the calculated drop exceeds it. null or zero when not specified.

public double? MaxTubePressureDrop { get; set; }
Public Property MaxTubePressureDrop As Double?

MobileCompatible: Gets a value indicating whether this unit operation is compatible with mobile interfaces.

Gets a value indicating whether this unit operation is compatible with mobile interfaces.

public override bool MobileCompatible { get; }
Public Overrides ReadOnly Property MobileCompatible As Boolean

NumberOfIncrements: Gets or sets the number of increments the exchanger is divided into for the incremental heat transfer calculation.

Gets or sets the number of increments the exchanger is divided into for the incremental heat transfer calculation. Default 20.

public int NumberOfIncrements { get; set; }
Public Property NumberOfIncrements As Integer

ObjectClass: Gets or sets the simulation object class category (Exchangers).

Gets or sets the simulation object class category (Exchangers). The setter always stores Exchangers.

public override SimulationObjectClass ObjectClass { get; set; }
Public Overrides Property ObjectClass As SimulationObjectClass

OverallCoefficient: Gets or sets the user-specified overall heat transfer coefficient, in W/(m2.K), required in Simulation mode.

Gets or sets the user-specified overall heat transfer coefficient, in W/(m2.K), required in Simulation mode. null when not specified.

public double? OverallCoefficient { get; set; }
Public Property OverallCoefficient As Double?

OverallCoefficientCalc: Gets or sets the overall heat transfer coefficient of the last calculation, in W/(m2.K).

Gets or sets the overall heat transfer coefficient of the last calculation, in W/(m2.K). In Simulation mode it equals OverallCoefficient; in FoulingFactor mode it is the fouled (dirty) coefficient.

public double OverallCoefficientCalc { get; set; }
Public Property OverallCoefficientCalc As Double

OverallFoulingFactor: Gets or sets the overall fouling resistance back-calculated in FoulingFactor mode (1/U_dirty - 1/U_clean), in m2.K/W.

Gets or sets the overall fouling resistance back-calculated in FoulingFactor mode (1/U_dirty - 1/U_clean), in m2.K/W.

public double OverallFoulingFactor { get; set; }
Public Property OverallFoulingFactor As Double

Prefix: Gets the default name prefix for this unit operation.

Gets the default name prefix for this unit operation.

public string Prefix { get; }
Public ReadOnly Property Prefix As String

Q: Heat duty [W].

Heat duty [W]. The DWSIM heat flow unit is kW, so every display and property divides by 1000.

public double Q { get; set; }
Public Property Q As Double

ShellSideCoefficient: Gets or sets the average shell-side heat transfer coefficient, in W/(m2.K).

Gets or sets the average shell-side heat transfer coefficient, in W/(m2.K).

public double ShellSideCoefficient { get; set; }
Public Property ShellSideCoefficient As Double

ShellSidePressureDrop: Gets or sets the calculated shell-side pressure drop, in Pa.

Gets or sets the calculated shell-side pressure drop, in Pa.

public double ShellSidePressureDrop { get; set; }
Public Property ShellSidePressureDrop As Double

STProperties: Gets or sets the exchanger data: shell, baffle, tube, nozzle, kettle and mechanical inputs, plus the detailed...

Gets or sets the exchanger data: shell, baffle, tube, nozzle, kettle and mechanical inputs, plus the detailed geometric and kettle results of the last calculation.

public STHXPropertiesAdvanced STProperties { get; set; }
Public Property STProperties As STHXPropertiesAdvanced

ThermalEfficiency: Gets or sets the thermal effectiveness: heat duty divided by the maximum possible duty Cmin (Th,in - Tc,in), as a...

Gets or sets the thermal effectiveness: heat duty divided by the maximum possible duty Cmin (Th,in - Tc,in), as a fraction from 0 to 1.

public double ThermalEfficiency { get; set; }
Public Property ThermalEfficiency As Double

Tolerance: Gets or sets the relative convergence tolerance on the heat duty between outer iterations.

Gets or sets the relative convergence tolerance on the heat duty between outer iterations. Default 1e-6.

public double Tolerance { get; set; }
Public Property Tolerance As Double

TubeSideCoefficient: Gets or sets the average tube-side heat transfer coefficient, in W/(m2.K).

Gets or sets the average tube-side heat transfer coefficient, in W/(m2.K).

public double TubeSideCoefficient { get; set; }
Public Property TubeSideCoefficient As Double

TubeSidePressureDrop: Gets or sets the calculated tube-side pressure drop, including the nozzles, in Pa.

Gets or sets the calculated tube-side pressure drop, including the nozzles, in Pa.

public double TubeSidePressureDrop { get; set; }
Public Property TubeSidePressureDrop As Double

VibrationWarnings: Gets or sets the flow-induced vibration warnings of the last rating calculation.

Gets or sets the flow-induced vibration warnings of the last rating calculation. Empty for kettle reboilers.

public List<string> VibrationWarnings { get; set; }
Public Property VibrationWarnings As List(Of String)

Methods

Calculate(): Calculates the heat exchanger: checks that all four streams are connected and runs the rating, design, simulation or...

Calculates the heat exchanger: checks that all four streams are connected and runs the rating, design, simulation or fouling factor calculation selected by CalculationMode.

public void Calculate()
Public Sub Calculate()

Calculate(object): Calculates the object.

Calculates the object.

Parameter Type Description
args Object
public override void Calculate(object args = null)
Public Overrides Sub Calculate(args As Object = Nothing)

CloneXML(): Creates a deep copy of this object by round-tripping through XML serialization.

Creates a deep copy of this object by round-tripping through XML serialization.

public override object CloneXML()
Public Overrides Function CloneXML() As Object

CloseEditForm(): Closes the editor of this object, if it is open.

Closes the editor of this object, if it is open.

public override void CloseEditForm()
Public Overrides Sub CloseEditForm()

CreateConnectors(): Creates the graphic connector definitions on the flowsheet: hot side and cold side inlets and outlets.

Creates the graphic connector definitions on the flowsheet: hot side and cold side inlets and outlets.

public void CreateConnectors()
Public Sub CreateConnectors()

DisplayEditForm(): Opens the editor of this object.

Opens the editor of this object. A host that has no editor for it does nothing.

public override void DisplayEditForm()
Public Overrides Sub DisplayEditForm()

Draw(object): Draws the unit operation icon on the given SkiaSharp canvas.

Draws the unit operation icon on the given SkiaSharp canvas.

Parameter Type Description
g Object The SkiaSharp canvas.
public void Draw(object g)
Public Sub Draw(g As Object)

GetDisplayDescription(): Returns the localized description string for this unit operation type.

Returns the localized description string for this unit operation type.

public override string GetDisplayDescription()
Public Overrides Function GetDisplayDescription() As String

GetDisplayName(): Returns the localized display name for this unit operation type.

Returns the localized display name for this unit operation type.

public override string GetDisplayName()
Public Overrides Function GetDisplayName() As String

GetIconBitmapBytes(): Returns the raw bytes of the icon image for this unit operation.

Returns the raw bytes of the icon image for this unit operation.

public override byte[] GetIconBitmapBytes()
Public Overrides Function GetIconBitmapBytes() As Byte()

GetPreferredGraphicObjectHeight(): Returns the preferred height of the flowsheet graphic object, in pixels.

Returns the preferred height of the flowsheet graphic object, in pixels.

public override double GetPreferredGraphicObjectHeight()
Public Overrides Function GetPreferredGraphicObjectHeight() As Double

GetPreferredGraphicObjectWidth(): Returns the preferred width of the flowsheet graphic object, in pixels.

Returns the preferred width of the flowsheet graphic object, in pixels.

public override double GetPreferredGraphicObjectWidth()
Public Overrides Function GetPreferredGraphicObjectWidth() As Double

GetProperties(PropertyType): Get a list of all properties of the object.

Get a list of all properties of the object.

Parameter Type Description
proptype PropertyType Type of the property.
public override string[] GetProperties(PropertyType proptype)
Public Overrides Function GetProperties(proptype As PropertyType) As String()

GetPropertyUnit(string, IUnitsOfMeasure): Gets the units of a property.

Gets the units of a property.

Parameter Type Description
prop String Property identifier.
su IUnitsOfMeasure Units system to use. Null to use the default (SI) system.
public override string GetPropertyUnit(string prop, IUnitsOfMeasure su = null)
Public Overrides Function GetPropertyUnit(prop As String, su As IUnitsOfMeasure = Nothing) As String

GetPropertyValue(string, IUnitsOfMeasure): Returns the value of a named property, converting from SI to the current unit system.

Returns the value of a named property, converting from SI to the current unit system. Falls back to extra properties if the property is not found in the base implementation.

Parameter Type Description
prop String The property identifier string.
su IUnitsOfMeasure Optional units-of-measure system used for conversion; uses the shared SI system when Nothing.
public override object GetPropertyValue(string prop, IUnitsOfMeasure su = null)
Public Overrides Function GetPropertyValue(prop As String, su As IUnitsOfMeasure = Nothing) As Object

LoadData(List<XElement>): Restores the unit operation state from a list of XML elements previously produced by SaveData.

Restores the unit operation state from a list of XML elements previously produced by SaveData.

Parameter Type Description
data List<XElement> The list of XElement objects containing serialized state.
public override bool LoadData(List<XElement> data)
Public Overrides Function LoadData(data As List(Of XElement)) As Boolean

PopulateEditorPanel(object): Populates the cross-platform editor panel with controls.

Populates the cross-platform editor panel with controls.

Parameter Type Description
ctner Object The editor panel (layout container) to populate.
public void PopulateEditorPanel(object ctner)
Public Sub PopulateEditorPanel(ctner As Object)

ReturnInstance(string): Creates and returns a new instance for deserialization.

Creates and returns a new instance for deserialization.

Parameter Type Description
typename String The type name to instantiate.
public object ReturnInstance(string typename)
Public Function ReturnInstance(typename As String) As Object

SaveData(): Serializes the unit operation state to a list of XML elements for persistence.

Serializes the unit operation state to a list of XML elements for persistence.

public override List<XElement> SaveData()
Public Overrides Function SaveData() As List(Of XElement)

SetPropertyValue(string, object, IUnitsOfMeasure): Sets the value of a property.

Sets the value of a property.

Parameter Type Description
prop String Property identifier.
propval Object Property value to set at the specified units.
su IUnitsOfMeasure Units system to use. Null to use the default (SI) system.
public override bool SetPropertyValue(string prop, object propval, IUnitsOfMeasure su = null)
Public Overrides Function SetPropertyValue(prop As String, propval As Object, su As IUnitsOfMeasure = Nothing) As Boolean

UpdateEditForm(): Redraws the editor of this object with the current values, if it is open.

Redraws the editor of this object with the current values, if it is open.

public override void UpdateEditForm()
Public Overrides Sub UpdateEditForm()

Fields

_editorForm: The classic (WinForms) editor window open for this unit operation, if any.

The classic (WinForms) editor window open for this unit operation, if any. Not saved with the flowsheet.

public FormEditorAdvancedHeatExchanger _editorForm
Public _editorForm As FormEditorAdvancedHeatExchanger