Pumping

QSDsan: Quantitative Sustainable Design for sanitation and resource recovery systems

This module is developed by:

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[AbstractStream] | None = None, outs: Sequence[AbstractStream] | 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>

line: str = 'Hydraulic delay'

class-attribute Name denoting the type of Unit class. Defaults to the class name of the first child class

set_init_conc(**kwargs)

set the initial concentrations [mg/L].

class qsdsan.sanunits._pumping.Pump(ID='', ins: Sequence[AbstractStream] | None = None, outs: Sequence[AbstractStream] | 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 with qsdsan.SanStream and qsdsan.WasteStream, and allows dynamic simulation.

line: str = 'Pump'

class-attribute Name denoting the type of Unit class. Defaults to the class name of the first child class

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[AbstractStream] | None = None, outs: Sequence[AbstractStream] | 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.

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].

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.

line: str = 'Sludge pump'

class-attribute Name denoting the type of Unit class. Defaults to the class name of the first child class

property v

[float] Fluid velocity, [ft/s].

class qsdsan.sanunits._pumping.WWTpump(ID='', ins: Sequence[AbstractStream] | None = None, outs: Sequence[AbstractStream] | 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

AnMBR

property BHP

[float] Brake horsepower, [hp].

property C

[float] Hazen-Williams coefficient to calculate fluid friction.

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].

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_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.

property headloss_multiplication_factor

[float] Factor to consider additional friction headloss (e.g., for sludge), default to be 1 and should be no less than 1.

See also https://github.com/QSD-Group/QSDsan/issues/119.

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.

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.

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 a qsdsan.SanUnit.

Refer to class:WWTpump for the parameters needed for using this decorator.

See also

WWTpump, AnMBR

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.