Skip to content

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

Bioreactor in the example flowsheet

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

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.

public Reactor_BioReactor()
Public Sub New()

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.
public Reactor_BioReactor(string name, string description)
Public Sub New(name As String, description As String)

Properties

BatchDuration: Gets or sets the batch/fed-batch duration (s).

Gets or sets the batch/fed-batch duration (s). Ignored in Continuous mode.

public double BatchDuration { get; set; }
Public Property BatchDuration As Double

BiomassCompound: Selected name of the biomass compound in the flowsheet.

Selected name of the biomass compound in the flowsheet.

public string BiomassCompound { get; set; }
Public Property BiomassCompound As String

CO2Compound: Selected name of the CO2 compound.

Selected name of the CO2 compound.

public string CO2Compound { get; set; }
Public Property CO2Compound As String

CO2sat_gL: Saturation dissolved oxygen concentration (g/L) at operating T, P.

Saturation dissolved oxygen concentration (g/L) at operating T, P.

public double CO2sat_gL { get; set; }
Public Property CO2sat_gL As Double

ComponentDescription: Gets or sets the display description for this unit operation.

Gets or sets the display description for this unit operation.

public override string ComponentDescription { get; set; }
Public Overrides Property ComponentDescription As String

ComponentName: Gets or sets the display name for this unit operation.

Gets or sets the display name for this unit operation.

public override string ComponentName { get; set; }
Public Overrides Property ComponentName As String

DeathRate_h: First-order death/decay rate constant (1/h).

First-order death/decay rate constant (1/h).

public double DeathRate_h { get; set; }
Public Property DeathRate_h As Double

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.

public double EH_EnzymeLoading_gL { get; set; }
Public Property EH_EnzymeLoading_gL As Double

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.

public double EH_HeatPerGProduct_Jg { get; set; }
Public Property EH_HeatPerGProduct_Jg As Double

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.

public double EH_k1_Lgh { get; set; }
Public Property EH_k1_Lgh As Double

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.

public double EH_k2_Lgh { get; set; }
Public Property EH_k2_Lgh As Double

EH_KG_glucose_gL: (Enzymatic Hydrolysis) Glucose competitive-inhibition constant (g/L).

(Enzymatic Hydrolysis) Glucose competitive-inhibition constant (g/L). Smaller = stronger inhibition.

public double EH_KG_glucose_gL { get; set; }
Public Property EH_KG_glucose_gL As Double

EH_KX_xylose_gL: (Enzymatic Hydrolysis) Xylose competitive-inhibition constant (g/L).

(Enzymatic Hydrolysis) Xylose competitive-inhibition constant (g/L).

public double EH_KX_xylose_gL { get; set; }
Public Property EH_KX_xylose_gL As Double

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.

public string EnzymeCompound { get; set; }
Public Property EnzymeCompound As String

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.

public override List<string> EquipmentTypes { get; }
Public Overrides ReadOnly Property EquipmentTypes As List(Of String)

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.

public double HeatPerMolO2_JmolO2 { get; set; }
Public Property HeatPerMolO2_JmolO2 As Double

HemicelluloseCompound: (Enzymatic Hydrolysis) Hemicellulose / xylan compound name.

(Enzymatic Hydrolysis) Hemicellulose / xylan compound name. Optional; leave empty for cellulose-only hydrolysis.

public string HemicelluloseCompound { get; set; }
Public Property HemicelluloseCompound As String

IsAerobic: Whether the culture is aerobic (consumes O2, produces CO2).

Whether the culture is aerobic (consumes O2, produces CO2).

public bool IsAerobic { get; set; }
Public Property IsAerobic As Boolean

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.

public bool IsBio { get; }
Public ReadOnly Property IsBio As Boolean

Ki_gL: Substrate inhibition constant for Haldane (g/L).

Substrate inhibition constant for Haldane (g/L).

public double Ki_gL { get; set; }
Public Property Ki_gL As Double

KineticModel: Kinetic model used for the specific growth rate.

Kinetic model used for the specific growth rate.

public BioKineticModel KineticModel { get; set; }
Public Property KineticModel As BioKineticModel

KLa_h: Volumetric oxygen transfer coefficient (1/h).

Volumetric oxygen transfer coefficient (1/h). Used for OTR/OUR balance in aerobic mode.

public double KLa_h { get; set; }
Public Property KLa_h As Double

