watertap.examples.flowsheets.full_treatment_train.model_components package

Subpackages

Submodules

watertap.examples.flowsheets.full_treatment_train.model_components.mixer module

class watertap.examples.flowsheets.full_treatment_train.model_components.mixer.Mixer(*args, **kwds)

Bases: idaes.core.process_block.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

  • default (dict) –

    Default ProcessBlockData config

    Keys
    dynamic

    Indicates whether this model will be dynamic or not, default = False. Mixer blocks are always steady-state.

    has_holdup

    Mixer blocks do not contain holdup, thus this must be False.

    property_package

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

    property_package_args

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

    inlet_list

    A list containing names of inlets, default - None. Valid values: { None - use num_inlets argument, list - a list of names to use for inlets.}

    num_inlets

    Argument indicating number (int) of inlets to construct, not used if inlet_list arg is provided, default - None. Valid values: { None - use inlet_list arg instead, or default to 2 if neither argument provided, int - number of inlets to create (will be named with sequential integers from 1 to num_inlets).}

    material_balance_type

    Indicates what type of mass balance should be constructed, default - MaterialBalanceType.useDefault. Valid values: { MaterialBalanceType.useDefault - refer to property package for default balance type **MaterialBalanceType.none - exclude material balances, MaterialBalanceType.componentPhase - use phase component balances, MaterialBalanceType.componentTotal - use total component balances, MaterialBalanceType.elementTotal - use total element balances, MaterialBalanceType.total - use total material balance.}

    has_phase_equilibrium

    Argument indicating whether phase equilibrium should be calculated for the resulting mixed stream, default - False. Valid values: { True - calculate phase equilibrium in mixed stream, False - do not calculate equilibrium in mixed stream.}

    energy_mixing_type

    Argument indicating what method to use when mixing energy flows of incoming streams, default - MixingType.extensive. Valid values: { MixingType.none - do not include energy mixing equations, MixingType.extensive - mix total enthalpy flows of each phase.}

    momentum_mixing_type

    Argument indicating what method to use when mixing momentum/ pressure of incoming streams, default - MomentumMixingType.minimize. Valid values: { MomentumMixingType.none - do not include momentum mixing equations, MomentumMixingType.minimize - mixed stream has pressure equal to the minimimum pressure of the incoming streams (uses smoothMin operator), MomentumMixingType.equality - enforces equality of pressure in mixed and all incoming streams., MomentumMixingType.minimize_and_equality - add constraints for pressure equal to the minimum pressure of the inlets and constraints for equality of pressure in mixed and all incoming streams. When the model is initially built, the equality constraints are deactivated. This option is useful for switching between flow and pressure driven simulations.}

    mixed_state_block

    An existing state block to use as the outlet stream from the Mixer block, default - None. Valid values: { None - create a new StateBlock for the mixed stream, StateBlock - a StateBock to use as the destination for the mixed stream.}

    construct_ports

    Argument indicating whether model should construct Port objects linked to all inlet states and the mixed state, default - True. Valid values: { True - construct Ports for all states, False - do not construct Ports.

  • initialize (dict) – ProcessBlockData config for individual elements. Keys are BlockData indexes and values are dictionaries described under the “default” argument above.

  • 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 overide the default behavior of matching the BlockData index exactly to the index in initialize.

Returns

(Mixer) New instance

class watertap.examples.flowsheets.full_treatment_train.model_components.mixer.MixerData(component)[source]

Bases: idaes.generic_models.unit_models.mixer.MixerData

Standard Mixer Unit Model Class with get_costing method added in.

build()[source]

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

Inheriting models should call super().build.

Parameters

None

Returns

None

watertap.examples.flowsheets.full_treatment_train.model_components.property_models module

Seawater feed specifications for supported property packages

watertap.examples.flowsheets.full_treatment_train.model_components.property_models.build_prop(m, base='TDS')[source]

Builds a property package for the specified base. Includes default scaling. Bases include: ‘TDS’, ‘ion’, ‘salt’.

watertap.examples.flowsheets.full_treatment_train.model_components.property_models.specify_feed(sb, base='TDS')[source]

Fixes the state variables on the stateblock to the base seawater composition for the specified base. Bases include: ‘TDS’, ‘ion’, ‘salt’.

watertap.examples.flowsheets.full_treatment_train.model_components.seawater_ion_prop_pack module

Simple property package for Na-Ca-Mg-SO4-Cl solution represented with ions

class watertap.examples.flowsheets.full_treatment_train.model_components.seawater_ion_prop_pack.PropParameterBlock(*args, **kwds)

Bases: idaes.core.process_block.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

  • default (dict) –

    Default ProcessBlockData config

    Keys
    default_arguments

    Default arguments to use with Property Package

  • initialize (dict) – ProcessBlockData config for individual elements. Keys are BlockData indexes and values are dictionaries described under the “default” argument above.

  • 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 overide the default behavior of matching the BlockData index exactly to the index in initialize.

Returns

(PropParameterBlock) New instance

class watertap.examples.flowsheets.full_treatment_train.model_components.seawater_ion_prop_pack.PropParameterData(component)[source]

Bases: idaes.core.property_base.PhysicalParameterBlock

build()[source]

Callable method for Block construction.

classmethod define_metadata(obj)[source]

Define properties supported and units.

class watertap.examples.flowsheets.full_treatment_train.model_components.seawater_ion_prop_pack.PropStateBlock(*args, **kwds)

Bases: watertap.examples.flowsheets.full_treatment_train.model_components.seawater_ion_prop_pack._PropStateBlock

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

  • default (dict) –

    Default ProcessBlockData config

    Keys
    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 described under the “default” argument above.

  • 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 overide the default behavior of matching the BlockData index exactly to the index in initialize.

Returns

(PropStateBlock) New instance

class watertap.examples.flowsheets.full_treatment_train.model_components.seawater_ion_prop_pack.PropStateBlockData(*args, **kwargs)[source]

Bases: idaes.core.property_base.StateBlockData

build()[source]

Callable method for Block construction.

define_state_vars()[source]

Define state vars.

get_enthalpy_flow_terms(p)[source]

Create enthalpy flow terms.

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]

