Skip to content

Mixer

Represents a mixer unit operation that combines up to six material inlet streams into one outlet stream by performing mass and energy balances. Outlet pressure is determined by the configured PressureBehavior (minimum, maximum, or average of inlet pressures).

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

At a glance

Mixer in the example flowsheet

Port Index Connected in the example
Inlet, material 0 Condensate
Inlet, material 1 Make-up
Inlet, material 2
Inlet, material 3
Inlet, material 4
Inlet, material 5
Outlet, material 0 Blend

Example

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

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

hot = (fs.AddMaterialStream("Condensate")
       .At(Q.Celsius(90.0), Q.Bar(4.0))
       .WithMassFlow(Q.KgPerSecond(1.5)))
cold = (fs.AddMaterialStream("Make-up")
        .At(Q.Celsius(15.0), Q.Bar(2.5))
        .WithMassFlow(Q.KgPerSecond(3.5)))
blend = fs.AddMaterialStream("Blend")

mixer = (fs.AddMixer("MIX-1")
         .WithPressureBehavior(Mixer.PressureBehavior.Minimum)   # outlet at the lowest inlet pressure
         .ConnectFeed(hot, 0)
         .ConnectFeed(cold, 1)
         .ConnectProduct(blend, 0))

fs.AutoLayout()
fs.Solve()

b = blend.Object
print(f"Outlet flow     = {b.GetMassFlow():.3f} kg/s")
print(f"Outlet T        = {blend.TemperatureK - 273.15:.2f} C")
print(f"Outlet P        = {b.Phases[0].Properties.pressure / 1e5:.2f} bar")
h_mix = (1.5 * hot.Object.Phases[0].Properties.enthalpy
         + 3.5 * cold.Object.Phases[0].Properties.enthalpy) / 5.0
print(f"Outlet h        = {b.Phases[0].Properties.enthalpy:.2f} kJ/kg (flow-weighted inlets {h_mix:.2f})")

Output

Outlet flow     = 5.000 kg/s
Outlet T        = 37.53 C
Outlet P        = 2.50 bar
Outlet h        = 157.42 kJ/kg (flow-weighted inlets 157.42)

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

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

Initializes a new default instance of the Mixer class.

public Mixer()
Public Sub New()

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

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

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

Properties

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

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

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

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

PressureCalculation: Gets or sets the rule used to determine the outlet stream pressure from the inlet stream pressures.

Gets or sets the rule used to determine the outlet stream pressure from the inlet stream pressures.

public Mixer.PressureBehavior PressureCalculation { get; set; }
Public Property PressureCalculation As Mixer.PressureBehavior

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

Methods

Calculate(object): Performs the mixer mass and energy balance: combines all connected inlet streams into the single outlet stream using...

Performs the mixer mass and energy balance: combines all connected inlet streams into the single outlet stream using the selected pressure rule and a PH flash to determine outlet temperature.

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 mixer via XML serialization.

Creates a deep copy of this mixer via XML serialization.

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

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

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

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

DeCalculate(): Resets the outlet material stream to an uncalculated state.

Resets the outlet material stream to an uncalculated state.

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

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

Opens or activates the editing form for this mixer.

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

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

Returns the localized display description for the mixer type.

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

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

Returns the localized display name for the mixer type.

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

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

Returns the raw bytes of the mixer icon image resource.

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

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

Returns the list of property identifiers available for this mixer.

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

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.

Returns the value of 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 object GetPropertyValue(string prop, IUnitsOfMeasure su = null)
Public Overrides Function GetPropertyValue(prop As String, su As IUnitsOfMeasure = Nothing) As Object

RunDynamicModel(): Executes the mixer calculation in dynamic simulation mode.

Executes the mixer calculation in dynamic simulation mode.

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

SetPropertyValue(string, object, IUnitsOfMeasure): Sets the value of the specified property; delegates to the base implementation.

Sets the value of the specified property; delegates to the base implementation.

Parameter Type Description
prop String The property identifier string.
propval Object The new property value.
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

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