Ks_gL: Saturation constant (g/L).

Saturation constant (g/L).

public double Ks_gL { get; set; }
Public Property Ks_gL As Double

Maintenance_gSg_cellh: Maintenance coefficient (g substrate / g biomass / h).

Maintenance coefficient (g substrate / g biomass / h).

public double Maintenance_gSg_cellh { get; set; }
Public Property Maintenance_gSg_cellh As Double

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.

public override bool MobileCompatible { get; }
Public Overrides ReadOnly Property MobileCompatible As Boolean

MoserN: Moser exponent.

Moser exponent.

public double MoserN { get; set; }
Public Property MoserN As Double

MuMax_h: Maximum specific growth rate (1/h).

Maximum specific growth rate (1/h).

public double MuMax_h { get; set; }
Public Property MuMax_h As Double

NitrogenSourceCompound: Selected name of the nitrogen-source compound (e.g.

Selected name of the nitrogen-source compound (e.g. Ammonia).

public string NitrogenSourceCompound { get; set; }
Public Property NitrogenSourceCompound As String

ObjectClass: Gets or sets the simulation object class category (Reactors).

Gets or sets the simulation object class category (Reactors).

public override SimulationObjectClass ObjectClass { get; set; }
Public Overrides Property ObjectClass As SimulationObjectClass

OperatingMode: Operation mode.

Operation mode.

public BioReactorMode OperatingMode { get; set; }
Public Property OperatingMode As BioReactorMode

OxygenCompound: Selected name of the oxygen compound (required if Aerobic).

Selected name of the oxygen compound (required if Aerobic).

public string OxygenCompound { get; set; }
Public Property OxygenCompound As String

ProductCompound: Selected name of the main product compound (optional).

Selected name of the main product compound (optional).

public string ProductCompound { get; set; }
Public Property ProductCompound As String

Result_CER_gLh: Carbon dioxide evolution rate (g CO2 / L / h).

Carbon dioxide evolution rate (g CO2 / L / h).

public double Result_CER_gLh { get; set; }
Public Property Result_CER_gLh As Double

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.

public double Result_Mu_h { get; set; }
Public Property Result_Mu_h As Double

Result_OUR_gLh: Oxygen uptake rate (g O2 / L / h).

Oxygen uptake rate (g O2 / L / h).

public double Result_OUR_gLh { get; set; }
Public Property Result_OUR_gLh As Double

Result_OutletTemperature_K: Outlet broth temperature (K) computed from the selected thermal mode.

Outlet broth temperature (K) computed from the selected thermal mode.

public double Result_OutletTemperature_K { get; set; }
Public Property Result_OutletTemperature_K As Double

Result_P_gL: Final product concentration at outlet (g/L).

Final product concentration at outlet (g/L).

public double Result_P_gL { get; set; }
Public Property Result_P_gL As Double

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.

public double Result_Q_duty_kW { get; set; }
Public Property Result_Q_duty_kW As Double

Result_Q_metabolic_kW: Metabolic heat released by the culture (kW).

Metabolic heat released by the culture (kW). Positive = heat produced.

public double Result_Q_metabolic_kW { get; set; }
Public Property Result_Q_metabolic_kW As Double

Result_RQ: Respiratory quotient (CER / OUR in mol/mol basis).

Respiratory quotient (CER / OUR in mol/mol basis).

public double Result_RQ { get; set; }
Public Property Result_RQ As Double

Result_S_gL: Final substrate concentration at outlet (g/L).

Final substrate concentration at outlet (g/L).

public double Result_S_gL { get; set; }
Public Property Result_S_gL As Double

Result_X_gL: Final biomass concentration at outlet (g/L).

Final biomass concentration at outlet (g/L).

public double Result_X_gL { get; set; }
Public Property Result_X_gL As Double

SubstrateCompound: Selected name of the limiting-substrate compound in the flowsheet.

Selected name of the limiting-substrate compound in the flowsheet.

public string SubstrateCompound { get; set; }
Public Property SubstrateCompound As String

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.

public string SulfurSourceCompound { get; set; }
Public Property SulfurSourceCompound As String

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.

public override bool SupportsDynamicMode { get; }
Public Overrides ReadOnly Property SupportsDynamicMode As Boolean

ThermalMode: Thermal handling mode (isothermal / adiabatic / defined outlet T).

Thermal handling mode (isothermal / adiabatic / defined outlet T).

public BioReactorThermalMode ThermalMode { get; set; }
Public Property ThermalMode As BioReactorThermalMode

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).

