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

G-step 1 — [2D_AQUIFER_OPTIONS], [2D_AQUIFER] and [2D_AQUIFER_NODE]: parsing, unit resolution and writing. More...

#include "SubsurfaceData.hpp"
#include "../../input/SectionRegistry.hpp"
#include <string>
#include <vector>
Include dependency graph for SubsurfaceSections.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  openswmm
 
namespace  openswmm::twoD
 

Functions

std::string openswmm::twoD::parseAquiferOptionsLine (const std::vector< std::string > &tokens, GwOptions &opts)
 One [2D_AQUIFER_OPTIONS] line (KEY VALUE). Empty return = OK.
 
std::string openswmm::twoD::parseAquiferLine (const std::vector< std::string > &tokens, std::vector< GwAquiferRow > &rows)
 One [2D_AQUIFER] line. Empty return = OK.
 
std::string openswmm::twoD::parseAquiferNodeLine (const std::vector< std::string > &tokens, std::vector< GwNodeBed > &beds, std::vector< std::string > &names)
 
void openswmm::twoD::registerSubsurfaceSections (SubsurfaceConfig &cfg, std::vector< std::string > &node_names, input::SectionRegistry &registry)
 Register the three handlers against registry, writing into cfg.
 
GwUnitFactors openswmm::twoD::gwUnitFactors (const SimulationContext &ctx) noexcept
 The factors for this project's unit system.
 
std::vector< std::string > openswmm::twoD::resolveSubsurface (SimulationContext &ctx, const MeshData &mesh, SubsurfaceConfig &cfg, const std::vector< std::string > &names)
 
void openswmm::twoD::writeSubsurfaceSections (const SubsurfaceConfig &cfg, const std::vector< std::string > &node_names, std::string &out)
 

Detailed Description

G-step 1 — [2D_AQUIFER_OPTIONS], [2D_AQUIFER] and [2D_AQUIFER_NODE]: parsing, unit resolution and writing.

One rule for units, not seven

Rows are authored in the project's own unit system and converted once, by the kernel, through GwUnitFactors (declared in SubsurfaceData.hpp). The rule is deliberately uniform so a user who has read one row can read them all:

quantity US SI
lengths — ZS, PSI_B, HG0, DC ft m
rates — KS, C_LOSS, KC in/hr mm/hr
inverse lengths — ALPHA 1/ft 1/m
areas — AREA ft²
THETA_S, THETA_R, LAMBDA, N, L

The rates follow [INFILTRATION] and [AQUIFERS] (in/hr, mm/hr), which is what a SWMM user already expects for a conductivity. The lengths follow the project length unit rather than [INFILTRATION]'s inches, because ZS is a soil-column depth of metres, not a suction head of millimetres, and mixing the two in one section is how unit bugs are authored.

Syntax

[2D_AQUIFER_OPTIONS]
SOIL_CHAR RUSSO | GARDNER | BROOKS_COREY | VAN_GENUCHTEN
CLOSURE AUTO | CLOSED_FORM | ENSLAVED | SIGMA
M_LAYERS 8
CAPILLARY_DIFF NO
C_GW 0.5
C_COL 0.9
FORCE_CLOSED_FORM NO
MODE MESH | PER_SUBCATCH
DUNNE YES
GW_ET NONE | CAPILLARY_RISE | BOUNDARY_ET | BOTH
[2D_AQUIFER]
;;scope KS ZS THETA_S THETA_R ALPHA [key value]…
* 0.5 5.0 0.45 0.10 2.0 C_LOSS 0.0 HG0 1.0
TAG clay 0.02 3.0 0.50 0.15 1.2 SOIL_CHAR VAN_GENUCHTEN N 1.3
CELL 42 1.0 6.0 0.42 0.08 3.0 CLOSURE SIGMA M_LAYERS 16
[2D_AQUIFER_NODE]
;;node cell [KC kc DC dc] [AREA a]
J1 17 KC 0.01 DC 0.5
@ BOTH
Based on both slope & Froude number.
Definition enums.h:740
@ NONE
None option.
Definition enums.h:1234
@ NO
No option.
Definition enums.h:1222
@ YES
Yes option.
Definition enums.h:1224

The five positional columns are the ones every law needs. Everything a particular law adds (PSI_B, LAMBDA, N, L) is a keyword, so adding a law later does not renumber anyone's file.

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License\n Apache-2.0