Skip to content

Anaerobic Digester

Anaerobic digester with three selectable model fidelities: BlackBox - steady-state Buswell / COD-removal (Tier A, default). ADM1Lite - reduced ADM1 ODE with hydrolysis -> acidogenesis -> acetogenesis (H2-inhibited) -> acetoclastic + hydrogenotrophic methanogenesis. ADM1Full - the full Batstone 2002 / Rosen & Jeppsson 2006 benchmark. ADM1S - ADM1Full plus kinetic sulfate reduction (Fedorovich 2003, Barrera 2015). All modes share compound roles, ports, thermal-balance and energy-stream plumbing. Sulfur is modelled on top of standard ADM1, which excludes sulfate reduction entirely. Declare sulfate and organic sulfur separately: sulfate carries no COD, so reducing it to sulfide costs 64 kg COD/kmol S out of the pool that would have made methane, while organic sulfur arrives already reduced and is COD-neutral. Sulfide is partitioned between the biogas (as H2S) and the effluent, and sulfide fed in joins the same pool. The first three models do that stoichiometrically: the electron accounting is right, but they assume every sulfate fed is reduced and carry no population dynamics. ADM1-S is the one that solves it, growing four sulfate-reducing populations against the methanogens and acetogens and letting free H2S inhibit both, so partial sulfate conversion, a sulfate- limited digester and H2S toxicity are all states it can actually reach.

DWSIM.UnitOperations.Reactors.Reactor_AnaerobicDigester
Assembly DWSIM.UnitOperations.dll · Object ← BaseClass ← UnitOpBaseClass ← Reactor ← Reactor_AnaerobicDigester

At a glance

Anaerobic Digester in the example flowsheet

Port Index Connected in the example
Inlet, material 0 Wastewater
Outlet, material 0 Digestate
Outlet, material 1 Biogas

Example

This code runs on every build of this site, and the output below is what it printed.

fs = (Flowsheet.Create("DigesterExample")
      .WithCompounds("Water", "Glucose", "Methane", "Carbon dioxide", "Ammonia")
      .WithPropertyPackage(PropertyPackages.NRTL))

# 86 m3/d of wastewater carrying 20 g/L of glucose (about 21 kg COD/m3)
feed = (fs.AddMaterialStream("Wastewater")
        .At(Q.Celsius(35.0), Q.Bar(1.01325))
        .SetCompoundMassFlow("Water", 0.98)        # kg/s
        .SetCompoundMassFlow("Glucose", 0.02))
effluent = fs.AddMaterialStream("Digestate")
biogas = fs.AddMaterialStream("Biogas")

ad = (fs.AddAnaerobicDigester("AD-1")
      .WithModel(DigesterModel.ADM1Full)
      .WithVolume(Q.CubicMeters(2000.0))
      .WithThermalMode(BioReactorThermalMode.Isothermal)
      .ConnectFeed(feed, 0)
      .ConnectProduct(effluent, 0)
      .ConnectProduct(biogas, 1))
d = ad.Object
d.SubstrateCompound = "Glucose"
# ADM1 takes the influent ammonia from Sin_IN (kmol N/m3). A sugar feed brings no
# nitrogen of its own, and the 0.01 default starves the biomass.
d.ADM1Params.Operating.Sin_IN = 0.07

fs.AutoLayout()
fs.Solve()

print(f"COD removed        = {d.Result_CODremoved_kgs / d.Result_CODin_kgs * 100.0:.1f} %")
print(f"Biogas flow        = {d.Result_BiogasFlow_mols * 0.022414 * 3600.0:.1f} Nm3/h")
print(f"Methane in biogas  = {d.Result_CH4MoleFraction * 100.0:.1f} mol %")
print(f"Methane yield      = {d.Result_SpecificCH4Yield_Nm3kgCOD:.3f} Nm3/kg COD removed")
print(f"Digester pH        = {d.ADM1LastState.pH:.2f}")
print(f"Retention time     = {d.HRT_s / 86400.0:.1f} d")

Output

