ASM1 Property Package
This package implements property relationships for the treatment of wastewater using an activated sludge biological reactor as provided in Henze, M. et al. (1987).
- This Activated Sludge Model no.1 (ASM1) property/reaction package:
supports ‘H2O’, ‘S_I’, ‘S_S’, ‘X_I’, ‘X_S’, ‘X_BH’, ‘X_BA’, ‘X_P’, ‘S_O’, ‘S_NO’, ‘S_NH’, ‘S_ND’, ‘X_ND’, and ‘S_ALK’ as components
supports only liquid phase
Sets
Description |
Symbol |
Indices |
---|---|---|
Components |
\(j\) |
[‘H2O’, ‘S_I’, ‘S_S’, ‘X_I’, ‘X_S’, ‘X_BH’, ‘X_BA’, ‘X_P’, ‘S_O’, ‘S_NO’, ‘S_NH’, ‘S_ND’, ‘X_ND’, ‘S_ALK’] |
Phases |
\(p\) |
[‘Liq’] |
Components
Description |
Symbol |
Variable |
---|---|---|
Soluble inert organic matter, S_I |
\(S_I\) |
S_I |
Readily biodegradable substrate S_S |
\(S_S\) |
S_S |
Particulate inert organic matter, X_I |
\(X_I\) |
X_I |
Slowly biodegradable substrate X_S |
\(X_S\) |
X_S |
Active heterotrophic biomass X_B,H |
\(X_{B,H}\) |
X_BH |
Active autotrophic biomass X_B,A |
\(X_{B,A}\) |
X_BA |
Particulate products arising from biomass decay, X_P |
\(X_P\) |
X_P |
Oxygen, S_O |
\(S_O\) |
S_O |
Nitrate and nitrite nitrogen, S_NO |
\(S_{NO}\) |
S_NO |
NH4 \(^{+}\) + NH \(_{3}\) Nitrogen, S_NH |
\(S_{NH}\) |
S_NH |
Soluble biodegradable organic nitrogen, S_ND |
\(S_{ND}\) |
S_ND |
Particulate biodegradable organic nitrogen, X_ND |
\(X_{ND}\) |
X_ND |
Alkalinity, S_ALK |
\(S_{ALK}\) |
S_ALK |
State variables
Description |
Symbol |
Variable |
Index |
Units |
---|---|---|---|---|
Total volumetric flowrate |
\(Q\) |
flow_vol |
None |
\(\text{m}^3\text{/s}\) |
Temperature |
\(T\) |
temperature |
None |
\(\text{K}\) |
Pressure |
\(P\) |
pressure |
None |
\(\text{Pa}\) |
Component mass concentrations |
\(C_j\) |
conc_mass_comp |
[j] |
\(\text{kg/}\text{m}^3\) |
Alkalinity in molar concentration |
\(A\) |
alkalinity |
None |
\(\text{kmol HCO}_{3}^{-}\text{/m}^{3}\) |
Stoichiometric Parameters
Description |
Symbol |
Parameter |
Value at 20 C |
Units |
---|---|---|---|---|
Yield of cell COD formed per g N consumed, Y_A |
\(Y_A\) |
Y_A |
0.24 |
\(\text{dimensionless}\) |
Yield of cell COD formed per g COD oxidized, Y_H |
\(Y_H\) |
Y_H |
0.67 |
\(\text{dimensionless}\) |
Fraction of biomass yielding particulate products, f_p |
\(f_P\) |
f_p |
0.08 |
\(\text{dimensionless}\) |
Mass fraction of N per COD in biomass, i_xb |
\(i_{XB}\) |
i_xb |
0.08 |
\(\text{dimensionless}\) |
Mass fraction of N per COD in particulates, i_xp |
\(i_{XP}\) |
i_xp |
0.06 |
\(\text{dimensionless}\) |
Kinetic Parameters
Description |
Symbol |
Parameter |
Value at 20 C |
Units |
---|---|---|---|---|
Maximum specific growth rate for autotrophic biomass, mu_A |
\(µ_A\) |
mu_A |
0.5 |
\(\text{d}^{-1}\) |
Maximum specific growth rate for heterotrophic biomass, mu_H |
\(µ_H\) |
mu_H |
4.0 |
\(\text{d}^{-1}\) |
Half-saturation coefficient for heterotrophic biomass, K_S |
\(K_S\) |
K_S |
0.01 |
\(\text{kg COD/}\text{m}^{3}\) |
Oxygen half-saturation coefficient for heterotrophic biomass, K_O,H |
\(K_{O,H}\) |
K_OH |
0.0002 |
\(\text{kg -COD/}\text{m}^{3}\) |
Oxygen half-saturation coefficient for autotrophic biomass, K_O,A |
\(K_{O,A}\) |
K_OA |
0.0004 |
\(\text{kg -COD/}\text{m}^{3}\) |
Nitrate half-saturation coefficient for denitrifying heterotrophic biomass, K_NO |
\(K_{NO}\) |
K_NO |
0.0005 |
\(\text{kg NO}_{3}\text{-N/}\text{m}^{3}\) |
Decay coefficient for heterotrophic biomass, b_H |
\(b_H\) |
b_H |
0.3 |
\(\text{d}^{-1}\) |
Decay coefficient for autotrophic biomass, b_A |
\(b_A\) |
b_A |
0.05 |
\(\text{d}^{-1}\) |
Correction factor for mu_H under anoxic conditions, eta_g |
\(η_g\) |
eta_g |
0.8 |
\(\text{dimensionless}\) |
Correction factor for hydrolysis under anoxic conditions, eta_h |
\(η_h\) |
eta_h |
0.8 |
\(\text{dimensionless}\) |
Maximum specific hydrolysis rate, k_h |
\(k_h\) |
k_h |
3.0 |
\(\text{d}^{-1}\) |
Half-saturation coefficient for hydrolysis of slowly biodegradable substrate, K_X |
\(K_X\) |
K_X |
0.1 |
\(\text{dimensionless}\) |
Ammonia Half-saturation coefficient for autotrophic biomass, K_NH |
\(K_{NH}\) |
K_NH |
1.0 |
\(\text{kg NH}_{3}\text{-N/}\text{m}^{3}\) |
Ammonification rate, k_a |
\(k_a\) |
k_a |
0.00005 |
\(\text{m}^{3}\text{/}\text{kg COD . d}\) |
Properties
Description |
Symbol |
Variable |
Index |
Units |
---|---|---|---|---|
Fluid specific heat capacity |
\(c_p\) |
cp |
None |
\(\text{J/kg/K}\) |
Mass density |
\(\rho\) |
dens_mass |
[p] |
\(\text{kg/}\text{m}^3\) |
Process Rate Equations
Description |
Equation |
---|---|
Aerobic growth of heterotrophs |
\(ρ_1 = µ_{H}(\frac{S_{S}}{K_{S}+S_{S}})(\frac{S_{O}}{K_{O,H}+S_{O}})X_{B,H}\) |
Anoxic growth of heterotrophs |
\(ρ_2 = µ_{H}(\frac{S_{S}}{K_{S}+S_{S}})(\frac{K_{O,H}}{K_{O,H}+S_{O}})(\frac{S_{NO}}{K_{NO}+S_{NO}})η_{g}X_{B,H}\) |
Aerobic growth of autotrophs |
\(ρ_3 = µ_{A}(\frac{S_{NH}}{K_{NH}+S_{NH}})(\frac{S_{O}}{K_{O,A}+S_{O}})X_{B,A}\) |
Decay of heterotrophs |
\(ρ_4 = b_{H}X_{B,H}\) |
Decay of autotrophs |
\(ρ_5 = b_{H}X_{B,H}\) |
Ammonification of soluble organic nitrogen |
\(ρ_6 = k_{a}S_{ND}X_{B,H}\) |
Hydrolysis of entrapped organics |
\(ρ_7 = k_{H}(\frac{X_{S}/X_{B,H}}{K_{X}+(X_{S}/X_{B,H})})[(\frac{S_{O}}{K_{O,H}+S_{O}})+η_{h}(\frac{K_{O,H}}{K_{O,H}+S_{O}})(\frac{S_{NO}}{K_{NO}+S_{NO}})]X_{B,H}\) |
Hydrolysis of entrapped organic nitrogen |
\(ρ_7 = k_{H}(\frac{X_{S}/X_{B,H}}{K_{X}+(X_{S}/X_{B,H})})[(\frac{S_{O}}{K_{O,H}+S_{O}})+η_{h}(\frac{K_{O,H}}{K_{O,H}+S_{O}})(\frac{S_{NO}}{K_{NO}+S_{NO}})]X_{B,H}(X_{ND}/X_{S})\) |
Scaling
Scaling for the ASM1 property package has yet to be implemented.
Class Documentation
- class watertap.property_models.unit_specific.activated_sludge.asm1_properties.ASM1ParameterBlock(*args, **kwds)
- Parameters:
rule (function) – A rule function or None. Default rule calls build().
concrete (bool) – If True, make this a toplevel model. Default - False.
ctype (class) –
Pyomo ctype of the block. Default - pyomo.environ.Block
Config args
- default_arguments
Default arguments to use with Property Package
initialize (dict) – ProcessBlockData config for individual elements. Keys are BlockData indexes and values are dictionaries with config arguments as keys.
idx_map (function) – Function to take the index of a BlockData element and return the index in the initialize dict from which to read arguments. This can be provided to override the default behavior of matching the BlockData index exactly to the index in initialize.
- Returns:
(ASM1ParameterBlock) New instance
- class watertap.property_models.unit_specific.activated_sludge.asm1_properties.ASM1ParameterData(component)[source]
Property Parameter Block Class
- build()[source]
Callable method for Block construction.
- classmethod define_metadata(obj)[source]
Set all the metadata for properties and units.
This method should be implemented by subclasses. In the implementation, they should set information into the object provided as an argument.
- Parameters:
pcm (PropertyClassMetadata) – Add metadata to this object.
- Returns:
None
- class watertap.property_models.unit_specific.activated_sludge.asm1_properties._ASM1StateBlock(*args, **kwds)[source]
This Class contains methods which should be applied to Property Blocks as a whole, rather than individual elements of indexed Property Blocks.
- default_scaler
alias of
ASM1PropertiesScaler
- initialize(state_args=None, state_vars_fixed=False, hold_state=False, outlvl=0, solver=None, optarg=None)[source]
Initialization routine for property package.
- Keyword Arguments:
state_args – Dictionary with initial guesses for the state vars chosen. Note that if this method is triggered through the control volume, and if initial guesses were not provided at the unit model level, the control volume passes the inlet values as initial guess.The keys for the state_args dictionary are:
flow_vol – value at which to initialize total volumetric flow (default=None)
alkalinity – value of alkalinity expressed as molar concentration
conc_mass_comp – value at which to initialize component concentrations (default=None)
pressure – value at which to initialize pressure (default=None)
temperature – value at which to initialize temperature (default=None)
outlvl – sets output level of initialization routine
state_vars_fixed – Flag to denote if state vars have already been fixed. True - states have already been fixed and initialization does not need to worry about fixing and unfixing variables. False - states have not been fixed. The state block will deal with fixing/unfixing.
optarg – solver options dictionary object (default=None, use default solver options)
solver – str indicating which solver to use during initialization (default = None, use default solver)
hold_state – flag indicating whether the initialization routine should unfix any state variables fixed during initialization (default=False). True - states variables are not unfixed, and a dict of returned containing flags for which states were fixed during initialization. False - state variables are unfixed after initialization by calling the release_state method.
- Returns:
If hold_states is True, returns a dict containing flags for which states were fixed during initialization.
- release_state(flags, outlvl=0)[source]
Method to relase state variables fixed during initialization.
- Keyword Arguments:
flags – dict containing information of which state variables were fixed during initialization, and should now be unfixed. This dict is returned by initialize if hold_state=True.
outlvl – sets output level of of logging
- class watertap.property_models.unit_specific.activated_sludge.asm1_properties.ASM1StateBlockData(*args, **kwargs)[source]
StateBlock for calculating thermophysical properties associated with the ASM1 reaction system.
- build()[source]
Callable method for Block construction
- define_display_vars()[source]
Method used to specify components to use to generate stream tables and other outputs. Defaults to define_state_vars, and developers should overload as required.
- define_state_vars()[source]
Method that returns a dictionary of state variables used in property package. Implement a placeholder method which returns an Exception to force users to overload this.
- get_energy_density_terms(p)[source]
Method which returns a valid expression for enthalpy density to use in the energy balances.
- get_enthalpy_flow_terms(p)[source]
Method which returns a valid expression for enthalpy flow to use in the energy balances.
- get_material_density_terms(p, j)[source]
Method which returns a valid expression for material density to use in the material balances .
- get_material_flow_basis()[source]
Method which returns an Enum indicating the basis of the material flow term.
- get_material_flow_terms(p, j)[source]
Method which returns a valid expression for material flow to use in the material balances.
- class watertap.property_models.unit_specific.activated_sludge.asm1_reactions.ASM1ReactionParameterBlock(*args, **kwds)
- Parameters:
rule (function) – A rule function or None. Default rule calls build().
concrete (bool) – If True, make this a toplevel model. Default - False.
ctype (class) –
Pyomo ctype of the block. Default - pyomo.environ.Block
Config args
- property_package
Reference to associated PropertyPackageParameter object
- default_arguments
Default arguments to use with Property Package
initialize (dict) – ProcessBlockData config for individual elements. Keys are BlockData indexes and values are dictionaries with config arguments as keys.
idx_map (function) – Function to take the index of a BlockData element and return the index in the initialize dict from which to read arguments. This can be provided to override the default behavior of matching the BlockData index exactly to the index in initialize.
- Returns:
(ASM1ReactionParameterBlock) New instance
- class watertap.property_models.unit_specific.activated_sludge.asm1_reactions.ASM1ReactionParameterData(component)[source]
Reaction Parameter Block Class
- build()[source]
Callable method for Block construction.
- classmethod define_metadata(obj)[source]
Set all the metadata for properties and units.
This method should be implemented by subclasses. In the implementation, they should set information into the object provided as an argument.
- Parameters:
pcm (PropertyClassMetadata) – Add metadata to this object.
- Returns:
None
- class watertap.property_models.unit_specific.activated_sludge.asm1_reactions._ASM1ReactionBlock(*args, **kwds)[source]
This Class contains methods which should be applied to Reaction Blocks as a whole, rather than individual elements of indexed Reaction Blocks.
- default_scaler
alias of
ASM1ReactionScaler
- initialize(outlvl=0, **kwargs)[source]
Initialization routine for reaction package.
- Keyword Arguments:
outlvl – sets output level of initialization routine
- Returns:
None
- class watertap.property_models.unit_specific.activated_sludge.asm1_reactions.ASM1ReactionBlockData(*args, **kwargs)[source]
ReactionBlock for ASM1.
- build()[source]
Callable method for Block construction
- get_reaction_rate_basis()[source]
Method which returns an Enum indicating the basis of the reaction rate term.
References
[1] Henze, M., Grady, C.P.L., Gujer, W., Marais, G.v.R., Matsuo, T., “Activated Sludge Model No. 1”, 1987, IAWPRC Task Group on Mathematical Modeling for Design and Operation of Biological Wastewater Treatment. https://belinra.inrae.fr/doc_num.php?explnum_id=4467
[2] Alex, J. et al. Benchmark Simulation Model no.1 (BSM1). Lund University, 2008, 5-6. https://www.iea.lth.se/publications/Reports/LTH-IEA-7229.pdf