Process Models

A list of the available Process Models.

There are two different kinds of defining processes in this library, the equation-defined models and the matrix-defined models. The list below is thus split into the two parts.

Index

Models

BioChemicalTreatment.ProcessSimulator.ASM1Function
ASM1(; name, Y_H=0.67, Y_A=0.24, i_XB=0.086, i_XP=0.01, f_P=0.08, mu_H=6.0, K_S=20.0, K_OH=0.2, K_NO=0.5, b_H=0.62,
     eta_g=0.8, mu_A=0.8, K_NH=1.0, K_OA=0.4, b_A=0.1, kappa_h=3.0, eta_h=0.4, K_X=0.03, kappa_a=0.08)

A component that defines the process rate in the activated sludge model number 1 (ASM1). Taken from (Henze et al., 2006)

Initial State

When using this Model, one needs to set the initial state/initial condition in the corresponding reactor. This is because the default values are all 0, and the some of the process equations have a division by 0 if all states are 0!

Parameters:

  • stoichiometric parameter (all at 20 C, neutral pH):
    • Y_H heterotrophic yield (default 0.67 gCOD/gCOD)
    • Y_A autotrophic yield (default 0.24 gCOD/gCOD)
    • i_XB nitrogen fraction in biomass (default 0.086 gN/gCOD)
    • i_XP nitrogen fraction in endogenous mass (default 0.01 gN/gCOD)
    • f_P fraction of biomass leading to particulate material (default 0.08 -)
  • kinetic parameter heterotrophs:
    • mu_H maximum specific growth rate (default 6.0 1/day)
    • K_S substrate saturation constant (default 20.0 gCOD/m3)
    • K_OH Oxygen saturation constant (default 0.2 gO2/m3)
    • K_NO nitrate saturation constant (default 0.5 gNO3-N/m3)
    • b_H specific decay rate (default 0.62 1/day)
    • eta_g anoxic growth correction factor (default 0.8 -)
  • kinetic parameter autotrophs:
    • mu_A maximum specific growth rate (default 0.8 1/day)
    • K_NH ammonium saturation constant (default 1.0 gO2/m3)
    • K_OA oxygen saturation constant (default 0.4 gO2/m3)
    • b_A specific decay rate (default 0.1 1/day)
  • hydrolysis parameter
    • kappa_h maximum specific hydrolysis rate (default 3.0 1/day)
    • eta_h anoxic hydrolysis correction factor (default 0.4 -)
    • K_X half-saturation coefficient for hydrolysis of XS (default 0.03 -)
  • ammonification
    • kappa_a ammonification rate constant (default 0.08 m3/(gCOD*day))

States:

  • S_I soluble inert organic matter
  • S_S readily biodegradable substrate
  • S_O oxygen
  • S_NO nitrate and nitrite nitrogen
  • S_NH ammonium and ammonia nitrogen
  • S_ND soluble biodegradable organic nitrogen
  • S_ALK alkalinity
  • X_I particulate inert organic matter
  • X_S slowly biodegradable substrate
  • X_BH active heterotrophic biomass
  • X_BA active autotrophic biomass
  • X_P particulate products from biomass decay
  • X_ND particulate biodegradable organic
source
BioChemicalTreatment.ProcessSimulator.OzoneDisinfectionFunction
OzoneDisinfection(; name, kO3=10, kd=1500)

A component that defines two processes in a ozone disinfection i.e. decay of ozone and disinfection. This can be used as an example for testing the package.

Parameters:

  • kO3 the ozone decay constant
  • kD the disinfection constant

States:

  • S_O3 the dissolved ozone concentration
  • X_B the bacteria concentration (particulate)
source
BioChemicalTreatment.ProcessSimulator.AerationFunction
Aeration(; name, k_La=240, S_O_max=8)

A component that defines a simple the aeration process using the oxygen transfer coefficient k_L*a and the oxygen saturation concentration.

Parameters:

  • k_La initial oxygen transfer coefficient (default 240 1/d)
  • S_O_max the saturation concentration for oxygen (default 8 g/m^3)

States:

  • S_O oxygen

Connectors

  • state The reactor states to connect (only dissolved oxygen)
  • rate The calculated rate (dissolved oxygen only)
  • k_La The oxygen transfer coefficent. Is a ModelingToolkitStandardLibrary.Blocks.RealInput, for usage with the systems from the ModelingToolkitStandardLibrary which provides e.g. controllers.
source

Matrix-defined Models

Matrix-Defined models are loaded using the default Process constructor, which supports loading models directly from files as well as using the included models:

BioChemicalTreatment.ProcessSimulator.ProcessMethod
Process(args...; name, error_invalid_composition=true, kwargs...)

Loads a process from files over the BioChemicalReactionSystem. Generates the process and checks if the composition requirement is fulfilled.

Arguments

Keyword Arguments

  • name: The name of the created system
  • error_invalid_composition: If an error should be thrown on invalid compositions. Defaults to true to force the user to actively activate that the invalid composition works. A warning is thrown instead of an error if this argument is set to false
  • kwargs...: Keyword arguments specifying the parameters of the model. An error is thrown if no matching parameter is found to set. Can be values or expressions of the other parameters (but be careful for circular expressions, they are not supported).
source

Currently, the following matrix-defined process models are part of this library:

They are called by passing the first string in the list above (before the colon) as argument to the Process:

@named asm = Process("ASM1")

To set model parameters, use keyword arguments:

@named asm = Process("ASM1"; Y_H = 12)