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¶

| 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.
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. |
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.
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 (MixersSplitters).
Gets or sets the simulation object class category (MixersSplitters).
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.
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.
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). |
CloneXML(): Creates a deep copy of this mixer via XML serialization.
Creates a deep copy of this mixer via XML serialization.
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.
DeCalculate(): Resets the outlet material stream to an uncalculated state.
Resets the outlet material stream to an uncalculated state.
DisplayEditForm(): Opens or activates the editing form for this mixer.
Opens or activates the editing form for this mixer.
GetDisplayDescription(): Returns the localized display description for the mixer type.
Returns the localized display description for the mixer type.
GetDisplayName(): Returns the localized display name for the mixer type.
Returns the localized display name for the mixer type.
GetIconBitmapBytes(): Returns the raw bytes of the mixer icon image resource.
Returns the raw bytes of the mixer icon image resource.
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. |
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.
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. |
RunDynamicModel(): Executes the mixer calculation in dynamic simulation mode.
Executes the mixer calculation in dynamic simulation mode.
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. |
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¶