Links
To change what a link is, use its typed settings Live View. To control it or
read what it is doing, use the link itself. Runtime controls, forcing, quality,
current results, snapshots, and statistics live there.
from swmmrs import Simulation
from swmmrs.objects import CircularCrossSection, Conduit, Pump
with Simulation("model.inp", "model.rpt") as simulation:
conduit = simulation.links["C-1"]
if isinstance(conduit, Conduit):
conduit.settings.update(
length=350.0,
roughness=0.013,
cross_section=CircularCrossSection(diameter=2.0),
)
pump = simulation.links["PUMP-1"]
if isinstance(pump, Pump):
pump.settings.use_curve(simulation.curves["PUMP-CURVE"])
# Runtime controls stay on the link, not its stable settings view.
pump.target_setting = 0.75
Look for an attached inlet on the link that owns it. The optional link.inlet
provides access; there is no global simulation.inlets collection.
link.inlet.settings exposes read-only count, local geometry, and the reusable
design from simulation.inlet_designs. Persistent percent_clogged and
flow_limit controls remain top-level on the inlet, while capture/backflow
values are runtime results. See Inspect model
definitions for more detail.
from swmmrs import Simulation
with Simulation("model.inp", "model.rpt") as simulation:
link = simulation.links["C-1"]
inlet = link.inlet
if inlet is not None:
print(inlet.settings.count, inlet.settings.design.id)
print(inlet.settings.local_depression, inlet.settings.local_width)
inlet.update(percent_clogged=15.0, flow_limit=2.0)
simulation.start()
while simulation.step() is not None:
if inlet is not None:
print(inlet.captured_flow, inlet.backflow)
flows = simulation.links.snapshot(["C-1"])
statistics = simulation.links.statistics()
pollut_quality, reactor concentration, and total pollutant load are immutable
current-result mappings. override_pollutant_concentrations({...}) atomically
queues nonnegative concentrations for the next quality-routing step only.
external_pollutant_mass_flux is a persistent live mutable mapping with atomic
item assignment and sparse update(). Deletion resets one configured pollutant
to zero, clear() resets all configured pollutants, and whole-property
assignment is unsupported.
from swmmrs import Simulation
with Simulation("model.inp", "model.rpt") as simulation:
link = simulation.links["C-1"]
flux = link.external_pollutant_mass_flux
flux.update({"TSS": 1.5, "Lead": 0.05})
del flux["Lead"] # Reset one pollutant to zero.
simulation.start()
link.override_pollutant_concentrations({"TSS": 80.0})
simulation.step()
print(dict(link.pollut_quality))
print(dict(link.reactor_pollutant_concentration))
flux.clear() # Reset all configured pollutant fluxes to zero.
Typed, generation-bound views over configured SWMM project objects.
All view instances retain the simulation and project generation that created them. They validate that identity before accessing native state, so retained views cannot silently address a subsequently reopened project.
| CLASS | DESCRIPTION |
|---|---|
LinkCollection |
Provide link lookup and aligned hydraulic, quality, and statistics snapshots. |
Link |
Expose link identity, stable settings, runtime controls, and current results. |
LinkSettings |
Expose stable common-link settings through one atomic owner. |
Conduit |
Expose a conduit link with stable settings and current hydraulics. |
ConduitSettings |
Expose stable conduit settings and cross-section replacement. |
CircularCrossSection |
Store a circular conduit cross-section in project length units. |
StandardCrossSection |
Store a standard SWMM cross-section declaration. |
CustomCrossSection |
Store a custom-shape cross-section relationship and full depth. |
IrregularCrossSection |
Store an irregular-transect cross-section relationship. |
StreetCrossSection |
Store a street cross-section relationship. |
Pump |
Expose a pump link with stable settings and current hydraulics. |
PumpSettings |
Expose stable pump settings and explicit operating-mode transitions. |
Orifice |
Expose an orifice link with stable settings and current hydraulics. |
OrificeSettings |
Expose stable orifice settings. |
Weir |
Expose a weir link with stable settings and current hydraulics. |
WeirSettings |
Expose stable weir settings. |
Outlet |
Expose an outlet link with stable settings and current hydraulics. |
OutletSettings |
Expose stable outlet-rating settings. |
FunctionalOutletRating |
Store a functional outlet rating in project units. |
TabularOutletRating |
Store a curve-driven outlet rating. |
Inlet |
Expose persistent controls and current results for one link-local inlet. |
InletSettings |
Expose the stable read-only placement settings of one link-local inlet. |
InletDesign |
Expose a generation-bound inlet-design definition. |
LinkCollection
flowchart TD
swmmrs.objects.LinkCollection[LinkCollection]
swmmrs.objects._collections._Collection[_Collection]
swmmrs.objects._collections._Collection --> swmmrs.objects.LinkCollection
click swmmrs.objects.LinkCollection href "" "swmmrs.objects.LinkCollection"
click swmmrs.objects._collections._Collection href "" "swmmrs.objects._collections._Collection"
Provide link lookup and aligned hydraulic, quality, and statistics snapshots.
| METHOD | DESCRIPTION |
|---|---|
__contains__ |
Return whether a case-insensitive object ID is configured. |
__getitem__ |
Return a link view by case-insensitive configured ID. |
__iter__ |
Return an iterator over object IDs in configured project order. |
__len__ |
Return the number of configured objects in this collection. |
by_index |
Return a link view by its zero-based configured position. |
quality_snapshot |
Copy current link quality in canonical or requested order. |
snapshot |
Copy current link hydraulics in canonical or requested order. |
statistics |
Copy cumulative link statistics in canonical or requested order. |
__contains__
__getitem__
Return a link view by case-insensitive configured ID.
__iter__
Return an iterator over object IDs in configured project order.
quality_snapshot
Copy current link quality in canonical or requested order.
snapshot
Copy current link hydraulics in canonical or requested order.
Link
flowchart TD
swmmrs.objects.Link[Link]
swmmrs.objects._base._LiveView[_LiveView]
swmmrs.objects._base._LiveView --> swmmrs.objects.Link
click swmmrs.objects.Link href "" "swmmrs.objects.Link"
click swmmrs.objects._base._LiveView href "" "swmmrs.objects._base._LiveView"
Expose link identity, stable settings, runtime controls, and current results.
| METHOD | DESCRIPTION |
|---|---|
override_pollutant_concentrations |
Atomically override concentrations for the next quality step. Lifecycle: |
| ATTRIBUTE | DESCRIPTION |
|---|---|
capacity |
Return native subtype capacity fraction or current setting.
TYPE:
|
depth |
Return current depth in project length units.
TYPE:
|
downstream_surface_area |
Return current downstream surface area in project area units.
TYPE:
|
external_pollutant_mass_flux |
Return canonical persistent mass fluxes as a live mutable mapping.
TYPE:
|
flow |
Return signed current flow in project flow units.
TYPE:
|
flow_limit |
Flow limit. Setter lifecycle:
TYPE:
|
froude_number |
Return the current dimensionless Froude number.
TYPE:
|
inlet |
Return this link's generation-bound inlet placement, when configured.
TYPE:
|
kind |
Return the configured link subtype.
TYPE:
|
pollut_quality |
Return immutable current concentrations by canonical pollutant ID. |
pollutant_total_load |
Return current total routed loads in reporting units. |
reactor_pollutant_concentration |
Return current pre-override reactor concentrations. |
setting |
Return the current setting or pump speed factor.
TYPE:
|
settings |
Return stable common-link settings.
TYPE:
|
statistics |
Return immutable cumulative common-link statistics.
TYPE:
|
target_setting |
Target setting or pump speed. Setter lifecycle:
TYPE:
|
time_closed |
Return current continuously-closed duration.
TYPE:
|
time_open |
Return current continuously-open duration.
TYPE:
|
upstream_surface_area |
Return current upstream surface area in project area units.
TYPE:
|
velocity |
Return current velocity in project length units per second.
TYPE:
|
volume |
Return current volume in project volume units.
TYPE:
|
downstream_surface_area
property
downstream_surface_area: float
Return current downstream surface area in project area units.
external_pollutant_mass_flux
property
external_pollutant_mass_flux: MutableMapping[str, float]
Return canonical persistent mass fluxes as a live mutable mapping.
Item assignment and update() are atomic sparse mutations. Deletion resets
one configured pollutant to zero; clear() atomically resets every pollutant.
Nonzero values require a non-dummy conduit; other link types accept only an
all-zero candidate.
Mutation lifecycle: OPEN, RUNNING, ENDED.
inlet
property
inlet: Inlet | None
Return this link's generation-bound inlet placement, when configured.
pollut_quality
property
Return immutable current concentrations by canonical pollutant ID.
pollutant_total_load
property
Return current total routed loads in reporting units.
reactor_pollutant_concentration
property
Return current pre-override reactor concentrations.
target_setting
property
writable
target_setting: float
Target setting or pump speed. Setter lifecycle: RUNNING.
upstream_surface_area
property
upstream_surface_area: float
Return current upstream surface area in project area units.
LinkSettings
Expose stable common-link settings through one atomic owner.
| METHOD | DESCRIPTION |
|---|---|
update |
Atomically update supplied stable link settings. |
| ATTRIBUTE | DESCRIPTION |
|---|---|
average_loss_coefficient |
Return the dimensionless average loss coefficient.
TYPE:
|
flow_direction |
Return the configured numeric orientation sign.
TYPE:
|
full_depth |
Return full depth in project length units.
TYPE:
|
full_flow |
Return full flow in project flow units.
TYPE:
|
has_flap_gate |
Return whether the link has a flap gate.
TYPE:
|
included_in_report |
Return whether detailed output includes this link.
TYPE:
|
initial_flow |
Return initial flow in project flow units.
TYPE:
|
inlet_loss_coefficient |
Return the dimensionless inlet loss coefficient.
TYPE:
|
inlet_node |
Return the generation-bound upstream node relationship.
TYPE:
|
inlet_offset |
Return inlet offset in project length units.
TYPE:
|
outlet_loss_coefficient |
Return the dimensionless outlet loss coefficient.
TYPE:
|
outlet_node |
Return the generation-bound downstream node relationship.
TYPE:
|
outlet_offset |
Return outlet offset in project length units.
TYPE:
|
seepage_rate |
Return seepage rate in project rainfall units.
TYPE:
|
tag |
Return the metadata tag.
TYPE:
|
average_loss_coefficient
property
writable
average_loss_coefficient: float
Return the dimensionless average loss coefficient.
flow_direction
property
flow_direction: Literal[-1, 1]
Return the configured numeric orientation sign.
included_in_report
property
writable
included_in_report: bool
Return whether detailed output includes this link.
inlet_loss_coefficient
property
writable
inlet_loss_coefficient: float
Return the dimensionless inlet loss coefficient.
inlet_node
property
writable
inlet_node: Node
Return the generation-bound upstream node relationship.
outlet_loss_coefficient
property
writable
outlet_loss_coefficient: float
Return the dimensionless outlet loss coefficient.
outlet_node
property
writable
outlet_node: Node
Return the generation-bound downstream node relationship.
Conduit
flowchart TD
swmmrs.objects.Conduit[Conduit]
swmmrs.objects._links.Link[Link]
swmmrs.objects._base._LiveView[_LiveView]
swmmrs.objects._links.Link --> swmmrs.objects.Conduit
swmmrs.objects._base._LiveView --> swmmrs.objects._links.Link
click swmmrs.objects.Conduit href "" "swmmrs.objects.Conduit"
click swmmrs.objects._links.Link href "" "swmmrs.objects._links.Link"
click swmmrs.objects._base._LiveView href "" "swmmrs.objects._base._LiveView"
Expose a conduit link with stable settings and current hydraulics.
| METHOD | DESCRIPTION |
|---|---|
override_pollutant_concentrations |
Atomically override concentrations for the next quality step. Lifecycle: |
| ATTRIBUTE | DESCRIPTION |
|---|---|
capacity |
Return native subtype capacity fraction or current setting.
TYPE:
|
depth |
Return current depth in project length units.
TYPE:
|
downstream_surface_area |
Return current downstream surface area in project area units.
TYPE:
|
external_pollutant_mass_flux |
Return canonical persistent mass fluxes as a live mutable mapping.
TYPE:
|
flow |
Return signed current flow in project flow units.
TYPE:
|
flow_limit |
Flow limit. Setter lifecycle:
TYPE:
|
froude_number |
Return the current dimensionless Froude number.
TYPE:
|
inlet |
Return this link's generation-bound inlet placement, when configured.
TYPE:
|
kind |
Return the configured link subtype.
TYPE:
|
pollut_quality |
Return immutable current concentrations by canonical pollutant ID. |
pollutant_total_load |
Return current total routed loads in reporting units. |
reactor_pollutant_concentration |
Return current pre-override reactor concentrations. |
setting |
Return the current setting or pump speed factor.
TYPE:
|
settings |
Return stable conduit settings.
TYPE:
|
statistics |
Return immutable cumulative common-link statistics.
TYPE:
|
target_setting |
Target setting or pump speed. Setter lifecycle:
TYPE:
|
time_closed |
Return current continuously-closed duration.
TYPE:
|
time_open |
Return current continuously-open duration.
TYPE:
|
top_width |
Return current conduit top width in project length units.
TYPE:
|
upstream_surface_area |
Return current upstream surface area in project area units.
TYPE:
|
velocity |
Return current velocity in project length units per second.
TYPE:
|
volume |
Return current volume in project volume units.
TYPE:
|
downstream_surface_area
property
downstream_surface_area: float
Return current downstream surface area in project area units.
external_pollutant_mass_flux
property
external_pollutant_mass_flux: MutableMapping[str, float]
Return canonical persistent mass fluxes as a live mutable mapping.
Item assignment and update() are atomic sparse mutations. Deletion resets
one configured pollutant to zero; clear() atomically resets every pollutant.
Nonzero values require a non-dummy conduit; other link types accept only an
all-zero candidate.
Mutation lifecycle: OPEN, RUNNING, ENDED.
inlet
property
inlet: Inlet | None
Return this link's generation-bound inlet placement, when configured.
pollut_quality
property
Return immutable current concentrations by canonical pollutant ID.
pollutant_total_load
property
Return current total routed loads in reporting units.
reactor_pollutant_concentration
property
Return current pre-override reactor concentrations.
target_setting
property
writable
target_setting: float
Target setting or pump speed. Setter lifecycle: RUNNING.
upstream_surface_area
property
upstream_surface_area: float
Return current upstream surface area in project area units.
ConduitSettings
flowchart TD
swmmrs.objects.ConduitSettings[ConduitSettings]
swmmrs.objects._links.LinkSettings[LinkSettings]
swmmrs.objects._links.LinkSettings --> swmmrs.objects.ConduitSettings
click swmmrs.objects.ConduitSettings href "" "swmmrs.objects.ConduitSettings"
click swmmrs.objects._links.LinkSettings href "" "swmmrs.objects._links.LinkSettings"
Expose stable conduit settings and cross-section replacement.
| METHOD | DESCRIPTION |
|---|---|
update |
Atomically update supplied stable link settings. |
| ATTRIBUTE | DESCRIPTION |
|---|---|
average_loss_coefficient |
Return the dimensionless average loss coefficient.
TYPE:
|
barrels |
Return the positive number of identical conduit barrels.
TYPE:
|
cross_section |
Return the complete typed cross-section declaration, when retained.
TYPE:
|
flow_direction |
Return the configured numeric orientation sign.
TYPE:
|
full_depth |
Return full depth in project length units.
TYPE:
|
full_flow |
Return full flow in project flow units.
TYPE:
|
has_flap_gate |
Return whether the link has a flap gate.
TYPE:
|
included_in_report |
Return whether detailed output includes this link.
TYPE:
|
initial_flow |
Return initial flow in project flow units.
TYPE:
|
inlet_loss_coefficient |
Return the dimensionless inlet loss coefficient.
TYPE:
|
inlet_node |
Return the generation-bound upstream node relationship.
TYPE:
|
inlet_offset |
Return inlet offset in project length units.
TYPE:
|
length |
Return conduit length in project length units.
TYPE:
|
outlet_loss_coefficient |
Return the dimensionless outlet loss coefficient.
TYPE:
|
outlet_node |
Return the generation-bound downstream node relationship.
TYPE:
|
outlet_offset |
Return outlet offset in project length units.
TYPE:
|
roughness |
Return conduit Manning roughness.
TYPE:
|
seepage_rate |
Return seepage rate in project rainfall units.
TYPE:
|
slope |
Return conduit slope as a fraction.
TYPE:
|
tag |
Return the metadata tag.
TYPE:
|
average_loss_coefficient
property
writable
average_loss_coefficient: float
Return the dimensionless average loss coefficient.
cross_section
property
writable
Return the complete typed cross-section declaration, when retained.
flow_direction
property
flow_direction: Literal[-1, 1]
Return the configured numeric orientation sign.
included_in_report
property
writable
included_in_report: bool
Return whether detailed output includes this link.
inlet_loss_coefficient
property
writable
inlet_loss_coefficient: float
Return the dimensionless inlet loss coefficient.
inlet_node
property
writable
inlet_node: Node
Return the generation-bound upstream node relationship.
outlet_loss_coefficient
property
writable
outlet_loss_coefficient: float
Return the dimensionless outlet loss coefficient.
outlet_node
property
writable
outlet_node: Node
Return the generation-bound downstream node relationship.
CircularCrossSection
Store a circular conduit cross-section in project length units.
StandardCrossSection
Store a standard SWMM cross-section declaration.
Geometry follows SWMM's four XSECTION parameters. Dimensional entries use project length units; side counts, side slopes, power exponents, catalog size codes, force-main roughness/C-factors, and unused entries do not.
CustomCrossSection
Store a custom-shape cross-section relationship and full depth.
IrregularCrossSection
Store an irregular-transect cross-section relationship.
StreetCrossSection
Store a street cross-section relationship.
Pump
flowchart TD
swmmrs.objects.Pump[Pump]
swmmrs.objects._links.Link[Link]
swmmrs.objects._base._LiveView[_LiveView]
swmmrs.objects._links.Link --> swmmrs.objects.Pump
swmmrs.objects._base._LiveView --> swmmrs.objects._links.Link
click swmmrs.objects.Pump href "" "swmmrs.objects.Pump"
click swmmrs.objects._links.Link href "" "swmmrs.objects._links.Link"
click swmmrs.objects._base._LiveView href "" "swmmrs.objects._base._LiveView"
Expose a pump link with stable settings and current hydraulics.
| METHOD | DESCRIPTION |
|---|---|
override_pollutant_concentrations |
Atomically override concentrations for the next quality step. Lifecycle: |
| ATTRIBUTE | DESCRIPTION |
|---|---|
capacity |
Return native subtype capacity fraction or current setting.
TYPE:
|
depth |
Return current depth in project length units.
TYPE:
|
downstream_surface_area |
Return current downstream surface area in project area units.
TYPE:
|
external_pollutant_mass_flux |
Return canonical persistent mass fluxes as a live mutable mapping.
TYPE:
|
flow |
Return signed current flow in project flow units.
TYPE:
|
flow_limit |
Flow limit. Setter lifecycle:
TYPE:
|
froude_number |
Return the current dimensionless Froude number.
TYPE:
|
inlet |
Return this link's generation-bound inlet placement, when configured.
TYPE:
|
kind |
Return the configured link subtype.
TYPE:
|
pollut_quality |
Return immutable current concentrations by canonical pollutant ID. |
pollutant_total_load |
Return current total routed loads in reporting units. |
pump_statistics |
Return immutable cumulative pump statistics.
TYPE:
|
reactor_pollutant_concentration |
Return current pre-override reactor concentrations. |
setting |
Return the current setting or pump speed factor.
TYPE:
|
settings |
Return stable pump settings.
TYPE:
|
statistics |
Return immutable cumulative common-link statistics.
TYPE:
|
target_setting |
Target setting or pump speed. Setter lifecycle:
TYPE:
|
time_closed |
Return current continuously-closed duration.
TYPE:
|
time_open |
Return current continuously-open duration.
TYPE:
|
upstream_surface_area |
Return current upstream surface area in project area units.
TYPE:
|
velocity |
Return current velocity in project length units per second.
TYPE:
|
volume |
Return current volume in project volume units.
TYPE:
|
downstream_surface_area
property
downstream_surface_area: float
Return current downstream surface area in project area units.
external_pollutant_mass_flux
property
external_pollutant_mass_flux: MutableMapping[str, float]
Return canonical persistent mass fluxes as a live mutable mapping.
Item assignment and update() are atomic sparse mutations. Deletion resets
one configured pollutant to zero; clear() atomically resets every pollutant.
Nonzero values require a non-dummy conduit; other link types accept only an
all-zero candidate.
Mutation lifecycle: OPEN, RUNNING, ENDED.
inlet
property
inlet: Inlet | None
Return this link's generation-bound inlet placement, when configured.
pollut_quality
property
Return immutable current concentrations by canonical pollutant ID.
pollutant_total_load
property
Return current total routed loads in reporting units.
pump_statistics
property
Return immutable cumulative pump statistics.
reactor_pollutant_concentration
property
Return current pre-override reactor concentrations.
target_setting
property
writable
target_setting: float
Target setting or pump speed. Setter lifecycle: RUNNING.
upstream_surface_area
property
upstream_surface_area: float
Return current upstream surface area in project area units.
PumpSettings
flowchart TD
swmmrs.objects.PumpSettings[PumpSettings]
swmmrs.objects._links.LinkSettings[LinkSettings]
swmmrs.objects._links.LinkSettings --> swmmrs.objects.PumpSettings
click swmmrs.objects.PumpSettings href "" "swmmrs.objects.PumpSettings"
click swmmrs.objects._links.LinkSettings href "" "swmmrs.objects._links.LinkSettings"
Expose stable pump settings and explicit operating-mode transitions.
| METHOD | DESCRIPTION |
|---|---|
update |
Atomically update supplied stable link settings. |
use_curve |
Switch to curve-driven operation while preserving scalar settings. |
use_ideal |
Switch to ideal operation while preserving scalar settings. |
| ATTRIBUTE | DESCRIPTION |
|---|---|
average_loss_coefficient |
Return the dimensionless average loss coefficient.
TYPE:
|
curve |
Return the pump curve, or
TYPE:
|
flow_direction |
Return the configured numeric orientation sign.
TYPE:
|
full_depth |
Return full depth in project length units.
TYPE:
|
full_flow |
Return full flow in project flow units.
TYPE:
|
has_flap_gate |
Return whether the link has a flap gate.
TYPE:
|
included_in_report |
Return whether detailed output includes this link.
TYPE:
|
initial_flow |
Return initial flow in project flow units.
TYPE:
|
initial_setting |
Return the initial dimensionless pump speed setting.
TYPE:
|
inlet_loss_coefficient |
Return the dimensionless inlet loss coefficient.
TYPE:
|
inlet_node |
Return the generation-bound upstream node relationship.
TYPE:
|
inlet_offset |
Return inlet offset in project length units.
TYPE:
|
outlet_loss_coefficient |
Return the dimensionless outlet loss coefficient.
TYPE:
|
outlet_node |
Return the generation-bound downstream node relationship.
TYPE:
|
outlet_offset |
Return outlet offset in project length units.
TYPE:
|
seepage_rate |
Return seepage rate in project rainfall units.
TYPE:
|
shutoff_depth |
Return pump shutoff depth in project length units.
TYPE:
|
startup_depth |
Return pump startup depth in project length units.
TYPE:
|
tag |
Return the metadata tag.
TYPE:
|
average_loss_coefficient
property
writable
average_loss_coefficient: float
Return the dimensionless average loss coefficient.
flow_direction
property
flow_direction: Literal[-1, 1]
Return the configured numeric orientation sign.
included_in_report
property
writable
included_in_report: bool
Return whether detailed output includes this link.
initial_setting
property
writable
initial_setting: float
Return the initial dimensionless pump speed setting.
inlet_loss_coefficient
property
writable
inlet_loss_coefficient: float
Return the dimensionless inlet loss coefficient.
inlet_node
property
writable
inlet_node: Node
Return the generation-bound upstream node relationship.
outlet_loss_coefficient
property
writable
outlet_loss_coefficient: float
Return the dimensionless outlet loss coefficient.
outlet_node
property
writable
outlet_node: Node
Return the generation-bound downstream node relationship.
shutoff_depth
property
writable
shutoff_depth: float
Return pump shutoff depth in project length units.
startup_depth
property
writable
startup_depth: float
Return pump startup depth in project length units.
use_curve
use_curve(curve: Curve) -> None
Switch to curve-driven operation while preserving scalar settings.
Orifice
flowchart TD
swmmrs.objects.Orifice[Orifice]
swmmrs.objects._links.Link[Link]
swmmrs.objects._base._LiveView[_LiveView]
swmmrs.objects._links.Link --> swmmrs.objects.Orifice
swmmrs.objects._base._LiveView --> swmmrs.objects._links.Link
click swmmrs.objects.Orifice href "" "swmmrs.objects.Orifice"
click swmmrs.objects._links.Link href "" "swmmrs.objects._links.Link"
click swmmrs.objects._base._LiveView href "" "swmmrs.objects._base._LiveView"
Expose an orifice link with stable settings and current hydraulics.
| METHOD | DESCRIPTION |
|---|---|
override_pollutant_concentrations |
Atomically override concentrations for the next quality step. Lifecycle: |
| ATTRIBUTE | DESCRIPTION |
|---|---|
capacity |
Return native subtype capacity fraction or current setting.
TYPE:
|
depth |
Return current depth in project length units.
TYPE:
|
downstream_surface_area |
Return current downstream surface area in project area units.
TYPE:
|
external_pollutant_mass_flux |
Return canonical persistent mass fluxes as a live mutable mapping.
TYPE:
|
flow |
Return signed current flow in project flow units.
TYPE:
|
flow_limit |
Flow limit. Setter lifecycle:
TYPE:
|
froude_number |
Return the current dimensionless Froude number.
TYPE:
|
inlet |
Return this link's generation-bound inlet placement, when configured.
TYPE:
|
kind |
Return the configured link subtype.
TYPE:
|
pollut_quality |
Return immutable current concentrations by canonical pollutant ID. |
pollutant_total_load |
Return current total routed loads in reporting units. |
reactor_pollutant_concentration |
Return current pre-override reactor concentrations. |
setting |
Return the current setting or pump speed factor.
TYPE:
|
settings |
Return stable orifice settings.
TYPE:
|
statistics |
Return immutable cumulative common-link statistics.
TYPE:
|
target_setting |
Target setting or pump speed. Setter lifecycle:
TYPE:
|
time_closed |
Return current continuously-closed duration.
TYPE:
|
time_open |
Return current continuously-open duration.
TYPE:
|
upstream_surface_area |
Return current upstream surface area in project area units.
TYPE:
|
velocity |
Return current velocity in project length units per second.
TYPE:
|
volume |
Return current volume in project volume units.
TYPE:
|
downstream_surface_area
property
downstream_surface_area: float
Return current downstream surface area in project area units.
external_pollutant_mass_flux
property
external_pollutant_mass_flux: MutableMapping[str, float]
Return canonical persistent mass fluxes as a live mutable mapping.
Item assignment and update() are atomic sparse mutations. Deletion resets
one configured pollutant to zero; clear() atomically resets every pollutant.
Nonzero values require a non-dummy conduit; other link types accept only an
all-zero candidate.
Mutation lifecycle: OPEN, RUNNING, ENDED.
inlet
property
inlet: Inlet | None
Return this link's generation-bound inlet placement, when configured.
pollut_quality
property
Return immutable current concentrations by canonical pollutant ID.
pollutant_total_load
property
Return current total routed loads in reporting units.
reactor_pollutant_concentration
property
Return current pre-override reactor concentrations.
target_setting
property
writable
target_setting: float
Target setting or pump speed. Setter lifecycle: RUNNING.
upstream_surface_area
property
upstream_surface_area: float
Return current upstream surface area in project area units.
OrificeSettings
flowchart TD
swmmrs.objects.OrificeSettings[OrificeSettings]
swmmrs.objects._links.LinkSettings[LinkSettings]
swmmrs.objects._links.LinkSettings --> swmmrs.objects.OrificeSettings
click swmmrs.objects.OrificeSettings href "" "swmmrs.objects.OrificeSettings"
click swmmrs.objects._links.LinkSettings href "" "swmmrs.objects._links.LinkSettings"
Expose stable orifice settings.
| METHOD | DESCRIPTION |
|---|---|
update |
Atomically update supplied stable link settings. |
| ATTRIBUTE | DESCRIPTION |
|---|---|
average_loss_coefficient |
Return the dimensionless average loss coefficient.
TYPE:
|
discharge_coefficient |
Return the dimensionless orifice discharge coefficient.
TYPE:
|
flow_direction |
Return the configured numeric orientation sign.
TYPE:
|
full_depth |
Return full depth in project length units.
TYPE:
|
full_flow |
Return full flow in project flow units.
TYPE:
|
has_flap_gate |
Return whether the link has a flap gate.
TYPE:
|
included_in_report |
Return whether detailed output includes this link.
TYPE:
|
initial_flow |
Return initial flow in project flow units.
TYPE:
|
inlet_loss_coefficient |
Return the dimensionless inlet loss coefficient.
TYPE:
|
inlet_node |
Return the generation-bound upstream node relationship.
TYPE:
|
inlet_offset |
Return inlet offset in project length units.
TYPE:
|
kind |
Return the orifice orientation.
TYPE:
|
opening_time_hours |
Return the hours required to fully open or close the orifice.
TYPE:
|
outlet_loss_coefficient |
Return the dimensionless outlet loss coefficient.
TYPE:
|
outlet_node |
Return the generation-bound downstream node relationship.
TYPE:
|
outlet_offset |
Return outlet offset in project length units.
TYPE:
|
seepage_rate |
Return seepage rate in project rainfall units.
TYPE:
|
tag |
Return the metadata tag.
TYPE:
|
average_loss_coefficient
property
writable
average_loss_coefficient: float
Return the dimensionless average loss coefficient.
discharge_coefficient
property
writable
discharge_coefficient: float
Return the dimensionless orifice discharge coefficient.
flow_direction
property
flow_direction: Literal[-1, 1]
Return the configured numeric orientation sign.
included_in_report
property
writable
included_in_report: bool
Return whether detailed output includes this link.
inlet_loss_coefficient
property
writable
inlet_loss_coefficient: float
Return the dimensionless inlet loss coefficient.
inlet_node
property
writable
inlet_node: Node
Return the generation-bound upstream node relationship.
opening_time_hours
property
writable
opening_time_hours: float
Return the hours required to fully open or close the orifice.
outlet_loss_coefficient
property
writable
outlet_loss_coefficient: float
Return the dimensionless outlet loss coefficient.
outlet_node
property
writable
outlet_node: Node
Return the generation-bound downstream node relationship.
Weir
flowchart TD
swmmrs.objects.Weir[Weir]
swmmrs.objects._links.Link[Link]
swmmrs.objects._base._LiveView[_LiveView]
swmmrs.objects._links.Link --> swmmrs.objects.Weir
swmmrs.objects._base._LiveView --> swmmrs.objects._links.Link
click swmmrs.objects.Weir href "" "swmmrs.objects.Weir"
click swmmrs.objects._links.Link href "" "swmmrs.objects._links.Link"
click swmmrs.objects._base._LiveView href "" "swmmrs.objects._base._LiveView"
Expose a weir link with stable settings and current hydraulics.
| METHOD | DESCRIPTION |
|---|---|
override_pollutant_concentrations |
Atomically override concentrations for the next quality step. Lifecycle: |
| ATTRIBUTE | DESCRIPTION |
|---|---|
capacity |
Return native subtype capacity fraction or current setting.
TYPE:
|
depth |
Return current depth in project length units.
TYPE:
|
downstream_surface_area |
Return current downstream surface area in project area units.
TYPE:
|
external_pollutant_mass_flux |
Return canonical persistent mass fluxes as a live mutable mapping.
TYPE:
|
flow |
Return signed current flow in project flow units.
TYPE:
|
flow_limit |
Flow limit. Setter lifecycle:
TYPE:
|
froude_number |
Return the current dimensionless Froude number.
TYPE:
|
inlet |
Return this link's generation-bound inlet placement, when configured.
TYPE:
|
kind |
Return the configured link subtype.
TYPE:
|
pollut_quality |
Return immutable current concentrations by canonical pollutant ID. |
pollutant_total_load |
Return current total routed loads in reporting units. |
reactor_pollutant_concentration |
Return current pre-override reactor concentrations. |
setting |
Return the current setting or pump speed factor.
TYPE:
|
settings |
Return stable weir settings.
TYPE:
|
statistics |
Return immutable cumulative common-link statistics.
TYPE:
|
target_setting |
Target setting or pump speed. Setter lifecycle:
TYPE:
|
time_closed |
Return current continuously-closed duration.
TYPE:
|
time_open |
Return current continuously-open duration.
TYPE:
|
upstream_surface_area |
Return current upstream surface area in project area units.
TYPE:
|
velocity |
Return current velocity in project length units per second.
TYPE:
|
volume |
Return current volume in project volume units.
TYPE:
|
downstream_surface_area
property
downstream_surface_area: float
Return current downstream surface area in project area units.
external_pollutant_mass_flux
property
external_pollutant_mass_flux: MutableMapping[str, float]
Return canonical persistent mass fluxes as a live mutable mapping.
Item assignment and update() are atomic sparse mutations. Deletion resets
one configured pollutant to zero; clear() atomically resets every pollutant.
Nonzero values require a non-dummy conduit; other link types accept only an
all-zero candidate.
Mutation lifecycle: OPEN, RUNNING, ENDED.
inlet
property
inlet: Inlet | None
Return this link's generation-bound inlet placement, when configured.
pollut_quality
property
Return immutable current concentrations by canonical pollutant ID.
pollutant_total_load
property
Return current total routed loads in reporting units.
reactor_pollutant_concentration
property
Return current pre-override reactor concentrations.
target_setting
property
writable
target_setting: float
Target setting or pump speed. Setter lifecycle: RUNNING.
upstream_surface_area
property
upstream_surface_area: float
Return current upstream surface area in project area units.
WeirSettings
flowchart TD
swmmrs.objects.WeirSettings[WeirSettings]
swmmrs.objects._links.LinkSettings[LinkSettings]
swmmrs.objects._links.LinkSettings --> swmmrs.objects.WeirSettings
click swmmrs.objects.WeirSettings href "" "swmmrs.objects.WeirSettings"
click swmmrs.objects._links.LinkSettings href "" "swmmrs.objects._links.LinkSettings"
Expose stable weir settings.
| METHOD | DESCRIPTION |
|---|---|
update |
Atomically update supplied stable link settings. |
| ATTRIBUTE | DESCRIPTION |
|---|---|
average_loss_coefficient |
Return the dimensionless average loss coefficient.
TYPE:
|
can_surcharge |
Return whether the weir may surcharge.
TYPE:
|
coefficient_curve |
Return the optional weir coefficient-curve relationship.
TYPE:
|
discharge_coefficient |
Return the primary weir discharge coefficient.
TYPE:
|
end_contractions |
Return the number of weir end contractions.
TYPE:
|
end_discharge_coefficient |
Return the weir end-section discharge coefficient.
TYPE:
|
flow_direction |
Return the configured numeric orientation sign.
TYPE:
|
full_depth |
Return full depth in project length units.
TYPE:
|
full_flow |
Return full flow in project flow units.
TYPE:
|
has_flap_gate |
Return whether the link has a flap gate.
TYPE:
|
included_in_report |
Return whether detailed output includes this link.
TYPE:
|
initial_flow |
Return initial flow in project flow units.
TYPE:
|
inlet_loss_coefficient |
Return the dimensionless inlet loss coefficient.
TYPE:
|
inlet_node |
Return the generation-bound upstream node relationship.
TYPE:
|
inlet_offset |
Return inlet offset in project length units.
TYPE:
|
kind |
Return the weir geometry and flow family.
TYPE:
|
outlet_loss_coefficient |
Return the dimensionless outlet loss coefficient.
TYPE:
|
outlet_node |
Return the generation-bound downstream node relationship.
TYPE:
|
outlet_offset |
Return outlet offset in project length units.
TYPE:
|
roadway_surface |
Return the roadway-weir surface material.
TYPE:
|
roadway_width |
Return roadway width in project length units.
TYPE:
|
seepage_rate |
Return seepage rate in project rainfall units.
TYPE:
|
tag |
Return the metadata tag.
TYPE:
|
average_loss_coefficient
property
writable
average_loss_coefficient: float
Return the dimensionless average loss coefficient.
coefficient_curve
property
writable
coefficient_curve: Curve | None
Return the optional weir coefficient-curve relationship.
discharge_coefficient
property
writable
discharge_coefficient: float
Return the primary weir discharge coefficient.
end_contractions
property
writable
end_contractions: float
Return the number of weir end contractions.
end_discharge_coefficient
property
writable
end_discharge_coefficient: float
Return the weir end-section discharge coefficient.
flow_direction
property
flow_direction: Literal[-1, 1]
Return the configured numeric orientation sign.
included_in_report
property
writable
included_in_report: bool
Return whether detailed output includes this link.
inlet_loss_coefficient
property
writable
inlet_loss_coefficient: float
Return the dimensionless inlet loss coefficient.
inlet_node
property
writable
inlet_node: Node
Return the generation-bound upstream node relationship.
outlet_loss_coefficient
property
writable
outlet_loss_coefficient: float
Return the dimensionless outlet loss coefficient.
outlet_node
property
writable
outlet_node: Node
Return the generation-bound downstream node relationship.
roadway_surface
property
writable
roadway_surface: RoadSurface
Return the roadway-weir surface material.
Outlet
flowchart TD
swmmrs.objects.Outlet[Outlet]
swmmrs.objects._links.Link[Link]
swmmrs.objects._base._LiveView[_LiveView]
swmmrs.objects._links.Link --> swmmrs.objects.Outlet
swmmrs.objects._base._LiveView --> swmmrs.objects._links.Link
click swmmrs.objects.Outlet href "" "swmmrs.objects.Outlet"
click swmmrs.objects._links.Link href "" "swmmrs.objects._links.Link"
click swmmrs.objects._base._LiveView href "" "swmmrs.objects._base._LiveView"
Expose an outlet link with stable settings and current hydraulics.
| METHOD | DESCRIPTION |
|---|---|
override_pollutant_concentrations |
Atomically override concentrations for the next quality step. Lifecycle: |
| ATTRIBUTE | DESCRIPTION |
|---|---|
capacity |
Return native subtype capacity fraction or current setting.
TYPE:
|
depth |
Return current depth in project length units.
TYPE:
|
downstream_surface_area |
Return current downstream surface area in project area units.
TYPE:
|
external_pollutant_mass_flux |
Return canonical persistent mass fluxes as a live mutable mapping.
TYPE:
|
flow |
Return signed current flow in project flow units.
TYPE:
|
flow_limit |
Flow limit. Setter lifecycle:
TYPE:
|
froude_number |
Return the current dimensionless Froude number.
TYPE:
|
inlet |
Return this link's generation-bound inlet placement, when configured.
TYPE:
|
kind |
Return the configured link subtype.
TYPE:
|
pollut_quality |
Return immutable current concentrations by canonical pollutant ID. |
pollutant_total_load |
Return current total routed loads in reporting units. |
reactor_pollutant_concentration |
Return current pre-override reactor concentrations. |
setting |
Return the current setting or pump speed factor.
TYPE:
|
settings |
Return stable outlet settings.
TYPE:
|
statistics |
Return immutable cumulative common-link statistics.
TYPE:
|
target_setting |
Target setting or pump speed. Setter lifecycle:
TYPE:
|
time_closed |
Return current continuously-closed duration.
TYPE:
|
time_open |
Return current continuously-open duration.
TYPE:
|
upstream_surface_area |
Return current upstream surface area in project area units.
TYPE:
|
velocity |
Return current velocity in project length units per second.
TYPE:
|
volume |
Return current volume in project volume units.
TYPE:
|
downstream_surface_area
property
downstream_surface_area: float
Return current downstream surface area in project area units.
external_pollutant_mass_flux
property
external_pollutant_mass_flux: MutableMapping[str, float]
Return canonical persistent mass fluxes as a live mutable mapping.
Item assignment and update() are atomic sparse mutations. Deletion resets
one configured pollutant to zero; clear() atomically resets every pollutant.
Nonzero values require a non-dummy conduit; other link types accept only an
all-zero candidate.
Mutation lifecycle: OPEN, RUNNING, ENDED.
inlet
property
inlet: Inlet | None
Return this link's generation-bound inlet placement, when configured.
pollut_quality
property
Return immutable current concentrations by canonical pollutant ID.
pollutant_total_load
property
Return current total routed loads in reporting units.
reactor_pollutant_concentration
property
Return current pre-override reactor concentrations.
target_setting
property
writable
target_setting: float
Target setting or pump speed. Setter lifecycle: RUNNING.
upstream_surface_area
property
upstream_surface_area: float
Return current upstream surface area in project area units.
OutletSettings
flowchart TD
swmmrs.objects.OutletSettings[OutletSettings]
swmmrs.objects._links.LinkSettings[LinkSettings]
swmmrs.objects._links.LinkSettings --> swmmrs.objects.OutletSettings
click swmmrs.objects.OutletSettings href "" "swmmrs.objects.OutletSettings"
click swmmrs.objects._links.LinkSettings href "" "swmmrs.objects._links.LinkSettings"
Expose stable outlet-rating settings.
| METHOD | DESCRIPTION |
|---|---|
update |
Atomically update supplied stable link settings. |
| ATTRIBUTE | DESCRIPTION |
|---|---|
average_loss_coefficient |
Return the dimensionless average loss coefficient.
TYPE:
|
flow_direction |
Return the configured numeric orientation sign.
TYPE:
|
full_depth |
Return full depth in project length units.
TYPE:
|
full_flow |
Return full flow in project flow units.
TYPE:
|
has_flap_gate |
Return whether the link has a flap gate.
TYPE:
|
included_in_report |
Return whether detailed output includes this link.
TYPE:
|
initial_flow |
Return initial flow in project flow units.
TYPE:
|
inlet_loss_coefficient |
Return the dimensionless inlet loss coefficient.
TYPE:
|
inlet_node |
Return the generation-bound upstream node relationship.
TYPE:
|
inlet_offset |
Return inlet offset in project length units.
TYPE:
|
outlet_loss_coefficient |
Return the dimensionless outlet loss coefficient.
TYPE:
|
outlet_node |
Return the generation-bound downstream node relationship.
TYPE:
|
outlet_offset |
Return outlet offset in project length units.
TYPE:
|
rating |
Return the complete functional or tabular outlet rating.
TYPE:
|
seepage_rate |
Return seepage rate in project rainfall units.
TYPE:
|
tag |
Return the metadata tag.
TYPE:
|
average_loss_coefficient
property
writable
average_loss_coefficient: float
Return the dimensionless average loss coefficient.
flow_direction
property
flow_direction: Literal[-1, 1]
Return the configured numeric orientation sign.
included_in_report
property
writable
included_in_report: bool
Return whether detailed output includes this link.
inlet_loss_coefficient
property
writable
inlet_loss_coefficient: float
Return the dimensionless inlet loss coefficient.
inlet_node
property
writable
inlet_node: Node
Return the generation-bound upstream node relationship.
outlet_loss_coefficient
property
writable
outlet_loss_coefficient: float
Return the dimensionless outlet loss coefficient.
outlet_node
property
writable
outlet_node: Node
Return the generation-bound downstream node relationship.
rating
property
writable
Return the complete functional or tabular outlet rating.
FunctionalOutletRating
Store a functional outlet rating in project units.
TabularOutletRating
Store a curve-driven outlet rating.
Inlet
Expose persistent controls and current results for one link-local inlet.
| METHOD | DESCRIPTION |
|---|---|
update |
Atomically update supplied persistent inlet controls. |
| ATTRIBUTE | DESCRIPTION |
|---|---|
backflow |
Return current backflow in project flow units.
TYPE:
|
backflow_ratio |
Return the current dimensionless inlet backflow ratio.
TYPE:
|
captured_flow |
Return current captured flow in project flow units.
TYPE:
|
flow_factor |
Return the current dimensionless capture flow factor.
TYPE:
|
flow_limit |
Per-inlet flow limit. Setter lifecycle:
TYPE:
|
percent_clogged |
Inlet clogging percentage. Setter lifecycle:
TYPE:
|
settings |
Return stable read-only inlet placement settings.
TYPE:
|
backflow_ratio
property
backflow_ratio: float
Return the current dimensionless inlet backflow ratio.
flow_limit
property
writable
flow_limit: float
Per-inlet flow limit. Setter lifecycle: OPEN, RUNNING, ENDED.
percent_clogged
property
writable
percent_clogged: float
Inlet clogging percentage. Setter lifecycle: OPEN, RUNNING, ENDED.
InletSettings
Expose the stable read-only placement settings of one link-local inlet.
| ATTRIBUTE | DESCRIPTION |
|---|---|
count |
Return the positive number of identical inlet structures.
TYPE:
|
design |
Return the generation-bound inlet-design relationship.
TYPE:
|
local_depression |
Return local depression depth in project length units.
TYPE:
|
local_width |
Return local depression width in project length units.
TYPE:
|
local_depression
property
local_depression: float
Return local depression depth in project length units.
InletDesign
flowchart TD
swmmrs.objects.InletDesign[InletDesign]
swmmrs.objects._base._LiveView[_LiveView]
swmmrs.objects._base._LiveView --> swmmrs.objects.InletDesign
click swmmrs.objects.InletDesign href "" "swmmrs.objects.InletDesign"
click swmmrs.objects._base._LiveView href "" "swmmrs.objects._base._LiveView"
Expose a generation-bound inlet-design definition.