Material Stream Mapper¶
DWSIM Plus
Available with a DWSIM Plus (Patreon) subscription.
![]()
Logical block that copies a source material stream to a target stream and optionally overrides the target's flow, temperature, pressure, flash specification and individual compound amounts, and redirects the mass flow of source compounds to other compounds (compound mappings).
DWSIM.UnitOperations.ExtensionPack.MaterialStreamMapper
Assembly DWSIM.UnitOperations.ExtensionPack.dll · Object ← BaseClass ← UnitOpBaseClass ← MaterialStreamMapper
At a glance¶

| Port | Index | Connected in the example |
|---|---|---|
| Inlet, material | 0 |
Source |
| Outlet, material | 0 |
Target |
Example¶
This code runs on every build of this site, and the output below is what it printed.
fs = (Flowsheet.Create("MapperExample")
.WithCompounds("Methane", "Propane", "Isobutane", "N-butane")
.WithPropertyPackage(PropertyPackages.PengRobinson))
source = (fs.AddMaterialStream("Source")
.At(Q.Celsius(40.0), Q.Bar(20.0))
.SetCompoundMassFlow("Methane", 1.0)
.SetCompoundMassFlow("Propane", 0.3)
.SetCompoundMassFlow("Isobutane", 0.0)
.SetCompoundMassFlow("N-butane", 0.2))
target = fs.AddMaterialStream("Target")
# The outlet starts as a copy of the inlet; the overrides then change it.
mapper = (fs.AddMaterialStreamMapper("MAP-1")
.WithOverrideTemperature(True, 273.15 + 15.0) # K
.WithOverridePressure(True, 5.0e5) # Pa
.MapCompound("N-butane", "Isobutane") # mass of n-butane goes to isobutane
.ConnectFeed(source)
.ConnectProduct(target))
fs.AutoLayout()
fs.Solve()
t = target.Object
print(f"Target T = {target.TemperatureK - 273.15:.1f} C")
print(f"Target P = {t.GetPressure() / 1e5:.2f} bar")
print(f"Target mass flow = {t.GetMassFlow():.3f} kg/s")
print(f"Target isobutane = {t.GetCompoundMassFlow('Isobutane'):.3f} kg/s")
print(f"Target n-butane = {t.GetCompoundMassFlow('N-butane'):.3f} kg/s")
Output
Target T = 15.0 C
Target P = 5.00 bar
Target mass flow = 1.500 kg/s
Target isobutane = 0.200 kg/s
Target n-butane = 0.000 kg/s
DWSIM 10.2.11.0, generated 2026-10-08.
Learn more¶
-
User guide
-
FluentAPI
API members¶
Public members declared by this class. Inherited members are documented on the base classes.
Constructors¶
MaterialStreamMapper(): Initializes a new default instance of the MaterialStreamMapper class.
Initializes a new default instance of the MaterialStreamMapper class.
MaterialStreamMapper(string, string): Initializes a new instance of the MaterialStreamMapper class with a name and description.
Initializes a new instance of the MaterialStreamMapper 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. |
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.
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.
CompoundAmountOverrides: Gets or sets the per-compound amount overrides applied to the target stream: each sets a compound's mass flow, molar...
Gets or sets the per-compound amount overrides applied to the target stream: each sets a compound's mass flow, molar flow or a percentage of its mass flow in the source stream.
CompoundMaps: Gets or sets the compound mappings as pairs {source compound, target compound}: the source compound's mass flow in...
Gets or sets the compound mappings as pairs {source compound, target compound}: the source compound's mass flow in the inlet stream is moved to the target compound in the outlet stream, and the source compound's flow in the outlet is set to zero. Applied after the compound amount overrides.
IsPremium: Gets a value indicating whether this unit operation requires a premium (Patreon) subscription.
Gets a value indicating whether this unit operation requires a premium (Patreon) subscription. Always True.
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.
ObjectClass: Gets or sets the simulation object class category (logical).
Gets or sets the simulation object class category (logical).
OverrideFlashSpec: Gets or sets whether the target stream uses OverrideFlashSpecValue as its flash...
Gets or sets whether the target stream uses OverrideFlashSpecValue as its flash specification. When False, the target keeps the source's specification. Default False.
OverrideFlashSpecValue: Gets or sets the flash specification (e.g.
Gets or sets the flash specification (e.g. temperature and pressure, pressure and enthalpy) applied to the target stream when OverrideFlashSpec is True.
OverrideFlow: Gets or sets whether the total flow of the target stream is replaced by OverrideFlowValue.
Gets or sets whether the total flow of the target stream is replaced by OverrideFlowValue. Default False.
OverrideFlowType: Gets or sets the kind of flow set by the flow override: mass, molar or volumetric.
Gets or sets the kind of flow set by the flow override: mass, molar or volumetric.
OverrideFlowUnits: Gets or sets the units of OverrideFlowValue (e.g.
Gets or sets the units of OverrideFlowValue (e.g. "kg/s", "kmol/h", "m3/h"). Default "kg/s".
OverrideFlowValue: Gets or sets the flow override value, in the units given by OverrideFlowUnits.
Gets or sets the flow override value, in the units given by OverrideFlowUnits. Default 1.0.
OverridePressure: Gets or sets whether the target stream pressure is replaced by OverridePressureValue (the...
Gets or sets whether the target stream pressure is replaced by OverridePressureValue (the flash specification becomes temperature and pressure). Default False.
OverridePressureUnits: Gets or sets the units of OverridePressureValue (e.g.
Gets or sets the units of OverridePressureValue (e.g. "Pa", "kPa", "bar"). Default "Pa".
OverridePressureValue: Gets or sets the pressure override value, in the units given by OverridePressureUnits.
Gets or sets the pressure override value, in the units given by OverridePressureUnits. Default 101325.
OverrideTemperature: Gets or sets whether the target stream temperature is replaced by...
Gets or sets whether the target stream temperature is replaced by OverrideTemperatureValue (the flash specification becomes temperature and pressure). Default False.
OverrideTemperatureUnits: Gets or sets the units of OverrideTemperatureValue ('K', 'C', 'F' or 'R').
Gets or sets the units of OverrideTemperatureValue ("K", "C", "F" or "R"). Default "K".
OverrideTemperatureValue: Gets or sets the temperature override value, in the units given by...
Gets or sets the temperature override value, in the units given by OverrideTemperatureUnits. Default 298.15.
Methods¶
Calculate(object): Calculates the object.
Calculates the object.
| Parameter | Type | Description |
|---|---|---|
args |
Object |
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.
CloseEditForm(): Closes the editor of this object, if it is open.
Closes the editor of this object, if it is open.
DisplayEditForm(): Opens the editor of this object.
Opens the editor of this object. A host that has no editor for it does nothing.
GetDisplayDescription(): Returns the description string for this unit operation type.
Returns the description string for this unit operation type.
GetDisplayName(): Returns the display name for this unit operation type.
Returns the display name for this unit operation type.
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.
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. |
PerformPostCalcValidation(): Post-calculation validation of the outlet stream.
Post-calculation validation of the outlet stream. Does nothing for this unit operation.
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.
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.
Validate(): Validates the object, checking its connections and other parameters.
Validates the object, checking its connections and other parameters.
Fields¶