COD removed        = 55.8 %
Biogas flow        = 26.6 Nm3/h
Methane in biogas  = 56.3 mol %
Methane yield      = 0.350 Nm3/kg COD removed
Digester pH        = 7.15
Retention time     = 23.3 d

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 61 properties
ID Name Unit (SI) Input
Volume m3 yes
HRT s yes
Substrate Compound yes
Methane Compound yes
CO2 Compound yes
Water Compound yes
NH3 Compound yes
Biomass Compound yes
H2S Compound yes
Sulfate Compound result
COD Removal Efficiency - result
Biomass Yield on COD g VSS/g COD result
Methane Fraction Override - result
Thermal Mode yes
Heat per g COD removed J/g yes
Digester Model yes
Influent Sulfate Sulfur mg S/L yes
Substrate Organic Sulfur g S/kg yes
Assumed pH for Sulfide - result
ADM1 k_hyd result
ADM1 km_su result
ADM1 Ks_su result
ADM1 Y_su result
ADM1 km_vfa result
ADM1 Ks_vfa result
ADM1 Y_ace result
ADM1 KI_h2 result
ADM1 km_ac result
ADM1 Ks_ac result
ADM1 Y_am result
ADM1 km_h2 result
ADM1 Ks_h2 result
ADM1 Y_hm result
ADM1 k_dec result
Feed COD kg/s result
COD Removed kg/s result
Substrate Consumed kg/s result
Biogas Molar Flow mol/s result
Methane Mass Flow kg/s result
CO2 Mass Flow kg/s result
Methane Mole Fraction - result
Specific CH4 Yield Nm3/kg result
Sludge Production kg/s result
H2S Mass Flow kg/s result
H2S in Biogas ppmv result
Dissolved Sulfide kg S/m3 result
Residual Sulfate kg S/m3 result
Sulfate Reduction - result
SRB Biomass kg COD/m3 result
Metabolic Heat Duty kW result
Net Heat Duty kW result
Outlet Temperature K result
ADM1 S_s result
ADM1 S_VFA result
ADM1 S_Ac result
ADM1 S_H2 result
ADM1 X_hyd result
ADM1 X_ace result
ADM1 X_am result
ADM1 X_hm result
ADM1 pH result

Learn more

API members

Public members declared by this class. Inherited members are documented on the base classes.

Constructors

Reactor_AnaerobicDigester(): Initializes a new default instance of the Reactor_AnaerobicDigester class.

Initializes a new default instance of the Reactor_AnaerobicDigester class.

public Reactor_AnaerobicDigester()
Public Sub New()

Reactor_AnaerobicDigester(string, string): Initializes a new instance of the Reactor_AnaerobicDigester class with a name and description.

Initializes a new instance of the Reactor_AnaerobicDigester 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_AnaerobicDigester(string name, string description)
Public Sub New(name As String, description As String)

Properties

ADM1_k_dec_d: (ADM1-Lite) First-order decay rate for all populations (1/d, ~0.02).

(ADM1-Lite) First-order decay rate for all populations (1/d, ~0.02).

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

ADM1_k_hyd_d: (ADM1-Lite) First-order hydrolysis rate of particulate substrate (1/d, Batstone default 10).

(ADM1-Lite) First-order hydrolysis rate of particulate substrate (1/d, Batstone default 10).

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

ADM1_KI_h2: (ADM1-Lite) H2 inhibition constant on acetogens (g COD/L, Batstone KI_h2_pro ~ 3.5e-6).

(ADM1-Lite) H2 inhibition constant on acetogens (g COD/L, Batstone KI_h2_pro ~ 3.5e-6).

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

ADM1_km_ac_d: (ADM1-Lite) Max acetoclastic methanogen uptake rate (1/d, ~8).

(ADM1-Lite) Max acetoclastic methanogen uptake rate (1/d, ~8).

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

ADM1_km_h2_d: (ADM1-Lite) Max hydrogenotrophic methanogen uptake rate (1/d, ~35).

(ADM1-Lite) Max hydrogenotrophic methanogen uptake rate (1/d, ~35).

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

