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

Two-zone groundwater model — batch-oriented ODE integration. More...

#include <vector>
#include "../math/MathExpr.hpp"
Include dependency graph for Groundwater.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  openswmm::groundwater::GWSoA
 
class  openswmm::groundwater::GWSolver
 

Namespaces

namespace  openswmm
 
namespace  openswmm::groundwater
 

Macros

#define OPENSWMM_RESTRICT   __restrict__
 

Enumerations

enum  openswmm::groundwater::GWVar : int {
  openswmm::groundwater::GWV_HGW = 0 ,
  openswmm::groundwater::GWV_HSW = 1 ,
  openswmm::groundwater::GWV_HCB = 2 ,
  openswmm::groundwater::GWV_HGS = 3 ,
  openswmm::groundwater::GWV_KS = 4 ,
  openswmm::groundwater::GWV_K = 5 ,
  openswmm::groundwater::GWV_THETA = 6 ,
  openswmm::groundwater::GWV_PHI = 7 ,
  openswmm::groundwater::GWV_FI = 8 ,
  openswmm::groundwater::GWV_FU = 9 ,
  openswmm::groundwater::GWV_A = 10 ,
  openswmm::groundwater::GWV_MAX = 11
}
 GW expression variable indices (matching legacy GWvariables enum). More...
 

Detailed Description

Two-zone groundwater model — batch-oriented ODE integration.

Each subcatchment has an independent aquifer with upper (unsaturated) and lower (saturated) zones. The ODE system is:

dθ/dt = (Infil - UpperEvap - UpperPerc) / upperDepth dH/dt = (UpperPerc - DeepPerc - LowerEvap - GWFlow) / (φ - θ)

Since each subcatchment is independent, the ODE integration is embarrassingly parallel — vectorise over subcatchments.

The lateral GW flow formula: Q = a1*(H-H*)^b1 - a2*(Hsw-H*)^b2 + a3*H*Hsw is arithmetic-only and vectorisable when b1/b2 are uniform.

Note
Legacy reference: src/legacy/engine/gwater.c
Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License\n MIT License

Macro Definition Documentation

◆ OPENSWMM_RESTRICT

#define OPENSWMM_RESTRICT   __restrict__