OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
NodesHandler.cpp File Reference

Section handlers for [JUNCTIONS], [OUTFALLS], [DIVIDERS], [STORAGE], [COORDINATES]. More...

#include "NodesHandler.hpp"
#include "../Tokenizer.hpp"
#include "../SectionParser.hpp"
#include "../../core/ErrorCodes.hpp"
#include "../../core/SimulationContext.hpp"
#include "../../data/NodeData.hpp"
#include "../../data/StorageGeometry.hpp"
#include "../InputParseUtils.hpp"
#include <algorithm>
#include <charconv>
#include <string>
#include <string_view>
Include dependency graph for NodesHandler.cpp:

Namespaces

namespace  openswmm
 
namespace  openswmm::input
 

Functions

void openswmm::input::handle_junctions (SimulationContext &ctx, const std::vector< std::string > &lines)
 Parse [JUNCTIONS] into NodeData + node_names.
 
void openswmm::input::handle_virtual_junctions (SimulationContext &ctx, const std::vector< std::string > &lines)
 Parse [VIRTUAL_JUNCTIONS] — junction-typed nodes with is_virtual = 1.
 
void openswmm::input::handle_outfalls (SimulationContext &ctx, const std::vector< std::string > &lines)
 Parse [OUTFALLS] — sets outfall-specific fields for nodes of type OUTFALL.
 
void openswmm::input::handle_dividers (SimulationContext &ctx, const std::vector< std::string > &lines)
 Parse [DIVIDERS] — sets divider-specific fields.
 
void openswmm::input::handle_storage (SimulationContext &ctx, const std::vector< std::string > &lines)
 Parse [STORAGE] — adds storage nodes and their geometry.
 
void openswmm::input::handle_coordinates (SimulationContext &ctx, const std::vector< std::string > &lines)
 Parse [COORDINATES] — fills spatial.node_x / node_y.
 

Detailed Description

Section handlers for [JUNCTIONS], [OUTFALLS], [DIVIDERS], [STORAGE], [COORDINATES].

[JUNCTIONS] format (legacy SWMM 5.x)

;; Name Elev MaxDepth InitDepth SurDepth Aponded
J1 0.0 5.0 0.0 0.0 0.0

[VIRTUAL_JUNCTIONS] format (refactored engine only)

;; Name Elev [MaxDepth]
VJ1 9.0
VJ2 9.0 4.5

MaxDepth is optional and RENDERING ONLY — it is the rim/ground depth a viewer draws the surface at. The solver always uses the derived pipe crown.

[OUTFALLS] format

;; Name Elev Type Stage/Tseries Gated RouteTo
Out1 0.0 FREE
Out2 0.0 FIXED 1.5
Out3 0.0 TIMESERIES TSERIES1
EXTERN TTable * Tseries
Definition globals.h:169
#define FREE(x)
Definition macros.h:22

[STORAGE] format

;; Name Elev MaxDepth InitDepth Shape Curve/A1 A2 A0 SurDepth Fevap Seep
Pond1 0.0 10.0 0.0 TABULAR POND_CURVE
Pond2 0.0 5.0 0.0 FUNCTIONAL 100 0 50
EXTERN TShape * Shape
Definition globals.h:172
EXTERN TTable * Curve
Definition globals.h:168
@ FUNCTIONAL
Area versus depth storage from function.
Definition enums.h:850
@ TABULAR
Area versus depth storage from table.
Definition enums.h:848
See also
Legacy reference: src/solver/input.c — readNode(), readOutfall(), readStorage()
Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License\n Apache-2.0