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

Section handlers for [EVAPORATION], [TEMPERATURE], [SNOWPACKS], [AQUIFERS], [GROUNDWATER], [GWF], [LID_CONTROLS], and [LID_USAGE]. More...

#include "HydrologyHandler.hpp"
#include <cmath>
#include <cstdlib>
#include "../Tokenizer.hpp"
#include "../../core/Constants.hpp"
#include "../../core/SimulationContext.hpp"
#include "../../data/SubcatchData.hpp"
#include "../../data/HydrologyData.hpp"
#include "../../hydrology/Groundwater.hpp"
#include "../InputParseUtils.hpp"
#include <charconv>
#include <string>
#include <algorithm>
#include <array>
Include dependency graph for HydrologyHandler.cpp:

Namespaces

namespace  openswmm
 
namespace  openswmm::input
 

Functions

void openswmm::input::handle_evaporation (SimulationContext &ctx, const std::vector< std::string > &lines)
 Update evaporation source/options, monthly values and recovery flags.
 
void openswmm::input::handle_temperature (SimulationContext &ctx, const std::vector< std::string > &lines)
 Update climate/snow forcing source and environmental authoring options.
 
void openswmm::input::handle_snowpacks (SimulationContext &ctx, const std::vector< std::string > &lines)
 Merge snowpack surface/removal rows or delegate UEB authoring.
 
void openswmm::input::handle_ueb_options (SimulationContext &ctx, const std::vector< std::string > &lines)
 Apply authored UEB option rows to snow configuration.
 
void openswmm::input::handle_mesh_snow_options (SimulationContext &ctx, const std::vector< std::string > &lines)
 Parse mesh-snow option rows through the shared dispatch.
 
void openswmm::input::handle_mesh_snow_defaults (SimulationContext &ctx, const std::vector< std::string > &lines)
 Parse mesh-snow default/tag rows through the shared dispatch.
 
void openswmm::input::handle_mesh_snow_cells (SimulationContext &ctx, const std::vector< std::string > &lines)
 Parse explicit mesh-snow cell rows through the shared dispatch.
 
void openswmm::input::handle_aquifers (SimulationContext &ctx, const std::vector< std::string > &lines)
 Append named legacy aquifer parameter sets and optional evaporation pattern.
 
void openswmm::input::handle_groundwater (SimulationContext &ctx, const std::vector< std::string > &lines)
 Assign subcatchment groundwater exchange coefficients and optional overrides.
 
void openswmm::input::handle_gwf (SimulationContext &ctx, const std::vector< std::string > &lines)
 Validate and retain custom LATERAL/DEEP groundwater flow expressions.
 
void openswmm::input::handle_lid_controls (SimulationContext &ctx, const std::vector< std::string > &lines)
 Merge conventional or NODE LID type/layer/removal authoring.
 
void openswmm::input::handle_lid_usage (SimulationContext &ctx, const std::vector< std::string > &lines)
 Append conventional LID deployment rows for known subcatchment/control names.
 

Detailed Description

Section handlers for [EVAPORATION], [TEMPERATURE], [SNOWPACKS], [AQUIFERS], [GROUNDWATER], [GWF], [LID_CONTROLS], and [LID_USAGE].

[EVAPORATION] format

CONSTANT 0.0
MONTHLY 0.1 0.1 0.2 0.3 0.4 0.5 0.5 0.4 0.3 0.2 0.1 0.1
TIMESERIES EvapTS
FILE
RECOVERY patternName
DRY_ONLY NO
@ RECOVERY
Soil moisture recovery pattern.
Definition enums.h:562
@ TEMPERATURE
Temperature.
Definition enums.h:305
@ NO
No option.
Definition enums.h:1173

[TEMPERATURE] format

TIMESERIES TempTS
FILE "filename" StartDate
WINDSPEED MONTHLY 1.0 1.0 ... (12 values)
HUMIDITY [DEWPOINT] value | MONTHLY h1 ... h12 | TIMESERIES name
SNOWMELT divT ATIwt nrgRatio lat minMelt maxMelt
ADC IMPERVIOUS frac1 frac2 ... frac10
ADC PERVIOUS frac1 frac2 ... frac10
EXTERN DateTime StartDate
Definition globals.h:127
@ SNOWMELT
Snowmelt parameter set.
Definition enums.h:85
@ WINDSPEED
Wind speed.
Definition enums.h:303

[SNOWPACKS] format

SP1 PLOWABLE cmin cmax tbase fwfrac sd0 fw0 snn0
SP1 IMPERVIOUS cmin cmax tbase fwfrac sd0 fw0 snn0
SP1 PERVIOUS cmin cmax tbase fwfrac sd0 fw0 snn0
SP1 REMOVAL dSnow fOut fImp fPerv fImelt fToSubcatch SubcatchName
@ REMOVAL
Treatment stated as a removal.
Definition enums.h:840

[AQUIFERS] format

Name Por WP FC Ksat Kslope Tslope ETu ETs Seep Ebot Egw Umc [ETupat]

[GROUNDWATER] format

Subcatch Aquifer Node SurfEl A1 B1 A2 B2 A3 Dsw [Egwt Ebot Wgw Umc]
EXTERN TSubcatch * Subcatch
Definition globals.h:153
EXTERN TNode * Node
Definition globals.h:156
EXTERN TAquifer * Aquifer
Definition globals.h:154

[LID_CONTROLS] format (multi-line per LID)

LID1 BC
LID1 SURFACE ...
LID1 SOIL ...
LID1 STORAGE ...
LID1 DRAIN ...
@ STORAGE
Storage node.
Definition enums.h:114
@ DRAIN
Definition lid.c:114
@ SOIL
Definition lid.c:110

[LID_USAGE] format

Subcatch LID Number Area Width InitSat FromImp ToPerv [RptFile] [DrainTo] [FromPerv]
@ LID
LID treatment units.
Definition enums.h:89
See also
Legacy reference: src/solver/input.c
Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License
Apache-2.0