watertap.property_models.activated_sludge package
Submodules
watertap.property_models.activated_sludge.asm1_properties module
Thermophysical property package to be used in conjunction with ASM1 reactions.
- class watertap.property_models.activated_sludge.asm1_properties.ASM1ParameterBlock(*args, **kwds)
Bases:
ProcessBlock
- 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.activated_sludge.asm1_properties.ASM1ParameterData(component)[source]
Bases:
PhysicalParameterBlock
Property Parameter Block Class
- 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.activated_sludge.asm1_properties.ASM1StateBlock(*args, **kwds)
Bases:
_ASM1StateBlock
- 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
- parameters
A reference to an instance of the Property Parameter Block associated with this property package.
- defined_state
Flag indicating whether the state should be considered fully defined, and thus whether constraints such as sum of mass/mole fractions should be included, default - False. Valid values: { True - state variables will be fully defined, False - state variables will not be fully defined.}
- has_phase_equilibrium
Flag indicating whether phase equilibrium constraints should be constructed in this state block, default - True. Valid values: { True - StateBlock should calculate phase equilibrium, False - StateBlock should not calculate phase equilibrium.}
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
(ASM1StateBlock) New instance
- class watertap.property_models.activated_sludge.asm1_properties.ASM1StateBlockData(*args, **kwargs)[source]
Bases:
StateBlockData
StateBlock for calculating thermophysical proeprties associated with the ASM1 reaction system.
- 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 .
watertap.property_models.activated_sludge.asm1_reactions module
ASM1 reaction package.
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 [2] J. Alex, L. Benedetti, J. Copp, K.V. Gernaey, U. Jeppsson, I. Nopens, M.N. Pons, J.P. Steyer and P. Vanrolleghem, “Benchmark Simulation Model no. 1 (BSM1)”, 2018
- class watertap.property_models.activated_sludge.asm1_reactions.ASM1ReactionBlock(*args, **kwds)
Bases:
_ASM1ReactionBlock
- 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
- parameters
A reference to an instance of the Reaction Parameter Block associated with this property package.
- state_block
A reference to an instance of a StateBlock with which this reaction block should be associated.
- has_equilibrium
Flag indicating whether equilibrium constraints should be constructed in this reaction block, default - True. Valid values: { True - ReactionBlock should enforce equilibrium constraints, False - ReactionBlock should not enforce equilibrium constraints.}
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
(ASM1ReactionBlock) New instance
- class watertap.property_models.activated_sludge.asm1_reactions.ASM1ReactionBlockData(*args, **kwargs)[source]
Bases:
ReactionBlockDataBase
ReactionBlcok for ASM1.
- class watertap.property_models.activated_sludge.asm1_reactions.ASM1ReactionParameterBlock(*args, **kwds)
Bases:
ProcessBlock
- 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.activated_sludge.asm1_reactions.ASM1ReactionParameterData(*args, **kwargs)[source]
Bases:
ReactionParameterBlock
Property Parameter Block Class
- 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
watertap.property_models.activated_sludge.asm2d_properties module
Thermophysical property package to be used in conjunction with ASM2d reactions.
Reference: [1] Henze, M., Gujer, W., Mino, T., Matsuo, T., Wentzel, M.C., Marais, G.v.R., Van Loosdrecht, M.C.M., “Activated Sludge Model No.2D, ASM2D”, 1999, Wat. Sci. Tech. Vol. 39, No. 1, pp. 165-182
- class watertap.property_models.activated_sludge.asm2d_properties.ASM2dParameterBlock(*args, **kwds)
Bases:
ProcessBlock
- 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
(ASM2dParameterBlock) New instance
- class watertap.property_models.activated_sludge.asm2d_properties.ASM2dParameterData(component)[source]
Bases:
PhysicalParameterBlock
Property Parameter Block Class
- 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.activated_sludge.asm2d_properties.ASM2dStateBlock(*args, **kwds)
Bases:
_ASM2dStateBlock
- 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
- parameters
A reference to an instance of the Property Parameter Block associated with this property package.
- defined_state
Flag indicating whether the state should be considered fully defined, and thus whether constraints such as sum of mass/mole fractions should be included, default - False. Valid values: { True - state variables will be fully defined, False - state variables will not be fully defined.}
- has_phase_equilibrium
Flag indicating whether phase equilibrium constraints should be constructed in this state block, default - True. Valid values: { True - StateBlock should calculate phase equilibrium, False - StateBlock should not calculate phase equilibrium.}
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
(ASM2dStateBlock) New instance
- class watertap.property_models.activated_sludge.asm2d_properties.ASM2dStateBlockData(*args, **kwargs)[source]
Bases:
StateBlockData
StateBlock for calculating thermophysical proeprties associated with the ASM2d reaction system.
- 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 .
watertap.property_models.activated_sludge.asm2d_reactions module
ASM2d reaction package.
Important Note: ASM2d reactions depend on the presences of TSS in solution, however TSS does not take part in the rate expressions. Thus, it is possible to have cases where there is insufficient TSS present in the system for the reactions to occur resulting in an infeasible solution.
Reference:
[1] Henze, M., Gujer, W., Mino, T., Matsuo, T., Wentzel, M.C., Marais, G.v.R., Van Loosdrecht, M.C.M., “Activated Sludge Model No.2D, ASM2D”, 1999, Wat. Sci. Tech. Vol. 39, No. 1, pp. 165-182
- class watertap.property_models.activated_sludge.asm2d_reactions.ASM2dReactionBlock(*args, **kwds)
Bases:
_ASM2dReactionBlock
- 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
- parameters
A reference to an instance of the Reaction Parameter Block associated with this property package.
- state_block
A reference to an instance of a StateBlock with which this reaction block should be associated.
- has_equilibrium
Flag indicating whether equilibrium constraints should be constructed in this reaction block, default - True. Valid values: { True - ReactionBlock should enforce equilibrium constraints, False - ReactionBlock should not enforce equilibrium constraints.}
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
(ASM2dReactionBlock) New instance
- class watertap.property_models.activated_sludge.asm2d_reactions.ASM2dReactionBlockData(*args, **kwargs)[source]
Bases:
ReactionBlockDataBase
Reaction Block for ASM2d.
- class watertap.property_models.activated_sludge.asm2d_reactions.ASM2dReactionParameterBlock(*args, **kwds)
Bases:
ProcessBlock
- 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
(ASM2dReactionParameterBlock) New instance
- class watertap.property_models.activated_sludge.asm2d_reactions.ASM2dReactionParameterData(*args, **kwargs)[source]
Bases:
ReactionParameterBlock
Property Parameter Block Class
- 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