Conversion Reactor¶
![]()
Represents a Conversion Reactor that calculates product composition from a set of conversion-type reactions with user-specified fractional conversions. Reactions are processed sequentially (by rank) and in parallel within each rank.
DWSIM.UnitOperations.Reactors.Reactor_Conversion
Assembly DWSIM.UnitOperations.dll · Object ← BaseClass ← UnitOpBaseClass ← Reactor ← Reactor_Conversion
At a glance¶

| Port | Index | Connected in the example |
|---|---|---|
| Inlet, material | 0 |
Fuel + air |
| Inlet, energy | 1 |
Q |
| Outlet, material | 0 |
Flue gas |
| Outlet, material | 1 |
Liquid |
| Outlet, energy | 2 |
Example¶
This code runs on every build of this site, and the output below is what it printed.
fs = (Flowsheet.Create("ConversionReactorExample")
.WithCompounds("Methane", "Oxygen", "Nitrogen", "Carbon dioxide", "Water")
.WithPropertyPackage(PropertyPackages.PengRobinson))
# CH4 + 2 O2 -> CO2 + 2 H2O, methane fully converted
stoich = Dictionary[String, Double]()
stoich["Methane"] = -1.0
stoich["Oxygen"] = -2.0
stoich["Carbon dioxide"] = 1.0
stoich["Water"] = 2.0
combustion = fs.DefineConversionReaction("Combustion", stoich, "Methane", "Vapor", "100")
fs.ReactionSet("Burner").Add(combustion)
feed = (fs.AddMaterialStream("Fuel + air")
.At(Q.Celsius(25.0), Q.Bar(1.01325))
.WithMolarFlow(Q.MolPerSecond(15.28))
.SetCompoundMolarFlow("Methane", 1.0)
.SetCompoundMolarFlow("Oxygen", 3.0)
.SetCompoundMolarFlow("Nitrogen", 11.28))
flue_gas = fs.AddMaterialStream("Flue gas")
liquid = fs.AddMaterialStream("Liquid") # empty here, but the port must be connected
duty = fs.AddEnergyStream("Q")
reactor = (fs.AddConversionReactor("R-1")
.Adiabatic()
.WithReactionSet("Burner")
.WithPressureDrop(Q.Bar(0.0))
.ConnectFeed(feed, 0)
.ConnectProduct(flue_gas, 0)
.ConnectProduct(liquid, 1)
.ConnectEnergyFeed(duty, 1))
fs.AutoLayout()
fs.Solve()
print(f"Methane conversion = {100.0 * reactor.Object.ComponentConversions['Methane']:.1f} %")
print(f"Adiabatic outlet T = {flue_gas.TemperatureK:.0f} K")
print(f"Flue gas CO2 = {100.0 * flue_gas.OverallMoleFraction('Carbon dioxide'):.2f} mol %")
print(f"Flue gas O2 = {100.0 * flue_gas.OverallMoleFraction('Oxygen'):.2f} mol %")
print(f"Flue gas H2O = {100.0 * flue_gas.OverallMoleFraction('Water'):.2f} mol %")
Output
Methane conversion = 100.0 %
Adiabatic outlet T = 1790 K
Flue gas CO2 = 6.54 mol %
Flue gas O2 = 6.54 mol %
Flue gas H2O = 13.09 mol %
DWSIM 10.2.16.0, generated 2026-11-11.
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 |
|---|---|---|---|
PROP_CR_0 |
Pressure Drop | Pa | yes |
Calculation Mode |
Select the calculation mode of this reactor. | result | |
Combustion: Extent |
% | result | |
Methane: Conversion |
% | result | |
Oxygen: Conversion |
% | result | |
Nitrogen: Conversion |
% | result | |
Carbon dioxide: Conversion |
% | result | |
Water: Conversion |
% | result |
Dynamic mode¶
Extra properties used when the flowsheet runs in dynamic mode.
| Name | Unit |
|---|---|
| Operating Pressure (Dynamics) | Pa |
| Liquid Level | m |
| Volume | m3 |
| Height | m |
| Minimum Pressure | Pa |
| Initialize using Inlet Stream | |
| Reset Contents |
Learn more¶
-
User guide
-
Tutorials
-
FluentAPI
API members¶
Public members declared by this class. Inherited members are documented on the base classes.
Constructors¶
Reactor_Conversion(): Initializes a new default instance of the Reactor_Conversion class.
Initializes a new default instance of the Reactor_Conversion class.
Reactor_Conversion(string, string): Initializes a new instance of the Reactor_Conversion class with a name and description.
Initializes a new instance of the Reactor_Conversion class with a name and description.
| Parameter | Type | Description |
|---|---|---|
name |
String |
The display name of the conversion reactor. |
description |
String |
A brief description of the conversion reactor. |
Properties¶
EOHasEquations: Equations of its own for reactions in the mixture, adiabatic (one group of parallel reactions), isothermal or at a...
Equations of its own for reactions in the mixture, adiabatic (one group of parallel reactions), isothermal or at a set outlet temperature, with a vapor and a liquid outlet: the inlet's moles are reacted group by group as the unit does, each conversion read at the temperature the unit reads it; the products split by the PT flash at the inlet's pressure less the drop; and the energy balance with the heats of reaction, or the temperature. A conversion the reactants cannot sustain is not limited here as the unit's own solver limits it.
HasPropertiesForDynamicMode: Gets a value indicating whether this reactor has no dedicated dynamic-mode properties.
Gets a value indicating whether this reactor has no dedicated dynamic-mode properties.
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.
SupportsDynamicMode: Gets a value indicating whether this reactor supports dynamic simulation mode.
Gets a value indicating whether this reactor supports dynamic simulation mode.
Methods¶
Calculate(object): Performs the conversion reactor calculation: applies each conversion reaction in sequence, computes the product...
Performs the conversion reactor calculation: applies each conversion reaction in sequence, computes the product composition and energy balance, and flashes the outlet stream.
| Parameter | Type | Description |
|---|---|---|
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.
CreateDynamicProperties(): Registers the dynamic properties (operating pressure, liquid level, volume, etc.) for dynamic simulation mode.
Registers the dynamic properties (operating pressure, liquid level, volume, etc.) for dynamic simulation mode.
DeCalculate(): Clears the calculated results from the outlet material streams.
Clears the calculated results from the outlet material streams.
DisplayDynamicsEditForm(): Opens or activates the dynamics property editor form for this reactor.
Opens or activates the dynamics property editor form for this reactor.
DisplayEditForm(): Opens or activates the editing form for this conversion reactor.
Opens or activates the editing form for this conversion reactor.
EOEquationCount(IEquationOrientedContext): How many equations the object adds, for the streams connected to it.
How many equations the object adds, for the streams connected to it.
| Parameter | Type | Description |
|---|---|---|
context |
IEquationOrientedContext |
EOEquationName(IEquationOrientedContext, int): What equation k says, for the solver's messages.
What equation k says, for the solver's messages.
| Parameter | Type | Description |
|---|---|---|
context |
IEquationOrientedContext |
|
k |
Int32 |
EOJacobian(IEquationOrientedContext, double[], Action<int, int, double>): False: a black box is differenced by the solver.
False: a black box is differenced by the solver.
| Parameter | Type | Description |
|---|---|---|
context |
IEquationOrientedContext |
|
x |
Double[] |
|
add |
Action<Int32,Int32,Double> |
EOParameters(): Nothing: as a black box, the object's own calculation reads any of its properties.
Nothing: as a black box, the object's own calculation reads any of its properties.
EOResiduals(IEquationOrientedContext, double[], double[], int): Writes the residuals, each divided by its tolerance, into r from position row.
Writes the residuals, each divided by its tolerance, into r from position row.
| Parameter | Type | Description |
|---|---|---|
context |
IEquationOrientedContext |
|
x |
Double[] |
|
r |
Double[] |
|
row |
Int32 |
EOVariables(IEquationOrientedContext): The indices of the variables the residuals read, the object's own parameters the solver moves included.
The indices of the variables the residuals read, the object's own parameters the solver moves included.
| Parameter | Type | Description |
|---|---|---|
context |
IEquationOrientedContext |
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.
RunDynamicModel(): Executes one dynamic simulation time step, integrating mass flows and updating accumulation.
Executes one dynamic simulation time step, integrating mass flows and updating accumulation.
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 |
UpdateEditForm(): Refreshes the editing form with updated data.
Refreshes the editing form with updated data.
Validate(): Validates that inlet and outlet streams are connected before calculation.
Validates that inlet and outlet streams are connected before calculation.
Fields¶