watertap.property_models.unit_specific.anaerobic_digestion package

Submodules

watertap.property_models.unit_specific.anaerobic_digestion.adm1_properties module

Thermophysical property package to be used in conjunction with ADM1 reactions.

class watertap.property_models.unit_specific.anaerobic_digestion.adm1_properties.ADM1ParameterBlock(*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:

(ADM1ParameterBlock) New instance

class watertap.property_models.unit_specific.anaerobic_digestion.adm1_properties.ADM1ParameterData(component)[source]

Bases: PhysicalParameterBlock

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.anaerobic_digestion.adm1_properties.ADM1StateBlock(*args, **kwds)

Bases: _ADM1StateBlock

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:

(ADM1StateBlock) New instance

class watertap.property_models.unit_specific.anaerobic_digestion.adm1_properties.ADM1StateBlockData(*args, **kwargs)[source]

Bases: StateBlockData

StateBlock for calculating thermophysical properties associated with the ADM1 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.

watertap.property_models.unit_specific.anaerobic_digestion.adm1_properties_vapor module

Thermophysical property package to be used in conjunction with ADM1 reactions.

class watertap.property_models.unit_specific.anaerobic_digestion.adm1_properties_vapor.ADM1_vaporParameterBlock(*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:

(ADM1_vaporParameterBlock) New instance

class watertap.property_models.unit_specific.anaerobic_digestion.adm1_properties_vapor.ADM1_vaporParameterData(component)[source]

Bases: PhysicalParameterBlock

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.anaerobic_digestion.adm1_properties_vapor.ADM1_vaporStateBlock(*args, **kwds)

Bases: _ADM1_vaporStateBlock

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:

(ADM1_vaporStateBlock) New instance

class watertap.property_models.unit_specific.anaerobic_digestion.adm1_properties_vapor.ADM1_vaporStateBlockData(*args, **kwargs)[source]

Bases: StateBlockData

StateBlock for calculating thermophysical properties associated with the ADM1 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.

watertap.property_models.unit_specific.anaerobic_digestion.adm1_reactions module

ADM1 reaction package.

References:

[1] D.J. Batstone, J. Keller, I. Angelidaki, S.V. Kalyuzhnyi, S.G. Pavlostathis, A. Rozzi, W.T.M. Sanders, H. Siegrist, V.A. Vavilin, The IWA Anaerobic Digestion Model No 1 (ADM1), Water Science and Technology. 45 (2002) 65–73. https://doi.org/10.2166/wst.2002.0292.

[2] C. Rosén, U. Jeppsson, Aspects on ADM1 Implementation within the BSM2 Framework, Department of Industrial Electrical Engineering and Automation, Lund University, Lund, Sweden. (2006) 1–35.

class watertap.property_models.unit_specific.anaerobic_digestion.adm1_reactions.ADM1ReactionBlock(*args, **kwds)

Bases: _ADM1ReactionBlock

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:

(ADM1ReactionBlock) New instance

class watertap.property_models.unit_specific.anaerobic_digestion.adm1_reactions.ADM1ReactionBlockData(*args, **kwargs)[source]

Bases: ReactionBlockDataBase

ReactionBlock for ADM1.

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.

class watertap.property_models.unit_specific.anaerobic_digestion.adm1_reactions.ADM1ReactionParameterBlock(*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:

(ADM1ReactionParameterBlock) New instance

class watertap.property_models.unit_specific.anaerobic_digestion.adm1_reactions.ADM1ReactionParameterData(component)[source]

Bases: ReactionParameterBlock

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

watertap.property_models.unit_specific.anaerobic_digestion.modified_adm1_properties module

Thermophysical property package to be used in conjunction with ADM1 reactions.

class watertap.property_models.unit_specific.anaerobic_digestion.modified_adm1_properties.ModifiedADM1ParameterBlock(*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:

(ModifiedADM1ParameterBlock) New instance

class watertap.property_models.unit_specific.anaerobic_digestion.modified_adm1_properties.ModifiedADM1ParameterData(component)[source]

Bases: PhysicalParameterBlock

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.anaerobic_digestion.modified_adm1_properties.ModifiedADM1StateBlock(*args, **kwds)

Bases: _ModifiedADM1StateBlock

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:

(ModifiedADM1StateBlock) New instance

class watertap.property_models.unit_specific.anaerobic_digestion.modified_adm1_properties.ModifiedADM1StateBlockData(*args, **kwargs)[source]

Bases: StateBlockData

StateBlock for calculating thermophysical properties associated with the modified ADM1 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.

watertap.property_models.unit_specific.anaerobic_digestion.modified_adm1_reactions module

Modified ADM1 reaction package.

Reference:

X. Flores-Alsina, K. Solon, C.K. Mbamba, S. Tait, K.V. Gernaey, U. Jeppsson, D.J. Batstone, Modelling phosphorus (P), sulfur (S) and iron (Fe) interactions fordynamic simulations of anaerobic digestion processes, Water Research. 95 (2016) 370-382. https://www.sciencedirect.com/science/article/pii/S0043135416301397

class watertap.property_models.unit_specific.anaerobic_digestion.modified_adm1_reactions.ModifiedADM1ReactionBlock(*args, **kwds)

Bases: _ModifiedADM1ReactionBlock

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:

(ModifiedADM1ReactionBlock) New instance

class watertap.property_models.unit_specific.anaerobic_digestion.modified_adm1_reactions.ModifiedADM1ReactionBlockData(*args, **kwargs)[source]

Bases: ReactionBlockDataBase

ReactionBlock for ADM1.

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.

class watertap.property_models.unit_specific.anaerobic_digestion.modified_adm1_reactions.ModifiedADM1ReactionParameterBlock(*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:

(ModifiedADM1ReactionParameterBlock) New instance

class watertap.property_models.unit_specific.anaerobic_digestion.modified_adm1_reactions.ModifiedADM1ReactionParameterData(component)[source]

Bases: ReactionParameterBlock

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

Module contents