Pollutants#
Note
Engine: OpenSWMM 6 — refactored.
Pollutants and their fate parameters. Shape mirrors Nodes —
solver.pollutants is the collection, Pollutant is the
wrapper.
Reference: openswmm_pollutants.h.
Quickstart#
from openswmm.engine import Solver, ConcentrationUnits
with Solver("model.inp") as s:
tss = s.pollutants["TSS"]
print(tss.units, tss.kdecay, tss.init_conc)
# Decay / fate
tss.kdecay = 0.05
# Runtime injection at a node or link.
s.pollutants.set_node_quality("J1", "TSS", 12.0)
s.pollutants.set_link_quality("C1", "TSS", 8.0)
Collection#
Operation |
What it does |
|---|---|
|
Standard container protocol over |
|
Id ↔ index lookup. |
|
Append a pollutant. Returns the new |
|
Runtime quality injection at a node. |
|
Runtime quality injection in a link. |
Wrapper: Pollutant#
Property |
Type |
Mode |
Meaning |
|---|---|---|---|
|
|
read-only |
|
|
|
read-only |
|
|
|
read/write |
First-order decay coefficient. |
|
|
read/write |
Molecular weight. |
|
|
read/write |
Inflow concentrations. |
|
|
read/write |
|
|
|
read-only |
Use Pollutant.set_co_pollutant(other, fraction)() to set the
co-pollutant link.
See also#
Nodes —
Node.quality()andset_quality_mass_flux.Links —
Link.quality().Subcatchments —
Subcatchment.quality().