watertap.property_models package

Subpackages

Submodules

watertap.property_models.NaCl_T_dep_prop_pack module

Initial property package for H2O-NaCl system with temperature dependence

class watertap.property_models.NaCl_T_dep_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_T_dep_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_T_dep_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_T_dep_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.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_energy_density_terms(p)[source]

Create enthalpy density terms.

get_enthalpy_flow_terms(p)[source]

Create enthalpy flow terms.

get_material_density_terms(p, j)[source]

Create material density 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.air_water_equilibrium_prop_pack module

Air-water equilibrium property package

class watertap.property_models.air_water_equilibrium_prop_pack.AirWaterEq(*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

    volatile_solute_list

    List of strings that specify names of volatile solute species.

    non_volatile_solute_list

    List of strings that specify names of non-volatile solute species.

    mw_data

    Required argument. Dict of component names (keys) and molecular weight data (values)

    diffusivity_data

    Dict of phase, solute species names (keys) and bulk ion diffusivity data (values)

    molar_volume_data

    Dict of solute species names and molar volume of aqueous species

    pressure_vap_sat_data

    User provided value for saturation vapor pressure of water in Pa

    pressure_vap_data

    User provided value for vapor pressure of water in Pa

    relative_humidity_data

    User provided value for relative humidity of air

    latent_heat_of_vaporization_data

    User provided value for latent heat of vaporization in kJ / kg

    specific_heat_of_water_data

    Dict for specific heat of water for liquid and vapor phases in J / kg / K

    critical_molar_volume_data

    Dict of solute species names and critical molar volume of aqueous species.Used for Tyn-Calus method for calculating molar volume

    density_data

    Dict of phases and density of vapor and liquid phases

    dynamic_viscosity_data

    Dict of phases and dynamic viscosity of vapor and liquid phases

    henry_constant_data

    Dict of solute species names and Henry’s Law Constant

    temp_adjust_henry

    Flag to indicate if provided Henry’s Law Constant should be adjusted for temperature.

    standard_enthalpy_change_data

    Dict of solute species names and standard enthalpy change of dissolution in water. Used to temperature adjust Henry’s Law Constant.

    temperature_boiling_data

    Dict of solute species names and boiling temperature data

    charge_data

    Dict of solute species names and ion charge

    liq_diffus_calculation

    Options to account for ionic or molecular diffusivity.

    default - LiqDiffusivityCalculation.HaydukLaudie

    Configuration Options

    Description

    LiqDiffusivityCalculation.none

    Users provide liquid diffusivity data via the diffusivity_data configuration

    LiqDiffusivityCalculation.HaydukLaudie

    Allow the nonelectrolyte (neutral) species to get diffusivity from the Hayduk-Laudie equation

    vap_diffus_calculation

    Options to account for ionic or molecular diffusivity.

    default - VapDiffusivityCalculation.WilkeLee

    Configuration Options

    Description

    VapDiffusivityCalculation.none

    Users provide vapor diffusivity data via the diffusivity_data configuration

    VapDiffusivityCalculation.WilkeLee

    Allow the nonelectrolyte (neutral) species to get diffusivity from the Wilke-Lee equation

    molar_volume_calculation

    Options to estimate molar volume for a component.

    default - MolarVolumeCalculation.TynCalus

    Configuration Options

    Description

    MolarVolumeCalculation.none

    Users provide data via the molar_volume_data configuration

    MolarVolumeCalculation.TynCalus

    Allow the component species to calculate molar volume from the Tyn-Calus equation

    saturation_vapor_pressure_calculation

    Options to estimate saturation vapor pressure for water in air.

    default - SaturationVaporPressureCalculation.ArdenBuck

    Configuration Options

    Description

    SaturationVaporPressureCalculation.none

    Users provide data via the pressure_vap_sat_data configuration

    SaturationVaporPressureCalculation.ArdenBuck

    Saturation vapor pressure is calculated from Arden Buck equation

    SaturationVaporPressureCalculation.Huang

    Saturation vapor pressure is calculated from Huang equation

    SaturationVaporPressureCalculation.Antoine

    Saturation vapor pressure is calculated from Antoine equation

    vapor_pressure_calculation

    Options to estimate vapor pressure for water in air.

    default - VaporPressureCalculation.FromRelativeHumidity

    Configuration Options

    Description

    VaporPressureCalculation.none

    Users provide data via the pressure_vap_data configuration

    VaporPressureCalculation.FromRelativeHumidity

    Vapor pressure is calculated from relative humidity and saturation vapor pressure

    relative_humidity_calculation

    Options to estimate relative humidity of air-water system.

    default - RelativeHumidityCalculation.none

    Configuration Options

    Description

    RelativeHumidityCalculation.none

    Users provide data via the relative_humidity_data configuration

    RelativeHumidityCalculation.FromVaporPressureRatio

    Relative humidity is calculated as ratio of vapor pressure to saturation vapor pressure

    latent_heat_of_vaporization_calculation

    Options to estimate latent heat of vaporization.

    default - LatentHeatVaporizationCalculation.Sharqawy

    Configuration Options

    Description

    LatentHeatVaporizationCalculation.none

    Users provide data via the latent_heat_of_vaporization_data configuration

    LatentHeatVaporizationCalculation.Sharqawy

    Latent heat of vaporization is calculated according to Sharqawy (2010)

    specific_heat_of_water_calculation

    Options to estimate specific heat of water.

    default - SpecificHeatWaterCalculation.Sharqawy

    Configuration Options

    Description

    SpecificHeatWaterCalculation.none

    Users provide data via the specific_heat_of_water_data configuration

    SpecificHeatWaterCalculation.Sharqawy

    Specific heat of water is calculated according to Sharqawy (2010)

    density_calculation

    Options to account for solution density.

    default - DensityCalculation.constant

    Configuration Options

    Description

    DensityCalculation.constant

    Users provide data via the density_data configuration

    DensityCalculation.calculated

    Density of water is calculated according to Sharqawy (2010); density of air is calculated according to modified CIPM-2007 formula

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

(AirWaterEq) New instance

class watertap.property_models.air_water_equilibrium_prop_pack.AirWaterEqData(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.air_water_equilibrium_prop_pack.AirWaterEqStateBlock(*args, **kwds)

Bases: _AirWaterEqStateBlock

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:

(AirWaterEqStateBlock) New instance

class watertap.property_models.air_water_equilibrium_prop_pack.AirWaterEqStateBlockData(*args, **kwargs)[source]

Bases: StateBlockData

build()[source]

Callable method for Block construction.

define_state_vars()[source]

Define state vars.

get_material_density_terms()[source]

Method which returns a valid expression for material density to use in the material balances .

get_material_flow_basis()[source]

Method which returns an Enum indicating the basis of the material flow term.

get_material_flow_terms(p, j)[source]

Create material flow terms for control volume.

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

Bases: Enum

Approach to determine density of water and air.

class watertap.property_models.air_water_equilibrium_prop_pack.LatentHeatVaporizationCalculation(value)[source]

Bases: Enum

Approach to determine latent heat of vaporization. Sharqawy is default.

class watertap.property_models.air_water_equilibrium_prop_pack.LiqDiffusivityCalculation(value)[source]

Bases: Enum

Approach to determine component liquid diffusivity. HaydukLaudie is default.

class watertap.property_models.air_water_equilibrium_prop_pack.MolarVolumeCalculation(value)[source]

Bases: Enum

Approach to determine component molar volume. TynCalus is default.

class watertap.property_models.air_water_equilibrium_prop_pack.RelativeHumidityCalculation(value)[source]

Bases: Enum

Approach to determine relative humidity. none (user-provided) is default.

class watertap.property_models.air_water_equilibrium_prop_pack.SaturationVaporPressureCalculation(value)[source]

Bases: Enum

Approach to determine saturation vapor presssure. ArdenBuck is default.

class watertap.property_models.air_water_equilibrium_prop_pack.SpecificHeatWaterCalculation(value)[source]

Bases: Enum

Approach to determine specific heat of water in liquid and vapor phase. Sharqawy is default.

class watertap.property_models.air_water_equilibrium_prop_pack.VapDiffusivityCalculation(value)[source]

Bases: Enum

Approach to determine component vapor diffusivity. WilkeLee is default.

class watertap.property_models.air_water_equilibrium_prop_pack.VaporPressureCalculation(value)[source]

Bases: Enum

Approach to determine vapor presssure. FromRelativeHumidity is default.

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 quantities and some physical, chemical and electrical properties.

This property package was formerly named the “ion_DSPMDE_prop_pack” and was originally designed for use with the Donnan Steric Pore Model with Dielectric Exclusion (DSPMDE) for nanofiltration.

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.DiffusivityCalculation(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

    Required argument.List of strings that specify names of solute species.

    stokes_radius_data

    Dict of solute species names (keys) and Stokes radius data (values)

    diffusivity_data

    Dict of solute species names (keys) and bulk ion diffusivity data (values)

    molar_volume_data

    Dict of solute species names and molar volume of aqueous species

    mw_data

    Required argument. Dict of component names (keys)and molecular weight data (values)

    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

    ignore_neutral_charge

    Level of reporting results. default - False. Valid values: { False - raise ConfigurationError when charge value not provided for ALL solutes, including neutral solutes (charge=0), True - will not raise ConfigurationError when charge not provided for particular solutes, assuming said solutes are meant to be designated as neutral.

    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 by default in dens_mass_const parameter

    DensityCalculation.seawater

    Solution density based on correlation for seawater (TDS)

    diffus_calculation

    Options to account for ionic or molecular diffusivity.

    default - DiffusivityCalculation.none

    Configuration Options

    Description

    DiffusivityCalculation.none

    Users provide data via the diffusivity_data configuration

    DiffusivityCalculation.HaydukLaudie

    Allow the nonelectrolyte (neutral) species to get diffusivity from the Hayduk Laudie equation

    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

    material_flow_basis

    Material flow basis options.

    default - MaterialFlowBasis.molar

    Configuration Options

    Description

    MaterialFlowBasis.molar

    molar flowrate as the state variable

    MaterialFlowBasis.mass

    mass flowrate as the state variable

    MaterialFlowBasis.other

    other material flowrate as the state variable

  • 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.MCASScaler(**kwargs)[source]

Bases: CustomScalerBase

zero_tolerance

Value at which a variable will be considered equal to zero for scaling.

max_variable_scaling_factor

Maximum value for variable scaling factors.

min_variable_scaling_factor

Minimum value for variable scaling factors.

max_constraint_scaling_factor

Maximum value for constraint scaling factors.

min_constraint_scaling_factor

Minimum value for constraint scaling factors.

max_expression_scaling_hint

Maximum value for expression scaling hints.

min_expression_scaling_hint

Minimum value for constraint scaling hints.

overwrite

Whether to overwrite existing scaling factors.

constraint_scaling_routine(model, overwrite: bool = False, submodel_scalers: dict | None = None)[source]

Routine to apply scaling factors to constraints in model.

Derived classes must overload this method.

Parameters:
  • model – model to be scaled

  • overwrite – whether to overwrite existing scaling factors

  • submodel_scalers – ComponentMap of Scalers to use for sub-models

Returns:

None

variable_scaling_routine(model, overwrite: bool = False, submodel_scalers: dict | None = None)[source]

Routine to apply scaling factors to variables in model.

Derived classes must overload this method.

Parameters:
  • model – model to be scaled

  • overwrite – whether to overwrite existing scaling factors

  • submodel_scalers – ComponentMap of Scalers to use for sub-models

Returns:

None

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

assert_electroneutrality(tol=None, tee=True, defined_state=True, adjust_by_ion=None, get_property=None, solve=True)[source]

TODO: add descriptions of args and what is returned

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.

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

Bases: Enum

An enumeration.

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.

list_properties()[source]

Return list of property descriptions, names, and units.

print_properties()[source]

Print table of property descriptions, names, and units to the console.

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_energy_density_terms(p)[source]

Create energy density terms.

get_enthalpy_flow_terms(p)[source]

Create enthalpy flow terms.

get_material_density_terms(p, j)[source]

Create material density 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