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

Section handlers for [CONDUITS], [PUMPS], [ORIFICES], [WEIRS], [OUTLETS], [XSECTIONS], [LOSSES], [TRANSECTS]. More...

#include "LinksHandler.hpp"
#include "../Tokenizer.hpp"
#include "../SectionParser.hpp"
#include "../../core/SimulationContext.hpp"
#include "../../core/ErrorCodes.hpp"
#include "../../core/Constants.hpp"
#include "../../data/LinkData.hpp"
#include "../../data/InfraData.hpp"
#include "../InputParseUtils.hpp"
#include <charconv>
#include <string>
#include <string_view>
#include <utility>
Include dependency graph for LinksHandler.cpp:

Namespaces

namespace  openswmm
 
namespace  openswmm::input
 

Functions

void openswmm::input::handle_conduits (SimulationContext &ctx, const std::vector< std::string > &lines)
 Parse conduit length/roughness, offsets and optional initial/limited flow.
 
void openswmm::input::handle_pumps (SimulationContext &ctx, const std::vector< std::string > &lines)
 Parse pump curves, initial status and start/shutoff depths.
 
void openswmm::input::handle_orifices (SimulationContext &ctx, const std::vector< std::string > &lines)
 Parse orifice orientation, offset, discharge coefficient and gate timing.
 
void openswmm::input::handle_weirs (SimulationContext &ctx, const std::vector< std::string > &lines)
 Parse weir type, crest/coefficient, surcharge and roadway authoring.
 
void openswmm::input::handle_outlets (SimulationContext &ctx, const std::vector< std::string > &lines)
 Parse functional/tabular outlet ratings and optional flap gate.
 
void openswmm::input::handle_xsections (SimulationContext &ctx, const std::vector< std::string > &lines)
 Assign raw link cross-sections and defer unresolved referenced names.
 
void openswmm::input::handle_losses (SimulationContext &ctx, const std::vector< std::string > &lines)
 Assign conduit loss/seepage parameters and a shared link flap flag.
 
void openswmm::input::handle_transects (SimulationContext &ctx, const std::vector< std::string > &lines)
 Append transects from stateful NC, X1 and GR authoring records.
 

Detailed Description

Section handlers for [CONDUITS], [PUMPS], [ORIFICES], [WEIRS], [OUTLETS], [XSECTIONS], [LOSSES], [TRANSECTS].

[CONDUITS] format

;; Name Node1 Node2 Length Roughness InOffset OutOffset InitFlow MaxFlow
C1 J1 J2 100.0 0.013 0.0 0.0 0.0 0.0

[XSECTIONS] format

;; Link Shape Geom1 Geom2 Geom3 Geom4 Barrels
C1 CIRCULAR 1.0 0.0 0.0 0.0 1
EXTERN TShape * Shape
Definition globals.h:173
EXTERN TLink * Link
Definition globals.h:160
@ CIRCULAR
Circular cross section.
Definition enums.h:195
See also
Legacy reference: src/solver/input.c — readLink(), readXsect()
Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License
Apache-2.0