ADM1_km_su_d: (ADM1-Lite) Maximum specific uptake rate of sugars/amino-acids by acidogens (1/d, ~30).

(ADM1-Lite) Maximum specific uptake rate of sugars/amino-acids by acidogens (1/d, ~30).

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

ADM1_km_vfa_d: (ADM1-Lite) Max specific uptake rate of VFAs by acetogens (1/d, ~20).

(ADM1-Lite) Max specific uptake rate of VFAs by acetogens (1/d, ~20).

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

ADM1_Ks_ac: (ADM1-Lite) Half-saturation K for acetate (g COD/L, ~0.15).

(ADM1-Lite) Half-saturation K for acetate (g COD/L, ~0.15).

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

ADM1_Ks_h2: (ADM1-Lite) Half-saturation K for H2 (g COD/L, ~7e-6).

(ADM1-Lite) Half-saturation K for H2 (g COD/L, ~7e-6).

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

ADM1_Ks_su: (ADM1-Lite) Half-saturation K for sugars/aa (g COD/L, ~0.5).

(ADM1-Lite) Half-saturation K for sugars/aa (g COD/L, ~0.5).

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

ADM1_Ks_vfa: (ADM1-Lite) Half-saturation K for VFAs (g COD/L, ~0.3).

(ADM1-Lite) Half-saturation K for VFAs (g COD/L, ~0.3).

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

ADM1_Result_pH: Digester pH from the last calculation.

Digester pH from the last calculation. ADM1-Lite reports a rough estimate from the VFA level (7 - log10(1 + 5 S_VFA)), for display only; ADM1-Full and ADM1-S report the pH solved from the charge balance at the end of the simulation. Default 7.

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

ADM1_Result_S_Ac: (ADM1-Lite) Final acetate concentration from the last calculation, in g COD/L.

(ADM1-Lite) Final acetate concentration from the last calculation, in g COD/L.

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

ADM1_Result_S_H2: (ADM1-Lite) Final dissolved hydrogen concentration from the last calculation, in g COD/L.

(ADM1-Lite) Final dissolved hydrogen concentration from the last calculation, in g COD/L.

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

ADM1_Result_S_s: (ADM1-Lite) Final soluble substrate concentration (lumped sugars, amino acids and LCFA) from the last calculation...

(ADM1-Lite) Final soluble substrate concentration (lumped sugars, amino acids and LCFA) from the last calculation, in g COD/L.

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

ADM1_Result_S_VFA: (ADM1-Lite) Final volatile fatty acid concentration (lumped propionate, butyrate and valerate) from the last...

(ADM1-Lite) Final volatile fatty acid concentration (lumped propionate, butyrate and valerate) from the last calculation, in g COD/L.

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

ADM1_Result_X_ace: (ADM1-Lite) Final acetogen biomass concentration from the last calculation, in g VSS/L.

(ADM1-Lite) Final acetogen biomass concentration from the last calculation, in g VSS/L.

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

ADM1_Result_X_am: (ADM1-Lite) Final acetoclastic methanogen biomass concentration from the last calculation, in g VSS/L.

(ADM1-Lite) Final acetoclastic methanogen biomass concentration from the last calculation, in g VSS/L.

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

ADM1_Result_X_hm: (ADM1-Lite) Final hydrogenotrophic methanogen biomass concentration from the last calculation, in g VSS/L.

(ADM1-Lite) Final hydrogenotrophic methanogen biomass concentration from the last calculation, in g VSS/L.

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

ADM1_Result_X_hyd: (ADM1-Lite) Final acidogen/hydrolyser biomass concentration from the last calculation, in g VSS/L.

(ADM1-Lite) Final acidogen/hydrolyser biomass concentration from the last calculation, in g VSS/L.

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

ADM1_S_Ac0: (ADM1-Lite) Initial acetate concentration (g COD/L).

(ADM1-Lite) Initial acetate concentration (g COD/L).

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

ADM1_S_H20: (ADM1-Lite) Initial dissolved H2 concentration (g COD/L).

(ADM1-Lite) Initial dissolved H2 concentration (g COD/L). Typical value ~1e-6.

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