Create material flow terms for control volume.

watertap.examples.flowsheets.full_treatment_train.model_components.seawater_salt_prop_pack module

Simple property package for Na-Ca-Mg-SO4-Cl solution represented with salts

class watertap.examples.flowsheets.full_treatment_train.model_components.seawater_salt_prop_pack.PropParameterBlock(*args, **kwds)

Bases: idaes.core.process_block.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

  • default (dict) –

    Default ProcessBlockData config

    Keys
    default_arguments

    Default arguments to use with Property Package

  • initialize (dict) – ProcessBlockData config for individual elements. Keys are BlockData indexes and values are dictionaries described under the “default” argument above.

  • 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 overide the default behavior of matching the BlockData index exactly to the index in initialize.

Returns

(PropParameterBlock) New instance

class watertap.examples.flowsheets.full_treatment_train.model_components.seawater_salt_prop_pack.PropParameterData(component)[source]

Bases: idaes.core.property_base.PhysicalParameterBlock

build()[source]

Callable method for Block construction.

classmethod define_metadata(obj)[source]

Define properties supported and units.

class watertap.examples.flowsheets.full_treatment_train.model_components.seawater_salt_prop_pack.PropStateBlock(*args, **kwds)

Bases: watertap.examples.flowsheets.full_treatment_train.model_components.seawater_salt_prop_pack._PropStateBlock

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

  • default (dict) –

    Default ProcessBlockData config

    Keys
    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 described under the “default” argument above.

  • 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 overide the default behavior of matching the BlockData index exactly to the index in initialize.

Returns

(PropStateBlock) New instance

class watertap.examples.flowsheets.full_treatment_train.model_components.seawater_salt_prop_pack.PropStateBlockData(*args, **kwargs)[source]

Bases: idaes.core.property_base.StateBlockData

build()[source]

Callable method for Block construction.

define_state_vars()[source]

Define state vars.

get_enthalpy_flow_terms(p)[source]

Create enthalpy flow terms.

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]

Create material flow terms for control volume.

watertap.examples.flowsheets.full_treatment_train.model_components.separator module

class watertap.examples.flowsheets.full_treatment_train.model_components.separator.Separator(*args, **kwds)

