Skip to content

Heater

Represents a heater unit operation that raises the temperature of an inlet material stream by adding a specified amount of heat, targeting an outlet temperature, outlet vapor fraction, or temperature change. Supports steady-state and dynamic simulation modes.

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

At a glance

Heater in the example flowsheet

Port Index Connected in the example
Inlet, material 0 Water-in
Inlet, energy 1 H-1 duty
Outlet, material 0 Water-out

Example

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

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

feed = (fs.AddMaterialStream("Water-in")
        .At(Q.Celsius(25.0), Q.Bar(3.0))
        .WithMassFlow(Q.KgPerSecond(2.0)))
product = fs.AddMaterialStream("Water-out")
duty = fs.AddEnergyStream("H-1 duty")

heater = (fs.AddHeater("H-1")
          .WithOutletTemperature(Q.Celsius(80.0))
          .WithPressureDrop(Q.Bar(0.2))
          .WithEfficiencyPercent(100.0)
          .ConnectFeed(feed)
          .ConnectProduct(product)
          .ConnectEnergyFeed(duty, 1))       # energy inlet is port 1

fs.AutoLayout()
fs.Solve()

h_in = feed.Object.Phases[0].Properties.enthalpy      # kJ/kg
h_out = product.Object.Phases[0].Properties.enthalpy
print(f"Heat duty       = {heater.Object.DeltaQ:.1f} kW")
print(f"Energy stream   = {duty.Object.EnergyFlow:.1f} kW")
print(f"Check m*dh      = {2.0 * (h_out - h_in):.1f} kW")
print(f"Outlet T        = {product.TemperatureK - 273.15:.2f} C")
print(f"Outlet P        = {product.Object.Phases[0].Properties.pressure / 1e5:.2f} bar")

Output

Heat duty       = 460.0 kW
Energy stream   = 460.0 kW
Check m*dh      = 460.0 kW
Outlet T        = 80.00 C
Outlet P        = 2.80 bar

DWSIM 10.2.11.0, generated 2026-10-08.

Calculation modes

Set with CalcMode (CalculationMode). The mode decides which properties are inputs; every other one is a result and is overwritten by the calculation.

Mode Value What it does Inputs
HeatAdded 0 Outlet conditions calculated from a specified heat duty (kW). PROP_HT_0, PROP_HT_1, PROP_HT_3
OutletTemperature 1 Heat duty calculated to achieve the specified outlet temperature. PROP_HT_0, PROP_HT_1, PROP_HT_2
EnergyStream 2 Heat duty read from the connected energy stream. PROP_HT_0, PROP_HT_1
OutletVaporFraction 3 Heat duty calculated to achieve the specified outlet vapor mole fraction. PROP_HT_0, PROP_HT_1, PROP_HT_4
TemperatureChange 4 Heat duty calculated to achieve the specified temperature change. PROP_HT_0, PROP_HT_1, PROP_HT_5
HeatAddedRemoved 5 Heat added or removed (for mobile compatibility). PROP_HT_0, PROP_HT_1, PROP_HT_3

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.

ID Name Unit (SI) Input in
PROP_HT_0 Pressure Drop Pa all modes
PROP_HT_1 Efficiency all modes
PROP_HT_2 Outlet Temperature K OutletTemperature
PROP_HT_3 Heat Added kW HeatAdded, HeatAddedRemoved
PROP_HT_4 Outlet Molar Vapor Fraction OutletVaporFraction
PROP_HT_5 Temperature Difference K (difference) TemperatureChange

Dynamic mode

Extra properties used when the flowsheet runs in dynamic mode.

Name Unit
Flow Conductance [kg/s]/[Pa^0.5]
Volume m3
Minimum Pressure Pa
Initialize using Inlet Stream
Reset Content
Ambient Temperature K
Ambient UA Product
Wall Thermal Mass
Wall Temperature K

Learn more

API members

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

Constructors

Heater(): Initializes a new default instance of the Heater class.

Initializes a new default instance of the Heater class.

public Heater()
Public Sub New()

Heater(string, string): Initializes a new instance of the Heater class with a name and description.

Initializes a new instance of the Heater class with a name and description.

Parameter Type Description
name String The display name of the heater.
description String A brief description of the heater.
public Heater(string name, string description)
Public Sub New(name As String, description As String)

