High rate wastewater treatment#

Unit construction and functions for creating a high-rate wastewater treatment system as described in Li et al., with some unit operations based on Humbird et al., and Davis et al.

Systems#

create_high_rate_wastewater_treatment_system(ID=None, ins=None, outs=None, mockup=False, area=None, udct=None, autorename=None, operating_hours=None, lang_factor=None, algorithm=None, method=None, maxiter=None, molar_tolerance=None, relative_molar_tolerance=None, temperature_tolerance=None, relative_temperature_tolerance=None, box=False, network_priority=None, *, process_ID='6', flowsheet=None, autopopulate=False, skip_IC=False, IC_kwargs={}, skip_AnMBR=False, AnMBR_kwargs={}, skip_AeF=False, AeF_kwargs={})#

Return a system for wastewater treatment (WWT) as described in Li et al. [1] The system includes internal circulation (IC), anaerobic membrane bioreactors (AnMBR), aerobic polishing filter (AeF), belt thickener and sludge centrifuge, and a reverse osmosis unit.

Users can choose whether to skip IC (makes sense when influent COD is only on the order of grams per liter), AnMBR (not recommended unless the COD is very low), and/or AeF (not recommended if want to achieve low COD in the effluent).

An optional biogas upgrading unit can be included to upgrade the biogas (from IC and AnMBR) as renewable natural gas (RNG) for sale with incentives, this is achieved through adjusting BiogasUpgrading.ratio.

Parameters:
  • ins (Stream], optional) – Wastewater streams (without solids). Defaults to all product streams at run time that are not sold and cannot generate energy through combustion (i.e. streams that have no sink, no price, and a LHV less that 1 kJ / g).

  • outs (Stream], optional) –

    • [0] RNG

    • [1] biogas

    • [2] sludge

    • [3] RO_treated_water

    • [4] brine

  • process_ID (float) – Number of the process. E.g., the default process_ID is 6, then the first mixer of this WWT system will be M601.

  • flowsheet (Flowsheet, optional) – If provided, the WWT system will be added to the given flowsheet.

  • autopopulate (bool, optional) – Whether to automatically add wastewater streams.

  • skip_IC (bool) – Whether to skip the IC unit.

  • IC_kwargs (dict) – kwargs to be passed to the IC unit (refer to the doc of the IC unit for details).

  • skip_AnMBR (bool) – Whether to skip the AnMBR unit.

  • AnMBR_kwargs (dict) – kwargs to be passed to the AnMBR unit (refer to the doc of the AnMBR unit for details).

  • skip_AeF (bool) – Whether to skip the AeF unit.

  • AeF_kwargs (dict) – kwargs to be passed to the AeF unit (refer to the doc of the AeF unit for details).

Examples

Check for PolishingFilter vent accumulation

>>> from biosteam import Stream, create_high_rate_wastewater_treatment_system, settings
>>> from biorefineries import cornstover as cs
>>> settings.set_thermo(cs.create_chemicals())
>>> feed = Stream(
...     ID='wastewater',
...     Water=2.634e+04,
...     Ethanol=0.07225,
...     AceticAcid=24.67,
...     Furfural=6.206,
...     Glycerol=1.784,
...     LacticAcid=17.7,
...     SuccinicAcid=3.472,
...     DAP=1.001,
...     AmmoniumSulfate=17.63,
...     HMF=2.366,
...     Glucose=2.816,
...     Xylose=6.953,
...     Arabinose=12.78,
...     Extract=65.98,
...     Ash=83.52,
...     Lignin=1.659,
...     SolubleLignin=4.202,
...     GlucoseOligomer=6.796,
...     GalactoseOligomer=0.01718,
...     MannoseOligomer=0.009008,
...     XyloseOligomer=2.878,
...     ArabinoseOligomer=0.3508,
...     Z_mobilis=0.6668,
...     Protein=2.569,
...     Glucan=0.1555,
...     Xylan=0.06121,
...     Xylitol=4.88,
...     Cellobiose=0.9419,
...     Arabinan=0.02242,
...     Mannan=0.06448,
...     Galactan=0.01504,
...     Cellulase=25.4,
...     units='kmol/hr'
... )
>>> wwt_sys = create_high_rate_wastewater_treatment_system(ins=feed)
>>> wwt_sys.simulate()
>>> wwt_sys.show('cwt100')
System: wastewater_sys
Highest convergence error among components in recycle
stream M603-0 after 6 loops:
- flow rate   1.57e+01 kmol/hr (0.066%)
- temperature 1.19e-03 K (0.00039%)
ins...
[0] wastewater
    phase: 'l', T: 298.15 K, P: 101325 Pa
    composition (%): Water              94.7
                     Ethanol            0.000664
                     AceticAcid         0.296
                     Furfural           0.119
                     Glycerol           0.0328
                     LacticAcid         0.318
                     SuccinicAcid       0.0818
                     DAP                0.0264
                     AmmoniumSulfate    0.465
                     HMF                0.0595
                     Glucose            0.101
                     Xylose             0.208
                     Arabinose          0.383
                     Extract            2.37
                     Ash                0.0167
                     Lignin             0.0504
                     SolubleLignin      0.128
                     GlucoseOligomer    0.22
                     GalactoseOligomer  0.000556
                     MannoseOligomer    0.000291
                     XyloseOligomer     0.0759
                     ArabinoseOligomer  0.00925
                     Z_mobilis          0.00328
                     Protein            0.0117
                     Glucan             0.00503
                     Xylan              0.00161
                     Xylitol            0.148
                     Cellobiose         0.0643
                     Arabinan           0.000591
                     Mannan             0.00209
                     Galactan           0.000487
                     Cellulase          0.122
                     -----------------  5.01e+05 kg/hr
