Skip to content

Splitter

Represents a stream splitter unit operation that divides one inlet material stream into up to three outlet streams. The split can be specified using fractional ratios, absolute mass flow rates, or absolute molar flow rates. The outlet streams share the same temperature, pressure, enthalpy, and composition as the inlet stream.

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

At a glance

Splitter in the example flowsheet

Port Index Connected in the example
Inlet, material 0 CW-header
Outlet, material 0 CW-user-1
Outlet, material 1 CW-user-2
Outlet, material 2 CW-user-3

Example

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

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

header = (fs.AddMaterialStream("CW-header")
          .At(Q.Celsius(28.0), Q.Bar(4.0))
          .WithMassFlow(Q.KgPerSecond(20.0)))
users = [fs.AddMaterialStream(f"CW-user-{i + 1}") for i in range(3)]

splitter = (fs.AddSplitter("SPL-1")
            .WithSplitRatios(0.5, 0.3, 0.2)       # fractions of the feed, in outlet port order
            .ConnectFeed(header)
            .ConnectProduct(users[0], 0)
            .ConnectProduct(users[1], 1)
            .ConnectProduct(users[2], 2))

fs.AutoLayout()
fs.Solve()

for u in users:
    s = u.Object
    print(f"{u.Object.GraphicObject.Tag}  = {s.GetMassFlow():6.2f} kg/s at "
          f"{u.TemperatureK - 273.15:.1f} C, {s.Phases[0].Properties.pressure / 1e5:.2f} bar")
total = sum(u.Object.GetMassFlow() for u in users)
print(f"Sum of outlets  = {total:.2f} kg/s")

Output

CW-user-1  =  10.00 kg/s at 28.0 C, 4.00 bar
CW-user-2  =   6.00 kg/s at 28.0 C, 4.00 bar
CW-user-3  =   4.00 kg/s at 28.0 C, 4.00 bar
Sum of outlets  = 20.00 kg/s

DWSIM 10.2.11.0, generated 2026-10-08.

Calculation modes

Set with OperationMode (OpMode). 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
SplitRatios 0 Outlet flows are determined by fractional split ratios that must sum to 1. SR1, SR2
StreamMassFlowSpec 1 Outlet flows are specified as absolute mass flow rates (kg/s). PROP_SP_1, PROP_SP_2
StreamMoleFlowSpec 2 Outlet flows are specified as absolute molar flow rates (mol/s). PROP_SP_1, PROP_SP_2
StreamVolumetricFlowSpec 3 Outlet flows are specified as absolute volumetric flow rates (m3/s). PROP_SP_1, PROP_SP_2

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_SP_1 Stream 1 Flow Spec StreamMassFlowSpec, StreamMoleFlowSpec, StreamVolumetricFlowSpec
PROP_SP_2 Stream 2 Flow Spec StreamMassFlowSpec, StreamMoleFlowSpec, StreamVolumetricFlowSpec
SR1 SplitRatios
SR2 SplitRatios
SR3 result

Learn more

API members

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

Constructors

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

Initializes a new default instance of the Splitter class.

public Splitter()
Public Sub New()

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

Initializes a new instance of the Splitter class with a specified name and description. Default split ratios are set so that the first outlet receives 100% of the inlet flow.

Parameter Type Description
Name String The display name of this splitter object.
Description String A short description of this splitter object.
public Splitter(string Name, string Description)
Public Sub New(Name As String, Description As String)

Properties

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

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

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 platform.

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

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

ObjectClass: Gets or sets the simulation object class category for this unit operation.

Gets or sets the simulation object class category for this unit operation.

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

OperationMode: Gets or sets the current calculation mode that determines how outlet stream flows are specified.

Gets or sets the current calculation mode that determines how outlet stream flows are specified.

public Splitter.OpMode OperationMode { get; set; }
Public Property OperationMode As Splitter.OpMode

Ratios: Gets the collection of fractional split ratios assigned to each outlet stream.

Gets the collection of fractional split ratios assigned to each outlet stream. Each value represents the fraction of the inlet mass flow directed to the corresponding outlet.

public ArrayList Ratios { get; }
Public ReadOnly Property Ratios As ArrayList

Stream2FlowSpec: Gets or sets the flow specification for the second outlet stream when using mass or molar flow specification modes...

Gets or sets the flow specification for the second outlet stream when using mass or molar flow specification modes and three outlets are connected.

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

StreamFlowSpec: Gets or sets the flow specification for the first outlet stream when using mass or molar flow specification modes.

Gets or sets the flow specification for the first outlet stream when using mass or molar flow specification modes.

public double StreamFlowSpec { get; set; }
Public Property StreamFlowSpec 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

Methods

Calculate(object): Executes the steady-state mass balance calculation for the splitter.

Executes the steady-state mass balance calculation for the splitter. Distributes the inlet stream to the connected outlet streams according to the active OperationMode (split ratios, mass flow spec, or mole flow spec). Outlet streams inherit the inlet temperature, pressure, enthalpy, and composition.

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

