watertap.unit_models.MD package

Submodules

watertap.unit_models.MD.MD_channel_0D module

class watertap.unit_models.MD.MD_channel_0D.MDChannel0DBlock(*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

    dynamic

    Indicates whether this model will be dynamic, default - useDefault. Valid values: { useDefault - get flag from parent, True - set as a dynamic model, False - set as a steady-state model}

    has_holdup

    Indicates whether holdup terms should be constructed or not. Must be True if dynamic = True, default - False. Valid values: { True - construct holdup terms, False - do not construct holdup terms}

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

    reaction_package

    Reaction parameter object used to define reaction calculations, default - None. Valid values: { None - no reaction package, ReactionParameterBlock - a ReactionParameterBlock object.}

    reaction_package_args

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

    auto_construct

    If set to True, this argument will trigger the auto_construct method which will attempt to construct a set of material, energy and momentum balance equations based on the parent unit’s config block. The parent unit must have a config block which derives from CONFIG_Base, default - False. Valid values: { True - use automatic construction, False - do not use automatic construction.}

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

(MDChannel0DBlock) New instance

class watertap.unit_models.MD.MD_channel_0D.MDChannel0DBlockData(component)[source]

Bases: MDChannelMixin, ControlVolume0DBlockData

add_geometry(length_var=None, width_var=None, flow_direction=FlowDirection.forward)[source]

Method to create volume Var in ControlVolume.

Parameters:

None

Returns:

None

add_state_blocks(has_phase_equilibrium=None, property_package_vapor=None, property_package_args_vapor=None)[source]

This method constructs the inlet and outlet state blocks for the control volume.

Parameters:
  • information_flow – a FlowDirection Enum indicating whether information flows from inlet-to-outlet or outlet-to-inlet

  • has_phase_equilibrium – indicates whether equilibrium calculations will be required in state blocks

  • package_arguments – dict-like object of arguments to be passed to state blocks as construction arguments

Returns:

None

initialize(state_args=None, outlvl=0, optarg=None, solver=None, hold_state=True, initialize_guess=None, type=None)[source]

Initialization routine for the membrane channel control volume

Keyword Arguments:
  • state_args – a dict of arguments to be passed to the property package(s) to provide an initial state for initialization (see documentation of the specific property package) (default = {}).

  • outlvl – sets output log level of initialization routine

  • optarg – solver options dictionary object (default=None, use default solver options)

  • solver – str indicating which solver to use during initialization (default = None)

  • hold_state – flag indicating whether the initialization routine should unfix any state variables fixed during initialization, default - True. Valid values: 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.

  • initialize_guess – a dict of guesses

Returns:

If hold_states is True, returns a dict containing flags for which states were fixed during initialization.

watertap.unit_models.MD.MD_channel_1D module

class watertap.unit_models.MD.MD_channel_1D.MDChannel1DBlock(*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

    dynamic

    Indicates whether this model will be dynamic, default - useDefault. Valid values: { useDefault - get flag from parent, True - set as a dynamic model, False - set as a steady-state model}

    has_holdup

    Indicates whether holdup terms should be constructed or not. Must be True if dynamic = True, default - False. Valid values: { True - construct holdup terms, False - do not construct holdup terms}

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

    reaction_package

    Reaction parameter object used to define reaction calculations, default - None. Valid values: { None - no reaction package, ReactionParameterBlock - a ReactionParameterBlock object.}

    reaction_package_args

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

    auto_construct

    If set to True, this argument will trigger the auto_construct method which will attempt to construct a set of material, energy and momentum balance equations based on the parent unit’s config block. The parent unit must have a config block which derives from CONFIG_Base, default - False. Valid values: { True - use automatic construction, False - do not use automatic construction.}

    area_definition

    Argument defining whether area variable should be spatially variant or not. default - DistributedVars.uniform. Valid values: { DistributedVars.uniform - area does not vary across spatial domain, DistributedVars.variant - area can vary over the domain and is indexed by time and space.}

    transformation_method

    Method to use to transform domain. Must be a method recognised by the Pyomo TransformationFactory.

    transformation_scheme

    Scheme to use when transforming domain. See Pyomo documentation for supported schemes.

    finite_elements

    Number of finite elements to use in transformation (equivalent to Pyomo nfe argument).

    collocation_points

    Number of collocation points to use (equivalent to Pyomo ncp argument).

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

(MDChannel1DBlock) New instance

class watertap.unit_models.MD.MD_channel_1D.MDChannel1DBlockData(component)[source]

Bases: MDChannelMixin, ControlVolume1DBlockData

add_geometry(length_var, width_var, flow_direction=FlowDirection.forward, **kwargs)[source]

Method to create spatial domain and volume Var in ControlVolume.

Parameters:
  • of (width_var - An external variable to use for the width) – the channel. If a variable is provided, a reference will be made to this in place of the length Var.

  • of – the channel. If a variable is provided, a reference will be made to this in place of the length Var.

  • flow (flow_direction - argument indicating direction of material) –

    relative to length domain. Valid values:
    • FlowDirection.forward (default), flow goes from 0 to 1.

    • FlowDirection.backward, flow goes from 1 to 0

  • - (length_domain_set) – domain for the ControlVolume. If not provided, a new ContinuousSet will be created (default=None). ContinuousSet should be normalized to run between 0 and 1.

  • - – a new ContinuousSet if length_domain is not provided (default = [0.0, 1.0]).

Returns:

None

add_state_blocks(has_phase_equilibrium=None, property_package_vapor=None, property_package_args_vapor=None)[source]

This method constructs the state blocks for the control volume.

Parameters:

has_phase_equilibrium – indicates whether equilibrium calculations will be required in state blocks

Returns:

None

apply_transformation(*args, **kwargs)[source]

Method to apply DAE transformation to the Control Volume length domain. Transformation applied will be based on the Control Volume configuration arguments.

initialize(state_args=None, outlvl=0, optarg=None, solver=None, hold_state=True, initialize_guess=None, type=None)[source]

Initialization routine for the membrane channel control volume

Keyword Arguments:
  • state_args – a dict of arguments to be passed to the property package(s) to provide an initial state for initialization (see documentation of the specific property package) (default = {}).

  • outlvl – sets output log level of initialization routine

  • optarg – solver options dictionary object (default=None, use default solver options)

  • solver – str indicating which solver to use during initialization (default = None)

  • hold_state – flag indicating whether the initialization routine should unfix any state variables fixed during initialization, default - True. Valid values: 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.

  • initialize_guess – a dict of guesses

Returns:

If hold_states is True, returns a dict containing flags for which states were fixed during initialization.

watertap.unit_models.MD.MD_channel_base module

” Base constraints and methods for membrane distillation channel __author__ = “Elmira Shamlou”

class watertap.unit_models.MD.MD_channel_base.ConcentrationPolarizationType(value)[source]

Bases: Enum

none: no concentration polarization fixed: concentration polarization modulus is a user specified value calculated: calculate concentration polarization (concentration at membrane interface)

class watertap.unit_models.MD.MD_channel_base.FrictionFactor(value)[source]

Bases: Enum

flat_sheet: Darcy’s friction factor correlation by Guillen & Hoek spiral_wound: Darcy’s friction factor correlation by Schock & Miquel, 1987

class watertap.unit_models.MD.MD_channel_base.MassTransferCoefficient(value)[source]

Bases: Enum

none: mass transfer coefficient not utilized for concentration polarization effect fixed: mass transfer coefficient is a user specified value calculated: mass transfer coefficient is calculated

class watertap.unit_models.MD.MD_channel_base.PressureChangeType(value)[source]

Bases: Enum

fixed_per_stage: pressure drop across membrane channel is a user-specified value fixed_per_unit_length: pressure drop per unit length across membrane channel is a user-specified value calculated: pressure drop across membrane channel is calculated

class watertap.unit_models.MD.MD_channel_base.TemperaturePolarizationType(value)[source]

Bases: Enum

none: no temperature polarization fixed: convective heat transfer coefficient is a user specified value calculated: calculate convective heat transfer coefficient

watertap.unit_models.MD.membrane_distillation_0D module

class watertap.unit_models.MD.membrane_distillation_0D.MembraneDistillation0D(*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

    dynamic

    Indicates whether this model will be dynamic or not. default - False. Membrane units do not yet support dynamic behavior.

    has_holdup

    Indicates whether holdup terms should be constructed or not. default - False. Membrane units do not have defined volume, thus this must be False.

    hot_ch

    hot channel config arguments

    hot_ch
    dynamic

    Indicates whether this model will be dynamic or not. default - False. Membrane units do not yet support dynamic behavior.

    has_holdup

    Indicates whether holdup terms should be constructed or not. default - False. Membrane units do not have defined volume, 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, PhysicalParameterObject - a PhysicalParameterBlock object.}

    property_package_args

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

    material_balance_type

    Indicates what type of mass balance should be constructed, default - 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.}

    energy_balance_type

    Indicates what type of energy balance should be constructed. default - useDefault. Valid values: { EnergyBalanceType.useDefault - refer to property package for default balance type EnergyBalanceType.none - exclude energy balances, EnergyBalanceType.enthalpyTotal - single enthalpy balance for material, EnergyBalanceType.enthalpyPhase - enthalpy balances for each phase, EnergyBalanceType.energyTotal - single energy balance for material, EnergyBalanceType.energyPhase - energy balances for each phase.}

    momentum_balance_type

    Indicates what type of momentum balance should be constructed, default - MomentumBalanceType.pressureTotal. Valid values: { MomentumBalanceType.none - exclude momentum balances, MomentumBalanceType.pressureTotal - single pressure balance for material, MomentumBalanceType.pressurePhase - pressure balances for each phase, MomentumBalanceType.momentumTotal - single momentum balance for material, MomentumBalanceType.momentumPhase - momentum balances for each phase.}

    flow_direction

    Options for the direction of flow:

    default - FlowDirection.forward

    Configuration Options

    Description

    FlowDirection.forward

    Flow is in the forward direction

    FlowDirection.backward

    Flow is in the backward direction

    temperature_polarization_type

    Options to account for temperature polarization.

    default - TemperaturePolarizationType.calculated

    Configuration Options

    Description

    TemperaturePolarizationType.none

    Simplifying assumption to ignore temperature polarization

    TemperaturePolarizationType.fixed

    Specify an estimated value for the temperature polarization modulus

    TemperaturePolarizationType.calculated

    Allow model to perform calculation of membrane-interface temperature

    concentration_polarization_type

    Options to account for concentration polarization.

    default - ConcentrationPolarizationType.calculated

    Configuration Options

    Description

    ConcentrationPolarizationType.none

    Simplifying assumption to ignore concentration polarization

    ConcentrationPolarizationType.fixed

    Specify an estimated value for the concentration polarization modulus

    ConcentrationPolarizationType.calculated

    Allow model to perform calculation of membrane-interface concentration

    mass_transfer_coefficient

    Options to account for mass transfer coefficient.

    default - MassTransferCoefficient.calculated

    Configuration Options

    Description

    MassTransferCoefficient.none

    Mass transfer coefficient not used in calculations

    MassTransferCoefficient.fixed

    Specify an estimated value for the mass transfer coefficient in the feed channel

    MassTransferCoefficient.calculated

    Allow model to perform calculation of mass transfer coefficient

    has_pressure_change

    Indicates whether terms for pressure change should be constructed, default - False. Valid values: { True - include pressure change terms, False - exclude pressure change terms.}

    pressure_change_type Indicates what type of pressure change calculation will be made. To use any of the pressure_change_type options to account for pressure drop, the configuration keyword has_pressure_change must also be set to True. Also, if a value is specified for pressure change, it should be negative to represent pressure drop.

    default - PressureChangeType.fixed_per_stage

    Configuration Options

    Description

    PressureChangeType.fixed_per_stage

    Specify an estimated value for pressure drop across the membrane feed channel

    PressureChangeType.fixed_per_unit_length

    Specify an estimated value for pressure drop per unit length across the membrane feed channel

    PressureChangeType.calculated

    Allow model to perform calculation of pressure drop across the membrane feed channel

    friction_factor

    Options to account for friction factor correlations.

    default - FrictionFactor.flat_sheet

    Configuration Options

    Description

    FrictionFactor.flat_sheet

    Friction factor correlation for flat-sheet membrane modules

    FrictionFactor.spiral_wound

    Friction factor correlation for spiral-wound membranes

    property_package_vapor

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

    property_package_args_vapor

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

    cold_ch

    cold channel config arguments

    cold_ch
    dynamic

    Indicates whether this model will be dynamic or not. default - False. Membrane units do not yet support dynamic behavior.

    has_holdup

    Indicates whether holdup terms should be constructed or not. default - False. Membrane units do not have defined volume, 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, PhysicalParameterObject - a PhysicalParameterBlock object.}

    property_package_args

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

    material_balance_type

    Indicates what type of mass balance should be constructed, default - 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.}

    energy_balance_type

    Indicates what type of energy balance should be constructed. default - useDefault. Valid values: { EnergyBalanceType.useDefault - refer to property package for default balance type EnergyBalanceType.none - exclude energy balances, EnergyBalanceType.enthalpyTotal - single enthalpy balance for material, EnergyBalanceType.enthalpyPhase - enthalpy balances for each phase, EnergyBalanceType.energyTotal - single energy balance for material, EnergyBalanceType.energyPhase - energy balances for each phase.}

    momentum_balance_type

    Indicates what type of momentum balance should be constructed, default - MomentumBalanceType.pressureTotal. Valid values: { MomentumBalanceType.none - exclude momentum balances, MomentumBalanceType.pressureTotal - single pressure balance for material, MomentumBalanceType.pressurePhase - pressure balances for each phase, MomentumBalanceType.momentumTotal - single momentum balance for material, MomentumBalanceType.momentumPhase - momentum balances for each phase.}

    flow_direction

    Options for the direction of flow:

    default - FlowDirection.forward

    Configuration Options

    Description

    FlowDirection.forward

    Flow is in the forward direction

    FlowDirection.backward

    Flow is in the backward direction

    temperature_polarization_type

    Options to account for temperature polarization.

    default - TemperaturePolarizationType.calculated

    Configuration Options

    Description

    TemperaturePolarizationType.none

    Simplifying assumption to ignore temperature polarization

    TemperaturePolarizationType.fixed

    Specify an estimated value for the temperature polarization modulus

    TemperaturePolarizationType.calculated

    Allow model to perform calculation of membrane-interface temperature

    concentration_polarization_type

    Options to account for concentration polarization.

    default - ConcentrationPolarizationType.calculated

    Configuration Options

    Description

    ConcentrationPolarizationType.none

    Simplifying assumption to ignore concentration polarization

    ConcentrationPolarizationType.fixed

    Specify an estimated value for the concentration polarization modulus

    ConcentrationPolarizationType.calculated

    Allow model to perform calculation of membrane-interface concentration

    mass_transfer_coefficient

    Options to account for mass transfer coefficient.

    default - MassTransferCoefficient.calculated

    Configuration Options

    Description

    MassTransferCoefficient.none

    Mass transfer coefficient not used in calculations

    MassTransferCoefficient.fixed

    Specify an estimated value for the mass transfer coefficient in the feed channel

    MassTransferCoefficient.calculated

    Allow model to perform calculation of mass transfer coefficient

    has_pressure_change

    Indicates whether terms for pressure change should be constructed, default - False. Valid values: { True - include pressure change terms, False - exclude pressure change terms.}

    pressure_change_type Indicates what type of pressure change calculation will be made. To use any of the pressure_change_type options to account for pressure drop, the configuration keyword has_pressure_change must also be set to True. Also, if a value is specified for pressure change, it should be negative to represent pressure drop.

    default - PressureChangeType.fixed_per_stage

    Configuration Options

    Description

    PressureChangeType.fixed_per_stage

    Specify an estimated value for pressure drop across the membrane feed channel

    PressureChangeType.fixed_per_unit_length

    Specify an estimated value for pressure drop per unit length across the membrane feed channel

    PressureChangeType.calculated

    Allow model to perform calculation of pressure drop across the membrane feed channel

    friction_factor

    Options to account for friction factor correlations.

    default - FrictionFactor.flat_sheet

    Configuration Options

    Description

    FrictionFactor.flat_sheet

    Friction factor correlation for flat-sheet membrane modules

    FrictionFactor.spiral_wound

    Friction factor correlation for spiral-wound membranes

    property_package_vapor

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

    property_package_args_vapor

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

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

