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

Section handlers for [POLLUTANTS], [LANDUSES], [COVERAGES], [BUILDUP], [WASHOFF], [TREATMENT], and [LOADINGS]. More...

#include "QualityHandler.hpp"
#include "../Tokenizer.hpp"
#include "../SectionParser.hpp"
#include "../../core/SimulationContext.hpp"
#include "../../data/PollutantData.hpp"
#include "../../data/QualityData.hpp"
#include "../InputParseUtils.hpp"
#include "../../core/Constants.hpp"
#include <charconv>
#include <initializer_list>
#include <string>
Include dependency graph for QualityHandler.cpp:

Namespaces

namespace  openswmm
 
namespace  openswmm::input
 

Functions

void openswmm::input::handle_pollutants (SimulationContext &ctx, const std::vector< std::string > &lines)
 Register pollutant names and populate definition columns in two passes.
 
void openswmm::input::handle_landuses (SimulationContext &ctx, const std::vector< std::string > &lines)
 Append named land uses with optional sweep parameters/comments.
 
void openswmm::input::handle_coverages (SimulationContext &ctx, const std::vector< std::string > &lines)
 Assign land-use percentages for each named subcatchment.
 
void openswmm::input::handle_buildup (SimulationContext &ctx, const std::vector< std::string > &lines)
 Assign pollutant buildup functions or defer nonpollutant species rows.
 
void openswmm::input::handle_washoff (SimulationContext &ctx, const std::vector< std::string > &lines)
 Assign pollutant washoff functions or defer nonpollutant species rows.
 
void openswmm::input::handle_treatment (SimulationContext &ctx, const std::vector< std::string > &lines)
 Store authored treatment expressions by node/pollutant key.
 
void openswmm::input::handle_loadings (SimulationContext &ctx, const std::vector< std::string > &lines)
 Assign initial pollutant surface buildup and defer MSX loading rows.
 
void openswmm::input::handle_initial_quality (SimulationContext &ctx, const std::vector< std::string > &lines)
 Append per-node/link initial-quality rows or record a CSV sidecar reference.
 

Detailed Description

Section handlers for [POLLUTANTS], [LANDUSES], [COVERAGES], [BUILDUP], [WASHOFF], [TREATMENT], and [LOADINGS].

[POLLUTANTS] format

;; Name Units Crain Cgw Crdii Kdecay SnowOnly CoPollut CoFrac Cdwf Cinit
TSS MG/L 0.0 0.0 0.0 0.0 NO * 0.0 0.0 0.0
Lead UG/L 0.0 0.0 0.0 0.0 NO TSS 0.2 0.0 0.0
@ NO
No option.
Definition enums.h:1173
@ MG
Milligrams per liter.
Definition enums.h:278
@ UG
Micrograms per liter.
Definition enums.h:280

[LANDUSES] format

;; Name SweepInterval SweepRemoval SweepDays0
Residential 0 0 0

[COVERAGES] format

;; Subcatch LandUse Percent [LandUse Percent ...]
S1 Residential 60.0 Commercial 40.0
EXTERN TSubcatch * Subcatch
Definition globals.h:153

[BUILDUP] format

;; Landuse Pollutant Type C1 C2 C3 PerUnit
Residential TSS POW 100 0.5 1 AREA
EXTERN TLanduse * Landuse
Definition globals.h:167

[WASHOFF] format

;; Landuse Pollutant Type C1 C2 SweepEffic BMPEffic
Residential TSS EMC 50 0 0 0

[TREATMENT] format

;; Node Pollutant Result = Expression
J1 TSS R = 0.5 * exp(-0.1 * DT)
EXTERN TNode * Node
Definition globals.h:156
struct TExpression * Expression
Array of math expressions.
Definition controls.c:527

[LOADINGS] format

;; Subcatch Pollutant InitBuildup
S1 TSS 100.0
See also
Legacy reference: src/solver/input.c — readPollutant(), readLanduse(), etc.
Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License
Apache-2.0