watertap.property_models package

Subpackages

Submodules

watertap.property_models.NDMA_prop_pack module

Initial property package for H2O-NDMA system

class watertap.property_models.NDMA_prop_pack.NDMAParameterBlock(*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

(NDMAParameterBlock) New instance

class watertap.property_models.NDMA_prop_pack.NDMAParameterData(component)[source]

Bases: PhysicalParameterBlock

build()[source]

Callable method for Block construction.

classmethod define_metadata(obj)[source]

Define properties supported and units.

class watertap.property_models.NDMA_prop_pack.NDMAStateBlock(*args, **kwds)

Bases: _NDMAStateBlock

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

(NDMAStateBlock) New instance

class watertap.property_models.NDMA_prop_pack.NDMAStateBlockData(*args, **kwargs)[source]

Bases: 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.property_models.NaCl_prop_pack module

Initial property package for H2O-NaCl system

class watertap.property_models.NaCl_prop_pack.NaClParameterBlock(*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

(NaClParameterBlock) New instance

class watertap.property_models.NaCl_prop_pack.NaClParameterData(component)[source]

Bases: PhysicalParameterBlock

build()[source]

Callable method for Block construction.

classmethod define_metadata(obj)[source]

Define properties supported and units.

class watertap.property_models.NaCl_prop_pack.NaClStateBlock(*args, **kwds)

Bases: _NaClStateBlock

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

(NaClStateBlock) New instance

class watertap.property_models.NaCl_prop_pack.NaClStateBlockData(*args, **kwargs)[source]

Bases: 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.property_models.coagulation_prop_pack module

Initial property package for water treatment via a Coagulation-Flocculation process

class watertap.property_models.coagulation_prop_pack.CoagulationParameterBlock(*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

(CoagulationParameterBlock) New instance

class watertap.property_models.coagulation_prop_pack.CoagulationParameterData(component)[source]

Bases: PhysicalParameterBlock

build()[source]

Callable method for Block construction.

classmethod define_metadata(obj)[source]

Define properties supported and units.

class watertap.property_models.coagulation_prop_pack.CoagulationStateBlock(*args, **kwds)

Bases: _CoagulationStateBlock

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

(CoagulationStateBlock) New instance

class watertap.property_models.coagulation_prop_pack.CoagulationStateBlockData(*args, **kwargs)[source]

Bases: 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.property_models.cryst_prop_pack module

Initial crystallization property package for H2O-NaCl system

class watertap.property_models.cryst_prop_pack.HeatOfCrystallizationModel(value)[source]

Bases: Enum

An enumeration.

class watertap.property_models.cryst_prop_pack.NaClParameterBlock(*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

    heat_of_crystallization_model

    Options to account for heat of crystallization value for NaCl.

    default - HeatOfCrystallizationModel.constant

    Configuration Options

    Description

    HeatOfCrystallizationModel.constant

    Fixed heat of crystallization for NaCl based on literature

    HeatOfCrystallizationModel.zero

    Zero heat of crystallization assumption

    HeatOfCrystallizationModel.temp_dependent

    Temperature-dependent heat of crystallization for NaCl

  • 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

(NaClParameterBlock) New instance

class watertap.property_models.cryst_prop_pack.NaClParameterData(component)[source]

Bases: PhysicalParameterBlock

build()[source]

General build method for PropertyParameterBlocks. Inheriting models should call super().build.

Parameters

None

Returns

None

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.cryst_prop_pack.NaClStateBlock(*args, **kwds)

Bases: _NaClStateBlock

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

(NaClStateBlock) New instance

class watertap.property_models.cryst_prop_pack.NaClStateBlockData(*args, **kwargs)[source]

Bases: 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.property_models.multicomp_aq_sol_prop_pack module

This property package computes a multi-component aqueous solution that can contain ionic and/or neutral solute species. It supports basic calculation of component quanitities and some physical, chemical and electrical properties.

This property package was formerly named as “ion_DSPMDE_prop_pack” for its use of Donnan Steric Pore Model with Dielectric Exclusion (DSPMDE).

class watertap.property_models.multicomp_aq_sol_prop_pack.ActivityCoefficientModel(value)[source]

Bases: Enum

An enumeration.

class watertap.property_models.multicomp_aq_sol_prop_pack.DensityCalculation(value)[source]

Bases: Enum

An enumeration.

class watertap.property_models.multicomp_aq_sol_prop_pack.ElectricalMobilityCalculation(value)[source]

Bases: Enum

An enumeration.

class watertap.property_models.multicomp_aq_sol_prop_pack.EquivalentConductivityCalculation(value)[source]

Bases: Enum

An enumeration.

class watertap.property_models.multicomp_aq_sol_prop_pack.MCASParameterBlock(*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

    solute_list

    List of solute species names

    stokes_radius_data

    Dict of solute species names and Stokes radius data

    diffusivity_data

    Dict of solute species names and bulk ion diffusivity data

    mw_data

    Dict of component names and molecular weight data

    elec_mobility_data

    Ion electrical mobility

    trans_num_data

    transport number of ions in the liquid phase

    equiv_conductivity_phase_data

    Equivalent conductivity of ions in the liquid phase

    charge

    Ion charge

    activity_coefficient_model

    Options to account for activity coefficient model.

    default - ActivityCoefficientModel.ideal

    Configuration Options

    Description

    ActivityCoefficientModel.ideal

    Activity coefficients equal to 1 assuming ideal solution

    ActivityCoefficientModel.davies

    Activity coefficients estimated via Davies model

    density_calculation

    Options to account for solution density.

    default - DensityCalculation.constant

    Configuration Options

    Description

    DensityCalculation.constant

    Solution density assumed constant at 1000 kg/m3

    DensityCalculation.seawater

    Solution density based on correlation for seawater (TDS)

    DensityCalculation.laliberte

    Solution density based on mixing correlation from Laliberte

    elec_mobility_calculation

    Options to account for ion electrical mobility.

    default - ElectricalMobilityCalculation.none

    Configuration Options

    Description

    ElectricalMobilityCalculation.none

    Users provide data via the elec_mobility_data configuration

    ElectricalMobilityCalculation.EinsteinRelation

    Calculate from the diffusivity_data by the Einstein Relation

    trans_num_calculation

    Options to account for ion transport number in the solution.

    default - TransportNumberCalculation.ElectricalMobility

    Configuration Options

    Description

    TransportNumberCalculation.none

    Users provide data via the trans_num_data configuration

    TransportNumberCalculation.ElectricalMobility

    Calculated from the elec_mobility_data

    equiv_conductivity_calculation

    Options to account for the total equivalent conductivity of the liquid phase (solution).

    default - EquivalentConductivityCalculation.none

    Configuration Options

    Description

    EquivalentConductivityCalculation.none

    Users provide data via the equiv_conductivity_data configuration

    EquivalentConductivityCalculation.ElectricalMobility

    Calculated from the electrical_mobility_data

  • 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

(MCASParameterBlock) New instance

class watertap.property_models.multicomp_aq_sol_prop_pack.MCASParameterData(component)[source]

Bases: PhysicalParameterBlock

build()[source]

Callable method for Block construction.

classmethod define_metadata(obj)[source]

Define properties supported and units.

class watertap.property_models.multicomp_aq_sol_prop_pack.MCASStateBlock(*args, **kwds)

Bases: _MCASStateBlock

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

(MCASStateBlock) New instance

class watertap.property_models.multicomp_aq_sol_prop_pack.MCASStateBlockData(*args, **kwargs)[source]

Bases: StateBlockData

build()[source]

Callable method for Block construction.

define_state_vars()[source]

Define state vars.

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.

class watertap.property_models.multicomp_aq_sol_prop_pack.TransportNumberCalculation(value)[source]

Bases: Enum

An enumeration.

watertap.property_models.seawater_ion_generic module

Artificial seawater properties comprising Na+, Cl-, Ca_2+, SO4_2-, Mg_2+ Equation of state: eNRTL

eNRTL property configuration dicts for synthetic hard water based on [1]

References:

[1] Islam, R.I., et al., Molecular thermodynamics for scaling prediction: Case of membrane distillation, Separation and Purification Technology, 2021, Vol. 276.

watertap.property_models.seawater_prop_pack module

Initial property package for seawater system

class watertap.property_models.seawater_prop_pack.SeawaterParameterBlock(*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

(SeawaterParameterBlock) New instance

class watertap.property_models.seawater_prop_pack.SeawaterParameterData(component)[source]

Bases: PhysicalParameterBlock

Parameter block for a seawater property package.

build()[source]

Callable method for Block construction.

classmethod define_metadata(obj)[source]

Define properties supported and units.

class watertap.property_models.seawater_prop_pack.SeawaterStateBlock(*args, **kwds)

Bases: _SeawaterStateBlock

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

(SeawaterStateBlock) New instance

class watertap.property_models.seawater_prop_pack.SeawaterStateBlockData(*args, **kwargs)[source]

Bases: StateBlockData

A seawater property package.

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.property_models.water_prop_pack module

Initial property package for pure water system (vapor or liquid)

class watertap.property_models.water_prop_pack.WaterParameterBlock(*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

(WaterParameterBlock) New instance

class watertap.property_models.water_prop_pack.WaterParameterData(component)[source]

Bases: PhysicalParameterBlock

Parameter block for a water property package.

build()[source]

Callable method for Block construction.

classmethod define_metadata(obj)[source]

Define properties supported and units.

class watertap.property_models.water_prop_pack.WaterStateBlock(*args, **kwds)

Bases: _WaterStateBlock

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

(WaterStateBlock) New instance

class watertap.property_models.water_prop_pack.WaterStateBlockData(*args, **kwargs)[source]

Bases: StateBlockData

A water property package.

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.

Module contents