watertap.unit_models package
Subpackages
- watertap.unit_models.mvc package
- watertap.unit_models.zero_order package
- Submodules
- watertap.unit_models.zero_order.CANDOP_zo module
- watertap.unit_models.zero_order.aeration_basin_zo module
- watertap.unit_models.zero_order.air_flotation_zo module
- watertap.unit_models.zero_order.anaerobic_digestion_oxidation_zo module
- watertap.unit_models.zero_order.anaerobic_mbr_mec_zo module
- watertap.unit_models.zero_order.autothermal_hydrothermal_liquefaction_zo module
- watertap.unit_models.zero_order.backwash_solids_handling_zo module
- watertap.unit_models.zero_order.bio_active_filtration_zo module
- watertap.unit_models.zero_order.bioreactor_zo module
- watertap.unit_models.zero_order.blending_reservoir_zo module
- watertap.unit_models.zero_order.brine_concentrator_zo module
- watertap.unit_models.zero_order.buffer_tank_zo module
- watertap.unit_models.zero_order.cartridge_filtration_zo module
- watertap.unit_models.zero_order.chemical_addition_zo module
- watertap.unit_models.zero_order.chlorination_zo module
- watertap.unit_models.zero_order.clarifier_zo module
- watertap.unit_models.zero_order.co2_addition_zo module
- watertap.unit_models.zero_order.coag_and_floc_zo module
- watertap.unit_models.zero_order.cofermentation_zo module
- watertap.unit_models.zero_order.constructed_wetlands_zo module
- watertap.unit_models.zero_order.conventional_activated_sludge_zo module
- watertap.unit_models.zero_order.cooling_supply_zo module
- watertap.unit_models.zero_order.cooling_tower_zo module
- watertap.unit_models.zero_order.decarbonator_zo module
- watertap.unit_models.zero_order.deep_well_injection_zo module
- watertap.unit_models.zero_order.dissolved_air_flotation_zo module
- watertap.unit_models.zero_order.dmbr_zo module
- watertap.unit_models.zero_order.dual_media_filtration_zo module
- watertap.unit_models.zero_order.electrochemical_nutrient_removal_zo module
- watertap.unit_models.zero_order.electrodialysis_reversal_zo module
- watertap.unit_models.zero_order.energy_recovery_zo module
- watertap.unit_models.zero_order.evaporation_pond_zo module
- watertap.unit_models.zero_order.feed_water_tank_zo module
- watertap.unit_models.zero_order.feed_zo module
- watertap.unit_models.zero_order.filter_press_zo module
- watertap.unit_models.zero_order.fixed_bed_zo module
- watertap.unit_models.zero_order.gac_zo module
- watertap.unit_models.zero_order.gas_sparged_membrane_zo module
- watertap.unit_models.zero_order.hydrothermal_gasification_zo module
- watertap.unit_models.zero_order.injection_well_disposal_zo module
- watertap.unit_models.zero_order.intrusion_mitigation_zo module
- watertap.unit_models.zero_order.ion_exchange_zo module
- watertap.unit_models.zero_order.iron_and_manganese_removal_zo module
- watertap.unit_models.zero_order.landfill_zo module
- watertap.unit_models.zero_order.mabr_zo module
- watertap.unit_models.zero_order.mbr_zo module
- watertap.unit_models.zero_order.media_filtration_zo module
- watertap.unit_models.zero_order.metab_zo module
- watertap.unit_models.zero_order.microfiltration_zo module
- watertap.unit_models.zero_order.microscreen_filtration_zo module
- watertap.unit_models.zero_order.municipal_drinking_zo module
- watertap.unit_models.zero_order.municipal_wwtp_zo module
- watertap.unit_models.zero_order.nanofiltration_zo module
- watertap.unit_models.zero_order.ozone_aop_zo module
- watertap.unit_models.zero_order.ozone_zo module
- watertap.unit_models.zero_order.photothermal_membrane_zo module
- watertap.unit_models.zero_order.primary_separator_zo module
- watertap.unit_models.zero_order.pump_electricity_zo module
- watertap.unit_models.zero_order.pump_zo module
- watertap.unit_models.zero_order.screen_zo module
- watertap.unit_models.zero_order.secondary_treatment_wwtp_zo module
- watertap.unit_models.zero_order.sedimentation_zo module
- watertap.unit_models.zero_order.settling_pond_zo module
- watertap.unit_models.zero_order.sludge_tank_zo module
- watertap.unit_models.zero_order.smp_zo module
- watertap.unit_models.zero_order.static_mixer_zo module
- watertap.unit_models.zero_order.storage_tank_zo module
- watertap.unit_models.zero_order.supercritical_salt_precipitation_zo module
- watertap.unit_models.zero_order.surface_discharge_zo module
- watertap.unit_models.zero_order.sw_onshore_intake_zo module
- watertap.unit_models.zero_order.tramp_oil_tank_zo module
- watertap.unit_models.zero_order.tri_media_filtration_zo module
- watertap.unit_models.zero_order.ultra_filtration_zo module
- watertap.unit_models.zero_order.uv_aop_zo module
- watertap.unit_models.zero_order.uv_zo module
- watertap.unit_models.zero_order.vfa_recovery_zo module
- watertap.unit_models.zero_order.waiv_zo module
- watertap.unit_models.zero_order.walnut_shell_filter_zo module
- watertap.unit_models.zero_order.water_pumping_station_zo module
- watertap.unit_models.zero_order.well_field_zo module
- Module contents
Submodules
watertap.unit_models.boron_removal module
- class watertap.unit_models.boron_removal.BoronRemoval(*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
default (dict) –
Default ProcessBlockData config
- Keys
- dynamic
Indicates whether this model will be dynamic or not, default: False. The filtration unit does not support dynamic behavior, thus this must be False.
- has_holdup
Indicates whether holdup terms should be constructed or not. default: False. The filtration unit does not have defined volume, thus this must be False.
- material_balance_type
Indicates what type of mass balance should be constructed, default - MaterialBalanceType.useDefault. Valid values: { MaterialBalanceType.useDefault - refer to property package for default balance type **MaterialBalanceType.none - exclude material balances, MaterialBalanceType.componentPhase - use phase component balances, MaterialBalanceType.componentTotal - use total component balances, MaterialBalanceType.elementTotal - use total element balances, MaterialBalanceType.total - use total material balance.}
- 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.}
- 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 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.}
- chemical_mapping_data
Dictionary of chemical species names from the property package and how they map to specific species needed for solving a simple boron speciation problem in an equilibrium reactor. This dictionary must have the following format [Required]:
{'boron_name': 'name_of_species_representing_boron', #[is required] 'borate_name': 'name_of_species_representing_borate', #[is required] 'proton_name': 'name_of_species_representing_protons', #[is optional] 'hydroxide_name': 'name_of_species_representing_hydroxides', #[is optional] 'caustic_additive': { 'additive_name': 'name_of_the_actual_chemical', #[is optional] 'cation_name': 'name_of_cation_species_in_additive', #[is required] 'mw_additive': (value, units), #[is required] 'moles_cation_per_additive': value, #[is required] }, }
initialize (dict) – ProcessBlockData config for individual elements. Keys are BlockData indexes and values are dictionaries described under the “default” argument above.
idx_map (function) – Function to take the index of a BlockData element and return the index in the initialize dict from which to read arguments. This can be provided to overide the default behavior of matching the BlockData index exactly to the index in initialize.
- Returns
(BoronRemoval) New instance
- class watertap.unit_models.boron_removal.BoronRemovalData(component)[source]
Bases:
UnitModelBlockData
0D Boron Removal model for after 1st Stage of RO
This model is an approximate equilibrium reactor wherein it is assumed that…
All reactions and activities are assumed ideal
(2) Only major reactions are water dissociation and boron dissociation
Only 1 caustic chemical is being added to raise pH
(4) The caustic additive will always completely dissociate into a cation and some amount hydroxide anions (e.g., NaOH –> Na+ + OH-, Ca(OH2) –> Ca2+ + 2 OH-, etc)
(5) Any other ions remaining in solution do not significantly change with pH changes, but do help act as buffers to changes in pH (i.e., will absorb/contribute protons proportional to their charge).
- build()[source]
General build method for UnitModelBlockData. This method calls a number of sub-methods which automate the construction of expected attributes of unit models.
Inheriting models should call super().build.
- Parameters
None –
- Returns
None
- initialize_build(state_args=None, outlvl=0, solver=None, optarg=None)[source]
General wrapper for pressure changer 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)
solver – str indicating which solver to use during initialization (default = None)
Returns: None
watertap.unit_models.coag_floc_model module
- class watertap.unit_models.coag_floc_model.CoagulationFlocculation(*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
default (dict) –
Default ProcessBlockData config
- Keys
- dynamic
Indicates whether this model will be dynamic or not, default: False. The filtration unit does not support dynamic behavior, thus this must be False.
- has_holdup
Indicates whether holdup terms should be constructed or not. default: False. The filtration unit does not have defined volume, thus this must be False.
- material_balance_type
Indicates what type of mass balance should be constructed, default - MaterialBalanceType.useDefault. Valid values: { MaterialBalanceType.useDefault - refer to property package for default balance type **MaterialBalanceType.none - exclude material balances, MaterialBalanceType.componentPhase - use phase component balances, MaterialBalanceType.componentTotal - use total component balances, MaterialBalanceType.elementTotal - use total element balances, MaterialBalanceType.total - use total material balance.}
- 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.}
- 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 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.}
- chemical_additives
A dict of chemical additives used in coagulation process along with their molecular weights, the moles of salt produced per mole of chemical added, and the molecular weights of the salt produced by the chemical additive with the format of:
{'chem_name_1': {'parameter_data': { 'mw_additive': (value, units), 'moles_salt_per_mole_additive': value, 'mw_salt': (value, units) } }, 'chem_name_2': {'parameter_data': { 'mw_additive': (value, units), 'moles_salt_per_mole_additive': value, 'mw_salt': (value, units) } }, }
initialize (dict) – ProcessBlockData config for individual elements. Keys are BlockData indexes and values are dictionaries described under the “default” argument above.
idx_map (function) – Function to take the index of a BlockData element and return the index in the initialize dict from which to read arguments. This can be provided to overide the default behavior of matching the BlockData index exactly to the index in initialize.
- Returns
(CoagulationFlocculation) New instance
- class watertap.unit_models.coag_floc_model.CoagulationFlocculationData(component)[source]
Bases:
UnitModelBlockData
Zero order Coagulation-Flocculation model based on Jar Tests
- build()[source]
General build method for UnitModelBlockData. This method calls a number of sub-methods which automate the construction of expected attributes of unit models.
Inheriting models should call super().build.
- Parameters
None –
- Returns
None
- compute_inlet_tss_mass_concentration(t)[source]
Function to generate an expression that would represent the mass concentration of TSS at the inlet port of the unit. Inlet ports are generally established upstream, but this will be useful for establishing the inlet TSS when an upstream TSS is unknown. This level of inlet TSS is based off of measurements made of Turbidity during the Jar Test.
- Keyword Arguments
self – this unit model object
t – time index on the flowsheet
Returns: Expression
Recover the numeric value by using ‘value(Expression)’
- compute_inlet_tss_mass_flow(t)[source]
Function to generate an expression that would represent the mass flow rate of TSS at the inlet port of the unit. Inlet ports are generally established upstream, but this will be useful for establishing the inlet TSS when an upstream TSS is unknown. This level of inlet TSS is based off of measurements made of Turbidity during the Jar Test.
- Keyword Arguments
self – this unit model object
t – time index on the flowsheet
Returns: Expression
Recover the numeric value by using ‘value(Expression)’
- initialize_build(state_args=None, outlvl=0, solver=None, optarg=None)[source]
General wrapper for pressure changer 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)
solver – str indicating which solver to use during initialization (default = None)
Returns: None
watertap.unit_models.crystallizer module
- class watertap.unit_models.crystallizer.Crystallization(*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
default (dict) –
Default ProcessBlockData config
- Keys
- dynamic
Indicates whether this model will be dynamic or not, default = False. The filtration unit does not support dynamic behavior, thus this must be False.
- has_holdup
Indicates whether holdup terms should be constructed or not. default - False. The filtration unit does 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 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 described under the “default” argument above.
idx_map (function) – Function to take the index of a BlockData element and return the index in the initialize dict from which to read arguments. This can be provided to overide the default behavior of matching the BlockData index exactly to the index in initialize.
- Returns
(Crystallization) New instance
- class watertap.unit_models.crystallizer.CrystallizationData(component)[source]
Bases:
UnitModelBlockData
Zero order crystallization model
- build()[source]
General build method for UnitModelBlockData. This method calls a number of sub-methods which automate the construction of expected attributes of unit models.
Inheriting models should call super().build.
- Parameters
None –
- Returns
None
- initialize(state_args=None, outlvl=0, solver=None, optarg=None)[source]
General wrapper for pressure changer 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)
solver – str indicating which solver to use during initialization (default = None)
Returns: None
watertap.unit_models.electrodialysis_0D module
- class watertap.unit_models.electrodialysis_0D.Electrodialysis0D(*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
default (dict) –
Default ProcessBlockData config
- Keys
- dynamic
Indicates whether this model will be dynamic or not, default = False. The filtration unit does not support dynamic behavior, thus this must be False.
- has_holdup
Indicates whether holdup terms should be constructed or not. default - False. The filtration unit does not have defined volume, thus this must be False.
- operation_mode
The electrical operation mode. To be selected between Constant Current and Constant Voltage
- material_balance_type
Indicates what type of mass balance should be constructed, default - MaterialBalanceType.useDefault. Valid values: { MaterialBalanceType.useDefault - refer to property package for default balance type **MaterialBalanceType.none - exclude material balances, MaterialBalanceType.componentPhase - use phase component balances, MaterialBalanceType.componentTotal - use total component balances, MaterialBalanceType.elementTotal - use total element balances, MaterialBalanceType.total - use total material balance.}
- 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.}
- 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 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 described under the “default” argument above.
idx_map (function) – Function to take the index of a BlockData element and return the index in the initialize dict from which to read arguments. This can be provided to overide the default behavior of matching the BlockData index exactly to the index in initialize.
- Returns
(Electrodialysis0D) New instance
- class watertap.unit_models.electrodialysis_0D.Electrodialysis0DData(component)[source]
Bases:
UnitModelBlockData
0D Electrodialysis Model
- build()[source]
General build method for UnitModelBlockData. This method calls a number of sub-methods which automate the construction of expected attributes of unit models.
Inheriting models should call super().build.
- Parameters
None –
- Returns
None
- initialize_build(state_args=None, outlvl=0, solver=None, optarg=None)[source]
General wrapper for pressure changer 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)
solver – str indicating which solver to use during initialization (default = None)
Returns: None
watertap.unit_models.electrodialysis_1D module
- class watertap.unit_models.electrodialysis_1D.Electrodialysis1D(*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
default (dict) –
Default ProcessBlockData config
- Keys
- dynamic
Indicates whether this model will be dynamic or not, default = False. The filtration unit does not support dynamic behavior, thus this must be False.
- has_holdup
Indicates whether holdup terms should be constructed or not. default - False. The filtration unit does not have defined volume, thus this must be False.
- 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.}
- operation_mode
The electrical operation mode. To be selected between Constant Current and Constant Voltage
- material_balance_type
Indicates what type of mass balance should be constructed, default - MaterialBalanceType.useDefault. Valid values: { MaterialBalanceType.useDefault - refer to property package for default balance type **MaterialBalanceType.none - exclude material balances, MaterialBalanceType.componentPhase - use phase component balances, MaterialBalanceType.componentTotal - use total component balances, MaterialBalanceType.elementTotal - use total element balances, MaterialBalanceType.total - use total material balance.}
- 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.}
- 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 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 transforming domain. See Pyomo documentation for supported schemes.
- finite_elements
Number of finite elements to use when discretizing length domain (default=10)
- collocation_points
Number of collocation points to use per finite element when discretizing length domain (default=2)
initialize (dict) – ProcessBlockData config for individual elements. Keys are BlockData indexes and values are dictionaries described under the “default” argument above.
idx_map (function) – Function to take the index of a BlockData element and return the index in the initialize dict from which to read arguments. This can be provided to overide the default behavior of matching the BlockData index exactly to the index in initialize.
- Returns
(Electrodialysis1D) New instance
- class watertap.unit_models.electrodialysis_1D.Electrodialysis1DData(component)[source]
Bases:
UnitModelBlockData
1D Electrodialysis Model
- build()[source]
General build method for UnitModelBlockData. This method calls a number of sub-methods which automate the construction of expected attributes of unit models.
Inheriting models should call super().build.
- Parameters
None –
- Returns
None
- initialize_build(state_args=None, outlvl=0, solver=None, optarg=None, fail_on_warning=False, ignore_dof=False)[source]
General wrapper for electrodialysis_1D 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)
solver – str indicating which solver to use during initialization (default = None)
fail_on_warning – boolean argument to fail or only produce warning upon unsuccessful solve (default=False)
ignore_dof – boolean argument to ignore when DOF != 0 (default=False)
Returns: None
watertap.unit_models.gac module
- class watertap.unit_models.gac.FilmTransferCoefficientType(value)[source]
Bases:
Enum
An enumeration.
- class watertap.unit_models.gac.GAC(*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
default (dict) –
Default ProcessBlockData config
- Keys
- dynamic
Indicates whether this model will be dynamic or not, default = False. The filtration unit does not support dynamic behavior, thus this must be False.
- has_holdup
Indicates whether holdup terms should be constructed or not. default - False. The filtration unit does 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 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.}
- material_balance_type
Indicates what type of mass balance should be constructed, default - MaterialBalanceType.useDefault. Valid values: { MaterialBalanceType.useDefault - refer to property package for default balance type **MaterialBalanceType.none - exclude material balances, MaterialBalanceType.componentPhase - use phase component balances, MaterialBalanceType.componentTotal - use total component balances, MaterialBalanceType.elementTotal - use total element balances, MaterialBalanceType.total - use total material balance.}
- 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.}
- film_transfer_coefficient_type
Indicates whether the liquid phase film transfer rate will be calculated or fixed by the user default - FilmTransferCoefficientType.fixed. Valid values: { FilmTransferCoefficientType.fixed - user specifies film transfer rate, FilmTransferCoefficientType.calculated - calculates film transfer rate based on the Gnielinshi correlation}
- surface_diffusion_coefficient_type
Indicates whether the surface diffusion coefficient will be calculated or fixed by the user default - SurfaceDiffusionCoefficientType.fixed. Valid values: { SurfaceDiffusionCoefficientType.fixed - user specifies surface diffusion coefficient, SurfaceDiffusionCoefficientType.calculated - calculates surface diffusion coefficient}
initialize (dict) – ProcessBlockData config for individual elements. Keys are BlockData indexes and values are dictionaries described under the “default” argument above.
idx_map (function) – Function to take the index of a BlockData element and return the index in the initialize dict from which to read arguments. This can be provided to overide the default behavior of matching the BlockData index exactly to the index in initialize.
- Returns
(GAC) New instance
- class watertap.unit_models.gac.GACData(component)[source]
Bases:
UnitModelBlockData
Initial Granular Activated Carbon Model - currently should be used for only with ion_DSPMDE_prop_pack with a single solute and single solvent as water
- build()[source]
General build method for UnitModelBlockData. This method calls a number of sub-methods which automate the construction of expected attributes of unit models.
Inheriting models should call super().build.
- Parameters
None –
- Returns
None
- initialize_build(state_args=None, outlvl=0, solver=None, optarg=None)[source]
General wrapper for 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)
solver – str indicating which solver to use during initialization (default = None)
Returns: None
watertap.unit_models.nanofiltration_0D module
- class watertap.unit_models.nanofiltration_0D.NanoFiltration0D(*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
default (dict) –
Default ProcessBlockData config
- Keys
- dynamic
Indicates whether this model will be dynamic or not, default = False. NF units do not support dynamic behavior.
- has_holdup
Indicates whether holdup terms should be constructed or not. default - False. NF units do not have defined volume, thus this must be False.
- material_balance_type
Indicates what type of mass balance should be constructed, default - MaterialBalanceType.useDefault. Valid values: { MaterialBalanceType.useDefault - refer to property package for default balance type **MaterialBalanceType.none - exclude material balances, MaterialBalanceType.componentPhase - use phase component balances, MaterialBalanceType.componentTotal - use total component balances, MaterialBalanceType.elementTotal - use total element balances, MaterialBalanceType.total - use total material balance.}
- energy_balance_type
Indicates what type of energy balance should be constructed, default - EnergyBalanceType.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.}
- 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.}
- 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 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 described under the “default” argument above.
idx_map (function) – Function to take the index of a BlockData element and return the index in the initialize dict from which to read arguments. This can be provided to overide the default behavior of matching the BlockData index exactly to the index in initialize.
- Returns
(NanoFiltration0D) New instance
- class watertap.unit_models.nanofiltration_0D.NanoFiltrationData(component)[source]
Bases:
UnitModelBlockData
Standard NF Unit Model Class: - zero dimensional model - steady state only - single liquid phase only
- build()[source]
General build method for UnitModelBlockData. This method calls a number of sub-methods which automate the construction of expected attributes of unit models.
Inheriting models should call super().build.
- Parameters
None –
- Returns
None
- initialize_build(state_args=None, outlvl=0, solver=None, optarg=None)[source]
General wrapper for pressure changer 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)
solver – str indicating which solver to use during initialization (default = None)
Returns: None
watertap.unit_models.nanofiltration_DSPMDE_0D module
- class watertap.unit_models.nanofiltration_DSPMDE_0D.ConcentrationPolarizationType(value)[source]
Bases:
Enum
An enumeration.
- class watertap.unit_models.nanofiltration_DSPMDE_0D.MassTransferCoefficient(value)[source]
Bases:
Enum
An enumeration.
- class watertap.unit_models.nanofiltration_DSPMDE_0D.NanofiltrationDSPMDE0D(*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
default (dict) –
Default ProcessBlockData config
- Keys
- dynamic
Indicates whether this model will be dynamic or not, default = False. NF units do not support dynamic behavior.
- has_holdup
Indicates whether holdup terms should be constructed or not. default - False. NF units do not have defined volume, thus this must be False.
- material_balance_type
Indicates what type of mass balance should be constructed, default - MaterialBalanceType.useDefault. Valid values: { MaterialBalanceType.useDefault - refer to property package for default balance type **MaterialBalanceType.none - exclude material balances, MaterialBalanceType.componentPhase - use phase component balances, MaterialBalanceType.componentTotal - use total component balances, MaterialBalanceType.elementTotal - use total element balances, MaterialBalanceType.total - use total material balance.}
- 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.}
- 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.}
- 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 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.}
- mass_transfer_coefficient
Options to account for mass transfer coefficient.
default -
MassTransferCoefficient.fixed
Configuration Options
Description
MassTransferCoefficient.fixed
Specify an estimated value for the mass transfer coefficient in the feed channel
MassTransferCoefficient.spiral_wound
Allow model to perform calculation of mass transfer coefficient based on spiral wound module correlation
- concentration_polarization_type
Options to account for concentration polarization.
default -
ConcentrationPolarizationType.calculated
Configuration Options
Description
ConcentrationPolarizationType.none
Simplifying assumption to ignore concentration polarization
ConcentrationPolarizationType.calculated
Allow model to perform calculation of membrane-interface concentration
initialize (dict) – ProcessBlockData config for individual elements. Keys are BlockData indexes and values are dictionaries described under the “default” argument above.
idx_map (function) – Function to take the index of a BlockData element and return the index in the initialize dict from which to read arguments. This can be provided to overide the default behavior of matching the BlockData index exactly to the index in initialize.
- Returns
(NanofiltrationDSPMDE0D) New instance
- class watertap.unit_models.nanofiltration_DSPMDE_0D.NanofiltrationData(component)[source]
Bases:
UnitModelBlockData
Nanofiltration model based on Donnan Steric Pore Model with Dielectric Exclusion (DSPM-DE).
- Assumptions
Membrane electric potential at membrane interface is taken as reference (i.e., equal to 0)
References
Geraldes and Alves, 2008 (https://doi.org/10.1016/j.memsci.2008.04.054) Roy et al., 2015 (http://dx.doi.org/10.1016/j.memsci.2015.06.030) Labban et al., 2017 (http://dx.doi.org/10.1016/j.memsci.2016.08.062)
- build()[source]
General build method for UnitModelBlockData. This method calls a number of sub-methods which automate the construction of expected attributes of unit models.
Inheriting models should call super().build.
- Parameters
None –
- Returns
None
- initialize_build(initialize_guess=None, state_args=None, outlvl=0, solver=None, optarg=None, fail_on_warning=False, ignore_dof=False, automate_rescale=True)[source]
General wrapper for pressure changer initialization routines
- Keyword Arguments
initialize_guess – a dict of guesses for …. #TODO: revise as appropriate solvent_recovery, solute_recovery, and cp_modulus. These guesses offset the initial values for the retentate, permeate, and membrane interface state blocks from the inlet feed (default = {‘deltaP’: -1e4, ‘solvent_recovery’: 0.5, ‘solute_recovery’: 0.01, ‘cp_modulus’: 1.1})
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)
solver – str indicating which solver to use during initialization (default = None)
fail_on_warning – boolean argument to fail or only produce warning upon unsuccessful solve (default=False)
ignore_dof – boolean argument to ignore when DOF != 0 (default=False)
automate_rescale – boolean argument to automatically rescale poorly scaled vars
- Returns
None
watertap.unit_models.nanofiltration_ZO module
- class watertap.unit_models.nanofiltration_ZO.NanofiltrationData(component)[source]
Bases:
UnitModelBlockData
Zero order nanofiltration model based on specified water flux and ion rejection. Default data from Table 9 in Labban et al. (2017) https://doi.org/10.1016/j.memsci.2016.08.062
- build()[source]
General build method for UnitModelBlockData. This method calls a number of sub-methods which automate the construction of expected attributes of unit models.
Inheriting models should call super().build.
- Parameters
None –
- Returns
None
- initialize_build(state_args=None, outlvl=0, solver=None, optarg=None)[source]
General wrapper for pressure changer 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)
solver – str indicating which solver to use during initialization (default = None)
Returns: None
- class watertap.unit_models.nanofiltration_ZO.NanofiltrationZO(*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
default (dict) –
Default ProcessBlockData config
- Keys
- dynamic
Indicates whether this model will be dynamic or not, default = False. NF units do not support dynamic behavior.
- has_holdup
Indicates whether holdup terms should be constructed or not. default - False. NF units do not have defined volume, thus this must be False.
- material_balance_type
Indicates what type of mass balance should be constructed, default - MaterialBalanceType.useDefault. Valid values: { MaterialBalanceType.useDefault - refer to property package for default balance type **MaterialBalanceType.none - exclude material balances, MaterialBalanceType.componentPhase - use phase component balances, MaterialBalanceType.componentTotal - use total component balances, MaterialBalanceType.elementTotal - use total element balances, MaterialBalanceType.total - use total material balance.}
- energy_balance_type
Indicates what type of energy balance should be constructed, default - EnergyBalanceType.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.}
- 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.}
- 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 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 described under the “default” argument above.
idx_map (function) – Function to take the index of a BlockData element and return the index in the initialize dict from which to read arguments. This can be provided to overide the default behavior of matching the BlockData index exactly to the index in initialize.
- Returns
(NanofiltrationZO) New instance
watertap.unit_models.pressure_changer module
- class watertap.unit_models.pressure_changer.EnergyRecoveryDevice(*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
default (dict) –
Default ProcessBlockData config
- Keys
- dynamic
Indicates whether this model will be dynamic or not, default = useDefault. Valid values: { useDefault - get flag from parent (default = False), 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: { useDefault - get flag from parent (default = False), True - construct holdup terms, False - do not construct holdup terms}
- material_balance_type
Indicates what type of mass balance should be constructed, default - MaterialBalanceType.useDefault. Valid values: { MaterialBalanceType.useDefault - refer to property package for default balance type **MaterialBalanceType.none - exclude material balances, MaterialBalanceType.componentPhase - use phase component balances, MaterialBalanceType.componentTotal - use total component balances, MaterialBalanceType.elementTotal - use total element balances, MaterialBalanceType.total - use total material balance.}
- energy_balance_type
Indicates what type of energy balance should be constructed, default - EnergyBalanceType.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.}
- has_phase_equilibrium
Indicates whether terms for phase equilibrium should be constructed, default = False. Valid values: { True - include phase equilibrium terms False - exclude phase equilibrium terms.}
- compressor
Indicates whether this unit should be considered a compressor (True (default), pressure increase) or an expander (False, pressure decrease).
- thermodynamic_assumption
Flag to set the thermodynamic assumption to use for the unit. - ThermodynamicAssumption.isothermal (default) - ThermodynamicAssumption.isentropic - ThermodynamicAssumption.pump - ThermodynamicAssumption.adiabatic
- 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.}
- support_isentropic_performance_curves
Include a block for performance curves, configure via isentropic_performance_curves.
- isentropic_performance_curves
Configuration dictionary for the performance curve block.
- build_callback
Optional callback to add performance curve constraints
- build_head_expressions
If true add expressions for ‘head’ and ‘head_isentropic’. These expressions can be used in performance curve constraints.
initialize (dict) – ProcessBlockData config for individual elements. Keys are BlockData indexes and values are dictionaries described under the “default” argument above.
idx_map (function) – Function to take the index of a BlockData element and return the index in the initialize dict from which to read arguments. This can be provided to overide the default behavior of matching the BlockData index exactly to the index in initialize.
- Returns
(EnergyRecoveryDevice) New instance
- class watertap.unit_models.pressure_changer.EnergyRecoveryDeviceData(component)[source]
Bases:
PumpIsothermalData
Turbine-type isothermal energy recovery device
- class watertap.unit_models.pressure_changer.Pump(*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
default (dict) –
Default ProcessBlockData config
- Keys
- dynamic
Indicates whether this model will be dynamic or not, default = useDefault. Valid values: { useDefault - get flag from parent (default = False), 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: { useDefault - get flag from parent (default = False), True - construct holdup terms, False - do not construct holdup terms}
- material_balance_type
Indicates what type of mass balance should be constructed, default - MaterialBalanceType.useDefault. Valid values: { MaterialBalanceType.useDefault - refer to property package for default balance type **MaterialBalanceType.none - exclude material balances, MaterialBalanceType.componentPhase - use phase component balances, MaterialBalanceType.componentTotal - use total component balances, MaterialBalanceType.elementTotal - use total element balances, MaterialBalanceType.total - use total material balance.}
- energy_balance_type
Indicates what type of energy balance should be constructed, default - EnergyBalanceType.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.}
- has_phase_equilibrium
Indicates whether terms for phase equilibrium should be constructed, default = False. Valid values: { True - include phase equilibrium terms False - exclude phase equilibrium terms.}
- compressor
Indicates whether this unit should be considered a compressor (True (default), pressure increase) or an expander (False, pressure decrease).
- thermodynamic_assumption
Flag to set the thermodynamic assumption to use for the unit. - ThermodynamicAssumption.isothermal (default) - ThermodynamicAssumption.isentropic - ThermodynamicAssumption.pump - ThermodynamicAssumption.adiabatic
- 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.}
- support_isentropic_performance_curves
Include a block for performance curves, configure via isentropic_performance_curves.
- isentropic_performance_curves
Configuration dictionary for the performance curve block.
- build_callback
Optional callback to add performance curve constraints
- build_head_expressions
If true add expressions for ‘head’ and ‘head_isentropic’. These expressions can be used in performance curve constraints.
initialize (dict) – ProcessBlockData config for individual elements. Keys are BlockData indexes and values are dictionaries described under the “default” argument above.
idx_map (function) – Function to take the index of a BlockData element and return the index in the initialize dict from which to read arguments. This can be provided to overide the default behavior of matching the BlockData index exactly to the index in initialize.
- Returns
(Pump) New instance
watertap.unit_models.pressure_exchanger module
- class watertap.unit_models.pressure_exchanger.PressureExchanger(*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
default (dict) –
Default ProcessBlockData config
- Keys
- dynamic
Indicates whether this model will be dynamic or not, default = False. Pressure exchangers do not support dynamic behavior.
- has_holdup
Indicates whether holdup terms should be constructed or not. default - False. Pressure exchangers do not have defined volume, thus this must be False.
- material_balance_type
Indicates what type of mass balance should be constructed, default - MaterialBalanceType.useDefault. Valid values: { MaterialBalanceType.useDefault - refer to property package for default balance type **MaterialBalanceType.none - exclude material balances, MaterialBalanceType.componentPhase - use phase component balances, MaterialBalanceType.componentTotal - use total component balances, MaterialBalanceType.elementTotal - use total element balances, MaterialBalanceType.total - use total material balance.}
- energy_balance_type
Indicates what type of energy balance should be constructed, default - EnergyBalanceType.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.}
- 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 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.}
- has_mass_transfer
Indicates whether pressure exchanger solution mass transfer terms should be constructed or not. default - False.
initialize (dict) – ProcessBlockData config for individual elements. Keys are BlockData indexes and values are dictionaries described under the “default” argument above.
idx_map (function) – Function to take the index of a BlockData element and return the index in the initialize dict from which to read arguments. This can be provided to overide the default behavior of matching the BlockData index exactly to the index in initialize.
- Returns
(PressureExchanger) New instance
- class watertap.unit_models.pressure_exchanger.PressureExchangerData(component)[source]
Bases:
UnitModelBlockData
Standard Pressure Exchanger Unit Model Class: - steady state only
- build()[source]
General build method for UnitModelBlockData. This method calls a number of sub-methods which automate the construction of expected attributes of unit models.
Inheriting models should call super().build.
- Parameters
None –
- Returns
None
- initialize_build(state_args=None, routine=None, outlvl=0, solver=None, optarg=None)[source]
General wrapper for pressure exchanger initialization routine
- Keyword Arguments
routine – str stating which initialization routine to execute * None - currently no specialized routine for Pressure exchanger unit
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 (default=idaeslog.NOTSET)
optarg – solver options dictionary object, if None provided an empty dictionary will be used (default=None)
solver – solver object or string indicating which solver to use during initialization, if None provided the default solver will be used (default = None)
Returns: None
watertap.unit_models.reverse_osmosis_0D module
- class watertap.unit_models.reverse_osmosis_0D.ReverseOsmosis0D(*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
default (dict) –
Default ProcessBlockData config
- Keys
- 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 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.}
- material_balance_type
Indicates what type of mass balance should be constructed, default - MaterialBalanceType.useDefault. Valid values: { MaterialBalanceType.useDefault - refer to property package for default balance type **MaterialBalanceType.none - exclude material balances, MaterialBalanceType.componentPhase - use phase component balances, MaterialBalanceType.componentTotal - use total component balances, MaterialBalanceType.elementTotal - use total element balances, MaterialBalanceType.total - use total material balance.}
- energy_balance_type
Indicates what type of energy balance should be constructed. default - EnergyBalanceType.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.}
- 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 keywordhas_pressure_change
must also be set toTrue
. 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
- has_full_reporting
Level of reporting results. default - False. Valid values: { False - include minimal reporting of results, True - report additional properties of interest that aren’t constructed by the unit model by default. Also, report averaged expression values
initialize (dict) – ProcessBlockData config for individual elements. Keys are BlockData indexes and values are dictionaries described under the “default” argument above.
idx_map (function) – Function to take the index of a BlockData element and return the index in the initialize dict from which to read arguments. This can be provided to overide the default behavior of matching the BlockData index exactly to the index in initialize.
- Returns
(ReverseOsmosis0D) New instance
- class watertap.unit_models.reverse_osmosis_0D.ReverseOsmosisData(component)[source]
Bases:
_ReverseOsmosisBaseData
Standard RO Unit Model Class: - zero dimensional model - steady state only - single liquid phase only
- initialize_build(initialize_guess=None, state_args=None, outlvl=0, solver=None, optarg=None, fail_on_warning=False, ignore_dof=False)[source]
General wrapper for RO initialization routines
- Keyword Arguments
initialize_guess – a dict of guesses for solvent_recovery, solute_recovery, and cp_modulus. These guesses offset the initial values for the retentate, permeate, and membrane interface state blocks from the inlet feed (default = {‘deltaP’: -1e4, ‘solvent_recovery’: 0.5, ‘solute_recovery’: 0.01, ‘cp_modulus’: 1.1})
state_args – a dict of arguments to be passed to the property package(s) to provide an initial state for the inlet feed side state block (see documentation of the specific property package) (default = None).
outlvl – sets output level of initialization routine
optarg – solver options dictionary object (default=None)
solver – solver object or string indicating which solver to use during initialization, if None provided the default solver will be used (default = None)
fail_on_warning – boolean argument to fail or only produce warning upon unsuccessful solve (default=False)
ignore_dof – boolean argument to ignore when DOF != 0 (default=False)
- Returns
None
watertap.unit_models.reverse_osmosis_1D module
- class watertap.unit_models.reverse_osmosis_1D.ReverseOsmosis1D(*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
default (dict) –
Default ProcessBlockData config
- Keys
- 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 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.}
- material_balance_type
Indicates what type of mass balance should be constructed, default - MaterialBalanceType.useDefault. Valid values: { MaterialBalanceType.useDefault - refer to property package for default balance type **MaterialBalanceType.none - exclude material balances, MaterialBalanceType.componentPhase - use phase component balances, MaterialBalanceType.componentTotal - use total component balances, MaterialBalanceType.elementTotal - use total element balances, MaterialBalanceType.total - use total material balance.}
- energy_balance_type
Indicates what type of energy balance should be constructed. default - EnergyBalanceType.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.}
- 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 keywordhas_pressure_change
must also be set toTrue
. 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
- has_full_reporting
Level of reporting results. default - False. Valid values: { False - include minimal reporting of results, True - report additional properties of interest that aren’t constructed by the unit model by default. Also, report averaged expression values
- 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 transforming 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=5)
initialize (dict) – ProcessBlockData config for individual elements. Keys are BlockData indexes and values are dictionaries described under the “default” argument above.
idx_map (function) – Function to take the index of a BlockData element and return the index in the initialize dict from which to read arguments. This can be provided to overide the default behavior of matching the BlockData index exactly to the index in initialize.
- Returns
(ReverseOsmosis1D) New instance
- class watertap.unit_models.reverse_osmosis_1D.ReverseOsmosis1DData(component)[source]
Bases:
_ReverseOsmosisBaseData
Standard 1D Reverse Osmosis Unit Model Class.
- initialize_build(initialize_guess=None, state_args=None, outlvl=0, solver=None, optarg=None, fail_on_warning=False, ignore_dof=False)[source]
Initialization routine for 1D-RO unit.
- Keyword Arguments
initialize_guess – a dict of guesses for solvent_recovery, solute_recovery, and cp_modulus. These guesses offset the initial values for the retentate, permeate, and membrane interface state blocks from the inlet feed (default = {‘deltaP’: -1e4, ‘solvent_recovery’: 0.5, ‘solute_recovery’: 0.01, ‘cp_modulus’: 1.1})
state_args – a dict of arguments to be passed to the property package(s) to provide an initial state for the inlet feed side state block (see documentation of the specific property package) (default = None).
outlvl – sets output level of initialization routine
solver – str indicating which solver to use during initialization (default = None, use default solver)
optarg – solver options dictionary object (default=None, use default solver options)
fail_on_warning – boolean argument to fail or only produce warning upon unsuccessful solve (default=False)
ignore_dof – boolean argument to ignore when DOF != 0 (default=False)
- Returns
None
watertap.unit_models.uv_aop module
- class watertap.unit_models.uv_aop.Ultraviolet0D(*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
default (dict) –
Default ProcessBlockData config
- Keys
- dynamic
Indicates whether this model will be dynamic or not, default = False. UV units do not support dynamic behavior.
- has_holdup
Indicates whether holdup terms should be constructed or not. default - False. UV units do not have defined volume, thus this must be False.
- material_balance_type
Indicates what type of mass balance should be constructed, default - MaterialBalanceType.useDefault. Valid values: { MaterialBalanceType.useDefault - refer to property package for default balance type **MaterialBalanceType.none - exclude material balances, MaterialBalanceType.componentPhase - use phase component balances, MaterialBalanceType.componentTotal - use total component balances, MaterialBalanceType.elementTotal - use total element balances, MaterialBalanceType.total - use total material balance.}
- energy_balance_type
Indicates what type of energy balance should be constructed, default - EnergyBalanceType.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.}
- 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.}
- 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 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 described under the “default” argument above.
idx_map (function) – Function to take the index of a BlockData element and return the index in the initialize dict from which to read arguments. This can be provided to overide the default behavior of matching the BlockData index exactly to the index in initialize.
- Returns
(Ultraviolet0D) New instance
- class watertap.unit_models.uv_aop.Ultraviolet0DData(component)[source]
Bases:
UnitModelBlockData
Standard UV Unit Model Class: - zero dimensional model - steady state only - single liquid phase only
- build()[source]
General build method for UnitModelBlockData. This method calls a number of sub-methods which automate the construction of expected attributes of unit models.
Inheriting models should call super().build.
- Parameters
None –
- Returns
None
- initialize_build(state_args=None, outlvl=0, solver=None, optarg=None)[source]
General wrapper for pressure changer 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)
solver – str indicating which solver to use during initialization (default = None)
Returns: None