Node

Young Ho Kwon·2025년 3월 27일

SWMM

목록 보기
3/6

🧱 1. What is a Node in SWMM?

In a SWMM model, a Node represents a point where flow converges, diverges, is stored, or is discharged — such as manholes, storage units, junctions, and pump inlets/outlets.

Node TypeDescription
JunctionGeneral connection point for conduits (accumulates flow/level)
OutfallExit point from the system (discharge location)
StorageTemporarily stores flow (e.g., detention basin)
DividerSplits flow based on conditions
Pump NodeInlet/outlet point for a pump

🧠 2. What You Can Do with pyswmm.Nodes

🔍 ✅ Readable Properties

from pyswmm import Simulation, Nodes

with Simulation("model.inp") as sim:
    node = Nodes(sim)["N1"]  # 'N1' is the node ID
    for step in sim:
        print(sim.current_time, node.depth, node.inflow, node.flooding)
PropertyDescription
depthCurrent water depth (m)
inflowInflow rate (cms or cfs)
floodingFlooding flow rate (m³/s)
headHydraulic head (depth + elevation)
overflowOverflow discharge
total_inflowTotal internal + external inflow
volumeVolume of stored water (for storage units)

⚙️ ✅ Writable Properties (for Certain Node Types)

Some nodes (e.g., Storage, pump-connected nodes) allow control during simulation:

node.target_depth = 2.5   # Set target water level

🧪 Example: Flood Detection

from pyswmm import Simulation, Nodes

with Simulation("model.inp") as sim:
    nodes = Nodes(sim)
    node = nodes["J1"]

    for step in sim:
        if node.flooding > 0:
            print(f"⚠️ Flooding at {node.nodeid} at {sim.current_time} - {node.flooding:.3f} m³/s")

ScenarioDescription
Track water depth at specific nodeAnalyze flood-prone areas
Monitor storage depthUseful for LID analysis, pump control, etc.
Analyze inflow patternsUnderstand runoff timing per catchment
Calculate head differencesDetermine pump operation needs

🔧 Which Nodes Can Be Controlled?

  • Most node properties are read-only (e.g., depth, inflow)
  • Storage nodes allow target_depth to be set
  • Pump nodes can be indirectly controlled using the Links module (pump ON/OFF logic)

0개의 댓글