Bioreactor¶
![]()
Represents a generic aerobic/anaerobic BioReactor that simulates microbial growth using Monod-family kinetics. Biomass is a real compound in the material stream (pseudo-compound from the shipped biomass database or a user-created one via the Biomass Compound Creator), flagged with IsBiomass=true in ExtraProperties. Stoichiometry for growth is auto-generated from the elemental formula of the biomass compound.
DWSIM.UnitOperations.Reactors.Reactor_BioReactor
Assembly DWSIM.UnitOperations.dll · Object ← BaseClass ← UnitOpBaseClass ← Reactor ← Reactor_BioReactor
At a glance¶

| Port | Index | Connected in the example |
|---|---|---|
| Inlet, material | 0 |
Broth |
| Inlet, material | 1 |
|
| Outlet, material | 0 |
Beer |
| Outlet, material | 1 |
Off-gas |
Example¶
This code runs on every build of this site, and the output below is what it printed.
fs = (Flowsheet.Create("BioReactorExample")
.WithCompounds("Water", "Glucose", "Ethanol", "Carbon dioxide", "Ammonia",
"Biomass_Yeast_Scerevisiae")
.WithPropertyPackage(PropertyPackages.NRTL))
# 100 g/L glucose broth inoculated with 1 g/L of yeast, ammonia as nitrogen source
feed = (fs.AddMaterialStream("Broth")
.At(Q.Celsius(30.0), Q.Bar(1.01325))
.SetCompoundMassFlow("Water", 0.894) # kg/s
.SetCompoundMassFlow("Glucose", 0.100)
.SetCompoundMassFlow("Ammonia", 0.005)
.SetCompoundMassFlow("Biomass_Yeast_Scerevisiae", 0.001))
beer = fs.AddMaterialStream("Beer")
offgas = fs.AddMaterialStream("Off-gas")
br = (fs.AddBioReactor("R-1")
.WithOperatingMode(BioReactorMode.Continuous)
.WithVolume(Q.CubicMeters(50.0))
.WithKineticModel(BioKineticModel.Monod)
.WithMaxSpecificGrowthPerHour(0.45)
.WithMonodKsGPerL(0.5)
.WithBiomassYield(0.10) # g cells / g glucose
.WithAerobic(False)
.WithThermalMode(BioReactorThermalMode.Isothermal)
.ConnectFeed(feed, 0)
.ConnectProduct(beer, 0)
.ConnectProduct(offgas, 1))
r = br.Object
r.BiomassCompound = "Biomass_Yeast_Scerevisiae"
r.SubstrateCompound = "Glucose"
r.ProductCompound = "Ethanol"
r.YieldPS = 0.45 # g ethanol / g glucose
fs.AutoLayout()
fs.Solve()
print(f"Residual glucose = {r.Result_S_gL:.2f} g/L")
print(f"Ethanol titer = {r.Result_P_gL:.1f} g/L")
print(f"Biomass = {r.Result_X_gL:.2f} g/L")
print(f"CO2 evolved = {offgas.MassFlowKgPerSecond * 3600.0:.1f} kg/h")
etoh = beer.Object.Phases[0].Compounds["Ethanol"].MassFlow
glucose = feed.Object.Phases[0].Compounds["Glucose"].MassFlow
print(f"Ethanol yield = {etoh / glucose:.3f} g/g glucose")
Output
Residual glucose = 0.09 g/L
Ethanol titer = 44.2 g/L
Biomass = 9.50 g/L
CO2 evolved = 181.5 kg/h
Ethanol yield = 0.426 g/g glucose
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 45 properties
| ID | Name | Unit (SI) | Input |
|---|---|---|---|
Working Volume |
m3 | yes | |
Batch Duration |
s | result | |
Operating Mode |
yes | ||
Thermal Mode |
yes | ||
Heat per mol O2 |
J/mol | result | |
Kinetic Model |
yes | ||
Aerobic |
yes | ||
Biomass Compound |
yes | ||
Substrate Compound |
yes | ||
Product Compound |
yes | ||
Oxygen Compound |
result | ||
CO2 Compound |
yes | ||
Nitrogen Source Compound |
yes | ||
Sulfur Source Compound |
yes | ||
Water Compound |
yes | ||
Max Specific Growth Rate |
1/h | yes | |
Saturation Constant |
g/L | yes | |
Inhibition Constant |
g/L | result | |
Moser Exponent |
result | ||
Biomass Yield on Substrate |
g/g | yes | |
Product Yield on Substrate |
g/g | yes | |
Maintenance Coefficient |
g/g/h | yes | |
Death Rate Constant |
1/h | yes | |
Volumetric Oxygen Transfer Coefficient |
1/h | result | |
Dissolved Oxygen Saturation |
g/L | result | |
User Kinetics Script Name |
result | ||
Hemicellulose Compound |
result | ||
Xylose Compound |
result | ||
Enzyme Compound |
result | ||
EH Cellulose Rate Constant |
L/(g.h) | result | |
EH Hemicellulose Rate Constant |
L/(g.h) | result | |
EH Glucose Inhibition Constant |
g/L | result | |
EH Xylose Inhibition Constant |
g/L | result | |
EH Enzyme Loading |
g/L | result | |
EH Heat Per Gram Product |
J/g | result | |
Outlet Biomass Concentration |
g/L | result | |
Outlet Substrate Concentration |
g/L | result | |
Outlet Product Concentration |
g/L | result | |
Average Specific Growth Rate |
1/h | result | |
Oxygen Uptake Rate |
g/L/h | result | |
Carbon Dioxide Evolution Rate |
g/L/h | result | |
Respiratory Quotient |
result | ||
Metabolic Heat Duty |
kW | result | |
Net Heat Duty |
kW | result | |
Outlet Temperature |
K | result |
Learn more¶
-
User guide
-
FluentAPI
API members¶
Public members declared by this class. Inherited members are documented on the base classes.
Constructors¶
Reactor_BioReactor(): Initializes a new default instance of the Reactor_BioReactor class.
Initializes a new default instance of the Reactor_BioReactor class.
Reactor_BioReactor(string, string): Initializes a new instance of the Reactor_BioReactor class with a name and description.
Initializes a new instance of the Reactor_BioReactor class with a name and description.
| Parameter | Type | Description |
|---|---|---|
name |
String |
The name of this reactor. |
description |
String |
A brief description of this reactor. |
Properties¶
BatchDuration: Gets or sets the batch/fed-batch duration (s).
Gets or sets the batch/fed-batch duration (s). Ignored in Continuous mode.
BiomassCompound: Selected name of the biomass compound in the flowsheet.
Selected name of the biomass compound in the flowsheet.
CO2Compound: Selected name of the CO2 compound.
Selected name of the CO2 compound.
CO2sat_gL: Saturation dissolved oxygen concentration (g/L) at operating T, P.
Saturation dissolved oxygen concentration (g/L) at operating T, P.
ComponentDescription: Gets or sets the display description for this unit operation.
Gets or sets the display description for this unit operation.
ComponentName: Gets or sets the display name for this unit operation.
Gets or sets the display name for this unit operation.
DeathRate_h: First-order death/decay rate constant (1/h).
First-order death/decay rate constant (1/h).
EH_EnzymeLoading_gL: (Enzymatic Hydrolysis) Enzyme loading (g/L) used when no EnzymeCompound is defined.
(Enzymatic Hydrolysis) Enzyme loading (g/L) used when no EnzymeCompound is defined. Set 0 to force use of the stream enzyme concentration.
EH_HeatPerGProduct_Jg: (Enzymatic Hydrolysis) Heat released per gram of sugar produced (J/g, negative = exothermic).
(Enzymatic Hydrolysis) Heat released per gram of sugar produced (J/g, negative = exothermic). Net hydrolysis is mildly exothermic, ~ -11 J/g glucose; set to 0 to disable the thermal contribution.
EH_k1_Lgh: (Enzymatic Hydrolysis) Cellulose hydrolysis rate constant k1, in L/(g_enzyme.h).
(Enzymatic Hydrolysis) Cellulose hydrolysis rate constant k1, in L/(g_enzyme.h). Typical value 0.02-0.10 L/(g.h) for commercial cellulase cocktails at 50 deg C.
EH_k2_Lgh: (Enzymatic Hydrolysis) Hemicellulose hydrolysis rate constant k2, in L/(g_enzyme.h).
(Enzymatic Hydrolysis) Hemicellulose hydrolysis rate constant k2, in L/(g_enzyme.h). Typically 0.3-0.7 * k1 for hemicellulases bundled with cellulase cocktails.
EH_KG_glucose_gL: (Enzymatic Hydrolysis) Glucose competitive-inhibition constant (g/L).
(Enzymatic Hydrolysis) Glucose competitive-inhibition constant (g/L). Smaller = stronger inhibition.
EH_KX_xylose_gL: (Enzymatic Hydrolysis) Xylose competitive-inhibition constant (g/L).
(Enzymatic Hydrolysis) Xylose competitive-inhibition constant (g/L).
EnzymeCompound: (Enzymatic Hydrolysis) Cellulase enzyme compound name.
(Enzymatic Hydrolysis) Cellulase enzyme compound name. Acts catalytically - not consumed by the reaction. If the enzyme is not tracked as a stream compound, leave empty and use EH_EnzymeLoading_gL.
EquipmentTypes: Gets the list of available equipment type names supported by this unit operation.
Gets the list of available equipment type names supported by this unit operation.
HeatPerMolO2_JmolO2: Specific heat of metabolism per mole of O2 consumed (J/mol_O2).
Specific heat of metabolism per mole of O2 consumed (J/mol_O2). The default 460 kJ/mol is the Cooney-Wang-Mateles correlation widely used for aerobic fermentations. Set to zero or adjust for specialised cases.
HemicelluloseCompound: (Enzymatic Hydrolysis) Hemicellulose / xylan compound name.
(Enzymatic Hydrolysis) Hemicellulose / xylan compound name. Optional; leave empty for cellulose-only hydrolysis.
IsAerobic: Whether the culture is aerobic (consumes O2, produces CO2).
Whether the culture is aerobic (consumes O2, produces CO2).
IsBio: Gets a value that marks this reactor as a bioprocess unit.
Gets a value that marks this reactor as a bioprocess unit. The object palettes read this flag by reflection to list it in the Biochemical group.
Ki_gL: Substrate inhibition constant for Haldane (g/L).
Substrate inhibition constant for Haldane (g/L).
KineticModel: Kinetic model used for the specific growth rate.
Kinetic model used for the specific growth rate.
KLa_h: Volumetric oxygen transfer coefficient (1/h).
Volumetric oxygen transfer coefficient (1/h). Used for OTR/OUR balance in aerobic mode.
Ks_gL: Saturation constant (g/L).
Saturation constant (g/L).
Maintenance_gSg_cellh: Maintenance coefficient (g substrate / g biomass / h).
Maintenance coefficient (g substrate / g biomass / h).
MobileCompatible: Gets a value indicating whether this reactor is compatible with mobile interfaces.
Gets a value indicating whether this reactor is compatible with mobile interfaces. Always False.
MoserN: Moser exponent.
Moser exponent.
MuMax_h: Maximum specific growth rate (1/h).
Maximum specific growth rate (1/h).
NitrogenSourceCompound: Selected name of the nitrogen-source compound (e.g.
Selected name of the nitrogen-source compound (e.g. Ammonia).
ObjectClass: Gets or sets the simulation object class category (Reactors).
Gets or sets the simulation object class category (Reactors).
OperatingMode: Operation mode.
Operation mode.
OxygenCompound: Selected name of the oxygen compound (required if Aerobic).
Selected name of the oxygen compound (required if Aerobic).
ProductCompound: Selected name of the main product compound (optional).
Selected name of the main product compound (optional).
Result_CER_gLh: Carbon dioxide evolution rate (g CO2 / L / h).
Carbon dioxide evolution rate (g CO2 / L / h).
Result_Mu_h: Average specific growth rate during integration (1/h).
Average specific growth rate during integration (1/h). In Continuous mode, the specific growth rate of the steady-state broth.
Result_OUR_gLh: Oxygen uptake rate (g O2 / L / h).
Oxygen uptake rate (g O2 / L / h).
Result_OutletTemperature_K: Outlet broth temperature (K) computed from the selected thermal mode.
Outlet broth temperature (K) computed from the selected thermal mode.
Result_P_gL: Final product concentration at outlet (g/L).
Final product concentration at outlet (g/L).
Result_Q_duty_kW: Net heat duty delivered to the broth by the energy stream (kW).
Net heat duty delivered to the broth by the energy stream (kW). Positive = heating, negative = cooling. In isothermal mode this is approximately -Q_metabolic.
Result_Q_metabolic_kW: Metabolic heat released by the culture (kW).
Metabolic heat released by the culture (kW). Positive = heat produced.
Result_RQ: Respiratory quotient (CER / OUR in mol/mol basis).
Respiratory quotient (CER / OUR in mol/mol basis).
Result_S_gL: Final substrate concentration at outlet (g/L).
Final substrate concentration at outlet (g/L).
Result_X_gL: Final biomass concentration at outlet (g/L).
Final biomass concentration at outlet (g/L).
SubstrateCompound: Selected name of the limiting-substrate compound in the flowsheet.
Selected name of the limiting-substrate compound in the flowsheet.
SulfurSourceCompound: Selected name of the sulfur-carrier compound (e.g.
Selected name of the sulfur-carrier compound (e.g. Sulfuric acid, Ammonium sulfate, Hydrogen sulfide). Leave empty to skip the sulfur balance entirely, which is what the reactor did before the balance existed. The carrier works in both directions: it is consumed when the biomass needs more sulfur than the substrate carries, and produced when an S-rich substrate releases more than the cells assimilate. It must be a different compound from the nitrogen source, otherwise one coefficient would have to satisfy both the N and the S balance.
SupportsDynamicMode: Gets a value indicating whether this reactor supports dynamic simulation mode.
Gets a value indicating whether this reactor supports dynamic simulation mode. Always False.
ThermalMode: Thermal handling mode (isothermal / adiabatic / defined outlet T).
Thermal handling mode (isothermal / adiabatic / defined outlet T).
UserScriptName: Name of the IronPython script (in flowsheet.Scripts) that evaluates the specific growth rate for UserScript mode.
Name of the IronPython script (in flowsheet.Scripts) that evaluates the specific growth rate for UserScript mode. The script must set variable mu (1/s).
Volume: Gets or sets the reactor working volume (m3).
Gets or sets the reactor working volume (m3).
WaterCompound: Selected name of the water compound.
Selected name of the water compound.
XyloseCompound: (Enzymatic Hydrolysis) Xylose compound name (hemicellulose hydrolysis product).
(Enzymatic Hydrolysis) Xylose compound name (hemicellulose hydrolysis product). Optional.
YieldPS: Product yield on substrate (g product / g substrate), growth-associated.
Product yield on substrate (g product / g substrate), growth-associated.
YieldXS: Biomass yield on substrate (g biomass / g substrate).
Biomass yield on substrate (g biomass / g substrate).
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.
CreateDimensionsList(): Initializes the list of equipment dimensions for this unit operation.
Initializes the list of equipment dimensions for this unit operation. Override to populate the Dimensions collection with dimension entries.
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.
GetChartModel(string): Builds an OxyPlot model of one trajectory group of the last calculation, time in hours on the x axis.
Builds an OxyPlot model of one trajectory group of the last calculation, time in hours on the x axis.
| Parameter | Type | Description |
|---|---|---|
name |
String |
GetChartModelNames(): Chart names the PFD chart object can embed: the trajectory groups of the last calculation.
Chart names the PFD chart object can embed: the trajectory groups of the last calculation.
GetDisplayDescription(): Returns the description string for this reactor type.
Returns the description string for this reactor type.
GetDisplayName(): Returns the display name for this reactor type.
Returns the display name for this reactor type.
GetIconBitmapBytes(): Returns the raw bytes of the icon image for this reactor.
Returns the raw bytes of the icon image for this reactor.
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. |
GetReport(IUnitsOfMeasure, CultureInfo, string): Generates a plain-text results report for this reactor.
Generates a plain-text results report for this reactor.
| Parameter | Type | Description |
|---|---|---|
su |
IUnitsOfMeasure |
The unit system used for formatting output values (not used; values are reported in fixed units). |
ci |
CultureInfo |
The culture info used for number formatting. |
numberformat |
String |
A .NET numeric format string (e.g. "G6") applied to output values. |
LoadData(List<XElement>): Restores the reactor state, including reaction and component conversions, from XML.
Restores the reactor state, including reaction and component conversions, from XML.
| Parameter | Type | Description |
|---|---|---|
data |
List<XElement> |
List of XML elements containing the serialized state. |
SaveData(): Serializes the reactor state, including reaction extents and component IDs, to XML.
Serializes the reactor state, including reaction extents and component IDs, to XML.
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. |
UpdateDimensionsList(): Updates the equipment dimensions list after a successful calculation.
Updates the equipment dimensions list after a successful calculation. Override to refresh computed dimension values.
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¶