Plug Flow Reactor (PFR)¶
![]()
Represents a Plug Flow Reactor (PFR) that integrates kinetic, heterogeneous catalytic, and conversion reactions along the reactor length using an ODE solver. Temperature, pressure, and composition profiles are computed section by section.
DWSIM.UnitOperations.Reactors.Reactor_PFR
Assembly DWSIM.UnitOperations.dll · Object ← BaseClass ← UnitOpBaseClass ← Reactor ← Reactor_PFR
At a glance¶

| Port | Index | Connected in the example |
|---|---|---|
| Inlet, material | 0 |
Ethane |
| Inlet, energy | 1 |
Q |
| Inlet, material | 2 |
|
| Outlet, material | 0 |
Cracked gas |
| Outlet, material | 1 |
Example¶
This code runs on every build of this site, and the output below is what it printed.
fs = (Flowsheet.Create("PFRExample")
.WithCompounds("Ethane", "Ethylene", "Hydrogen")
.WithPropertyPackage(PropertyPackages.PengRobinson))
# C2H6 -> C2H4 + H2, first order: k = 0.072 1/s at 1000 K, E = 82 kcal/mol
E = 82000.0 * 4.184 # J/mol
A = 0.072 * math.exp(E / (8.314 * 1000.0)) # 1/s
cracking = fs.DefineKineticReaction(
"Cracking",
coefficients({"Ethane": -1, "Ethylene": 1, "Hydrogen": 1}),
coefficients({"Ethane": 1, "Ethylene": 0, "Hydrogen": 0}), # forward orders
coefficients({"Ethane": 0, "Ethylene": 0, "Hydrogen": 0}), # reverse orders
"Ethane", "Vapor", "Molar Concentration", "mol/m3", "mol/[m3.s]", A, E)
fs.ReactionSet("Cracking").Add(cracking)
feed = (fs.AddMaterialStream("Ethane")
.At(Q.Kelvin(1100.0), Q.Bar(6.0 * 1.01325))
.WithMolarFlow(Q.MolPerSecond(10.0))
.SetCompoundMolarFlow("Ethane", 10.0))
product = fs.AddMaterialStream("Cracked gas")
duty = fs.AddEnergyStream("Q")
reactor = (fs.AddPFR("R-1")
.Isothermal()
.WithReactionSet("Cracking")
.WithVolume(Q.CubicMeters(0.12))
.ConnectFeed(feed, 0)
.ConnectProduct(product, 0)
.ConnectEnergyFeed(duty, 1))
reactor.Object.Length = 10.0 # m; the diameter follows from the volume
fs.AutoLayout()
fs.Solve()
# isothermal, isobaric design equation with volume change (epsilon = 1)
X = reactor.Object.ComponentConversions["Ethane"]
k = A * math.exp(-E / (8.314 * 1100.0))
c0 = feed.PressurePa / (8.314 * 1100.0)
v_hand = 10.0 / (k * c0) * (2.0 * math.log(1.0 / (1.0 - X)) - X)
print(f"Ethane conversion = {100.0 * X:.1f} %")
print(f"Ethylene produced = {product.MolarFlowMolPerSecond * product.OverallMoleFraction('Ethylene'):.2f} mol/s")
print(f"Volume for this X = {v_hand:.4f} m3 by hand (reactor: 0.12 m3)")
print(f"Residence time = {reactor.Object.ResidenceTime:.3f} s")
print(f"Heat supplied = {reactor.HeatDutyKW:.0f} kW")
Output
Ethane conversion = 80.1 %
Ethylene produced = 8.01 mol/s
Volume for this X = 0.1190 m3 by hand (reactor: 0.12 m3)
Residence time = 0.796 s
Heat supplied = 1151 kW
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 42 properties
| ID | Name | Unit (SI) | Input |
|---|---|---|---|
PROP_PF_0 |
Pressure Drop | Pa | yes |
PROP_PF_1 |
Residence time | s | yes |
PROP_PF_2 |
Volume | m3 | yes |
PROP_PF_3 |
Tube Length | m | yes |
PROP_PF_4 |
Catalyst loading | kg/m3 | yes |
PROP_PF_5 |
Catalyst diameter | mm | yes |
PROP_PF_6 |
Catalyst void fraction | yes | |
PROP_PF_7 |
Temperature delta | K (difference) | yes |
PROP_PF_8 |
Heat load | kW | yes |
PROP_PF_9 |
Tube Diameter | mm | yes |
PROP_PF_10 |
Number of Tubes | yes | |
PROP_PF_11 |
Integration Step | yes | |
PROP_PF_12 |
Outlet Temperature | K | yes |
PROP_PF_13 |
Overall Heat Transfer Coefficient | W/m2.K | yes |
PROP_PF_14 |
Heat Exchange Area | m2 | yes |
PROP_PF_15 |
Coolant Inlet Temperature | K | yes |
PROP_PF_16 |
Coolant Mass Flow Rate | kg/s | yes |
PROP_PF_17 |
Coolant Specific Heat | J/kg.K | yes |
PROP_PF_18 |
Coolant Flow Direction | yes | |
PROP_PF_19 |
Area Calculation Mode | yes | |
PROP_PF_20 |
Use Utility Stream | yes | |
PROP_PF_21 |
Wall Thickness | m | yes |
PROP_PF_22 |
Internal Heat Transfer Coefficient | W/m2.K | yes |
PROP_PF_23 |
External Heat Transfer Coefficient | W/m2.K | yes |
PROP_PF_24 |
Use Wall Properties | yes | |
PROP_PF_25 |
Calculated Overall HTC | W/m2.K | yes |
PROP_PF_26 |
Calculate Internal HTC | yes | |
PROP_PF_27 |
Calculate External HTC | yes | |
PROP_PF_28 |
Jacket Diameter | mm | yes |
PROP_PF_29 |
Coolant Density | kg/m3 | yes |
PROP_PF_30 |
Coolant Viscosity | Pa.s | yes |
PROP_PF_31 |
Coolant Thermal Conductivity | W/m.K | yes |
PROP_PF_32 |
Calculated Internal HTC | W/m2.K | yes |
PROP_PF_33 |
Calculated External HTC | W/m2.K | yes |
PROP_PF_34 |
Catalyst Particle Sphericity | yes | |
Calculation Mode |
Select the calculation mode of this reactor. | result | |
Ethane: Conversion |
% | result | |
Ethylene: Conversion |
% | result | |
Hydrogen: Conversion |
% | result | |
Cracking: Reaction Extent |
mol/s | result | |
Cracking: Reaction Rate |
mol/[m3.s] | result | |
Cracking: Reaction Heat |
kW | result |
Dynamic mode¶
Extra properties used when the flowsheet runs in dynamic mode.
| Name | Unit |
|---|---|
| Max Sections | |
| Reset Contents |
Learn more¶
-
User guide
-
FluentAPI
API members¶
Public members declared by this class. Inherited members are documented on the base classes.
Constructors¶
Reactor_PFR(): Initializes a new default instance of the Reactor_PFR class.
Initializes a new default instance of the Reactor_PFR class.
Reactor_PFR(string, string): Initializes a new instance of the Reactor_PFR class with a name and description.
Initializes a new instance of the Reactor_PFR class with a name and description.
| Parameter | Type | Description |
|---|---|---|
name |
String |
The display name of the PFR. |
description |
String |
A brief description of the PFR. |
Properties¶
AccumulationStreams: Gets or sets the list of accumulation streams used for dynamic-mode mass balance tracking.
Gets or sets the list of accumulation streams used for dynamic-mode mass balance tracking.
CatalystLoading: Gets or sets the catalyst mass loading (kg/m� of reactor volume).
Gets or sets the catalyst mass loading (kg/m� of reactor volume).
CatalystParticleDiameter: Gets or sets the catalyst particle equivalent diameter (m).
Gets or sets the catalyst particle equivalent diameter (m).
CatalystParticleSphericity: Gets or sets the catalyst particle sphericity (0-1).
Gets or sets the catalyst particle sphericity (0-1).
CatalystVoidFraction: Gets or sets the void fraction of the catalyst bed (0�1).
Gets or sets the void fraction of the catalyst bed (0�1).
Diameter: Gets or sets the reactor tube internal diameter (m).
Gets or sets the reactor tube internal diameter (m).
dV: Gets or sets the volume increment (m�) used as the ODE integration step.
Gets or sets the volume increment (m�) used as the ODE integration step.
EquipmentTypes: Gets the list of equipment sub-types available for this reactor.
Gets the list of equipment sub-types available for this reactor.
HasPropertiesForDynamicMode: Gets a value indicating whether this reactor exposes dedicated dynamic-mode properties.
Gets a value indicating whether this reactor exposes dedicated dynamic-mode properties.
InternalSolver: Gets or sets the internal ODE solver type index (0 = Oslo/RK, 1 = manual Euler).
Gets or sets the internal ODE solver type index (0 = Oslo/RK, 1 = manual Euler).
Length: Gets or sets the reactor tube length (m).
Gets or sets the reactor tube length (m).
MobileCompatible: Gets a value indicating whether this reactor is compatible with mobile/cross-platform interfaces.
Gets a value indicating whether this reactor is compatible with mobile/cross-platform interfaces.
NumberOfTubes: Gets or sets the number of parallel tubes in the reactor.
Gets or sets the number of parallel tubes in the reactor.
Profile: Gets or sets the composition/flow/temperature profile computed along the reactor length.
Gets or sets the composition/flow/temperature profile computed along the reactor length.
ReactorSizingType: Gets or sets the sizing calculation mode for the PFR.
Gets or sets the sizing calculation mode for the PFR.
ResidenceTime: Gets or sets the calculated residence time (s).
Gets or sets the calculated residence time (s).
SlurryViscosityMode: Gets or sets the slurry viscosity model index (0 = default).
Gets or sets the slurry viscosity model index (0 = default).
SupportsDynamicMode: Gets a value indicating whether this reactor supports dynamic simulation mode.
Gets a value indicating whether this reactor supports dynamic simulation mode.
UserDefinedPressureDrop: Gets or sets the user-defined total pressure drop (Pa) when...
Gets or sets the user-defined total pressure drop (Pa) when UseUserDefinedPressureDrop is True.
UseUserDefinedPressureDrop: Gets or sets whether a user-defined total pressure drop is used instead of computing it from the Ergun equation.
Gets or sets whether a user-defined total pressure drop is used instead of computing it from the Ergun equation.
Volume: Gets or sets the total reactor volume (m�).
Gets or sets the total reactor volume (m�).
Methods¶
Calculate(object): Performs the PFR calculation by integrating the reaction-rate ODEs along the reactor volume, computing temperature...
Performs the PFR calculation by integrating the reaction-rate ODEs along the reactor volume, computing temperature, pressure, and composition profiles.
| Parameter | Type | Description |
|---|---|---|
args |
Object |
Optional. If True, indicates a dynamic-mode call. |
Calculate_Internal(double, object): Internal calculation routine that integrates the PFR ODEs using the specified volume-fraction scale factor.
Internal calculation routine that integrates the PFR ODEs using the specified volume-fraction scale factor.
| Parameter | Type | Description |
|---|---|---|
dVF |
Double |
Volume fraction scale factor applied to the integration step. |
args |
Object |
Optional. If True, indicates a dynamic-mode call. |
CloneXML(): Creates a deep copy of this reactor via XML serialization.
Creates a deep copy of this reactor via XML serialization.
CloseEditForm(): Closes and disposes the editing form.
Closes and disposes the editing form.
CreateDimensionsList(): Creates the dimensions list (Volume, Length, Diameter) for this PFR.
Creates the dimensions list (Volume, Length, Diameter) for this PFR.
CreateDynamicProperties(): Registers the dynamic properties for dynamic simulation mode.
Registers the dynamic properties for dynamic simulation mode.
DeCalculate(): Clears the calculated results from the outlet material streams.
Clears the calculated results from the outlet material streams.
DisplayEditForm(): Opens or activates the editing form for this reactor.
Opens or activates the editing form for this reactor.
GetChartModel(string): Returns an OxyPlot chart model for the specified profile chart name.
Returns an OxyPlot chart model for the specified profile chart name.
| Parameter | Type | Description |
|---|---|---|
name |
String |
GetChartModelNames(): Returns the list of available profile chart names for this PFR.
Returns the list of available profile chart names for this PFR.
GetDisplayDescription(): Returns the localised display description for this reactor.
Returns the localised display description for this reactor.
GetDisplayName(): Returns the localised display name for this reactor.
Returns the localised display name for this reactor.
GetIconBitmapBytes(): Returns the icon bitmap as a byte array.
Returns the icon bitmap as a byte array.
GetProperties(PropertyType): Returns an array of property identifiers for the specified property type.
Returns an array of property identifiers for the specified property type.
| Parameter | Type | Description |
|---|---|---|
proptype |
PropertyType |
GetPropertyDescription(string): Returns a human-readable description of the specified property.
Returns a human-readable description of the specified property.
| Parameter | Type | Description |
|---|---|---|
p |
String |
GetPropertyUnit(string, IUnitsOfMeasure): Returns the unit string for the specified property.
Returns the unit string for the specified property.
| Parameter | Type | Description |
|---|---|---|
prop |
String |
|
su |
IUnitsOfMeasure |
GetPropertyValue(string, IUnitsOfMeasure): Returns the value of the specified property, converted to the given unit system.
Returns the value of the specified property, converted to the given unit system.
| Parameter | Type | Description |
|---|---|---|
prop |
String |
|
su |
IUnitsOfMeasure |
GetReport(IUnitsOfMeasure, CultureInfo, string): Generates a plain-text report of the reactor results using the specified units and format.
Generates a plain-text report of the reactor results using the specified units and format.
| Parameter | Type | Description |
|---|---|---|
su |
IUnitsOfMeasure |
|
ci |
CultureInfo |
|
numberformat |
String |
GetStructuredReport(): Generates a structured report of the reactor results as a list of typed tuples.
Generates a structured report of the reactor results as a list of typed tuples.
LoadData(List<XElement>): Restores the reactor state, including accumulation streams and profile data, from XML.
Restores the reactor state, including accumulation streams and profile data, from XML.
| Parameter | Type | Description |
|---|---|---|
data |
List<XElement> |
ODEFunc(double, double[]): Evaluates the system of ODEs (molar flow derivatives with respect to volume) for the PFR integration at the current...
Evaluates the system of ODEs (molar flow derivatives with respect to volume) for the PFR integration at the current position and composition.
| Parameter | Type | Description |
|---|---|---|
x |
Double |
Current volume coordinate (m�). |
y |
Double[] |
Current molar flows (mol/s) for each compound. |
RunDynamicModel(): Executes one dynamic simulation time step for the PFR.
Executes one dynamic simulation time step for the PFR.
SaveData(): Serializes the reactor state, including profile and accumulation streams, to XML.
Serializes the reactor state, including profile and accumulation streams, to XML.
SetPropertyValue(string, object, IUnitsOfMeasure): Sets the value of the specified property from the given value and unit system.
Sets the value of the specified property from the given value and unit system.
| Parameter | Type | Description |
|---|---|---|
prop |
String |
|
propval |
Object |
|
su |
IUnitsOfMeasure |
UpdateDimensionsList(): Updates the dimension values from the current reactor geometry.
Updates the dimension values from the current reactor geometry.
UpdateEditForm(): Refreshes the editing form with updated data.
Refreshes the editing form with updated data.
Fields¶
DHRi: Heat of each reaction over the whole reactor, keyed by reaction ID: the reaction heat (kJ/kmol of base compound)...
Heat of each reaction over the whole reactor, keyed by reaction ID: the reaction heat (kJ/kmol of base compound) times the base compound consumed (the extent in RxiT times its stoichiometric coefficient, mol/s) divided by 1000, a heat flow in kW.
DHRT: Heat of reaction released in each integration segment along the reactor, in kW, one entry per segment.
Heat of reaction released in each integration segment along the reactor, in kW, one entry per segment.
f: The classic (WinForms) editor window open for this reactor, if any.
The classic (WinForms) editor window open for this reactor, if any. Not saved with the flowsheet.
points: Profile data points along the reactor, used by the profile charts.
Profile data points along the reactor, used by the profile charts. Each entry is a Double array with the axial position (m), the molar concentration of each compound (mol/m3), the temperature (K) and the pressure (Pa).
Rxi: Rate of each reaction at the current integration point, keyed by reaction ID, converted to SI units from the...
Rate of each reaction at the current integration point, keyed by reaction ID, converted to SI units from the reaction's rate unit.
RxiT: Extent of each reaction over the whole reactor, keyed by reaction ID.
Extent of each reaction over the whole reactor, keyed by reaction ID. Computed after the solve from the change in the base reactant molar flow between feed and outlet, divided by its stoichiometric coefficient, and split among reactions that share the base reactant in proportion to their rates. Stored in mol/s, the SI molar flow unit, like the CSTR.