Skip to content

Energy Mixer

DWSIM Plus

Available with a DWSIM Plus (Patreon) subscription.

Energy mixer: sums the energy flows of up to six inlet energy streams into one outlet energy stream. It has no configurable parameters.

DWSIM.UnitOperations.ExtensionPack.UnitOperations.EnergyMixer
Assembly DWSIM.UnitOperations.ExtensionPack.dll · Object ← BaseClass ← UnitOpBaseClass ← EnergyMixer

At a glance

Energy Mixer in the example flowsheet

Port Index Connected in the example
Inlet, energy 0 C-1 duty
Inlet, energy 1 C-2 duty
Inlet, energy 2
Inlet, energy 3
Inlet, energy 4
Inlet, energy 5
Outlet, energy 0 Total duty

Example

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

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

hot1 = fs.AddMaterialStream("Water-1").At(Q.Celsius(80.0), Q.Bar(2.0)).WithMassFlow(Q.KgPerSecond(3.0))
hot2 = fs.AddMaterialStream("Water-2").At(Q.Celsius(60.0), Q.Bar(2.0)).WithMassFlow(Q.KgPerSecond(5.0))
cold1 = fs.AddMaterialStream("Water-1-out")
cold2 = fs.AddMaterialStream("Water-2-out")
q1 = fs.AddEnergyStream("C-1 duty")
q2 = fs.AddEnergyStream("C-2 duty")
total = fs.AddEnergyStream("Total duty")

(fs.AddCooler("C-1").WithOutletTemperature(Q.Celsius(35.0))
   .ConnectFeed(hot1).ConnectProduct(cold1).ConnectEnergyProduct(q1, 0))
(fs.AddCooler("C-2").WithOutletTemperature(Q.Celsius(35.0))
   .ConnectFeed(hot2).ConnectProduct(cold2).ConnectEnergyProduct(q2, 0))

# Up to six energy streams in, one out: the outlet carries the sum.
mixer = (fs.AddEnergyMixer("EM-1")
         .ConnectEnergyFeed(q1, 0)
         .ConnectEnergyFeed(q2, 1)
         .ConnectEnergyProduct(total, 0))

fs.AutoLayout()
fs.Solve()

print(f"C-1 duty   = {q1.EnergyFlowKW:.1f} kW")
print(f"C-2 duty   = {q2.EnergyFlowKW:.1f} kW")
print(f"Total duty = {total.EnergyFlowKW:.1f} kW")

Output

C-1 duty   = 564.8 kW
C-2 duty   = 522.4 kW
Total duty = 1087.2 kW

DWSIM 10.2.11.0, generated 2026-10-08.

Learn more

API members

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

Constructors

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

Initializes a new default instance of the EnergyMixer class.

public EnergyMixer()
Public Sub New()

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

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

Parameter Type Description
Name String The name of this unit operation.
Description String A brief description of this unit operation.
public EnergyMixer(string Name, string Description)
Public Sub New(Name As String, Description As String)

Properties

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

ComponentName: Gets or sets the CAPE-OPEN component name for this unit operation.

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

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

IsPremium: Gets a value indicating whether this unit operation is a premium (DWSIM Patreon) unit operation.

Gets a value indicating whether this unit operation is a premium (DWSIM Patreon) unit operation. Always True; the object palette lists it under the Premium category.

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

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. Always False.

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

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

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

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

Methods

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()

DeCalculate(): Decalculates the object.

Decalculates the object.

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

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()

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

Returns the description string for this unit operation type.

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

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

Returns the display name for this unit operation type.

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

GetEditingForm(): The editor window of this object, a window of the host's UI framework.

The editor window of this object, a window of the host's UI framework.

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

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()

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

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)

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

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 EditingForm_Emixer f
Public f As EditingForm_Emixer