outs...
[0] RNG
    phase: 'g', T: 298.15 K, P: 101325 Pa
    flow: 0
[1] biogas
    phase: 'g', T: 298.15 K, P: 101325 Pa
    composition (%): CH4  26.9
                     H2S  0.0348
                     CO2  73.1
                     ---  4.33e+04 kg/hr
[2] sludge
    phase: 'l', T: 307.85 K, P: 101325 Pa
    composition (%): Water              80
                     Ethanol            2.49e-05
                     AceticAcid         0.0111
                     Furfural           0.00447
                     Glycerol           0.00123
                     NH3                0.0448
                     LacticAcid         0.0117
                     SuccinicAcid       0.00307
                     DAP                0.0636
                     AmmoniumSulfate    1.12
                     HMF                0.00224
                     Glucose            0.0038
                     Xylose             0.00679
                     Arabinose          0.0144
                     Extract            0.0872
                     Ash                0.832
                     Lignin             2.51
                     SolubleLignin      0.00469
                     GlucoseOligomer    0.0081
                     GalactoseOligomer  2.05e-05
                     MannoseOligomer    1.07e-05
                     XyloseOligomer     0.0028
                     ArabinoseOligomer  0.000341
                     Z_mobilis          0.163
                     Protein            0.584
                     Glucan             0.251
                     Xylan              0.0805
                     Xylitol            0.00556
                     Cellobiose         0.00242
                     Arabinan           0.0295
                     Mannan             0.104
                     Galactan           0.0243
                     WWTsludge          14
                     Cellulase          0.00447
                     -----------------  1e+04 kg/hr
[3] RO_treated_water
    phase: 'l', T: 303.15 K, P: 101325 Pa
    composition (%): Water  100
                     -----  4.59e+05 kg/hr
[4] brine
    phase: 'l', T: 303.15 K, P: 101325 Pa
    composition (%): Water              71.2
                     Ethanol            2.18e-05
                     AceticAcid         0.00971
                     Furfural           0.00391
                     Glycerol           0.00108
                     NH3                1.07
                     LacticAcid         0.0121
                     SuccinicAcid       0.00269
                     DAP                1.48
                     AmmoniumSulfate    26
                     HMF                0.00195
                     Glucose            0.00332
                     Xylose             0.0133
                     Arabinose          0.0126
                     Extract            0.09
                     SolubleLignin      0.00484
                     GlucoseOligomer    0.00822
                     GalactoseOligomer  2.08e-05
                     MannoseOligomer    1.09e-05
                     XyloseOligomer     0.00284
                     ArabinoseOligomer  0.000346
                     Xylitol            0.00486
                     Cellobiose         0.00211
                     Cellulase          0.00462
                     -----------------  8.51e+03 kg/hr
>>> u = wwt_sys.flowsheet.unit
>>> print(round(u.R603.outs[3].F_mol, 2))
50.46
>>> wwt_sys.simulate()
>>> print(round(u.R603.outs[3].F_mol, 2))
50.46
>>> wwt_sys.simulate()
>>> print(round(u.R603.outs[3].F_mol, 2))
50.46