Bases: idaes.core.process_block.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

  • default (dict) –

    Default ProcessBlockData config

    Keys
    dynamic

    Indicates whether this model will be dynamic or not, default = False. Product blocks are always steady- state.

    has_holdup

    Product blocks do not contain holdup, thus this must be False.

    property_package

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

    property_package_args

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

    outlet_list

    A list containing names of outlets, default - None. Valid values: { None - use num_outlets argument, list - a list of names to use for outlets.}

    num_outlets

    Argument indicating number (int) of outlets to construct, not used if outlet_list arg is provided, default - None. Valid values: { None - use outlet_list arg instead, or default to 2 if neither argument provided, int - number of outlets to create (will be named with sequential integers from 1 to num_outlets).}

    split_basis

    Argument indicating basis to use for splitting mixed stream, default - SplittingType.totalFlow. Valid values: { SplittingType.totalFlow - split based on total flow (split fraction indexed only by time and outlet), SplittingType.phaseFlow - split based on phase flows (split fraction indexed by time, outlet and phase), SplittingType.componentFlow - split based on component flows (split fraction indexed by time, outlet and components), SplittingType.phaseComponentFlow - split based on phase-component flows ( split fraction indexed by both time, outlet, phase and components).}

    material_balance_type

    Indicates what type of mass balance should be constructed, default - MaterialBalanceType.useDefault. Valid values: { MaterialBalanceType.useDefault - refer to property package for default balance type **MaterialBalanceType.none - exclude material balances, MaterialBalanceType.componentPhase - use phase component balances, MaterialBalanceType.componentTotal - use total component balances, MaterialBalanceType.elementTotal - use total element balances, MaterialBalanceType.total - use total material balance.}

    has_phase_equilibrium

    Argument indicating whether phase equilibrium should be calculated for the resulting mixed stream, default - False. Valid values: { True - calculate phase equilibrium in mixed stream, False - do not calculate equilibrium in mixed stream.}

    energy_split_basis

    Argument indicating basis to use for splitting energy this is not used for when ideal_separation == True. default - EnergySplittingType.equal_temperature. Valid values: { EnergySplittingType.equal_temperature - outlet temperatures equal inlet EnergySplittingType.equal_molar_enthalpy - oulet molar enthalpies equal inlet, EnergySplittingType.enthalpy_split - apply split fractions to enthalpy flows. Does not work with component or phase-component splitting.}

    ideal_separation

    Argument indicating whether ideal splitting should be used. Ideal splitting assumes perfect spearation of material, and attempts to avoid duplication of StateBlocks by directly partitioning outlet flows to ports, default - False. Valid values: { True - use ideal splitting methods. Cannot be combined with has_phase_equilibrium = True, False - use explicit splitting equations with split fractions.}

    ideal_split_map

    Dictionary containing information on how extensive variables should be partitioned when using ideal splitting (ideal_separation = True). default - None. Valid values: { dict with keys of indexing set members and values indicating which outlet this combination of keys should be partitioned to. E.g. {(“Vap”, “H2”): “outlet_1”}}

    mixed_state_block

    An existing state block to use as the source stream from the Separator block, default - None. Valid values: { None - create a new StateBlock for the mixed stream, StateBlock - a StateBock to use as the source for the mixed stream.}

    construct_ports

    Argument indicating whether model should construct Port objects linked the mixed state and all outlet states, default - True. Valid values: { True - construct Ports for all states, False - do not construct Ports.

  • initialize (dict) – ProcessBlockData config for individual elements. Keys are BlockData indexes and values are dictionaries described under the “default” argument above.

  • 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 overide the default behavior of matching the BlockData index exactly to the index in initialize.

Returns

(Separator) New instance

class watertap.examples.flowsheets.full_treatment_train.model_components.separator.SeparatorData(component)[source]

Bases: idaes.generic_models.unit_models.separator.SeparatorData

Standard Separator Unit Model Class with get_costing method added in.

build()[source]

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

Inheriting models should call super().build.

Parameters

None

Returns

None

watertap.examples.flowsheets.full_treatment_train.model_components.unit_0DRO module

0D reverse osmosis examples

watertap.examples.flowsheets.full_treatment_train.model_components.unit_0DRO.build_RO(m, base='TDS', level='simple', name_str='RO')[source]

Builds a 0DRO model at a specified level (simple or detailed). Requires prop_TDS property package.

watertap.examples.flowsheets.full_treatment_train.model_components.unit_1DRO module

1D reverse osmosis examples

watertap.examples.flowsheets.full_treatment_train.model_components.unit_1DRO.build_RO(m, base='TDS', level='simple', name_str='RO')[source]

Builds a 1DRO model at a specified level (simple or detailed). Requires prop_TDS property package.

watertap.examples.flowsheets.full_treatment_train.model_components.unit_ZONF module

Zero order nanofiltration model based on specifying solvent flux and solute rejection

watertap.examples.flowsheets.full_treatment_train.model_components.unit_ZONF.build_ZONF(m, base='ion')[source]

Builds a ZONF model based on specified rejection and solvent flux. Requires prop_ion property package.

watertap.examples.flowsheets.full_treatment_train.model_components.unit_separator module

Simple zero order separator examples

watertap.examples.flowsheets.full_treatment_train.model_components.unit_separator.build_SepNF(m, base='ion')[source]

Builds NF model based on the IDAES separator for a specified property base. Requires prop_ion or prop_salt property package.

watertap.examples.flowsheets.full_treatment_train.model_components.unit_separator.build_SepRO(m, base='TDS')[source]

Builds RO model based on the IDAES separator. Requires prop_TDS property package.

Module contents