ADM1_S_s0: (ADM1-Lite) Initial soluble-substrate COD (g COD/L) - lumped sugars/amino-acids/LCFA from hydrolysed particulates.

(ADM1-Lite) Initial soluble-substrate COD (g COD/L) - lumped sugars/amino-acids/LCFA from hydrolysed particulates.

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

ADM1_S_VFA0: (ADM1-Lite) Initial VFA concentration (g COD/L) - lumped propionate + butyrate + valerate.

(ADM1-Lite) Initial VFA concentration (g COD/L) - lumped propionate + butyrate + valerate.

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

ADM1_X_ace0: (ADM1-Lite) Initial acetogen biomass (g VSS/L).

(ADM1-Lite) Initial acetogen biomass (g VSS/L).

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

ADM1_X_am0: (ADM1-Lite) Initial acetoclastic methanogen biomass (g VSS/L).

(ADM1-Lite) Initial acetoclastic methanogen biomass (g VSS/L).

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

ADM1_X_hm0: (ADM1-Lite) Initial hydrogenotrophic methanogen biomass (g VSS/L).

(ADM1-Lite) Initial hydrogenotrophic methanogen biomass (g VSS/L).

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

ADM1_X_hyd0: (ADM1-Lite) Initial acidogen/hydrolyser biomass (g VSS/L).

(ADM1-Lite) Initial acidogen/hydrolyser biomass (g VSS/L).

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

ADM1_Y_ace: (ADM1-Lite) Acetogen yield (g VSS / g COD, ~0.05).

(ADM1-Lite) Acetogen yield (g VSS / g COD, ~0.05).

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

ADM1_Y_am: (ADM1-Lite) Acetoclastic methanogen yield (g VSS / g COD, ~0.05).

(ADM1-Lite) Acetoclastic methanogen yield (g VSS / g COD, ~0.05).

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

ADM1_Y_hm: (ADM1-Lite) Hydrogenotrophic methanogen yield (g VSS / g COD, ~0.06).

(ADM1-Lite) Hydrogenotrophic methanogen yield (g VSS / g COD, ~0.06).

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

ADM1_Y_su: (ADM1-Lite) Biomass yield on soluble substrate (g VSS / g COD, ~0.1).

(ADM1-Lite) Biomass yield on soluble substrate (g VSS / g COD, ~0.1).

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

ADM1ParamsJSON: Serialized ADM1 parameter set (XML/clone round-trip).

Serialized ADM1 parameter set (XML/clone round-trip).

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

AssumedPH_ForSulfide: Assumed pH for the H2S/HS- speciation in the BlackBox and ADM1-Lite models, which have no mechanistic pH.

Assumed pH for the H2S/HS- speciation in the BlackBox and ADM1-Lite models, which have no mechanistic pH. ADM1-Full ignores this and uses its charge-balance pH.

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

BiomassCompound: Sludge biomass compound name.

Sludge biomass compound name. Optional - if empty, sludge is reported as zero.

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

BiomassYield_gVSSpergCOD: Biomass yield on COD removed (g VSS / g COD).

Biomass yield on COD removed (g VSS / g COD). Typical 0.04-0.10 for mesophilic AD.

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

CO2Compound: Carbon dioxide compound name.

Carbon dioxide compound name.

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

CODRemovalEfficiency: Fractional COD removal (0-1).

Fractional COD removal (0-1). Typical 0.65-0.90 for mesophilic AD.

public double CODRemovalEfficiency { get; set; }
Public Property CODRemovalEfficiency 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

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)

H2SCompound: Hydrogen sulfide compound name.

Hydrogen sulfide compound name. Defaults to "Hydrogen sulfide" so the partitioned H2S is written into the outlet streams whenever that compound is present; if the name is cleared or the compound is absent, the sulfur balance still runs and is reported.

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

HeatPerGCODremoved_Jg: Heat release per gram of COD removed (J/g COD, negative = exothermic).

Heat release per gram of COD removed (J/g COD, negative = exothermic). Anaerobic digestion is only mildly exothermic, ~ -3500 J/g COD (~ 8 % of aerobic).

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