Properties

CalcMode: Gets or sets the active calculation mode that determines which variables are specified and which are calculated.

Gets or sets the active calculation mode that determines which variables are specified and which are calculated.

public Heater.CalculationMode CalcMode { get; set; }
Public Property CalcMode As Heater.CalculationMode

DeltaP: Gets or sets the pressure drop across the heater (Pa).

Gets or sets the pressure drop across the heater (Pa). Outlet pressure = inlet pressure - DeltaP.

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

DeltaQ: Gets or sets the heat duty added to the stream (kW).

Gets or sets the heat duty added to the stream (kW). Positive = heating.

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

DeltaT: Gets or sets the calculated or specified temperature change across the heater (K).

Gets or sets the calculated or specified temperature change across the heater (K).

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

Efficiency: Gets or sets the efficiency (%) as a plain Double proxy for Eficiencia.

Gets or sets the efficiency (%) as a plain Double proxy for Eficiencia.

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

Eficiencia: Gets or sets the heater efficiency as a percentage (0–100).

Gets or sets the heater efficiency as a percentage (0–100). Determines how much of the specified heat duty is actually transferred to the stream.

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

EquipmentTypes: Gets the list of equipment sub-types available for this heater.

Gets the list of equipment sub-types available for this heater.

public override List<string> EquipmentTypes { get; }
Public Overrides ReadOnly Property EquipmentTypes As List(Of String)

FixOnHeat: Gets or sets whether the solver fixes on heat duty when convergence fails (not used in normal mode).

Gets or sets whether the solver fixes on heat duty when convergence fails (not used in normal mode).

public bool FixOnHeat { get; set; }
Public Property FixOnHeat As Boolean

HasPropertiesForDynamicMode: Gets a value indicating whether this unit operation exposes properties for dynamic mode.

Gets a value indicating whether this unit operation exposes properties for dynamic mode.

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

HeatDuty: Gets or sets the heat duty (kW) as a plain Double proxy for DeltaQ.

Gets or sets the heat duty (kW) as a plain Double proxy for DeltaQ.

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

MobileCompatible: Gets a value indicating whether this unit operation is compatible with the DWSIM mobile interface.

Gets a value indicating whether this unit operation is compatible with the DWSIM mobile interface.

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

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

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

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

OutletTemperature: Gets or sets the target outlet temperature (K) used when CalcMode is OutletTemperature.

Gets or sets the target outlet temperature (K) used when CalcMode is OutletTemperature.

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

OutletVaporFraction: Gets or sets the target outlet vapor mole fraction used when CalcMode is OutletVaporFraction.

Gets or sets the target outlet vapor mole fraction used when CalcMode is OutletVaporFraction.

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

PressureDrop: Gets or sets the pressure drop (Pa) as a plain Double proxy for DeltaP.

Gets or sets the pressure drop (Pa) as a plain Double proxy for DeltaP.

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

SupportsDynamicMode: Gets a value indicating whether this unit operation supports dynamic simulation mode.

Gets a value indicating whether this unit operation supports dynamic simulation mode.

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

TemperatureChange: Gets or sets the temperature change (K) as a plain Double proxy for DeltaT.

Gets or sets the temperature change (K) as a plain Double proxy for DeltaT.

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

Methods

Calculate(object): Performs the steady-state heater calculation according to CalcMode.

Performs the steady-state heater calculation according to CalcMode. Computes outlet enthalpy, temperature, vapor fraction, and heat duty from the inlet stream and specified parameters.

Parameter Type Description
args Object Optional calculation arguments (not used).
public override void Calculate(object args = null)
Public Overrides Sub Calculate(args As Object = Nothing)

CloneXML(): Creates a deep copy of this heater via XML serialization.

Creates a deep copy of this heater via XML serialization.

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

CloseEditForm(): Closes and disposes the editing form for this heater if it is open.

Closes and disposes the editing form for this heater if it is open.

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

CreateDimensionsList(): Creates the dimensions list used for equipment sizing (Power).

Creates the dimensions list used for equipment sizing (Power).

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

CreateDynamicProperties(): Registers dynamic properties (Flow Conductance, Volume, Minimum Pressure, initialization flags) used in dynamic...

Registers dynamic properties (Flow Conductance, Volume, Minimum Pressure, initialization flags) used in dynamic simulation mode.

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

