Product Blender¶
DWSIM Plus
Available with a DWSIM Plus (Patreon) subscription.
![]()
Shortcut Product Blender. Up to four material inlets → one pooled outlet. Per-compound molar flows sum across connected inlets; outlet T is mass-flow-weighted; outlet P is the minimum (or mean) of connected inlet pressures. Per-compound ExtraProperties on the first inlet to contribute a compound are carried forward.
DWSIM.UnitOperations.Refining.Blender.BlenderUnitOperation
Assembly DWSIM.UnitOperations.Refining.dll · Object ← BaseClass ← UnitOpBaseClass ← BlenderUnitOperation
At a glance¶

| Port | Index | Connected in the example |
|---|---|---|
| Inlet, material | 0 |
Reformate |
| Inlet, material | 1 |
FCC-naphtha |
| Inlet, material | 2 |
Alkylate |
| Inlet, material | 3 |
Butane |
| Outlet, material | 0 |
Gasoline |
Example¶
This code runs on every build of this site, and the output below is what it printed.
fs = (Flowsheet.Create("BlenderExample")
.WithCompounds("N-butane", "Isopentane", "N-hexane", "Toluene", "2,2,4-trimethylpentane")
.WithPropertyPackage(PropertyPackages.PengRobinson))
def liquid(tag, kg_s):
s = fs.AddMaterialStream(tag).At(Q.Celsius(35.0), Q.Bar(6.0))
for name, flow in kg_s.items():
s.SetCompoundMassFlow(name, flow)
return s
reformate = liquid("Reformate", {"Toluene": 6.0, "N-hexane": 3.0})
fcc_naphtha = liquid("FCC-naphtha", {"Isopentane": 2.0, "N-hexane": 5.0, "Toluene": 2.0})
alkylate = liquid("Alkylate", {"2,2,4-trimethylpentane": 4.0})
butane = liquid("Butane", {"N-butane": 0.6})
gasoline = fs.AddMaterialStream("Gasoline")
blender = (fs.AddBlender("BLD-1")
.WithNumberOfInlets(4)
.WithPressureMode("Min")
.ConnectFeed(reformate, 0).ConnectFeed(fcc_naphtha, 1)
.ConnectFeed(alkylate, 2).ConnectFeed(butane, 3)
.ConnectProduct(gasoline, 0))
# Octane by the Ethyl RT-70 method and RVP by the Chevron index, on a volume basis.
# Per-inlet RON, MON, RVP (Pa), olefins and aromatics (vol%), in port order.
cfg = blender.Config
cfg.OctaneMethod = OctaneBlendingMethod.Ethyl
cfg.RVPMethod = RVPBlendingMethod.ChevronIndex
cfg.Basis = BlendingBasis.Volume
inlets = [(98.0, 88.0, 24e3, 1.0, 65.0), # reformate
(92.0, 80.0, 48e3, 30.0, 25.0), # FCC naphtha
(95.0, 93.0, 28e3, 0.0, 0.0), # alkylate
(94.0, 90.0, 358e3, 0.0, 0.0)] # n-butane
for i, (ron, mon, rvp, olefins, aromatics) in enumerate(inlets):
cfg.InletRON[i] = ron
cfg.InletMON[i] = mon
cfg.InletRVP[i] = rvp
cfg.InletOlefinsVolPct[i] = olefins
cfg.InletAromaticsVolPct[i] = aromatics
fs.AutoLayout()
fs.Solve()
r = blender.Object.Results
print(f"Gasoline flow = {gasoline.MassFlowKgPerSecond:.2f} kg/s at {gasoline.TemperatureK - 273.15:.1f} C")
print(f"Blended RON = {r.BlendedRON:.1f} (linear average {r.LinearRON:.1f})")
print(f"Blended MON = {r.BlendedMON:.1f}")
print(f"Anti-knock index (R+M)/2 = {r.AntiKnockIndex:.1f}")
print(f"Blended RVP = {r.BlendedRVP / 1000.0:.1f} kPa")
Output
Gasoline flow = 22.60 kg/s at 35.0 C
Blended RON = 94.7 (linear average 94.8)
Blended MON = 85.9
Anti-knock index (R+M)/2 = 90.3
Blended RVP = 51.0 kPa
DWSIM 10.2.11.0, generated 2026-10-08.
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.
All 46 properties
| ID | Name | Unit (SI) | Input |
|---|---|---|---|
Pressure Mode |
NF | yes | |
Octane Blending Method |
NF | yes | |
RVP Blending Method |
NF | yes | |
Blending Basis |
NF | yes | |
Inlet 1 RON |
yes | ||
Inlet 1 MON |
yes | ||
Inlet 1 RVP |
Pa | yes | |
Inlet 1 Olefins vol% |
yes | ||
Inlet 1 Aromatics vol% |
yes | ||
Inlet 2 RON |
yes | ||
Inlet 2 MON |
yes | ||
Inlet 2 RVP |
Pa | yes | |
Inlet 2 Olefins vol% |
yes | ||
Inlet 2 Aromatics vol% |
yes | ||
Inlet 3 RON |
yes | ||
Inlet 3 MON |
yes | ||
Inlet 3 RVP |
Pa | yes | |
Inlet 3 Olefins vol% |
yes | ||
Inlet 3 Aromatics vol% |
yes | ||
Inlet 4 RON |
yes | ||
Inlet 4 MON |
yes | ||
Inlet 4 RVP |
Pa | yes | |
Inlet 4 Olefins vol% |
yes | ||
Inlet 4 Aromatics vol% |
yes | ||
Ethyl a1 |
NF | yes | |
Ethyl a2 |
NF | yes | |
Ethyl a3 |
NF | yes | |
Ethyl b1 |
NF | yes | |
Ethyl b2 |
NF | yes | |
Ethyl b3 |
NF | yes | |
Total Mass Flow |
kg/s | result | |
Total Molar Flow |
mol/s | result | |
Outlet Temperature |
K | result | |
Outlet Pressure |
Pa | result | |
Blended RON |
NF | result | |
Blended MON |
NF | result | |
Anti-Knock Index |
NF | result | |
Octane Sensitivity |
NF | result | |
Linear RON |
NF | result | |
Linear MON |
NF | result | |
Octane Blend Coverage |
NF | result | |
Blended RVP |
Pa | result | |
RVP Blend Coverage |
NF | result | |
Blending Basis Used |
NF | result | |
Pool Sulfur wt% |
NF | result | |
Pool Nitrogen wt% |
NF | result |
Learn more¶
-
User guide
-
FluentAPI
API members¶
Public members declared by this class. Inherited members are documented on the base classes.
Constructors¶
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.
Config: Gets or sets the blender configuration: outlet pressure mode, octane and RVP blending methods, blending basis...
Gets or sets the blender configuration: outlet pressure mode, octane and RVP blending methods, blending basis, per-inlet RON, MON, RVP, olefins and aromatics values used when an inlet stream does not carry them, and the user Ethyl coefficients. Saved with the flowsheet.
IsRefining: Gets a value that is always true.
Gets a value that is always true. It marks this class as a refining unit operation, so the flowsheet object palettes (which read it by reflection) list it under the Refining category.
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 the simulation object class category (MixersSplitters).
Gets the simulation object class category (MixersSplitters).
Prefix: Gets the default name prefix for this unit operation ('BLD-').
Gets the default name prefix for this unit operation ("BLD-").
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.
CreateConnectors(): Creates the graphic connector definitions on the flowsheet: four material inlets ('Inlet 1' to 'Inlet 4') on the...
Creates the graphic connector definitions on the flowsheet: four material inlets ("Inlet 1" to "Inlet 4") on the left edge and one material outlet ("Product") on the right edge. The energy connector is disabled.
DeCalculate(): Decalculates the object.
Decalculates the object.
DisplayEditForm(): Opens the editor of this object.
Opens the editor of this object. A host that has no editor for it does nothing.
Draw(object): Draws the unit operation icon on the given SkiaSharp canvas.
Draws the unit operation icon on the given SkiaSharp canvas. Draw mode 2 uses the embedded PNG image (falling back to the vector icon if the image cannot be loaded), draw mode 1 draws the vector icon as a silhouette, and any other mode draws the vector icon.
| Parameter | Type | Description |
|---|---|---|
g |
Object |
The SkiaSharp canvas (SKCanvas). |
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.
GetPreferredGraphicObjectHeight(): Returns the preferred height of the flowsheet graphic object, in pixels.
Returns the preferred height of the flowsheet graphic object, in pixels.
GetPreferredGraphicObjectWidth(): Returns the preferred width of the flowsheet graphic object, in pixels.
Returns the preferred width of the flowsheet graphic object, in pixels.
GetProperties(PropertyType): Get a list of all properties of the object.
Get a list of all properties of the object.
| Parameter | Type | Description |
|---|---|---|
proptype |
PropertyType |
Type of the property. |
GetPropertyUnit(string, IUnitsOfMeasure): Gets the units of a property.
Gets the units of a property.
| Parameter | Type | Description |
|---|---|---|
prop |
String |
Property identifier. |
su |
IUnitsOfMeasure |
Units system to use. Null to use the default (SI) system. |
GetPropertyValue(string, IUnitsOfMeasure): Returns the value of a named property, converting from SI to the current unit system.
Returns the value of a named property, converting from SI to the current unit system. Falls back to extra properties if the property is not found in the base implementation.
| Parameter | Type | Description |
|---|---|---|
prop |
String |
The property identifier string. |
su |
IUnitsOfMeasure |
Optional units-of-measure system used for conversion; uses the shared SI system when Nothing. |
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. |
PopulateEditorPanel(object): Populates the cross-platform editor panel with controls.
Populates the cross-platform editor panel with controls. Only the Avalonia editor panel (AvaloniaEditorPanel) is filled; other container types are left unchanged.
| Parameter | Type | Description |
|---|---|---|
ctner |
Object |
The editor panel (layout container) to populate. |
ReturnInstance(string): Creates and returns a new instance for deserialization.
Creates and returns a new instance for deserialization.
| Parameter | Type | Description |
|---|---|---|
typename |
String |
The type name to instantiate. Not used; a new BlenderUnitOperation is always returned. |
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.
SetPropertyValue(string, object, IUnitsOfMeasure): Sets the value of a property.
Sets the value of a property.
| Parameter | Type | Description |
|---|---|---|
prop |
String |
Property identifier. |
propval |
Object |
Property value to set at the specified units. |
su |
IUnitsOfMeasure |
Units system to use. Null to use the default (SI) system. |
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.
Fields¶
_editorForm: 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.
KeyAromatics: Stream extra property key for the aromatics content in vol% ('AromaticsVolPct'), read from each inlet and written to...
Stream extra property key for the aromatics content in vol% ("AromaticsVolPct"), read from each inlet and written to the outlet.
KeyMON: Stream extra property key for the motor octane number ('MON'), read from each inlet and written to the outlet.
Stream extra property key for the motor octane number ("MON"), read from each inlet and written to the outlet.
KeyOlefins: Stream extra property key for the olefins content in vol% ('OlefinsVolPct'), read from each inlet and written to the...
Stream extra property key for the olefins content in vol% ("OlefinsVolPct"), read from each inlet and written to the outlet.
KeyRON: Stream-level ExtraProperties keys read from each inlet and written to the outlet.
Stream-level ExtraProperties keys read from each inlet and written to the outlet.
KeyRVP: Stream extra property key for the Reid vapor pressure ('RVP', in Pa), read from each inlet and written to the outlet.
Stream extra property key for the Reid vapor pressure ("RVP", in Pa), read from each inlet and written to the outlet.