Junction

QSDsan: Quantitative Sustainable Design for sanitation and resource recovery systems

This module is developed by:

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._junction.ADMjunction(ID='', upstream=None, downstream=(), thermo=None, init_with='WasteStream', F_BM_default=None, isdynamic=False, adm1_model=None)

An abstract superclass holding common properties of ADM interface classes. Users should use its subclasses (e.g., ASMtoADM, ADMtoASM) instead.

See also

qsdsan.sanunits.Junction, qsdsan.sanunits.ADMtoASM, qsdsan.sanunits.ASMtoADM

property Ka_dH

[float] Heat of reaction for Ka.

property T

[float] Temperature of the upstream/downstream [K].

property T_base

[float] Base temperature in the ADM1 model.

property adm1_model

[qsdsan.Process] ADM process model.

property alpha_IC

[float] Charge per g of C.

property alpha_IN

[float] Charge per g of N.

line: str = 'ADMjunction'

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

property pH

[float] pH of the upstream/downstream.

property pKa

[numpy.array] pKa array of the following acid-base pairs: (‘H+’, ‘OH-‘), (‘NH4+’, ‘NH3’), (‘CO2’, ‘HCO3-‘), (‘HAc’, ‘Ac-‘), (‘HPr’, ‘Pr-‘), (‘HBu’, ‘Bu-‘), (‘HVa’, ‘Va-‘)

property pKa_base

[float] pKa of the acid-base pairs at the base temperature in the ADM1 model.

class qsdsan.sanunits._junction.ADMtoASM(ID='', upstream=None, downstream=(), thermo=None, init_with='WasteStream', F_BM_default=None, isdynamic=False, adm1_model=None)

Interface unit to convert anaerobic digestion model (ADM) components to activated sludge model (ASM) components.

Parameters:
  • upstream (stream or str) – Influent stream with ADM components.

  • downstream (stream or str) – Effluent stream with ASM components.

  • adm1_model (obj) – The anaerobic digestion process model (qsdsan.processes.ADM1).

  • bio_to_xs (float) – Split of the total biomass COD to slowly biodegradable substrate (X_S), the rest is assumed to be mapped into X_P.

  • rtol (float) – Relative tolerance for COD and TKN balance.

  • atol (float) – Absolute tolerance for COD and TKN balance.

References

[1] Nopens, I.; Batstone, D. J.; Copp, J. B.; Jeppsson, U.; Volcke, E.; Alex, J.; Vanrolleghem, P. A. An ASM/ADM Model Interface for Dynamic Plant-Wide Simulation. Water Res. 2009, 43, 1913–1923.

See also

qsdsan.sanunits.ADMjunction

qsdsan.sanunits.ASMtoADM

math.isclose <https://docs.python.org/3.8/library/math.html#math.isclose>

line: str = 'ADMto ASM'

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

class qsdsan.sanunits._junction.ASMtoADM(ID='', upstream=None, downstream=(), thermo=None, init_with='WasteStream', F_BM_default=None, isdynamic=False, adm1_model=None)

Interface unit to convert activated sludge model (ASM) components to anaerobic digestion model (ADM) components.

Parameters:
  • upstream (stream or str) – Influent stream with ASM components.

  • downstream (stream or str) – Effluent stream with ADM components.

  • adm1_model (obj) – The anaerobic digestion process model (qsdsan.processes.ADM1).

  • xs_to_li (float) – Split of slowly biodegradable substrate COD to lipid, after all N is mapped into protein.

  • bio_to_li (float) – Split of biomass COD to lipid, after all biomass N is mapped into protein.

  • frac_deg (float) – Biodegradable fraction of biomass COD.

  • rtol (float) – Relative tolerance for COD and TKN balance.

  • atol (float) – Absolute tolerance for COD and TKN balance.

References

[1] Nopens, I.; Batstone, D. J.; Copp, J. B.; Jeppsson, U.; Volcke, E.; Alex, J.; Vanrolleghem, P. A. An ASM/ADM Model Interface for Dynamic Plant-Wide Simulation. Water Res. 2009, 43, 1913–1923.

See also

qsdsan.sanunits.ADMjunction

qsdsan.sanunits.ADMtoASM

math.isclose <https://docs.python.org/3.8/library/math.html#math.isclose>

line: str = 'ASMto ADM'

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

class qsdsan.sanunits._junction.Junction(ID='', upstream=None, downstream=(), thermo=None, init_with='WasteStream', F_BM_default=None, isdynamic=False, reactions=None, **kwargs)

A non-reactive class that serves to convert a stream with one set of components and into another.

Thermal conditions of the downstream (T, P) will be copied from those of the upstream.

Parameters:
  • upstream (stream or str) – Influent stream.

  • downstream (stream or str) – Effluent stream.

  • reactions (iterable(dict) | callable) –

    Iterable of dict that has the conversion of upstream components to downstream components, or a function that will return the concentration of the effluent with influent concentration as the input.

    If given as an iterable of dict, keys of each of the dict should be the ID or alias of components, values should be the conversion/yield, which should be negative for reactants and positive for products.

property downstream

[qsdsan.WasteStream] Effluent.

line: str = 'Junction'

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

property reactions

[callable] Function that takes the concentration array of the influent and convert to the concentration array of the effluent.

property state

The state of the Junction, including component concentrations [mg/L] and flow rate [m^3/d].

property upstream

[qsdsan.WasteStream] Influent.