Shortcut Crude Distillation Unit (CDU)¶
DWSIM Plus
Available with a DWSIM Plus (Patreon) subscription.
![]()
Shortcut Crude Distillation Unit. Takes a single crude feed (with real components + pseudocomponents from the DWSIM assay manager / oil characterization tools) and splits it into N products defined by TBP cut-points, with a logistic overlap to emulate imperfect fractionation. Ports ───── Inlet 0 : Crude feed Outlet 0 .. N-1 : Products, light → heavy (last one is the residue)
DWSIM.UnitOperations.Refining.ShortcutCDU.ShortcutCDUUnitOperation
Assembly DWSIM.UnitOperations.Refining.dll · Object ← BaseClass ← UnitOpBaseClass ← ShortcutCDUUnitOperation
At a glance¶

| Port | Index | Connected in the example |
|---|---|---|
| Inlet, material | 0 |
Crude |
| Outlet, material | 0 |
Naphtha |
| Outlet, material | 1 |
Kerosene |
| Outlet, material | 2 |
Diesel |
| Outlet, material | 3 |
AGO |
| Outlet, material | 4 |
Residue |
Example¶
This code runs on every build of this site, and the output below is what it printed.
fs = Flowsheet.Create("CDUExample").WithCompounds("N-butane")
# Crude assay as pseudocomponents: name, NBP (K), SG, MW, mass flow (kg/s), sulfur (wt%)
crude = [("C-01", 330.0, 0.66, 85.0, 5.0, 0.01),
("C-02", 390.0, 0.73, 105.0, 7.0, 0.03),
("C-03", 440.0, 0.77, 130.0, 7.0, 0.08),
("C-04", 490.0, 0.80, 160.0, 8.0, 0.20),
("C-05", 540.0, 0.83, 200.0, 8.0, 0.60),
("C-06", 590.0, 0.85, 245.0, 8.0, 1.00),
("C-07", 640.0, 0.87, 295.0, 7.0, 1.40),
("C-08", 700.0, 0.90, 370.0, 10.0, 1.80),
("C-09", 780.0, 0.94, 480.0, 12.0, 2.40),
("C-10", 880.0, 1.00, 750.0, 17.0, 3.20)]
for i, (name, nbp, sg, mw, _, _) in enumerate(crude):
CompoundExtensions.WithPseudoComponent(fs, name, Q.Kelvin(nbp), sg, mw,
paraffinFrac=0.45, naphtenicFrac=0.30, aromaticFrac=0.25)
# Give each pseudocomponent its own ID: the property package caches compounds by ID
fs.Inner.SelectedCompounds[name].ID = -(i + 1)
fs.WithPropertyPackage(PropertyPackages.PengRobinson)
feed = fs.AddMaterialStream("Crude").At(Q.Celsius(360.0), Q.Bar(2.0)).SetCompoundMassFlow("N-butane", 1.0)
for name, _, _, _, kg_s, s in crude:
feed.SetCompoundMassFlow(name, kg_s) # 89 kg/s of pseudos + 1 kg/s of butane
ContaminantKeys.Set(feed.Object.Phases[0].Compounds[name], ContaminantKeys.WtPctSulfur, s)
# Cut points are TBP upper limits in K; the last cut takes everything heavier
cuts = [("Naphtha", 453.15), ("Kerosene", 523.15), ("Diesel", 613.15), ("AGO", 663.15), ("Residue", 0.0)]
definitions = []
for name, tbp in cuts:
cut = CDUCutDefinition()
cut.Name, cut.UpperTBP, cut.OutletPressure = name, tbp, 1.5e5
definitions.append(cut)
cdu = fs.AddShortcutCDU("CDU-1").WithOverlapK(10.0).WithCuts(*definitions)
cdu.Object.CreateConnectors() # one outlet port per cut
products = [fs.AddMaterialStream(name) for name, _ in cuts]
cdu.ConnectFeed(feed, 0)
for port, stream in enumerate(products):
cdu.ConnectProduct(stream, port)
fs.AutoLayout()
fs.Solve()
for cut in cdu.Object.Results.Cuts:
print(f"{cut.Name:9s} {cut.MassFlow / cdu.Object.Results.FeedMassFlow * 100.0:5.1f} wt% "
f"mean NBP {cut.AverageNBP - 273.15:4.0f} C S {cut.Contaminants.SulfurWtPct:.2f} wt%")
Output
Naphtha 20.8 wt% mean NBP 99 C S 0.04 wt%
Kerosene 11.4 wt% mean NBP 213 C S 0.23 wt%
Diesel 16.4 wt% mean NBP 290 C S 0.81 wt%
AGO 7.7 wt% mean NBP 362 C S 1.37 wt%
Residue 43.8 wt% mean NBP 505 C S 2.58 wt%
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 69 properties
| ID | Name | Unit (SI) | Input |
|---|---|---|---|
Overlap (K) |
K | yes | |
Top Pressure |
Pa | yes | |
Bottom Pressure |
Pa | yes | |
Number of Cuts |
NF | yes | |
Feed Molar Flow |
mol/s | result | |
Feed Mass Flow |
kg/s | result | |
Feed Temperature |
K | result | |
Feed Pressure |
Pa | result | |
Pseudocomponents In Feed |
NF | result | |
Cut Naphtha Sulfur (wt%) |
wt% | result | |
Cut Naphtha Nitrogen (wt%) |
wt% | result | |
Cut Naphtha MercaptanS (wt%) |
wt% | result | |
Cut Naphtha Ni (ppm) |
ppm wt | result | |
Cut Naphtha V (ppm) |
ppm wt | result | |
Cut Naphtha Fe (ppm) |
ppm wt | result | |
Cut Naphtha Na (ppm) |
ppm wt | result | |
Cut Naphtha CCR (wt%) |
wt% | result | |
Cut Naphtha Asphaltenes (wt%) |
wt% | result | |
Cut Naphtha TAN (mgKOH/g) |
mgKOH/g | result | |
Cut Naphtha Mass Flow |
kg/s | result | |
Cut Naphtha Avg NBP |
K | result | |
Cut Kerosene Sulfur (wt%) |
wt% | result | |
Cut Kerosene Nitrogen (wt%) |
wt% | result | |
Cut Kerosene MercaptanS (wt%) |
wt% | result | |
Cut Kerosene Ni (ppm) |
ppm wt | result | |
Cut Kerosene V (ppm) |
ppm wt | result | |
Cut Kerosene Fe (ppm) |
ppm wt | result | |
Cut Kerosene Na (ppm) |
ppm wt | result | |
Cut Kerosene CCR (wt%) |
wt% | result | |
Cut Kerosene Asphaltenes (wt%) |
wt% | result | |
Cut Kerosene TAN (mgKOH/g) |
mgKOH/g | result | |
Cut Kerosene Mass Flow |
kg/s | result | |
Cut Kerosene Avg NBP |
K | result | |
Cut Diesel Sulfur (wt%) |
wt% | result | |
Cut Diesel Nitrogen (wt%) |
wt% | result | |
Cut Diesel MercaptanS (wt%) |
wt% | result | |
Cut Diesel Ni (ppm) |
ppm wt | result | |
Cut Diesel V (ppm) |
ppm wt | result | |
Cut Diesel Fe (ppm) |
ppm wt | result | |
Cut Diesel Na (ppm) |
ppm wt | result | |
Cut Diesel CCR (wt%) |
wt% | result | |
Cut Diesel Asphaltenes (wt%) |
wt% | result | |
Cut Diesel TAN (mgKOH/g) |
mgKOH/g | result | |
Cut Diesel Mass Flow |
kg/s | result | |
Cut Diesel Avg NBP |
K | result | |
Cut AGO Sulfur (wt%) |
wt% | result | |
Cut AGO Nitrogen (wt%) |
wt% | result | |
Cut AGO MercaptanS (wt%) |
wt% | result | |
Cut AGO Ni (ppm) |
ppm wt | result | |
Cut AGO V (ppm) |
ppm wt | result | |
Cut AGO Fe (ppm) |
ppm wt | result | |
Cut AGO Na (ppm) |
ppm wt | result | |
Cut AGO CCR (wt%) |
wt% | result | |
Cut AGO Asphaltenes (wt%) |
wt% | result | |
Cut AGO TAN (mgKOH/g) |
mgKOH/g | result | |
Cut AGO Mass Flow |
kg/s | result | |
Cut AGO Avg NBP |
K | result | |
Cut Residue Sulfur (wt%) |
wt% | result | |
Cut Residue Nitrogen (wt%) |
wt% | result | |
Cut Residue MercaptanS (wt%) |
wt% | result | |
Cut Residue Ni (ppm) |
ppm wt | result | |
Cut Residue V (ppm) |
ppm wt | result | |
Cut Residue Fe (ppm) |
ppm wt | result | |
Cut Residue Na (ppm) |
ppm wt | result | |
Cut Residue CCR (wt%) |
wt% | result | |
Cut Residue Asphaltenes (wt%) |
wt% | result | |
Cut Residue TAN (mgKOH/g) |
mgKOH/g | result | |
Cut Residue Mass Flow |
kg/s | result | |
Cut Residue Avg NBP |
K | 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 CDU configuration: the list of product cuts with their TBP cut points, the logistic overlap factor...
Gets or sets the CDU configuration: the list of product cuts with their TBP cut points, the logistic overlap factor, and the column top and bottom pressures. 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 (Columns).
Gets the simulation object class category (Columns).
Prefix: Gets the default name prefix for this unit operation ('CDU-').
Gets the default name prefix for this unit operation ("CDU-").
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: the crude feed inlet ('Crude Feed') on the left edge and...
Creates the graphic connector definitions on the flowsheet: the crude feed inlet ("Crude Feed") on the left edge and one material outlet per configured cut on the right edge, ordered light (top) to heavy (bottom) and named after the cuts. Outlets are added or removed to match the number of cuts. 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 ShortcutCDUUnitOperation 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¶