public string UserScriptName { get; set; }
Public Property UserScriptName As String

Volume: Gets or sets the reactor working volume (m3).

Gets or sets the reactor working volume (m3).

public double Volume { get; set; }
Public Property Volume As Double

WaterCompound: Selected name of the water compound.

Selected name of the water compound.

public string WaterCompound { get; set; }
Public Property WaterCompound As String

XyloseCompound: (Enzymatic Hydrolysis) Xylose compound name (hemicellulose hydrolysis product).

(Enzymatic Hydrolysis) Xylose compound name (hemicellulose hydrolysis product). Optional.

public string XyloseCompound { get; set; }
Public Property XyloseCompound As String

YieldPS: Product yield on substrate (g product / g substrate), growth-associated.

Product yield on substrate (g product / g substrate), growth-associated.

public double YieldPS { get; set; }
Public Property YieldPS As Double

YieldXS: Biomass yield on substrate (g biomass / g substrate).

Biomass yield on substrate (g biomass / g substrate).

public double YieldXS { get; set; }
Public Property YieldXS As Double

Methods

Calculate(object): Calculates the object.

Calculates the object.

Parameter Type Description
args Object
public override void Calculate(object args = null)
Public Overrides Sub Calculate(args As Object = Nothing)

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.

public override object CloneXML()
Public Overrides Function CloneXML() As Object

CloseEditForm(): Closes the editor of this object, if it is open.

Closes the editor of this object, if it is open.

public override void CloseEditForm()
Public Overrides Sub CloseEditForm()

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.

public override void CreateDimensionsList()
Public Overrides Sub CreateDimensionsList()

DeCalculate(): Decalculates the object.

Decalculates the object.

public override void DeCalculate()
Public Overrides Sub DeCalculate()

DisplayEditForm(): Opens the editor of this object.

Opens the editor of this object. A host that has no editor for it does nothing.

public override void DisplayEditForm()
Public Overrides Sub DisplayEditForm()

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
public override object GetChartModel(string name)
Public Overrides Function GetChartModel(name As String) As Object

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.

public override List<string> GetChartModelNames()
Public Overrides Function GetChartModelNames() As List(Of String)

GetDisplayDescription(): Returns the description string for this reactor type.

Returns the description string for this reactor type.

public override string GetDisplayDescription()
Public Overrides Function GetDisplayDescription() As String

GetDisplayName(): Returns the display name for this reactor type.

Returns the display name for this reactor type.

public override string GetDisplayName()
Public Overrides Function GetDisplayName() As String

GetIconBitmapBytes(): Returns the raw bytes of the icon image for this reactor.

Returns the raw bytes of the icon image for this reactor.

public override byte[] GetIconBitmapBytes()
Public Overrides Function GetIconBitmapBytes() As Byte()

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.
public override string[] GetProperties(PropertyType proptype)
Public Overrides Function GetProperties(proptype As PropertyType) As String()

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.
public override string GetPropertyUnit(string prop, IUnitsOfMeasure su = null)
Public Overrides Function GetPropertyUnit(prop As String, su As IUnitsOfMeasure = Nothing) As String

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.
public override object GetPropertyValue(string prop, IUnitsOfMeasure su = null)
Public Overrides Function GetPropertyValue(prop As String, su As IUnitsOfMeasure = Nothing) As Object

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.
public override string GetReport(IUnitsOfMeasure su, CultureInfo ci, string numberformat)
Public Overrides Function GetReport(su As IUnitsOfMeasure, ci As CultureInfo, numberformat As String) As String

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.
public override bool LoadData(List<XElement> data)
Public Overrides Function LoadData(data As List(Of XElement)) As Boolean

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.

public override List<XElement> SaveData()
Public Overrides Function SaveData() As List(Of XElement)

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.
public override bool SetPropertyValue(string prop, object propval, IUnitsOfMeasure su = null)
Public Overrides Function SetPropertyValue(prop As String, propval As Object, su As IUnitsOfMeasure = Nothing) As Boolean

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.

public override void UpdateDimensionsList()
Public Overrides Sub UpdateDimensionsList()

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.

public override void UpdateEditForm()
Public Overrides Sub UpdateEditForm()

Fields

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.

public object f
Public f As Object