CloneXML(): Creates a deep copy of this splitter instance by serializing and deserializing through XML.

Creates a deep copy of this splitter instance by serializing and deserializing through XML.

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

CloseEditForm(): Closes and disposes the splitter's editing form if it is currently open.

Closes and disposes the splitter's editing form if it is currently open.

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

DeCalculate(): Resets all outlet stream properties to their default (uncalculated) state, clearing temperatures, pressures...

Resets all outlet stream properties to their default (uncalculated) state, clearing temperatures, pressures, enthalpies, flow rates, and compositions.

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

DisplayEditForm(): Opens or activates the splitter's editing form.

Opens or activates the splitter's editing form. Creates a new form instance if none exists or if the previous one was disposed.

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

GetCalculationModes(): Returns an array of strings describing all available calculation modes for this splitter.

Returns an array of strings describing all available calculation modes for this splitter.

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

GetDisplayDescription(): Returns the localized description string for the splitter unit operation.

Returns the localized description string for the splitter unit operation.

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

GetDisplayName(): Returns the localized display name for the splitter unit operation.

Returns the localized display name for the splitter unit operation.

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

GetIconBitmapBytes(): Returns the raw bytes of the splitter icon image, suitable for cross-platform rendering.

Returns the raw bytes of the splitter icon image, suitable for cross-platform rendering.

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

GetProperties(PropertyType): Returns the list of property identifiers available for this splitter, filtered by the requested access type.

Returns the list of property identifiers available for this splitter, filtered by the requested access type. Split ratio properties (SR1, SR2, SR3) are included according to the number of connected outlets.

Parameter Type Description
proptype PropertyType The access-type filter (PropertyType) such as read-write, write-only, or all.
public override string[] GetProperties(PropertyType proptype)
Public Overrides Function GetProperties(proptype As PropertyType) As String()

GetPropertyDescription(string): Returns a human-readable description for a named splitter property, suitable for display in the property editor.

Returns a human-readable description for a named splitter property, suitable for display in the property editor.

Parameter Type Description
p String The property display name (e.g. "Specification", "Split Ratio Stream 1").
public override string GetPropertyDescription(string p)
Public Overrides Function GetPropertyDescription(p As String) As String

GetPropertyUnit(string, IUnitsOfMeasure): Returns the unit string for a named splitter property under the supplied unit system.

Returns the unit string for a named splitter property under the supplied unit system. Flow specification properties return mass or molar flow units depending on the active operation mode.

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 current value of a named splitter property, converting from SI units to the supplied unit system.

Returns the current value of a named splitter property, converting from SI units to the supplied unit system.

Parameter Type Description
prop String The property identifier string (e.g. "PROP_SP_1", "SR1").
su IUnitsOfMeasure The target unit system for the returned value. 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

LoadData(List<XElement>): Restores the splitter state from a list of XML elements previously produced by SaveData.

Restores the splitter state from a list of XML elements previously produced by SaveData.

Parameter Type Description
data List<XElement> A list of XElement objects containing the serialized splitter data.
public override bool LoadData(List<XElement> data)
Public Overrides Function LoadData(data As List(Of XElement)) As Boolean

PerformPostCalcValidation(): Performs post-calculation validation checks to verify the splitter results are physically consistent.

Performs post-calculation validation checks to verify the splitter results are physically consistent.

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

RunDynamicModel(): Executes the dynamic simulation model for the splitter, back-calculating the inlet stream mass flow as the sum of...

Executes the dynamic simulation model for the splitter, back-calculating the inlet stream mass flow as the sum of the connected outlet stream mass flows and propagating inlet thermodynamic state to all outlets.

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

SaveData(): Serializes the splitter state, including split ratios, into a list of XML elements.

Serializes the splitter state, including split ratios, into a list of XML elements.

public override List<XElement> SaveData()
Public Overrides Function SaveData() As List(Of XElement)

SetCalculationMode(int): Sets the active calculation mode for the splitter using a numeric identifier.

Sets the active calculation mode for the splitter using a numeric identifier.

Parameter Type Description
modeID Int32 The integer ID corresponding to an OpMode value.
public override object SetCalculationMode(int modeID)
Public Overrides Function SetCalculationMode(modeID As Integer) As Object

SetPropertyValue(string, object, IUnitsOfMeasure): Sets the value of a named splitter property, converting from the supplied unit system to SI units.

Sets the value of a named splitter property, converting from the supplied unit system to SI units.

Parameter Type Description
prop String The property identifier string (e.g. "PROP_SP_1", "SR1", "SR2").
propval Object The new property value in the units of su.
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 splitter's editing form with the latest object data, if the form is currently open.

Refreshes the splitter's editing form with the latest object data, if the form 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

OutCount: Gets or sets the number of currently connected outlet streams.

Gets or sets the number of currently connected outlet streams.

public int OutCount
Public OutCount As Integer