HRT_s: Hydraulic retention time HRT (s).

Hydraulic retention time HRT (s). Reported; not used in the steady-state conversion.

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

InfluentAlkalinity_eqL: (ADM1-Full) Feed alkalinity carried by strong cations - the net cation charge the substrate brings that is not...

(ADM1-Full) Feed alkalinity carried by strong cations - the net cation charge the substrate brings that is not accounted for by the ammonia it releases (potassium, sodium, calcium salts in the raw feed), in equivalents per litre (= kmol charge/m³). ADM1-Full solves pH from the influent charge balance, and manure feeds are strongly buffered (typically 0.05-0.15 eq/L, ~2.5-7.5 g CaCO3/L); leaving this at 0 lets the pH fall, which strips CO2 into the biogas and understates the methane fraction. Only ADM1-Full and ADM1-S read it.

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

InfluentSulfateS_mgL: Sulfate sulfur in the feed liquid (mg S/L).

Sulfate sulfur in the feed liquid (mg S/L). Carries no COD of its own; reducing it to sulfide debits 64 kg COD/kmol S from the feed, which is a genuine methane loss.

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

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

MethaneCompound: Methane compound name (typically 'Methane').

Methane compound name (typically "Methane").

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

MethaneFractionOverride: User override for the methane fraction of the biogas (mol/mol).

User override for the methane fraction of the biogas (mol/mol). Set <=0 to use the Buswell-predicted split.

public double MethaneFractionOverride { get; set; }
Public Property MethaneFractionOverride 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

Model: Model fidelity selector (BlackBox Buswell or ADM1-Lite reduced dynamic model).

Model fidelity selector (BlackBox Buswell or ADM1-Lite reduced dynamic model).

public DigesterModel Model { get; set; }
Public Property Model As DigesterModel

NH3Compound: Ammonia compound name (nitrogen release from organic N).

Ammonia compound name (nitrogen release from organic N). Optional.

public string NH3Compound { get; set; }
Public Property NH3Compound 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

Result_BiogasFlow_mols: Biogas molar flow (mol/s).

Biogas molar flow (mol/s).

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

Result_CH4_kgs: Methane flow (kg/s).

Methane flow (kg/s).

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

Result_CH4MoleFraction: Methane mole fraction in biogas (-).

Methane mole fraction in biogas (-).

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

Result_CO2_kgs: Carbon dioxide flow (kg/s).

Carbon dioxide flow (kg/s).

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

Result_CODin_kgs: Feed COD load (kg COD/s).

Feed COD load (kg COD/s).

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

Result_CODremoved_kgs: COD removed (kg COD/s).

COD removed (kg COD/s).

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

Result_DissolvedSulfide_kgSm3: Total dissolved sulfide (H2S + HS-) left in the effluent, as kg S/m³.

Total dissolved sulfide (H2S + HS-) left in the effluent, as kg S/m³.

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

Result_H2S_kgs: Hydrogen sulfide leaving in the biogas (kg/s).

Hydrogen sulfide leaving in the biogas (kg/s).

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

Result_H2S_ppmv: Hydrogen sulfide in the biogas (ppmv, dry basis) - the number that sizes the primary desulfurisation stage ahead of...

Hydrogen sulfide in the biogas (ppmv, dry basis) - the number that sizes the primary desulfurisation stage ahead of upgrading.

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

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

Outlet temperature (K) resulting from the selected thermal mode.

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

Result_Q_duty_kW: Net heat duty published to the energy stream (kW, + heating / - cooling).

Net heat duty published to the energy stream (kW, + heating / - cooling).

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

Result_Q_metabolic_kW: Metabolic heat release (kW, positive = exothermic).

Metabolic heat release (kW, positive = exothermic).

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

Result_ResidualSulfate_kgSm3: (ADM1-S) Sulfate left unreduced in the effluent, as kg S/m³.

(ADM1-S) Sulfate left unreduced in the effluent, as kg S/m³. Zero in the other models, which assume every sulfate fed is reduced.

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

Result_Sludge_kgs: Biomass (sludge) production (kg/s).

