Suspended Growth Bioreactor

QSDsan: Quantitative Sustainable Design for sanitation and resource recovery systems

This module is developed by:

Joy Zhang <joycheung1994@gmail.com>

This module is under the University of Illinois/NCSA Open Source License. Please refer to https://github.com/QSD-Group/QSDsan/blob/main/LICENSE.txt for license details.

class qsdsan.sanunits._suspended_growth_bioreactor.BatchExperiment(ID='', ins: Sequence[AbstractStream] | None = None, outs: Sequence[AbstractStream] | None = (), thermo=None, init_with='WasteStream', model=None, isdynamic=True, exogenous_vars=(), **kwargs)
line: str = 'Batch experiment'

class-attribute Name denoting the type of Unit class. Defaults to the class name of the first child class

property model

[CompiledProcesses or NoneType] Suspended growth model.

set_init_conc(**kwargs)

set the initial concentrations of the BatchExperiment.

property state

The state of the BatchExperiment, i.e., component concentrations.

class qsdsan.sanunits._suspended_growth_bioreactor.CSTR(ID='', ins: Sequence[AbstractStream] | None = None, outs: Sequence[AbstractStream] | None = (), split=None, thermo=None, init_with='WasteStream', V_max=1000, aeration=2.0, DO_ID='S_O2', suspended_growth_model=None, isdynamic=True, exogenous_vars=(), **kwargs)

A single continuous stirred tank reactor.

Parameters:
  • ID (str) – ID for the reactor.

  • ins (WasteStream) – Influents to the reactor. Can be an array of up to 3 WasteStream objects by default, typically wastewater to be treated, recycled effluent, recycled activated sludge.

  • outs (WasteStream) – Treated effluent.

  • split (iterable of float) – Volumetric splits of effluent flows if there are more than one effluent. The default is None.

  • V_max (float) – Designed volume, in [m^3]. The default is 1000.

  • aeration (float or Process, optional) – Aeration setting. Either specify a targeted dissolved oxygen concentration in [mg O2/L] or provide a Process object to represent aeration, or None for no aeration. The default is 2.0.

  • DO_ID (str, optional) – The Component ID for dissolved oxygen, only relevant when the reactor is aerated. The default is ‘S_O2’.

  • suspended_growth_model (Processes, optional) – The suspended growth biokinetic model. The default is None.

  • exogenous_var (iterable[ExogenousDynamicVariable], optional) – Any exogenous dynamic variables that affect the process mass balance, e.g., temperature, sunlight irradiance. Must be independent of state variables of the suspended_growth_model (if has one).

property DO_ID

[str] The Component ID for dissolved oxygen used in the suspended growth model and the aeration model.

property V_max

[float] The designed maximum liquid volume, not accounting for increased volume due to aeration, in m^3.

property aeration

[Process or float or NoneType] Aeration model.

line: str = 'CSTR'

class-attribute Name denoting the type of Unit class. Defaults to the class name of the first child class

set_init_conc(**kwargs)

set the initial concentrations [mg/L] of the CSTR.

property split

[numpy.1darray or NoneType] The volumetric split of outs.

property state

The state of the CSTR, including component concentrations [mg/L] and flow rate [m^3/d].

property suspended_growth_model

[CompiledProcesses or NoneType] Suspended growth model.

class qsdsan.sanunits._suspended_growth_bioreactor.SBR(ID='', ins: Sequence[AbstractStream] | None = None, outs: Sequence[AbstractStream] | None = (), thermo=None, init_with='WasteStream', surface_area=1500, height=4, operation_cycle=(0.5, 1.5, 2.0, 0, 1.0, 0.5, 0.1), aeration=(None, None, None, 2.0), DO_ID='S_O2', suspended_growth_model=None, N_layer=10, pumped_flow=None, underflow=None, X_threshold=3000, v_max=474, v_max_practical=250, rh=0.000576, rp=0.00286, fns=0.00228, cache_state=True, **kwargs)

Sequential batch reactors operated in parallel. The number of reactors is determined by operation cycle and influent flowrate. [1]

Parameters:
  • ID (str) – ID for the reactors. The default is ‘’.

  • ins (WasteStream) – Influent to the reactor. Expected number of influent is 1.

  • outs (WasteStream) – Treated effluent and wasted sludge.

  • surface_area (float, optional) – Surface area of the reactor bottom, in [m^2]. The reactor is assumed to be cylinder. The default is 1500.

  • height (float, optional) – Height of the reactor, in [m]. The default is 4.

  • operation_cycle (iterable of float, optional) – Operation cycle of the SBR, time for each stage specified in [h]. There are 7 stages: 1 - fill, 2 - fill, 3 - mix, 4 - mix, 5 - settle, 6 - decant, 7 - desludge. The first 4 stages are modeled as a biological reactor. The 5th stage is modeled as a 1D N-layer settler. The last 2 stages are assumed inactive. The default is (0.5, 1.5, 2.0, 0, 1.0, 0.5, 0.1).

  • aeration (iterable of float and/or Process, optional) – Aeration settings for the first 4 stages of the operation cycle. Either specify a targeted dissolved oxygen concentration in [mg O2/L] or provide a Process object to represent aeration, or None for no aeration. The default is (None, None, None, 2.0).

  • DO_ID (str, optional) – The Component ID for dissolved oxygen, only relevant when the reactor is aerated. The default is ‘S_O2’.

  • suspended_growth_model (Processes, optional) – The suspended growth biokinetic model. The default is None.

  • N_layer (int, optional) – The number of layers to model settling. The default is 10.

  • pumped_flow (float, optional) – Designed effluent flowrate, in [m^3/d]. The default is None.

  • underflow (float, optional) – Designed wasted activated sludge flowrate, in [m^3/d]. The default is None.

  • X_threshold (float, optional) – Threshold suspended solid concentration, in [g/m^3]. The default is 3000.

  • v_max (float, optional) – Maximum theoretical (i.e. Vesilind) settling velocity, in [m/d]. The default is 474.

  • v_max_practical (float, optional) – Maximum practical settling velocity, in [m/d]. The default is 250.

  • rh (float, optional) – Hindered zone settling parameter in the double-exponential settling velocity function, in [m^3/g]. The default is 5.76e-4.

  • rp (float, optional) – Flocculant zone settling parameter in the double-exponential settling velocity function, in [m^3/g]. The default is 2.86e-3.

  • fns (float, optional) – Non-settleable fraction of the suspended solids, dimensionless. Must be within [0, 1]. The default is 2.28e-3.

  • cache_state (bool, optional) – Whether to store volume and composition of retained sludge in the tank from most recent run. The default is True.

References

line: str = 'SBR'

class-attribute Name denoting the type of Unit class. Defaults to the class name of the first child class

Example

import qsdsan.processes as pc, qsdsan.sanunits as su
from qsdsan import System
cmps = pc.create_asm1_cmps()
asm1 = pc.ASM1()
BE = su.BatchExperiment('E1', model=asm1)
BE.set_init_conc(S_S=5, X_S=100, X_BH=500, X_BA=100, X_P=100, S_O=8,
                 S_NO=20, S_NH=2, S_ND=1, X_ND=1, S_ALK=7*12)
sys = System('sys', path=(BE,))
sys.set_dynamic_tracker(BE)
sys.simulate(t_span=(0, 3))
BE.scope.plot_time_series(('X_BH', 'X_BA', 'X_S'))
../../_images/batch_experiment.png