QSDsan: Quantitative Sustainable Design for sanitation and resource recovery systems

This module is developed by:

Yalin Li <>

This module is under the University of Illinois/NCSA Open Source License. Please refer to for license details.

class qsdsan.sanunits._lagoon.Lagoon(ID='', ins: Sequence[AbstractStream] | None = None, outs: Sequence[AbstractStream] | None = (), thermo=None, init_with='WasteStream', design_type='anaerobic', flow_rate=None, degraded_components=('OtherSS',), if_N2O_emission=False, **kwargs)

Anaerobic and facultative lagoon treatment based on Trimmer et al.

To enable life cycle assessment, the following impact items should be pre-constructed: Plastic, Excavation.

  • ins (WasteStream) – Waste for treatment.

  • outs (WasteStream) – Treated waste, fugitive CH4, and fugitive N2O.

  • design_type (str) – Can be “anaerobic” or “facultative”.

  • flow_rate (float) – Total flow rate through the lagoon (to calculate retention time), [m3/d]. If not provided, will use F_vol_in.


bwaise systems


[1] Trimmer et al., Navigating Multidimensional Social–Ecological System Trade-Offs across Sanitation Alternatives in an Urban Informal Settlement. Environ. Sci. Technol. 2020, 54 (19), 12641–12653.

property COD_decay

[float] Fraction of removed COD that decays.

property COD_removal

[float] Fraction of COD removed during treatment.

property N_lagoon

[int] Number of lagoons, float will be converted to the smallest integer.

property P_removal

[float] Fraction of P removed during treatment.

property design_type

[str] Lagoon type, can be either “anaerobic” or “facultative”.

property flow_rate

[float] Total flow rate through the lagoon (to calculate retention time), [m3/d]. If not provided, will calculate based on F_vol_in.

property lagoon_L

[float] Length of the lagoon, [m].

property lagoon_V

[float] Volume of the lagoon, [m3].

property lagoon_W

[float] Width of the lagoon, [m].

line: str = 'Lagoon'

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

property liner_unit_mass

[float] Unit mass of the lagoon liner, [kg/m2].

property tau

[float] Residence time, [d].