Toilet#
QSDsan: Quantitative Sustainable Design for sanitation and resource recovery systems
This module is developed by:
Yalin Li <mailto.yalin.li@gmail.com>
Lewis Rowles <stetsonsc@gmail.com>
Lane To <lane20@illinois.edu>
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._toilet.MURT(ID='', ins: Sequence[Stream] | None = None, outs: Sequence[Stream] | None = (), thermo=None, init_with='WasteStream', degraded_components=('OtherSS',), N_user=1, N_tot_user=1, N_toilet=None, if_toilet_paper=True, if_flushing=True, if_cleansing=False, if_desiccant=True, if_air_emission=True, if_ideal_emptying=True, CAPEX=0, OPEX_over_CAPEX=0, lifetime=10, N_squatting_pan_per_toilet=1, N_urinal_per_toilet=1, if_include_front_end=True, **kwargs)#
Multi-unit reinvented toilet.
The following components should be included in system thermo object for simulation: Tissue, WoodAsh, H2O, NH3, NonNH3, P, K, Mg, CH4, N2O.
The following impact items should be pre-constructed for life cycle assessment: Ceramic, Fan.
- Parameters:
ins (Iterable(stream)) – waste_in: mixed excreta.
Outs (Iterable(stream)) – waste_out: degraded mixed excreta. CH4: fugitive CH4. N2O: fugitive N2O.
N_squatting_pan_per_toilet (int) – The number of squatting pan per toilet.
N_urinal_per_toilet (int) – The number of urinals per toilet.
if_include_front_end (bool) – If False, will not consider the capital and operating costs of this unit.
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.
- property collection_period#
[float] Time interval between storage tank collection, [d].
- 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 = 'MURT'#
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 tau#
[float] Retention time of the unit, same as collection_period.
- class qsdsan.sanunits._toilet.PitLatrine(ID='', ins: Sequence[Stream] | None = None, outs: Sequence[Stream] | None = (), thermo=None, init_with='WasteStream', degraded_components=('OtherSS',), N_user=1, N_toilet=1, N_tot_user=None, if_toilet_paper=True, if_flushing=True, if_cleansing=False, if_desiccant=False, if_air_emission=True, if_ideal_emptying=True, CAPEX=449, OPEX_over_CAPEX=0.05, lifetime=8, if_leaching=True, if_shared=True, if_pit_above_water_table=True, **kwargs)#
Single pit latrine based on Trimmer et al., a subclass of
qsdsan.sanunits.Toilet
.The following components should be included in system thermo object for simulation: Tissue, WoodAsh, H2O, NH3, NonNH3, P, K, CH4, N2O.
The following impact items should be pre-constructed for life cycle assessment: Cement, Sand, Gravel, Brick, Plastic, Steel, Wood, Excavation.
- Parameters:
ins (stream obj) – Excreta.
outs (Iterable(stream obj)) – Recyclable mixed excreta, stream leached to soil, fugitive CH4, and fugitive N2O.
lifetime (int) – Lifetime of this pit latrine, [yr].
if_leaching (bool) – If infiltration to soil occurs (i.e., if the pit walls and floors are permeable).
if_shared (bool) – If the toilet is shared.
if_pit_above_water_table (bool) – If the pit is above local water table.
Examples
References
[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. https://doi.org/10.1021/acs.est.0c03296.
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
.
- property K_leaching#
[float] Fraction of input K that leaches to the soil (if if_leaching is True).
- property MCF_decay#
[float] Methane correction factor for COD degraded during storage.
- property N2O_EF_decay#
[float] Fraction of N emitted as N2O during storage.
- property N_leaching#
[float] Fraction of input N that leaches to the soil (if if_leaching is True).
- property P_leaching#
[float] Fraction of input P that leaches to the soil (if if_leaching is True).
- 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.
- property emptying_period#
[float] Time interval between pit emptying, [yr].
- 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 = 'Pit latrine'#
class-attribute Name denoting the type of Unit class. Defaults to the class name of the first child class
- property liq_leaching#
[float] Fraction of input water that leaches to the soil (if if_leaching is True). If not set, then return the maximum of fraction of N, P, K leaching
- 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.
- property pit_V#
[float] Volume of the pit, [m3].
- property pit_area#
[float] Area of the pit, [m2].
- property pit_depth#
[float] Depth of the pit, [m].
- 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 sludge_accum_rate#
[float] Sludge accumulation rate, [L/cap/yr].
- property tau#
[float] Retention time of the unit, same as emptying_period but in day.
- class qsdsan.sanunits._toilet.Toilet(ID='', ins: Sequence[Stream] | None = None, outs: Sequence[Stream] | None = (), thermo=None, init_with='WasteStream', degraded_components=('OtherSS',), N_user=1, N_toilet=1, N_tot_user=None, if_toilet_paper=True, if_flushing=True, if_cleansing=False, if_desiccant=False, if_air_emission=True, if_ideal_emptying=True, CAPEX=None, OPEX_over_CAPEX=None, price_ratio=1.0)#
Abstract class containing common parameters and design algorithms for toilets based on Trimmer et al.
- Parameters:
degraded_components (tuple) – IDs of components that will degrade (simulated by first-order decay).
N_user (int, float) – Number of people per toilet. Note that this number can be a float when calculated from N_tot_user and N_toilet.
N_toilet (int) – Number of parallel toilets. In calculation, N_toilet will be calculated as ceil(N_tot_user/N_user).
N_tot_user (int) –
Total number of users.
Note
If N_tot_user is provided (i.e., not “None”), then updating N_user will recalculate N_toilet, and vice versa.
if_toilet_paper (bool) – If toilet paper is used.
if_flushing (bool) – If water is used for flushing.
if_cleansing (bool) – If water is used for cleansing.
if_desiccant (bool) – If desiccant is used for moisture and odor control.
if_air_emission (bool) – If emission to air occurs (i.e., if the pit is completely sealed off from the atmosphere).
if_ideal_emptying (bool) – If the toilet appropriately emptied to avoid contamination to the environmental.
CAPEX (float) – Capital cost of a single toilet.
OPEX_over_CAPEX (float) – Fraction of annual operating cost over total capital cost.
price_ratio (float) – Calculated capital cost will be multiplied by this number to consider the effect in cost difference from different locations.
References
[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. https://doi.org/10.1021/acs.est.0c03296.
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
.
- property MCF_aq#
[float] Methane correction factor for COD lost due to inappropriate emptying.
- property N2O_EF_aq#
[float] Fraction of N emitted as N2O due to inappropriate emptying.
- property N_toilet#
[int] Number of parallel toilets.
- property N_tot_user#
[int] Number of total users.
- property N_user#
[int, float] Number of people per toilet.
- property N_volatilization#
[float] Fraction of input N that volatilizes to the air (if
if_air_emission
is True).
- baseline_purchase_costs: dict[str, float]#
All baseline purchase costs without accounting for design, pressure, and material factors.
- property cleansing_water#
[float] Amount of water used for cleansing (if
if_cleansing_water
is True), [kg/cap/hr].
- property desiccant#
[float] Amount of desiccant used (if
if_desiccant
is True), [kg/cap/hr].Note
Value set by
desiccant_V
anddesiccant_rho
.
- design_results: dict[str, object]#
All design requirements excluding utility requirements and detailed auxiliary unit requirements.
- property empty_ratio#
[float] Fraction of excreta that is appropriately emptied.
Note
Will be 1 (i.e., 100%) if
if_ideal_emptying
is True.
- 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.
- property flushing_water#
[float] Amount of water used for flushing (if
if_flushing_water
is True), [kg/cap/hr].
- static get_emptying_emission(waste, CH4, N2O, empty_ratio, CH4_factor, N2O_factor)#
Calculate emissions due to non-ideal emptying based on Trimmer et al.,
- Parameters:
stream (WasteStream) – Excreta stream that is not appropriately emptied (before emptying).
CH4 (WasteStream) – Fugitive CH4 gas (before emptying).
N2O (WasteStream) – Fugitive N2O gas (before emptying).
empty_ratio (float) – Fraction of excreta that is appropriately emptied..
CH4_factor (float) – Factor to convert COD removal to CH4 emission.
N2O_factor (float) – Factor to convert COD removal to N2O emission.
- Returns:
stream (WasteStream) – Excreta stream that is not appropriately emptied (after emptying).
CH4 (WasteStream) – Fugitive CH4 gas (after emptying).
N2O (WasteStream) – Fugitive N2O gas (after emptying).
- heat_utilities: tuple[HeatUtility, ...]#
All heat utilities associated to unit. Cooling and heating requirements are stored here (including auxiliary requirements).
- property if_N2O_emission#
[bool] Whether to consider N degradation and fugitive N2O emission.
- 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 = 'Toilet'#
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 toilet_paper#
[float] Amount of toilet paper used (if
if_toilet_paper
is True), [kg/cap/hr].
- class qsdsan.sanunits._toilet.UDDT(ID='', ins: Sequence[Stream] | None = None, outs: Sequence[Stream] | None = (), thermo=None, init_with='WasteStream', degraded_components=('OtherSS',), N_user=1, N_toilet=1, N_tot_user=None, if_toilet_paper=True, if_flushing=False, if_cleansing=False, if_desiccant=True, if_air_emission=True, if_ideal_emptying=True, CAPEX=553, OPEX_over_CAPEX=0.1, lifetime=8, T=298.15, safety_factor=1, if_prep_loss=True, if_treatment=False, **kwargs)#
Urine-diverting dry toilet with liquid storage tank and dehydration vault for urine and feces storage, respectively, based on Trimmer et al., a subclass of
qsdsan.sanunits.Toilet
.The following components should be included in system thermo object for simulation: Tissue, WoodAsh, H2O, NH3, NonNH3, P, K, Mg, CH4, N2O.
The following impact items should be pre-constructed for life cycle assessment: Cement, Sand, Gravel, Brick, Plastic, Steel, StainlessSteelSheet, Wood.
- Parameters:
ins (stream obj) – Excreta stream.
outs (Iterable(stream obj)) – Recyclable liquid urine, recyclable solid feces, struvite scaling (irrecoverable), hydroxyapatite scaling (irrecoverable), fugitive CH4, and fugitive N2O.
lifetime (int) – Lifetime of this UDDT, [yr].
T (float) – Temperature, [K].
safety_factor (float) – Safety factor for pathogen removal during onsite treatment, must be larger than 1.
if_treatment (bool) – If has onsite treatment.
Examples
References
[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. https://doi.org/10.1021/acs.est.0c03296.
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.
- property collection_period#
[float] Time interval between storage tank collection, [d].
- 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.
- property fec_moi_min#
[float] Minimum moisture content of feces.
- property fec_moi_red_rate#
[float] Exponential reduction rate of feces moisture.
- 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 = 'UDDT'#
class-attribute Name denoting the type of Unit class. Defaults to the class name of the first child class
- property log_removal#
Desired level of pathogen inactivation.
- 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).
- property prep_sludge#
[float] Fraction of total precipitate appearing as sludge that can settle and be removed.
- 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 struvite_pKsp#
[float] Precipitation constant of struvite.
- property tank_V#
[float] Volume of the urine storage tank, [m3].
- property tau#
[float] Retention time of the unit, same as collection_period.
- property treatment_V#
[float] Volume needed to achieve treatment target (if treating), [d].
- property treatment_tau#
[float] Time for onsite treatment (if treating), [d].
- property ur_pH#
Urine pH.
- property vault_V#
[float] Volume of the feces dehydration vault, [m3].