OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
openswmm::groundwater Namespace Reference

Classes

struct  GWContext
 
struct  GWSoA
 
class  GWSolver
 Mutable two-zone groundwater state with independent scalar per-subcatchment RKF45. One owning simulation thread serializes init/execute/state edits. Initialization supplies defaults only; model loading must populate physical aquifer parameters and compile/bind optional expressions before stepping. No transactional rollback or per-call integration failure result is exposed. More...
 

Enumerations

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

Functions

int gwf_validate (const std::string &expr, std::string &msg, int &col)
 Validate a GWF expression and probe the production parser without storing it.
 

Variables

constexpr double GWTOL
 
constexpr double XTOL
 

Enumeration Type Documentation

◆ GWVar

GW expression variable indices (matching legacy GWvariables enum).

Enumerator
GWV_HGW 

Water table height.

GWV_HSW 

Surface water head.

GWV_HCB 

Channel bottom height (h_star)

GWV_HGS 

Ground surface height (total_depth)

GWV_KS 

Saturated conductivity.

GWV_K 

Unsaturated conductivity.

GWV_THETA 

Upper zone moisture content.

GWV_PHI 

Porosity.

GWV_FI 

Surface infiltration rate.

GWV_FU 

Upper zone percolation rate.

GWV_A 

Subcatchment area.

GWV_MAX 

Function Documentation

◆ gwf_validate()

int openswmm::groundwater::gwf_validate ( const std::string & expr,
std::string & msg,
int & col )

Validate a GWF expression and probe the production parser without storing it.

Parameters
exprBorrowed arithmetic text; empty/whitespace-only is invalid. Supports numbers, variable identifiers, known functions, parentheses, comma and + - * / ^. Identifiers are case insensitive; legacy variable names may be prefixes of a longer identifier (e.g. HGWW resolves HGW, Area resolves A).
[out]msgCleared on entry/success, otherwise human-readable rejection.
[out]colZero-based byte position or -1 for unattributed/internal failure; not a Unicode code-point column. Text/token positions must fit int.
Returns
Zero when strict grammar and a production parse both accept, -1 otherwise. Checks function arity (min/max two, others one), operator sequencing, unary minus and balanced parentheses. Unary plus is rejected. Numeric overflow to infinity is not explicitly refused by tokenization. Does not evaluate, check units/physics, bind variables or retain the compiled probe. Catches parser/allocation exceptions into an internal diagnostic where possible.
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ GWTOL

double openswmm::constants::ode::GWTOL
constexpr

Groundwater ODE tolerance.

See also
Legacy: GWTOL in gwater.c

◆ XTOL

double openswmm::constants::XTOL
constexpr

Tolerance for bounding state variables.

See also
Legacy: XTOL in gwater.c