OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
SigmaColumn.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
2//
3// Copyright 2026 Caleb Buahin
4//
5// Licensed under the Apache License, Version 2.0 (the "License");
6// you may not use this file except in compliance with the License.
7// You may obtain a copy of the License at
8//
9// http://www.apache.org/licenses/LICENSE-2.0
10//
11// Unless required by applicable law or agreed to in writing, software
12// distributed under the License is distributed on an "AS IS" BASIS,
13// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14// See the License for the specific language governing permissions and
15// limitations under the License.
16
79
80#ifndef OPENSWMM_ENGINE_2D_SIGMA_COLUMN_HPP
81#define OPENSWMM_ENGINE_2D_SIGMA_COLUMN_HPP
82
84
85namespace openswmm::twoD::sigma {
86
88struct ColumnStep {
89 // ---- in ----
90 double L_old = 1.0;
91 double L_new = 1.0;
92 double dt = 1.0;
93 double q_in = 0.0;
94 double q_et = 0.0;
95 double q0_phys = 0.0;
96 bool capillary = false;
97
98 // ---- out ----
99 double f_top = 0.0;
100 double rejected = 0.0;
101 double f_bot = 0.0;
102 double et_taken = 0.0;
103 double theta_bot = 0.0;
104 double dt_limit = 1.0e30;
109 double overflow_to_sat = 0.0;
112 double deficit_from_sat = 0.0;
113};
114
134void advanceColumn(const soil::Params& p, double* theta, int m, int stride,
135 ColumnStep& st) noexcept;
136
140double columnDtLimit(const soil::Params& p, const double* theta, int m,
141 int stride, double L, double Ldot, double c_col,
142 bool capillary) noexcept;
143
145void seedHydrostatic(const soil::Params& p, double* theta, int m, int stride,
146 double L) noexcept;
147
149double columnStorage(const double* theta, int m, int stride, double L) noexcept;
150
151} // namespace openswmm::twoD::sigma
152
153#endif // OPENSWMM_ENGINE_2D_SIGMA_COLUMN_HPP
G-steps 2 and 13 — the four production soil-characteristic laws and the closure-A quasi-steady rechar...
Definition SigmaColumn.cpp:33
void seedHydrostatic(const soil::Params &p, double *theta, int m, int stride, double L) noexcept
Seed a column to hydrostatic equilibrium above a table at depth L.
Definition SigmaColumn.cpp:64
void advanceColumn(const soil::Params &p, double *theta, int m, int stride, ColumnStep &st) noexcept
Advance one σ column by st.dt.
Definition SigmaColumn.cpp:114
double columnDtLimit(const soil::Params &p, const double *theta, int m, int stride, double L, double Ldot, double c_col, bool capillary) noexcept
Definition SigmaColumn.cpp:77
double columnStorage(const double *theta, int m, int stride, double L) noexcept
Total water in the column (m of water) — Σ θ_j·L·Δσ.
Definition SigmaColumn.cpp:57
What one column sweep needs and what it reports back.
Definition SigmaColumn.hpp:88
bool capillary
include the diffusive term
Definition SigmaColumn.hpp:96
double rejected
q_in − f_top (m/s, ≥ 0) back to the surface
Definition SigmaColumn.hpp:100
double et_taken
ET actually removed (m/s, ≤ q_et)
Definition SigmaColumn.hpp:102
double q_et
ET demand at the top (m/s, ≥ 0)
Definition SigmaColumn.hpp:94
double f_top
accepted top flux (m/s) — q_in after rejection
Definition SigmaColumn.hpp:99
double dt_limit
Definition SigmaColumn.hpp:104
double L_old
column thickness before the table moved (m)
Definition SigmaColumn.hpp:90
double q_in
infiltration offered at the top (m/s, ≥ 0)
Definition SigmaColumn.hpp:93
double dt
the cell's tier step (s)
Definition SigmaColumn.hpp:92
double L_new
…and after (m). L̇ = (L_new − L_old)/dt.
Definition SigmaColumn.hpp:91
double deficit_from_sat
Definition SigmaColumn.hpp:112
double overflow_to_sat
Definition SigmaColumn.hpp:109
double f_bot
total bottom flux incl. handover (m/s)
Definition SigmaColumn.hpp:101
double theta_bot
bottom-layer θ after the sweep (specific yield)
Definition SigmaColumn.hpp:103
double q0_phys
physical Darcy flux across the table (m/s)
Definition SigmaColumn.hpp:95
Definition SoilCharacteristic.hpp:90