(MembraneDistillation0D) New instance

class watertap.unit_models.MD.membrane_distillation_0D.MembraneDistillationData(component)[source]

Bases: MembraneDistillationBaseData

Standard DCMD Unit Model Class: - zero dimensional model - steady state only

watertap.unit_models.MD.membrane_distillation_1D module

class watertap.unit_models.MD.membrane_distillation_1D.MembraneDistillation1D(*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

    dynamic

    Indicates whether this model will be dynamic or not. default - False. Membrane units do not yet support dynamic behavior.

    has_holdup

    Indicates whether holdup terms should be constructed or not. default - False. Membrane units do not have defined volume, thus this must be False.

    hot_ch

    hot channel config arguments

    hot_ch
    dynamic

    Indicates whether this model will be dynamic or not. default - False. Membrane units do not yet support dynamic behavior.

    has_holdup

    Indicates whether holdup terms should be constructed or not. default - False. Membrane units do not have defined volume, 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, PhysicalParameterObject - a PhysicalParameterBlock object.}

    property_package_args

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

    material_balance_type

    Indicates what type of mass balance should be constructed, default - 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.}

    energy_balance_type

    Indicates what type of energy balance should be constructed. default - useDefault. Valid values: { EnergyBalanceType.useDefault - refer to property package for default balance type EnergyBalanceType.none - exclude energy balances, EnergyBalanceType.enthalpyTotal - single enthalpy balance for material, EnergyBalanceType.enthalpyPhase - enthalpy balances for each phase, EnergyBalanceType.energyTotal - single energy balance for material, EnergyBalanceType.energyPhase - energy balances for each phase.}

    momentum_balance_type

    Indicates what type of momentum balance should be constructed, default - MomentumBalanceType.pressureTotal. Valid values: { MomentumBalanceType.none - exclude momentum balances, MomentumBalanceType.pressureTotal - single pressure balance for material, MomentumBalanceType.pressurePhase - pressure balances for each phase, MomentumBalanceType.momentumTotal - single momentum balance for material, MomentumBalanceType.momentumPhase - momentum balances for each phase.}

    flow_direction

    Options for the direction of flow:

    default - FlowDirection.forward

    Configuration Options

    Description

    FlowDirection.forward

    Flow is in the forward direction

    FlowDirection.backward

    Flow is in the backward direction

    temperature_polarization_type

    Options to account for temperature polarization.

    default - TemperaturePolarizationType.calculated

    Configuration Options

    Description

    TemperaturePolarizationType.none

    Simplifying assumption to ignore temperature polarization

    TemperaturePolarizationType.fixed

    Specify an estimated value for the temperature polarization modulus

    TemperaturePolarizationType.calculated

    Allow model to perform calculation of membrane-interface temperature

    concentration_polarization_type

    Options to account for concentration polarization.

    default - ConcentrationPolarizationType.calculated

    Configuration Options

    Description

    ConcentrationPolarizationType.none

    Simplifying assumption to ignore concentration polarization

    ConcentrationPolarizationType.fixed

    Specify an estimated value for the concentration polarization modulus

    ConcentrationPolarizationType.calculated

    Allow model to perform calculation of membrane-interface concentration

    mass_transfer_coefficient

    Options to account for mass transfer coefficient.

    default - MassTransferCoefficient.calculated

    Configuration Options

    Description

    MassTransferCoefficient.none

    Mass transfer coefficient not used in calculations

    MassTransferCoefficient.fixed

    Specify an estimated value for the mass transfer coefficient in the feed channel

    MassTransferCoefficient.calculated

    Allow model to perform calculation of mass transfer coefficient

    has_pressure_change

    Indicates whether terms for pressure change should be constructed, default - False. Valid values: { True - include pressure change terms, False - exclude pressure change terms.}

    pressure_change_type Indicates what type of pressure change calculation will be made. To use any of the pressure_change_type options to account for pressure drop, the configuration keyword has_pressure_change must also be set to True. Also, if a value is specified for pressure change, it should be negative to represent pressure drop.

    default - PressureChangeType.fixed_per_stage

    Configuration Options

    Description

    PressureChangeType.fixed_per_stage

    Specify an estimated value for pressure drop across the membrane feed channel

    PressureChangeType.fixed_per_unit_length

    Specify an estimated value for pressure drop per unit length across the membrane feed channel

    PressureChangeType.calculated

    Allow model to perform calculation of pressure drop across the membrane feed channel

    friction_factor

    Options to account for friction factor correlations.

    default - FrictionFactor.flat_sheet

    Configuration Options

    Description

    FrictionFactor.flat_sheet

    Friction factor correlation for flat-sheet membrane modules

    FrictionFactor.spiral_wound

    Friction factor correlation for spiral-wound membranes

    property_package_vapor

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

    property_package_args_vapor

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

    cold_ch

    cold channel config arguments

    cold_ch
    dynamic

    Indicates whether this model will be dynamic or not. default - False. Membrane units do not yet support dynamic behavior.

    has_holdup

    Indicates whether holdup terms should be constructed or not. default - False. Membrane units do not have defined volume, 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, PhysicalParameterObject - a PhysicalParameterBlock object.}

    property_package_args

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

    material_balance_type

    Indicates what type of mass balance should be constructed, default - 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.}

    energy_balance_type

    Indicates what type of energy balance should be constructed. default - useDefault. Valid values: { EnergyBalanceType.useDefault - refer to property package for default balance type EnergyBalanceType.none - exclude energy balances, EnergyBalanceType.enthalpyTotal - single enthalpy balance for material, EnergyBalanceType.enthalpyPhase - enthalpy balances for each phase, EnergyBalanceType.energyTotal - single energy balance for material, EnergyBalanceType.energyPhase - energy balances for each phase.}

    momentum_balance_type

    Indicates what type of momentum balance should be constructed, default - MomentumBalanceType.pressureTotal. Valid values: { MomentumBalanceType.none - exclude momentum balances, MomentumBalanceType.pressureTotal - single pressure balance for material, MomentumBalanceType.pressurePhase - pressure balances for each phase, MomentumBalanceType.momentumTotal - single momentum balance for material, MomentumBalanceType.momentumPhase - momentum balances for each phase.}

    flow_direction

    Options for the direction of flow:

    default - FlowDirection.forward

    Configuration Options

    Description

    FlowDirection.forward

    Flow is in the forward direction

    FlowDirection.backward

    Flow is in the backward direction

    temperature_polarization_type

    Options to account for temperature polarization.

    default - TemperaturePolarizationType.calculated

    Configuration Options

    Description

    TemperaturePolarizationType.none

    Simplifying assumption to ignore temperature polarization

    TemperaturePolarizationType.fixed

    Specify an estimated value for the temperature polarization modulus

    TemperaturePolarizationType.calculated

    Allow model to perform calculation of membrane-interface temperature

    concentration_polarization_type

    Options to account for concentration polarization.

    default - ConcentrationPolarizationType.calculated

    Configuration Options

    Description

    ConcentrationPolarizationType.none

    Simplifying assumption to ignore concentration polarization

    ConcentrationPolarizationType.fixed

    Specify an estimated value for the concentration polarization modulus

    ConcentrationPolarizationType.calculated

    Allow model to perform calculation of membrane-interface concentration

    mass_transfer_coefficient

    Options to account for mass transfer coefficient.

    default - MassTransferCoefficient.calculated

    Configuration Options

    Description

    MassTransferCoefficient.none

    Mass transfer coefficient not used in calculations

    MassTransferCoefficient.fixed

    Specify an estimated value for the mass transfer coefficient in the feed channel

    MassTransferCoefficient.calculated

    Allow model to perform calculation of mass transfer coefficient

    has_pressure_change

    Indicates whether terms for pressure change should be constructed, default - False. Valid values: { True - include pressure change terms, False - exclude pressure change terms.}

    pressure_change_type Indicates what type of pressure change calculation will be made. To use any of the pressure_change_type options to account for pressure drop, the configuration keyword has_pressure_change must also be set to True. Also, if a value is specified for pressure change, it should be negative to represent pressure drop.

    default - PressureChangeType.fixed_per_stage

    Configuration Options

    Description

    PressureChangeType.fixed_per_stage

    Specify an estimated value for pressure drop across the membrane feed channel

    PressureChangeType.fixed_per_unit_length

    Specify an estimated value for pressure drop per unit length across the membrane feed channel

    PressureChangeType.calculated

    Allow model to perform calculation of pressure drop across the membrane feed channel

    friction_factor

    Options to account for friction factor correlations.

    default - FrictionFactor.flat_sheet

    Configuration Options

    Description

    FrictionFactor.flat_sheet

    Friction factor correlation for flat-sheet membrane modules

    FrictionFactor.spiral_wound

    Friction factor correlation for spiral-wound membranes

    property_package_vapor

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

    property_package_args_vapor

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

    area_definition

    Argument defining whether area variable should be spatially variant or not. default - DistributedVars.uniform. Valid values: { DistributedVars.uniform - area does not vary across spatial domain, DistributedVars.variant - area can vary over the domain and is indexed by time and space.}

    transformation_method

    Discretization method to use for DAE transformation. See Pyomo documentation for supported transformations.

    transformation_scheme

    Discretization scheme to use when transformating domain. See Pyomo documentation for supported schemes.

    finite_elements

    Number of finite elements to use when discretizing length domain (default=20)

    collocation_points

    Number of collocation points to use per finite element when discretizing length domain (default=3)

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

(MembraneDistillation1D) New instance

class watertap.unit_models.MD.membrane_distillation_1D.MembraneDistillationData(component)[source]

Bases: MembraneDistillationBaseData

Standard DCMD Unit Model Class: - one dimensional model - steady state only

watertap.unit_models.MD.membrane_distillation_base module

class watertap.unit_models.MD.membrane_distillation_base.MembraneDistillationBaseData(component)[source]

Bases: InitializationMixin, UnitModelBlockData

build()[source]

Common variables and constraints for a DCMD unit model

initialize_build(initialize_guess=None, state_args_hot_ch=None, state_args_cold_ch=None, outlvl=0, solver=None, optarg=None)[source]

This is a general purpose initialization routine for simple unit models. This method assumes a single ControlVolume block called controlVolume, and first initializes this and then attempts to solve the entire unit.

More complex models should overload this method with their own initialization routines,

Keyword Arguments:
  • state_args – a dict of arguments to be passed to the property package(s) to provide an initial state for initialization (see documentation of the specific property package) (default = {}).

  • outlvl – sets output level of initialization routine

  • optarg – solver options dictionary object (default=None, use default solver options)

  • solver – str indicating which solver to use during initialization (default = None, use default IDAES solver)

Returns:

None

Module contents