Biomass (sludge) production (kg/s).

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

Result_SpecificCH4Yield_Nm3kgCOD: Specific methane yield (Nm3 CH4 / kg COD removed).

Specific methane yield (Nm3 CH4 / kg COD removed).

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

Result_SRBBiomass_kgCODm3: (ADM1-S) Standing sulfate-reducing biomass, all four groups (kg COD/m³).

(ADM1-S) Standing sulfate-reducing biomass, all four groups (kg COD/m³).

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

Result_SubstrateConsumed_kgs: Mass flow of substrate consumed (kg/s).

Mass flow of substrate consumed (kg/s).

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

Result_SulfateReduction: (ADM1-S) Fraction of the influent sulfate the reducers actually respired.

(ADM1-S) Fraction of the influent sulfate the reducers actually respired. Well short of 1 whenever sulfate outruns the electron donors or the H2S turns toxic.

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

SubstrateCompound: Name of the single Organic Substrate compound being digested.

Name of the single Organic Substrate compound being digested.

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

SubstrateOrganicS_gPerKg: Organic sulfur bound in the substrate (g S/kg substrate).

Organic sulfur bound in the substrate (g S/kg substrate). Leave at -1 to read it from the substrate compound's elemental formula, which keeps it consistent with the theoretical COD. Set >= 0 to override when the compound has no S in its formula.

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

SulfateCompound: (ADM1-S) Compound carrying the sulfate the reducers did not respire, so it leaves in the effluent instead of...

(ADM1-S) Compound carrying the sulfate the reducers did not respire, so it leaves in the effluent instead of disappearing. Sulfuric acid or any sulfate salt will do: the sulfur is converted through the compound's own formula. Only ADM1-S can leave sulfate unreduced - the other models assume all of it is - so the other three ignore this.

public string SulfateCompound { get; set; }
Public Property SulfateCompound 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 mode (reuses the BioReactor enum for consistency).

Thermal mode (reuses the BioReactor enum for consistency).

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

Volume: Working volume (m3).

Working volume (m3).

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

WaterCompound: Water compound name.

Water compound name.

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

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)

CalculateADM1Full(): Calculates the digester with the full ADM1 model (Batstone et al.

Calculates the digester with the full ADM1 model (Batstone et al. 2002), used when Model is ADM1Full or ADM1Sulfate (the latter adds kinetic sulfate reduction). Integrates the ADM1 state equations over the configured simulation time, stores the trajectory in ADM1LastTrajectory and the final state in ADM1LastState, fills the result properties, and writes the Effluent and Biogas outlet streams on a COD basis.

public void CalculateADM1Full()
Public Sub CalculateADM1Full()

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 group of the last ADM1 trajectory, time in days on the x axis.

Builds an OxyPlot model of one group of the last ADM1 trajectory, time in days 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 groups of the last ADM1 trajectory.

Chart names the PFD chart object can embed: the groups of the last ADM1 trajectory.

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

RunADM1Simulation(ADM1Parameters, ADM1State, double, double[], double): Pure-function ADM1 simulation API for regression/scripting.

Pure-function ADM1 simulation API for regression/scripting. Runs the integrator with the supplied parameters and initial conditions over the requested time span (days) and returns the trajectory result. Does not modify the unit op.

Parameter Type Description
p ADM1Parameters ADM1 parameter set.
ic ADM1State Initial conditions.
qInflow_m3d Double Influent volumetric flow (m3/d).
Sin Double[] Influent concentrations in state order (ADM1State.NDynamic entries).
tEnd_d Double Integration endpoint (days).
public ADM1TrajectoryResult RunADM1Simulation(ADM1Parameters p, ADM1State ic, double qInflow_m3d, double[] Sin, double tEnd_d)
Public Function RunADM1Simulation(p As ADM1Parameters, ic As ADM1State, qInflow_m3d As Double, Sin As Double(), tEnd_d As Double) As ADM1TrajectoryResult

SaveData(): Serializes the reactor state, including reaction and component conversions, to XML.

Serializes the reactor state, including reaction and component conversions, 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