![]() |
OpenSWMM Engine
6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
|
Classes | |
| struct | ColumnPreparation |
| struct | ColumnStep |
| What one column sweep needs and what it reports back. More... | |
| struct | ColumnTransfers |
Functions | |
| double | columnStorage (const double *theta, int m, int stride, double L) noexcept |
Total water in the column (m of water) — Σ θ_j·L·Δσ. | |
| 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. | |
| double | columnDtLimit (const soil::Params &p, const double *theta, int m, int stride, double L, double Ldot, double c_col, bool capillary) noexcept |
The explicit stability bound of a column, without advancing it (§2.3): Δt_u ≤ C_col·min_j[ L·Δσ / ( c(θ_j) + |σ_j·L̇| + 2·D̄_j/(L·Δσ) ) ] with celerity c(θ) = dK/dθ. | |
| void | prepareColumn (const soil::Params &p, const double *theta, int m, int stride, const ColumnStep &st, ColumnPreparation &prepared) noexcept |
| Prepare reusable trial invariants. Same input preconditions as advanceColumn; m > 0. | |
| void | advanceColumn (const soil::Params &p, double *theta, int m, int stride, ColumnStep &st) noexcept |
Advance one σ column by st.dt. | |
| void | advanceColumn (const soil::Params &p, double *theta, int m, int stride, ColumnStep &st, const ColumnPreparation &prepared) noexcept |
|
noexcept |
Advance one σ column by st.dt.
| [in] | p | the cell's soil law and parameters |
| [in,out] | theta | m layer water contents, layer 0 at the surface. Read and written in place; stride is the caller's (the SoA is layer-major, so the caller passes a gathered/scattered buffer or a strided view — see stride). |
| [in] | m | layer count |
| [in] | stride | distance between consecutive layers in theta (1 for a packed buffer, n_cells for the layer-major SoA) |
| [in,out] | st | step inputs and outputs |
Positivity is enforced per face by an availability share, the same idiom as the surface solver's volume share: a face may not take more water than its donor layer holds above θ_r, and the shares are scaled together when a layer's outgoing faces over-subscribe it. First-order upwind in v1 (D-N4); MUSCL is a recorded follow-up.
|
noexcept |
Advance using invariants prepared from exactly this old column and step inputs. L_new, boundary rates, layer inflows and capture receipts may differ between trials.
|
noexcept |
The explicit stability bound of a column, without advancing it (§2.3): Δt_u ≤ C_col·min_j[ L·Δσ / ( c(θ_j) + |σ_j·L̇| + 2·D̄_j/(L·Δσ) ) ] with celerity c(θ) = dK/dθ.
| [in] | p | Borrowed validated SI soil-law parameters. |
| [in] | theta | Required strided layer water-content array, dimensionless; at least 1+(m-1)*stride readable doubles. |
| [in] | m | Strictly positive layer count. |
| [in] | stride | Strictly positive distance in doubles between layers; 1 packed or n_cells for a layer-major SoA. |
| [in] | L | Finite column thickness in m. |
| [in] | Ldot | Finite column-thickness rate in m/s, positive for a falling table. |
| [in] | c_col | Finite Courant factor, numerically floored at 1e-6. |
| [in] | capillary | Whether to include the moisture diffusivity contribution. |
|
noexcept |
Total water in the column (m of water) — Σ θ_j·L·Δσ.
| [in] | theta | Required borrowed dimensionless layer water contents, at least 1+(m-1)*stride doubles. |
| [in] | m | Strictly positive layer count. |
| [in] | stride | Strictly positive distance in doubles between layers. |
| [in] | L | Finite column thickness, m; negative thickness clamps to zero. |
|
noexcept |
Prepare reusable trial invariants. Same input preconditions as advanceColumn; m > 0.
|
noexcept |
Seed a column to hydrostatic equilibrium above a table at depth L.
| [in] | p | Borrowed validated SI soil-law parameters. |
| [out] | theta | Required strided layer water-content array, dimensionless; at least 1+(m-1)*stride writable doubles. |
| [in] | m | Strictly positive layer count. |
| [in] | stride | Strictly positive distance in doubles between layers; 1 packed or n_cells for a layer-major SoA. |
| [in] | L | Finite column thickness in m. |