Check if system can finish simulating with a dilute influent stream.

>>> from biosteam import Stream, create_high_rate_wastewater_treatment_system, settings
>>> from biorefineries import cornstover as cs
>>> settings.set_thermo(cs.create_chemicals())
>>> feed = Stream(
...     ID='wastewater',
...     Water=2.634e+05,
...     Ethanol=0.07225,
...     AceticAcid=24.67,
...     Furfural=6.206,
...     Glycerol=1.784,
...     LacticAcid=17.7,
...     SuccinicAcid=3.472,
...     DAP=1.001,
...     AmmoniumSulfate=17.63,
...     HMF=2.366,
...     Glucose=2.816,
...     Xylose=6.953,
...     Arabinose=12.78,
...     Extract=65.98,
...     Ash=83.52,
...     Lignin=1.659,
...     SolubleLignin=4.202,
...     GlucoseOligomer=6.796,
...     GalactoseOligomer=0.01718,
...     MannoseOligomer=0.009008,
...     XyloseOligomer=2.878,
...     ArabinoseOligomer=0.3508,
...     Z_mobilis=0.6668,
...     Protein=2.569,
...     Glucan=0.1555,
...     Xylan=0.06121,
...     Xylitol=4.88,
...     Cellobiose=0.9419,
...     Arabinan=0.02242,
...     Mannan=0.06448,
...     Galactan=0.01504,
...     Cellulase=25.4,
...     units='kmol/hr'
... )
>>> wwt_sys = create_high_rate_wastewater_treatment_system(ins=feed)
>>> wwt_sys.simulate()
>>> wwt_sys.show('cwt100')
System: wastewater_sys
Highest convergence error among components in recycle
stream M603-0 after 6 loops:
- flow rate   5.52e+00 kmol/hr (0.027%)
- temperature 4.36e-04 K (0.00014%)
ins...
[0] wastewater
    phase: 'l', T: 298.15 K, P: 101325 Pa
    composition (%): Water              99.4
                     Ethanol            6.98e-05
                     AceticAcid         0.031
                     Furfural           0.0125
                     Glycerol           0.00344
                     LacticAcid         0.0334
                     SuccinicAcid       0.00859
                     DAP                0.00277
                     AmmoniumSulfate    0.0488
                     HMF                0.00625
                     Glucose            0.0106
                     Xylose             0.0219
                     Arabinose          0.0402
                     Extract            0.249
                     Ash                0.00175
                     Lignin             0.00529
                     SolubleLignin      0.0134
                     GlucoseOligomer    0.0231
                     GalactoseOligomer  5.84e-05
                     MannoseOligomer    3.06e-05
                     XyloseOligomer     0.00797
                     ArabinoseOligomer  0.000971
                     Z_mobilis          0.000344
                     Protein            0.00123
                     Glucan             0.000528
                     Xylan              0.000169
                     Xylitol            0.0156
                     Cellobiose         0.00676
                     Arabinan           6.21e-05
                     Mannan             0.000219
                     Galactan           5.11e-05
                     Cellulase          0.0128
                     -----------------  4.77e+06 kg/hr
outs...
[0] RNG
    phase: 'g', T: 298.15 K, P: 101325 Pa
    flow: 0
[1] biogas
    phase: 'g', T: 298.15 K, P: 101325 Pa
    composition (%): CH4  26.9
                     H2S  0.0348
                     CO2  73.1
                     ---  4.33e+04 kg/hr
[2] sludge
    phase: 'l', T: 307.9 K, P: 101325 Pa
    composition (%): Water              79.9
                     Ethanol            2e-05
                     AceticAcid         0.00889
                     Furfural           0.00358
                     Glycerol           0.000986
                     NH3                0.0359
                     LacticAcid         0.00936
                     SuccinicAcid       0.00246
                     DAP                0.0511
                     AmmoniumSulfate    0.9
                     HMF                0.00179
                     Glucose            0.00304
                     Xylose             0.00544
                     Arabinose          0.0115
                     Extract            0.0698
                     Ash                0.838
                     Lignin             2.53
                     SolubleLignin      0.00375
                     GlucoseOligomer    0.00649
                     GalactoseOligomer  1.64e-05
                     MannoseOligomer    8.6e-06
                     XyloseOligomer     0.00224
                     ArabinoseOligomer  0.000273
                     Z_mobilis          0.165
                     Protein            0.589
                     Glucan             0.253
                     Xylan              0.0811
                     Xylitol            0.00445
                     Cellobiose         0.00193
                     Arabinan           0.0297
                     Mannan             0.105
                     Galactan           0.0245
                     WWTsludge          14.3
                     Cellulase          0.00358
                     -----------------  9.97e+03 kg/hr
