watertap.property_models package
Subpackages
- watertap.property_models.unit_specific package
- Subpackages
- watertap.property_models.unit_specific.activated_sludge package
- Submodules
- watertap.property_models.unit_specific.activated_sludge.asm1_properties module
- watertap.property_models.unit_specific.activated_sludge.asm1_reactions module
- watertap.property_models.unit_specific.activated_sludge.asm2d_properties module
- watertap.property_models.unit_specific.activated_sludge.asm2d_reactions module
- watertap.property_models.unit_specific.activated_sludge.asm3_properties module
- watertap.property_models.unit_specific.activated_sludge.asm3_reactions module
- watertap.property_models.unit_specific.activated_sludge.modified_asm2d_properties module
- watertap.property_models.unit_specific.activated_sludge.modified_asm2d_reactions module
- Module contents
- watertap.property_models.unit_specific.anaerobic_digestion package
- Submodules
- watertap.property_models.unit_specific.anaerobic_digestion.adm1_properties module
- watertap.property_models.unit_specific.anaerobic_digestion.adm1_properties_vapor module
- watertap.property_models.unit_specific.anaerobic_digestion.adm1_reactions module
- watertap.property_models.unit_specific.anaerobic_digestion.modified_adm1_properties module
- watertap.property_models.unit_specific.anaerobic_digestion.modified_adm1_reactions module
- Module contents
- watertap.property_models.unit_specific.activated_sludge package
- Submodules
- watertap.property_models.unit_specific.NDMA_prop_pack module
- watertap.property_models.unit_specific.coagulation_prop_pack module
- watertap.property_models.unit_specific.cryst_prop_pack module
- Module contents
- 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
- 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
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
- 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
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:
EnumAn enumeration.
- class watertap.property_models.multicomp_aq_sol_prop_pack.DensityCalculation(value)[source]
Bases:
EnumAn enumeration.
- class watertap.property_models.multicomp_aq_sol_prop_pack.DiffusivityCalculation(value)[source]
Bases:
EnumAn enumeration.
- class watertap.property_models.multicomp_aq_sol_prop_pack.ElectricalMobilityCalculation(value)[source]
Bases:
EnumAn enumeration.
- class watertap.property_models.multicomp_aq_sol_prop_pack.EquivalentConductivityCalculation(value)[source]
Bases:
EnumAn 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.idealConfiguration Options
Description
ActivityCoefficientModel.idealActivity coefficients equal to 1 assuming ideal solution
ActivityCoefficientModel.daviesActivity coefficients estimated via Davies model
- density_calculation
Options to account for solution density.
default -
DensityCalculation.constantConfiguration Options
Description
DensityCalculation.constantSolution density assumed constant at 1000 kg/m3 by default in dens_mass_const parameter
DensityCalculation.seawaterSolution density based on correlation for seawater (TDS)
- diffus_calculation
Options to account for ionic or molecular diffusivity.
default -
DiffusivityCalculation.noneConfiguration Options
Description
DiffusivityCalculation.noneUsers provide data via the diffusivity_data configuration
DiffusivityCalculation.HaydukLaudieAllow the nonelectrolyte (neutral) species to get diffusivity from the Hayduk Laudie equation
- elec_mobility_calculation
Options to account for ion electrical mobility.
default -
ElectricalMobilityCalculation.noneConfiguration Options
Description
ElectricalMobilityCalculation.noneUsers provide data via the elec_mobility_data configuration
ElectricalMobilityCalculation.EinsteinRelationCalculate from the diffusivity_data by the Einstein Relation
- trans_num_calculation
Options to account for ion transport number in the solution.
default -
TransportNumberCalculation.ElectricalMobilityConfiguration Options
Description
TransportNumberCalculation.noneUsers provide data via the trans_num_data configuration
TransportNumberCalculation.ElectricalMobilityCalculated from the elec_mobility_data
- equiv_conductivity_calculation
Options to account for the total equivalent conductivity of the liquid phase (solution).
default -
EquivalentConductivityCalculation.noneConfiguration Options
Description
EquivalentConductivityCalculation.noneUsers provide data via the equiv_conductivity_data configuration
EquivalentConductivityCalculation.ElectricalMobilityCalculated from the electrical_mobility_data
- material_flow_basis
Material flow basis options.
default -
MaterialFlowBasis.molarConfiguration Options
Description
MaterialFlowBasis.molarmolar flowrate as the state variable
MaterialFlowBasis.massmass flowrate as the state variable
MaterialFlowBasis.otherother 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
- 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
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:
PhysicalParameterBlockParameter block for a seawater property package.
- 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:
StateBlockDataA seawater property package.
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:
PhysicalParameterBlockParameter block for a water property package.
- 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:
StateBlockDataA water property package.