Gas Sparged Membrane (ZO)

Model Type

This unit model is formulated as a single-input, double-output model form. See documentation for single-input, double-output Helper Methods.

Electricity Consumption

Electricity consumption is calculated using the pump_electricity helper function. See documentation for Helper Methods for Electricity Demand.

Costing Method

This unit does not include costing.

Additional Variables


Variable Name


Mass flow of gas extracted per mass flow of influent



Mass flow of hydrogen extracted



Additional Constraints


Constraint Name

Overall flow balance


Gas extraction equation


Class Documentation

This module contains a zero-order representation of a gas-sparged membrane unit.

class watertap.unit_models.zero_order.gas_sparged_membrane_zo.GasSpargedMembraneZO(*args, **kwds)
  • 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


    All zero-order models are steady-state only


    Zero order models do not include holdup


    Property parameter object used to define property calculations, default - useDefault. Valid values: { useDefault - use default package from parent model or flowsheet, PhysicalParameterObject - a PhysicalParameterBlock object.}


    A ConfigBlock with arguments to be passed to a property block(s) and used when constructing these, default - None. Valid values: {see property package for documentation.}


    An instance of a WaterTAP Database to use for parameters.


    Process subtype to use when looking up parameters from database.

  • 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.


(GasSpargedMembraneZO) New instance

class watertap.unit_models.zero_order.gas_sparged_membrane_zo.GasSpargedMembraneZOData(component)[source]

Zero-Order model for a gas-sparged membrane. This unit is similar to a SIDO, but there is technically a third outlet for gas extraction. Three StateBlocks are added with corresponding Ports:

  • properties_inlet

  • properties_treated

  • properties_byproduct

Two additional variables are added:

  • recovery_vol (indexed by time)

  • removal_frac_mass_comp (indexed by time and component)

Four additional constraints are added to represent the material balances, with modifications to account for gas extraction.

  • water_recovery_equation (indexed by time)

  • flow_balance (indexed by time)

  • solute_removal_equation (indexed by time and solute)

  • solute_treated_equation (indexed by time and solute)

The build method also sets private attributes on the unit model with references to the appropriate initialization and scaling methods to use and to return the inlet volumetric flow rate.


General build method for UnitModelBlockData. This method calls a number of sub-methods which automate the construction of expected attributes of unit models.

Inheriting models should call super().build.