[3] RO_treated_water
    phase: 'l', T: 303.15 K, P: 101325 Pa
    composition (%): Water  100
                     -----  4.67e+06 kg/hr
[4] brine
    phase: 'l', T: 303.15 K, P: 101325 Pa
    composition (%): Water              96.1
                     Ethanol            2.92e-06
                     AceticAcid         0.0013
                     Furfural           0.000522
                     Glycerol           0.000144
                     NH3                0.144
                     LacticAcid         0.00161
                     SuccinicAcid       0.000359
                     DAP                0.198
                     AmmoniumSulfate    3.49
                     HMF                0.000261
                     Glucose            0.000445
                     Xylose             0.00178
                     Arabinose          0.00168
                     Extract            0.012
                     SolubleLignin      0.000647
                     GlucoseOligomer    0.0011
                     GalactoseOligomer  2.78e-06
                     MannoseOligomer    1.46e-06
                     XyloseOligomer     0.000379
                     ArabinoseOligomer  4.62e-05
                     Xylitol            0.000651
                     Cellobiose         0.000282
                     Cellulase          0.000617
                     -----------------  6.42e+04 kg/hr

Unit operations#

class InternalCirculationRx(ID='', ins=None, outs=(), thermo=None, **kwargs)[source]#

Internal circulation (IC) reactor for anaerobic digestion (AD), including a high-rate bottom reactor for rapid organic removal and a low-rate top reactor for polishing. Both reactors are similar to upflow anaerobic blanket reactor (UASB).

Design of the reactor follows steps described in [4] (assuming steady state and pseudo-zeroth-order kinetics), where two methods are used based on Irizar et al. [7] and Tchobanoglous et al. [8].

Parameters:
  • ins (Stream], optional) – Influent.

  • outs (Stream], optional) –

    • [0] biogas

    • [1] effluent

    • [2] waste sludge

  • method (str) –

    • “separate” to design the bottom and top reactors separately as in [7].

    Design parameters for this methid include OLRall, biodegradability, Y, q_Qw, mu_max, b, Fxt, and Fxb.

    • ”lumped” to design the entire IC reactor as a black box following [8].

    Design parameters for this method include OLRall, biodegradability, Y, q_Qw, and q_Xw.

  • OLRall (float) – Overall organic loading rate, [kg COD/m3/hr].

  • Y_biogas (float) – Biogas yield, [kg biogas/kg consumed COD].

  • Y_biomass (float) – Biomass yield, [kg biomass/kg consumed COD].

  • biodegradability (float or dict) – Biodegradability of chemicals, when shown as a float, all biodegradable chemicals are assumed to have the same degradability.

  • q_Qw (float) – Ratio between the bottom reactor waste flow and the influent.

  • q_Xw (float) – Ratio between the biomass concentration in the reactor and the waste flow.

  • mu_max (float) – Maximum specific growth rate, [/hr].

  • b (float) – Specific endogenous decay coefficient, [/hr].

  • V_wf (float) – Fraction of working volume over total volume.

  • vessel_type (str) – Can be “IC” to use the reactor size constraints according to [4], or “Conventional” based on biosteam.MixTank (much smaller tank size, not recommended).

  • vessel_material (str) – Vessel material.

  • kW_per_m3 (float) – Electricity requirement per unit volume, [kW/m^3]. Default to 0 as IC reactors realizes mixing through internal circulation caused by the rising force of the generated biogas.

  • T (float) – Temperature of the reactor. Will not control temperature if provided as None.

  • kwargs (dict) – Other keyword arguments (e.g., Fxb, Fxt).

class AnMBR(ID='', ins=None, outs=(), thermo=None, **kwargs)[source]#

Anaerobic membrane bioreactor (AnMBR) for wastewater treatment as in Shoener et al. [6] Some assumptions adopted from Humbird et al. [2]

In addition to the anaerobic treatment, an optional second stage can be added, which can be aerobic filter or granular activated carbon (GAC).

