Hydrocracker (HCR)¶
DWSIM Plus
Available with a DWSIM Plus (Patreon) subscription.
![]()
Shortcut Hydrocracker. Feed: VGO / heavy gas oil. Products: 5 material outlets (light ends, naphtha, kerosene, diesel, unconverted oil). Reactor exotherm is released via the energy connector. Chemical H₂ consumption is reported. Hydrotreating severity removes a configurable fraction of feed S and N, with the removed heteroatoms reported as H₂S/NH₃ produced. Product composition: light ends (C1–C4), naphtha, kerosene, diesel are emitted as moles of a single surrogate compound each; UCO keeps the feed pseudos, scaled. Contaminants (retained S/N) are partitioned by the user-configured fractions.
DWSIM.UnitOperations.Refining.HCR.HCRUnitOperation
Assembly DWSIM.UnitOperations.Refining.dll · Object ← BaseClass ← UnitOpBaseClass ← HCRUnitOperation
At a glance¶

| Port | Index | Connected in the example |
|---|---|---|
| Inlet, material | 0 |
VGO |
| Inlet, material | 1 |
Make-up-H2 |
| Outlet, material | 0 |
Light-ends |
| Outlet, material | 1 |
Naphtha |
| Outlet, material | 2 |
Kerosene |
| Outlet, material | 3 |
Diesel |
| Outlet, material | 4 |
UCO |
| Outlet, material | 5 |
Offgas |
| Outlet, energy | 6 |
Reactor-heat |
Example¶
This code runs on every build of this site, and the output below is what it printed.
# Light ends, naphtha, kerosene and diesel leave as one surrogate compound each
# (propane, isooctane, n-dodecane, n-hexadecane); the unconverted oil keeps the feed pseudos.
fs = Flowsheet.Create("HCRExample").WithCompounds(
"Hydrogen", "Hydrogen sulfide", "Ammonia",
"Propane", "2,2,4-trimethylpentane", "N-dodecane", "N-hexadecane")
# Vacuum gas oil as three pseudocomponents: name, NBP (K), SG, MW
vgo = [("VGO-1", 650.0, 0.89, 330.0), ("VGO-2", 720.0, 0.91, 420.0), ("VGO-3", 790.0, 0.93, 520.0)]
for name, nbp, sg, mw in vgo:
CompoundExtensions.WithPseudoComponent(fs, name, Q.Kelvin(nbp), sg, mw,
paraffinFrac=0.50, naphtenicFrac=0.28, aromaticFrac=0.22)
fs.WithPropertyPackage(PropertyPackages.PengRobinson)
feed = fs.AddMaterialStream("VGO").At(Q.Celsius(380.0), Q.Bar(150.0))
for name, *_ in vgo:
feed.SetCompoundMassFlow(name, 15.0) # kg/s each, 45 kg/s in total
comp = feed.Object.Phases[0].Compounds[name]
ContaminantKeys.Set(comp, ContaminantKeys.WtPctSulfur, 2.0)
ContaminantKeys.Set(comp, ContaminantKeys.WtPctNitrogen, 0.12)
hydrogen = fs.AddMaterialStream("Make-up-H2").At(Q.Celsius(60.0), Q.Bar(150.0)).SetCompoundMolarFlow("Hydrogen", 800.0)
products = [fs.AddMaterialStream(tag) for tag in ("Light-ends", "Naphtha", "Kerosene", "Diesel", "UCO", "Offgas")]
duty = fs.AddEnergyStream("Reactor-heat")
hcr = (fs.AddHydrocracker("HCR-1")
.WithReactorTemperature(Q.Celsius(400.0))
.WithReactorPressure(Q.Bar(150.0))
.WithLHSV(1.0)
.WithTargetConversion(0.80)
.WithH2ConsumptionPerKgFeed(0.025)
.WithSulfurRemoval(0.995)
.WithNitrogenRemoval(0.95)
.ConnectFeed(feed, 0).ConnectFeed(hydrogen, 1))
for port, stream in enumerate(products): # outlets 0-4 products, 5 offgas
hcr.ConnectProduct(stream, port)
# The reaction heat leaves through outlet port 6
hcr.ConnectEnergyProduct(duty, 6)
fs.AutoLayout()
fs.Solve()
r = hcr.Object.Results
print(f"Conversion = {r.Conversion * 100.0:.1f} wt%")
print(f"Naphtha / kero / diesel = {r.Naphtha.MassYield * 100.0:.1f} / "
f"{r.Kerosene.MassYield * 100.0:.1f} / {r.Diesel.MassYield * 100.0:.1f} wt% of feed")
print(f"H2 consumed = {r.H2ConsumptionKgPerS * 3.6:.1f} t/h ({r.H2ConsumptionKgPerS / r.FeedMassFlow * 100.0:.2f} wt% of feed)")
print(f"H2S produced = {r.H2SProducedKgPerS * 3.6:.2f} t/h")
print(f"Reaction heat = {duty.EnergyFlowKW / 1000.0:.1f} MW")
Output
Conversion = 79.0 wt%
Naphtha / kero / diesel = 19.1 / 21.3 / 34.0 wt% of feed
H2 consumed = 4.1 t/h (2.54 wt% of feed)
H2S produced = 3.43 t/h
Reaction heat = 88.9 MW
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.
| ID | Name | Unit (SI) | Input |
|---|---|---|---|
Reactor Temperature |
K | yes | |
Reactor Pressure |
Pa | yes | |
LHSV |
1/h | yes | |
Target Conversion |
NF | yes | |
H2 Consumption (kg/kg feed) |
NF | yes | |
S Removal Fraction |
NF | yes | |
N Removal Fraction |
NF | yes | |
Feed Mass Flow |
kg/s | result | |
Conversion |
NF | result | |
Light Ends Yield |
NF | result | |
Naphtha Yield |
NF | result | |
Kerosene Yield |
NF | result | |
Diesel Yield |
NF | result | |
UCO Yield |
NF | result | |
H2 Consumption |
kg/s | result | |
H2S Produced |
kg/s | result | |
NH3 Produced |
kg/s | result | |
Reactor Duty |
kW | result | |
Feed xP |
NF | result | |
Feed xN |
NF | result | |
Feed xA |
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 configuration of this hydrocracker: the operating conditions (reactor temperature and pressure...
Gets or sets the configuration of this hydrocracker: the operating conditions (reactor temperature and pressure, LHSV), target conversion, base yield slate, hydrogen consumption, feed PNA corrections, heat of reaction, hydrotreating severity, sulfur and nitrogen partitioning across the products, and the product surrogate compounds.
IsRefining: Gets a value indicating that this unit operation belongs to the refining group.
Gets a value indicating that this unit operation belongs to the refining group. Always true; the object palette uses it to list the unit under the Refinery 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 (Reactors).
Gets the simulation object class category (Reactors).
Prefix: Gets the default name prefix for this unit operation ('HCR-').
Gets the default name prefix for this unit operation ("HCR-").
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: two inlets (Feed and Hydrogen) on the left, five product...
Creates the graphic connector definitions on the flowsheet: two inlets (Feed and Hydrogen) on the left, five product outlets (Light Ends, Naphtha, Kerosene, Diesel, UCO) and a Sour Offgas outlet on the right, and a Reactor Duty energy outlet at the bottom.
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 it cannot be loaded), draw mode 1 draws the vector icon as a silhouette, and other modes draw 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, rendered from the vector icon at 64 x 64 pixels.
Returns the raw bytes of the icon image for this unit operation, rendered from the vector icon at 64 x 64 pixels.
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 (Avalonia) editor panel with controls: buttons that open the configuration and results...
Populates the cross-platform (Avalonia) editor panel with controls: buttons that open the configuration and results forms. Other container types are ignored.
| 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). |
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¶