DeCalculate(): Resets the outlet material and energy streams to an uncalculated state.

Resets the outlet material and energy streams to an uncalculated state.

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

DisplayEditForm(): Opens or activates the editing form for this heater.

Opens or activates the editing form for this heater.

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

GetCalculationModes(): Returns the list of available calculation mode names and IDs.

Returns the list of available calculation mode names and IDs.

public override string[] GetCalculationModes()
Public Overrides Function GetCalculationModes() As String()

GetDisplayDescription(): Returns the localized display description for the heater type.

Returns the localized display description for the heater type.

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

GetDisplayName(): Returns the localized display name for the heater type.

Returns the localized display name for the heater type.

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

GetIconBitmapBytes(): Returns the raw bytes of the heater icon image resource.

Returns the raw bytes of the heater icon image resource.

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

GetProperties(PropertyType): Returns the list of property identifiers available for this heater.

Returns the list of property identifiers available for this heater.

Parameter Type Description
proptype PropertyType The type of properties to retrieve.
public override string[] GetProperties(PropertyType proptype)
Public Overrides Function GetProperties(proptype As PropertyType) As String()

GetPropertyDescription(string): Returns a human-readable description for the specified property name, used in the property grid.

Returns a human-readable description for the specified property name, used in the property grid.

Parameter Type Description
p String The property display name.
public override string GetPropertyDescription(string p)
Public Overrides Function GetPropertyDescription(p As String) As String

GetPropertyUnit(string, IUnitsOfMeasure): Returns the unit string for the specified property.

Returns the unit string for the specified property.

Parameter Type Description
prop String The property identifier string.
su IUnitsOfMeasure The unit system to use; defaults to SI if not provided.
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 the specified property converted to the given unit system.

Returns the value of the specified property converted to the given unit system.

Parameter Type Description
prop String The property identifier string (e.g., "PROP_HT_0").
su IUnitsOfMeasure The unit system to use; defaults to SI if not provided.
public override object GetPropertyValue(string prop, IUnitsOfMeasure su = null)
Public Overrides Function GetPropertyValue(prop As String, su As IUnitsOfMeasure = Nothing) As Object

GetReport(IUnitsOfMeasure, CultureInfo, string): Generates a text report summarizing the heater's inlet, outlet, and calculation parameters.

Generates a text report summarizing the heater's inlet, outlet, and calculation parameters.

Parameter Type Description
su IUnitsOfMeasure The unit system for reported values.
ci CultureInfo The culture info used for number formatting.
numberformat String The numeric format string.
public override string GetReport(IUnitsOfMeasure su, CultureInfo ci, string numberformat)
Public Overrides Function GetReport(su As IUnitsOfMeasure, ci As CultureInfo, numberformat As String) As String

GetStructuredReport(): Generates a structured (tabular) results report for display in the UI.

Generates a structured (tabular) results report for display in the UI.

public override List<Tuple<ReportItemType, string[]>> GetStructuredReport()
Public Overrides Function GetStructuredReport() As List(Of Tuple(Of ReportItemType, String()))

RunDynamicModel(): Executes the heater dynamic model for one integration time step, updating accumulation, temperature, and pressure.

Executes the heater dynamic model for one integration time step, updating accumulation, temperature, and pressure.

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

SetCalculationMode(int): Sets the calculation mode by numeric ID and returns the mode name.

Sets the calculation mode by numeric ID and returns the mode name.

Parameter Type Description
modeID Int32 The integer ID of the desired calculation mode.
public override object SetCalculationMode(int modeID)
Public Overrides Function SetCalculationMode(modeID As Integer) As Object

SetPropertyValue(string, object, IUnitsOfMeasure): Sets the value of the specified property from the given unit system.

Sets the value of the specified property from the given unit system.

Parameter Type Description
prop String The property identifier string.
propval Object The new value to assign.
su IUnitsOfMeasure The unit system of the supplied value; defaults to SI if not provided.
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

UpdateDimensionsList(): Updates the Power dimension value from the current heat duty.

Updates the Power dimension value from the current heat duty.

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

UpdateEditForm(): Refreshes the displayed data in the editing form if it is currently open.

Refreshes the displayed data in the editing form if it is currently open.

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

Fields

f: 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 object f
Public f As Object