Parameters:
  • ins (Stream], optional) –

    • [0] influent

    • [1] recycle (optional)

    • [2] NaOCl

    • [3] citric acid

    • [4] bisulfite

    • [5] air (optional)

  • outs (Stream], optional) –

    • [0] biogas

    • [1] effluent

    • [2] waste sludge

    • [3] air (optional)

  • reactor_type (str) – Can either be “CSTR” for continuous stirred tank reactor or “AF” for anaerobic filter.

  • membrane_configuration (str) – Can either be “cross-flow” or “submerged”.

  • membrane_type (str) – Can be “hollow fiber” (“submerged” configuration only), “flat sheet” (either “cross-flow” or “submerged” configuration), or “multi-tube” (“cross-flow” configuration only).

  • membrane_material (str) – Can be any of the plastics (“PES”, “PVDF”, “PET”, “PTFE”) for any of the membrane types (“hollow fiber”, “flat sheet”, “multi-tube”), or “sintered steel” for “flat sheet”, or “ceramic” for “multi-tube”.

  • membrane_unit_cost (float) – Cost of membrane, [$/ft2]

  • include_aerobic_filter (bool) – Whether to include an aerobic filtration process in this AnMBR, can only be True in “AF” (not “CSTR”) reactor.

  • add_GAC (bool) – If to add granular activated carbon to enhance biomass retention, can only be True for the “submerged” configuration.

  • include_degassing_membrane (bool) – If to include a degassing membrane to enhance methane (generated through the digestion reaction) recovery.

  • Y_biogas (float) – Biogas yield, [kg biogas/kg consumed COD].

  • Y_biomass (float) – Biomass yield, [kg biomass/kg consumed COD].

  • biodegradability (float or dict) – Biodegradability of chemicals, when shown as a float, all biodegradable chemicals are assume to have the same degradability.

  • split (dict) – Component-wise split to the treated water. E.g., {‘Water’:1, ‘WWTsludge’:0} indicates all of the water goes to the treated water and all of the WWTsludge goes to the wasted sludge. Default splits (based on the membrane bioreactor in [2]) will be used if not provided.

  • sludge_conc (float) – Concentration of biomass in the waste sludge stream, in g/L. Note that the solids content of the effluent should be smaller than the solids content of the waste sludge stream.

  • T (float) – Temperature of the reactor. Will not control temperature if provided as None.

  • include_pump_building_cost (bool) – Whether to include the construction cost of pump building.

  • include_excavation_cost (bool) – Whether to include the construction cost of excavation.

  • kwargs (dict) – Other keyword arguments (e.g., J_max, SGD).

class PolishingFilter(ID='', ins=None, outs=(), thermo=None, **kwargs)[source]#

A superclass for anaerobic and aerobic polishing as in Shoener et al. [6] Some assumptions adopted from Humbird et al. [2]

Parameters:
  • ins (Stream], optional) –

    • [0] influent

    • [1] recycle

    • [2] air (optional & when aerobic).

  • outs (Stream], optional) –

    • [0] biogas (when anaerobic)

    • [1] effluent

    • [2] waste sludge

    • [3] air (optional & when aerobic).

  • filter_type (str) – Can either be “anaerobic” or “aerobic”.

  • OLR (float) – Organic loading rate of influent, [kg COD/m3/hr].

  • HLR (float) – Hydraulic loading rate of influent, [m3/m2/hr].

  • X_decomp (float) – Fraction of the influent COD converted to biogas (filter_type == “anaerobic”) or CO2 (filter_type == “aerobic”).

  • X_growth (float) – Fraction of the influent COD converted to biomass growth.

  • split (dict) – Component-wise split to the treated water. E.g., {‘Water’:1, ‘WWTsludge’:0} indicates all of the water goes to the treated water and all of the WWTsludge goes to the wasted sludge. Default splits (based on the membrane bioreactor in [2]) will be used if not provided.

  • T (float) – Temperature of the filter tank. Will not control temperature if provided as None.

  • include_degassing_membrane (bool) – If to include a degassing membrane to enhance methane (generated through the digestion reaction) recovery. No degassing membrane will be added if filter_type is “aerobic”.

  • include_pump_building_cost (bool) – Whether to include the construction cost of pump building.

  • include_excavation_cost (bool) – Whether to include the construction cost of excavation.

class BeltThickener(ID='', ins=None, outs=(), thermo=None, **kwargs)[source]#

Gravity belt thickener (GBT) designed based on the manufacture specification data sheet. [9]

