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¶

| 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¶
-
User guide
-
Tutorials
-
FluentAPI
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.
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. |
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.
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.
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.
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).
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.
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.
EquipmentTypes: Gets the list of equipment sub-types available for this heater.
Gets the list of equipment sub-types available for this heater.
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).
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.
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.
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.
ObjectClass: Gets or sets the simulation object class category (Exchangers).
Gets or sets the simulation object class category (Exchangers).
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.
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.
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.
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.
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.
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). |
CloneXML(): Creates a deep copy of this heater via XML serialization.
Creates a deep copy of this heater via XML serialization.
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.
CreateDimensionsList(): Creates the dimensions list used for equipment sizing (Power).
Creates the dimensions list used for equipment sizing (Power).
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.
DeCalculate(): Resets the outlet material and energy streams to an uncalculated state.
Resets the outlet material and energy streams to an uncalculated state.
DisplayEditForm(): Opens or activates the editing form for this heater.
Opens or activates the editing form for this heater.
GetCalculationModes(): Returns the list of available calculation mode names and IDs.
Returns the list of available calculation mode names and IDs.
GetDisplayDescription(): Returns the localized display description for the heater type.
Returns the localized display description for the heater type.
GetDisplayName(): Returns the localized display name for the heater type.
Returns the localized display name for the heater type.
GetIconBitmapBytes(): Returns the raw bytes of the heater icon image resource.
Returns the raw bytes of the heater icon image resource.
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. |
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. |
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. |
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. |
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. |
GetStructuredReport(): Generates a structured (tabular) results report for display in the UI.
Generates a structured (tabular) results report for display in the UI.
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.
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. |
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. |
UpdateDimensionsList(): Updates the Power dimension value from the current heat duty.
Updates the Power dimension value from the current heat duty.
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.
Fields¶