Pumping#
QSDsan: Quantitative Sustainable Design for sanitation and resource recovery systems
This module is developed by:
Yalin Li <mailto.yalin.li@gmail.com>
Joy Zhang <joycheung1994@gmail.com>
Jianan Feng <jiananf2@illinois.edu>
Part of this module is based on the biosteam package: https://github.com/BioSTEAMDevelopmentGroup/biosteam
This module is under the University of Illinois/NCSA Open Source License. Please refer to https://github.com/QSD-Group/QSDsan/blob/main/LICENSE.txt for license details.
- class qsdsan.sanunits._pumping.HydraulicDelay(ID='', ins: Sequence[Stream] | None = None, outs: Sequence[Stream] | None = (), thermo=None, t_delay=0.0001, *, init_with='WasteStream', F_BM_default=None, isdynamic=True)#
A fake unit for implementing hydraulic delay by a first-order reaction (i.e., a low-pass filter) with a specified time constant [d].
See also
Benchmark Simulation Model No.1 implemented in MATLAB & Simulink <https://www.cs.mcgill.ca/~hv/articles/WWTP/sim_manual.pdf>
- F_BM: dict[str, float]#
All bare-module factors for each purchase cost. Defaults to values in the class attribute
_F_BM_default
.
- F_D: dict[str, float]#
All design factors for each purchase cost item in
baseline_purchase_costs
.
- F_M: dict[str, float]#
All material factors for each purchase cost item in
baseline_purchase_costs
.
- F_P: dict[str, float]#
All pressure factors for each purchase cost item in
baseline_purchase_costs
.
- baseline_purchase_costs: dict[str, float]#
All baseline purchase costs without accounting for design, pressure, and material factors.
- design_results: dict[str, object]#
All design requirements excluding utility requirements and detailed auxiliary unit requirements.
- equipment_lifetime: int | dict[str, int]#
Lifetime of equipment. Defaults to values in the class attribute
_default_equipment_lifetime
. Use an integer to specify the lifetime for all items in the unit purchase costs. Use a dictionary to specify the lifetime of each purchase cost item.
- heat_utilities: tuple[HeatUtility, ...]#
All heat utilities associated to unit. Cooling and heating requirements are stored here (including auxiliary requirements).
- installed_costs: dict[str, float]#
All installed costs accounting for bare module, design, pressure, and material factors. Items here are automatically updated at the end of unit simulation.
- line: str = 'Hydraulic delay'#
class-attribute Name denoting the type of Unit class. Defaults to the class name of the first child class
- parallel: dict[str, int]#
Name-number pairs of baseline purchase costs and auxiliary unit operations in parallel. Use ‘self’ to refer to the main unit. Capital and heat and power utilities in parallel will become proportional to this value.
- power_utility: PowerUtility#
Electric utility associated to unit (including auxiliary requirements).
- prioritize: bool#
Whether to prioritize unit operation specification within recycle loop (if any).
- purchase_costs: dict[str, float]#
Itemized purchase costs (including auxiliary units) accounting for design, pressure, and material factors (i.e.,
F_D
,F_P
,F_M
). Items here are automatically updated at the end of unit simulation.
- responses: set[bst.GenericResponse]#
Unit design decisions that must be solved to satisfy specifications. While adding responses is optional, simulations benefit from responses by being able to predict better guesses.
- run_after_specifications: bool#
Whether to run mass and energy balance after calling specification functions
- set_init_conc(**kwargs)#
set the initial concentrations [mg/L].
- class qsdsan.sanunits._pumping.Pump(ID='', ins: Sequence[Stream] | None = None, outs: Sequence[Stream] | None = (), thermo=None, *, P=None, pump_type='Default', material='Cast iron', dP_design=101325, ignore_NPSH=True, init_with='Stream', F_BM_default=None, isdynamic=False)#
Similar to the
biosteam.units.Pump
, but can be initialized withqsdsan.SanStream
andqsdsan.WasteStream
, and allows dynamic simulation.See also
- F_BM: dict[str, float]#
All bare-module factors for each purchase cost. Defaults to values in the class attribute
_F_BM_default
.
- F_D: dict[str, float]#
All design factors for each purchase cost item in
baseline_purchase_costs
.
- F_M: dict[str, float]#
All material factors for each purchase cost item in
baseline_purchase_costs
.
- F_P: dict[str, float]#
All pressure factors for each purchase cost item in
baseline_purchase_costs
.
- baseline_purchase_costs: dict[str, float]#
All baseline purchase costs without accounting for design, pressure, and material factors.
- design_results: dict[str, object]#
All design requirements excluding utility requirements and detailed auxiliary unit requirements.
- equipment_lifetime: int | dict[str, int]#
Lifetime of equipment. Defaults to values in the class attribute
_default_equipment_lifetime
. Use an integer to specify the lifetime for all items in the unit purchase costs. Use a dictionary to specify the lifetime of each purchase cost item.
- heat_utilities: tuple[HeatUtility, ...]#
All heat utilities associated to unit. Cooling and heating requirements are stored here (including auxiliary requirements).
- installed_costs: dict[str, float]#
All installed costs accounting for bare module, design, pressure, and material factors. Items here are automatically updated at the end of unit simulation.
- line: str = 'Pump'#
class-attribute Name denoting the type of Unit class. Defaults to the class name of the first child class
- parallel: dict[str, int]#
Name-number pairs of baseline purchase costs and auxiliary unit operations in parallel. Use ‘self’ to refer to the main unit. Capital and heat and power utilities in parallel will become proportional to this value.
- power_utility: PowerUtility#
Electric utility associated to unit (including auxiliary requirements).
- prioritize: bool#
Whether to prioritize unit operation specification within recycle loop (if any).
- purchase_costs: dict[str, float]#
Itemized purchase costs (including auxiliary units) accounting for design, pressure, and material factors (i.e.,
F_D
,F_P
,F_M
). Items here are automatically updated at the end of unit simulation.
- responses: set[bst.GenericResponse]#
Unit design decisions that must be solved to satisfy specifications. While adding responses is optional, simulations benefit from responses by being able to predict better guesses.
- run_after_specifications: bool#
Whether to run mass and energy balance after calling specification functions
- property state#
The state of the Pump, including component concentrations [mg/L] and flow rate [m^3/d].
- class qsdsan.sanunits._pumping.SludgePump(ID='', ins: Sequence[Stream] | None = None, outs: Sequence[Stream] | None = (), thermo=None, *, P=None, pump_type='Default', material='Cast iron', dP_design=101325, ignore_NPSH=True, init_with='Stream', F_BM_default=None, isdynamic=False)#
Pumps used in HTL system See qsdsan.sanunits.WWTpump for pipe and pump weight calculation See bst.units.Pump for other functions All pumps are assumed to be made of stainless steel and specific for sludge.
- Parameters:
P (float) – pump pressure
References
- [1] Shoener et al., Design of Anaerobic Membrane Bioreactors for the
Valorization of Dilute Organic Carbon Waste Streams. Energy Environ. Sci. 2016, 9 (3), 1102–1112. https://doi.org/10.1039/C5EE03715H.
See also
qsdsan.sanunits.WWTpump
,biosteam.units.Pump
- property C#
[float] Hazen-Williams coefficient to calculate fluid friction.
- F_BM: dict[str, float]#
All bare-module factors for each purchase cost. Defaults to values in the class attribute
_F_BM_default
.
- F_D: dict[str, float]#
All design factors for each purchase cost item in
baseline_purchase_costs
.
- F_M: dict[str, float]#
All material factors for each purchase cost item in
baseline_purchase_costs
.
- F_P: dict[str, float]#
All pressure factors for each purchase cost item in
baseline_purchase_costs
.
- property H_p#
[float] Pressure head, [ft].
- property H_ts#
[float] Total static head, [ft].
- property Q_cfs#
[float] Volumetric flow rate in cubic feet per second, [cfs].
- property Q_mgd#
[float] Volumetric flow rate in million gallon per day, [mgd]. Will use total volumetric flow through the unit if not provided.
- property SS_per_pump#
[float] Quantity of stainless steel per pump, [kg/ea].
- baseline_purchase_costs: dict[str, float]#
All baseline purchase costs without accounting for design, pressure, and material factors.
- design_results: dict[str, object]#
All design requirements excluding utility requirements and detailed auxiliary unit requirements.
- design_sludge(Q_mgd=None, N_pump=None, **kwargs)#
Design pump for handling waste sludge.
- Parameters:
Q_mgd (float) – Volumetric flow rate in million gallon per day, [mgd].
N_pump (int) – Number of the pumps.
kwargs (dict) – Additional attribute values to set (e.g., L_s, H_ts), this will overwrite the default values.
- equipment_lifetime: int | dict[str, int]#
Lifetime of equipment. Defaults to values in the class attribute
_default_equipment_lifetime
. Use an integer to specify the lifetime for all items in the unit purchase costs. Use a dictionary to specify the lifetime of each purchase cost item.
- heat_utilities: tuple[HeatUtility, ...]#
All heat utilities associated to unit. Cooling and heating requirements are stored here (including auxiliary requirements).
- installed_costs: dict[str, float]#
All installed costs accounting for bare module, design, pressure, and material factors. Items here are automatically updated at the end of unit simulation.
- line: str = 'Sludge pump'#
class-attribute Name denoting the type of Unit class. Defaults to the class name of the first child class
- parallel: dict[str, int]#
Name-number pairs of baseline purchase costs and auxiliary unit operations in parallel. Use ‘self’ to refer to the main unit. Capital and heat and power utilities in parallel will become proportional to this value.
- power_utility: PowerUtility#
Electric utility associated to unit (including auxiliary requirements).
- prioritize: bool#
Whether to prioritize unit operation specification within recycle loop (if any).
- purchase_costs: dict[str, float]#
Itemized purchase costs (including auxiliary units) accounting for design, pressure, and material factors (i.e.,
F_D
,F_P
,F_M
). Items here are automatically updated at the end of unit simulation.
- responses: set[bst.GenericResponse]#
Unit design decisions that must be solved to satisfy specifications. While adding responses is optional, simulations benefit from responses by being able to predict better guesses.
- run_after_specifications: bool#
Whether to run mass and energy balance after calling specification functions
- property v#
[float] Fluid velocity, [ft/s].
- class qsdsan.sanunits._pumping.WWTpump(ID='', ins: Sequence[Stream] | None = None, outs: Sequence[Stream] | None = (), thermo=None, init_with='WasteStream', prefix='', pump_type='', Q_mgd=None, add_inputs=(), capacity_factor=1.0, include_pump_cost=True, include_building_cost=False, include_OM_cost=False, F_BM={'Pump': 1.1800826, 'Pump building': 1.1800826}, lifetime={'Pump': 15, 'Pump chemical storage HDPE': 30, 'Pump pipe stainless steel': 15, 'Pump stainless steel': 15}, **kwargs)#
Generic class for pumps used in wastewater treatment, all pumps are assumed be made of stainless steel.
This class is intended to be used as a part of other units (e.g.,
AnMBR
), but it can be used as a standalone unit.Note that pump building concrete usage and excavation is not included here as pumps are often housed together with the reactors.
- Parameters:
prefix (str) – If provided, all keys in design and cost dicts will be prefixed with the provided string.
pump_type (str) –
The type of the pump that determines the design algorithms to use. The following types are valid:
”permeate_cross-flow”
”retentate_CSTR”
”retentate_AF”
”recirculation_CSTR”
”recirculation_AF”
”lift”
”sludge”
”chemical”
”” (i.e., empty)
When left as empty, the generic algorithm will be used and the following values should be included in add_inputs (in this order):
N_pump: number of pumps
L_s: pipe length of the suction side, [ft]
L_d: pipe length of the discharge side, [ft]
H_ts: total static head, [ft]
H_p: pressure head, [ft]
Q_mgd (float) – Volumetric flow rate in million gallon per day, [mgd]. Will use total volumetric flow through the unit if not provided.
add_inputs (Iterable) – Additional inputs that will be passed to the corresponding design algorithm. Check the documentation of for the corresponding pump type for the design algorithm of the specific input requirements.
capacity_factor (float) – A safety factor to handle peak flows.
include_pump_cost (bool) – Whether to include pump cost.
include_building_cost (bool) – Whether to include the cost of the pump building.
include_OM_cost (bool) – Whether to include the operating and maintenance cost of the pump.
F_BM (dict) – Bare module factors of the individual equipment.
lifetime (dict) – Lifetime of the individual equipment.
kwargs (dict) – Other attributes to be set.
References
- [1] Shoener et al., Design of Anaerobic Membrane Bioreactors for the
Valorization of Dilute Organic Carbon Waste Streams. Energy Environ. Sci. 2016, 9 (3), 1102–1112. https://doi.org/10.1039/C5EE03715H.
See also
- property BHP#
[float] Brake horsepower, [hp].
- property C#
[float] Hazen-Williams coefficient to calculate fluid friction.
- F_BM: dict[str, float]#
All bare-module factors for each purchase cost. Defaults to values in the class attribute
_F_BM_default
.
- F_D: dict[str, float]#
All design factors for each purchase cost item in
baseline_purchase_costs
.
- F_M: dict[str, float]#
All material factors for each purchase cost item in
baseline_purchase_costs
.
- F_P: dict[str, float]#
All pressure factors for each purchase cost item in
baseline_purchase_costs
.
- property H_df#
[float] Discharge friction head, [ft].
- property H_p#
[float] Pressure head, [ft].
- property H_sf#
[float] Suction friction head, [ft].
- property H_ts#
[float] Total static head, [ft].
- property N_pump#
[int] Number of pumps.
- property Q_cfs#
[float] Volumetric flow rate in cubic feet per second, [cfs].
- property Q_cmd#
[float] Volumetric flow rate in cubic meter per day, [cmd].
- property Q_gpm#
[float] Volumetric flow rate in gallon per minute, [gpm].
- property Q_mgd#
[float] Volumetric flow rate in million gallon per day, [mgd]. Will use total volumetric flow through the unit if not provided.
- property SS_per_pump#
[float] Quantity of stainless steel per pump, [kg/ea].
- property TDH#
[float] Total dynamic head, [ft].
- baseline_purchase_costs: dict[str, float]#
All baseline purchase costs without accounting for design, pressure, and material factors.
- property brake_efficiency#
[float] Brake efficiency.
- property building_unit_cost#
[float] Unit cost of the pump building, [USD/ft2].
- property capacity_factor#
[float] A safety factor to handle peak flow.
- design_chemical(Q_mgd=None, N_pump=None, **kwargs)#
Design pump for membrane cleaning chemicals (NaOCl and citric acid), storage containers are included, and are assumed to be cubic in shape and made of HDPE.
Parameters defined through the add_inputs argument upon initialization of this unit (Q_mgd listed separately) will be used if not provided when calling this function.
- Parameters:
Q_mgd (float) – Volumetric flow rate in million gallon per day, [mgd].
N_pump (int) – Number of the pumps.
kwargs (dict) – Additional attribute values to set (e.g., L_s, H_ts), this will overwrite the default values.
- design_lift(Q_mgd=None, N_pump=None, D=None, **kwargs)#
Design pump for the filter tank to lift streams.
Parameters defined through the add_inputs argument upon initialization of this unit (Q_mgd listed separately) will be used if not provided when calling this function.
- Parameters:
Q_mgd (float) – Volumetric flow rate in million gallon per day, [mgd].
N_pump (int) – Number of the pumps.
D (float) – Depth of the filter tank, [ft].
kwargs (dict) – Additional attribute values to set (e.g., L_s, H_ts), this will overwrite the default values.
- design_permeate_cross_flow(Q_mgd=None, N_pump=None, D=None, TMP=None, include_aerobic_filter=False, **kwargs)#
Design pump for the permeate stream of cross-flow membrane configuration.
Parameters defined through the add_inputs argument upon initialization of this unit (Q_mgd listed separately) will be used if not provided when calling this function.
- Parameters:
Q_mgd (float) – Volumetric flow rate in million gallon per day, [mgd].
N_pump (int) – Number of the pumps.
D (float) – Depth of the reactor, [ft].
TMP (float) – Transmembrane pressure, [psi].
include_aerobic_filter (bool) – Whether aerobic filter is included in the reactor design, additional head will be added if the filter is included.
kwargs (dict) – Additional attribute values to set (e.g., L_s, H_ts), this will overwrite the default values.
- design_recirculation_AF(Q_mgd=None, N_pump=None, d=None, D=None, **kwargs)#
Design pump for the recirculation stream of AF reactors.
Parameters defined through the add_inputs argument upon initialization of this unit (Q_mgd listed separately) will be used if not provided when calling this function.
- Parameters:
Q_mgd (float) – Volumetric flow rate in million gallon per day, [mgd].
N_pump (int) – Number of the pumps.
d (float) – Diameter (or width) of the reactor, [ft].
D (float) – Depth of the reactor, [ft].
kwargs (dict) – Additional attribute values to set (e.g., L_s, H_ts), this will overwrite the default values.
- design_recirculation_CSTR(Q_mgd=None, N_pump=None, L=None, **kwargs)#
Design pump for the recirculation stream of reactors.
Parameters defined through the add_inputs argument upon initialization of this unit (Q_mgd listed separately) will be used if not provided when calling this function.
- Parameters:
Q_mgd (float) – Volumetric flow rate in million gallon per day, [mgd].
N_pump (int) – Number of the pumps.
L (float) – Length of the reactor, [ft].
kwargs (dict) – Additional attribute values to set (e.g., L_s, H_ts), this will overwrite the default values.
- design_results: dict[str, object]#
All design requirements excluding utility requirements and detailed auxiliary unit requirements.
- design_retentate_AF(Q_mgd=None, N_pump=None, D=None, **kwargs)#
Design pump for the retentate stream of AF reactors.
Parameters defined through the add_inputs argument upon initialization of this unit (Q_mgd listed separately) will be used if not provided when calling this function.
- Parameters:
Q_mgd (float) – Volumetric flow rate in million gallon per day, [mgd].
N_pump (int) – Number of the pumps.
D (float) – Depth of the reactor, [ft].
kwargs (dict) – Additional attribute values to set (e.g., L_s, H_ts), this will overwrite the default values.
- design_retentate_CSTR(Q_mgd=None, N_pump=None, **kwargs)#
Design pump for the retent stream of CSTR reactors.
Parameters defined through the add_inputs argument upon initialization of this unit (Q_mgd listed separately) will be used if not provided when calling this function.
- Parameters:
Q_mgd (float) – Volumetric flow rate in million gallon per day, [mgd].
N_pump (int) – Number of the pumps.
kwargs (dict) – Additional attribute values to set (e.g., L_s, H_ts), this will overwrite the default values.
- design_sludge(Q_mgd=None, N_pump=None, **kwargs)#
Design pump for handling waste sludge.
- Parameters:
Q_mgd (float) – Volumetric flow rate in million gallon per day, [mgd].
N_pump (int) – Number of the pumps.
kwargs (dict) – Additional attribute values to set (e.g., L_s, H_ts), this will overwrite the default values.
- equipment_lifetime: int | dict[str, int]#
Lifetime of equipment. Defaults to values in the class attribute
_default_equipment_lifetime
. Use an integer to specify the lifetime for all items in the unit purchase costs. Use a dictionary to specify the lifetime of each purchase cost item.
- heat_utilities: tuple[HeatUtility, ...]#
All heat utilities associated to unit. Cooling and heating requirements are stored here (including auxiliary requirements).
- installed_costs: dict[str, float]#
All installed costs accounting for bare module, design, pressure, and material factors. Items here are automatically updated at the end of unit simulation.
- line: str = 'WWTpump'#
class-attribute Name denoting the type of Unit class. Defaults to the class name of the first child class
- property motor_efficiency#
[float] Motor efficiency.
- parallel: dict[str, int]#
Name-number pairs of baseline purchase costs and auxiliary unit operations in parallel. Use ‘self’ to refer to the main unit. Capital and heat and power utilities in parallel will become proportional to this value.
- power_utility: PowerUtility#
Electric utility associated to unit (including auxiliary requirements).
- prioritize: bool#
Whether to prioritize unit operation specification within recycle loop (if any).
- property pump_type#
[str] The type of the pump that determines the design algorithms to use. Use valid_pump_type to see acceptable pump types.
- purchase_costs: dict[str, float]#
Itemized purchase costs (including auxiliary units) accounting for design, pressure, and material factors (i.e.,
F_D
,F_P
,F_M
). Items here are automatically updated at the end of unit simulation.
- responses: set[bst.GenericResponse]#
Unit design decisions that must be solved to satisfy specifications. While adding responses is optional, simulations benefit from responses by being able to predict better guesses.
- run_after_specifications: bool#
Whether to run mass and energy balance after calling specification functions
- property v#
[float] Fluid velocity, [ft/s].
- property valid_pump_types#
[tuple] Acceptable pump types.
- qsdsan.sanunits._pumping.wwtpump(ID, ins=(), prefix='', pump_type='', Q_mgd=None, add_inputs=(), capacity_factor=1.0, include_pump_cost=True, include_building_cost=False, include_OM_cost=False, F_BM=1.1800826, lifetime={'Pump': 15, 'Pump chemical storage HDPE': 30, 'Pump pipe stainless steel': 15, 'Pump stainless steel': 15}, **kwargs)#
Handy decorator to add a
WWTpump
as an attribute of aqsdsan.SanUnit
.Refer to class:WWTpump for the parameters needed for using this decorator.
References
- [1] Shoener et al., Design of Anaerobic Membrane Bioreactors for the
Valorization of Dilute Organic Carbon Waste Streams. Energy Environ. Sci. 2016, 9 (3), 1102–1112. https://doi.org/10.1039/C5EE03715H.
Note#
wwtpump
is a decorator function to add the WWTpump
to a SanUnit
.