Key parameters include:

  • Capacity: 80-100 m3/h.

  • Influent solids concentration: 0.2-1%.

  • Sludge cake moisture content: 90-96%.

  • Motor power: 3 (driving motor) and 1.1 (agitator motor) kW.

  • Belt width: 2.5 m.

  • Weight: 2350 kg.

  • Quote price: $3680 ea for three or more sets.

The bare module (installation) factor is from Table 25 in Humbird et al. [2] (solids handling equipment).

Parameters:
  • ins (Stream], optional) – Influent

  • outs (Stream], optional) –

    • [0] water-rich supernatant

    • [1] solid-rich sludge

  • sludge_moisture (float) – Moisture content of the thickened sludge, [wt% water].

  • solubles (tuple) – IDs of the soluble chemicals. Note that all chemicals that are not included in this tuple and not locked as gas phase (i.e., chemical.locked_state!=’g’) will be treated as solids in simulation.

  • max_capacity (float) – Maximum hydraulic loading per belt thickener, [m3/h].

  • power_demand (float) – Total power demand of each belt thickener, [kW].

class SludgeCentrifuge(ID='', ins=None, outs=(), thermo=None, **kwargs)[source]#

Solid centrifuge for sludge dewatering.

The simulation (_run() method) and costing (_cost() method) are based on SludgeHandling and the sizing (_design() method) is based on SolidsCentrifuge.

Parameters:
  • ins (Stream], optional) – Influent

  • outs (Stream], optional) –

    • [0] water-rich supernatant

    • [1] solid-rich sludge

  • sludge_moisture (float) – Moisture content of the thickened sludge, [wt% water].

  • solubles (tuple) – IDs of the soluble chemicals. Note that all chemicals that are not included in this tuple and not locked as gas phase (i.e., chemical.locked_state!=’g’) will be treated as solids in simulation.

class BiogasUpgrading(ID='', ins=None, outs=(), thermo=None, **kwargs)[source]#

Upgrade the biogas to renewable natural gas (RNG). Note that the second influent is a dummy stream to calculate the upgrading cost.

Parameters:
  • ratio (float) – How much of the incoming biogas will be upgraded to RNG.

  • loss (float) – CH4 loss during upgrading.

  • unit_upgrading_cost (float) – Unit cost for upgrading, in $/MMBtu.

  • unit_upgrading_GWP (float) – Unit 100-yr global warming potential (GWP) for biogas upgrading, in kg CO2/MMBtu.

References

Yang et al., Cost and Life-Cycle Greenhouse Gas Implications of Integrating Biogas Upgrading and Carbon Capture Technologies in Cellulosic Biorefineries. Environ. Sci. Technol. 2020. https://doi.org/10.1021/acs.est.0c02816.

IEA. Outlook for Biogas and Biomethane: Prospects for Organic Growth; IEA: Paris, 2020. https://www.iea.org/reports/outlook-for-biogas-and-biomethane-prospects-for-organic-growth

Rai et al., Comparative Life Cycle Evaluation of the Global Warming Potential (GWP) Impacts of Renewable Natural Gas Production Pathways. Environ. Sci. Technol. 2022. https://doi.org/10.1021/acs.est.2c00093.

class CHP(ID='', ins=None, outs=(), thermo=None, **kwargs)[source]#

Used to estimate the cost of producing electricity as in [6].

Parameters:
  • eff (float) – Combined efficiency for combustion and power generation.

  • unit_CAPEX (float) – Capital cost of the CHP per kW of power generated, $/kW.

class ReverseOsmosis(ID='', ins=None, outs=(), thermo=None, **kwargs)[source]#
class Skipped(ID='', ins=None, outs=(), thermo=None, **kwargs)[source]#

Copy ins[main_in] as ins[main_out]. Can be also used to calculate the cost of wastewater treatment by clearing all WWT-related units and streams.

Parameters:
  • main_in (int) – Which influent will be copied to main_out.

  • main_out (int) – Which effluent will be copied from main_in.

  • wwt_units (Iterable) – Collection of units whose costs will be cleared when clear_wwt is True. ins and outs of the units will be emptied if its price isn’t 0.

  • wwt_streams (Iterable) – Collection of streams which will be emptied when clear_wwt is True. Usually should at least includes the biogas and sludge stream.

  • clear_wwt (bool) – Whether to clear the costs of and select streams associated with wwt_units.

References