![]() |
OpenSWMM Engine
6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
|
Namespaces | |
| namespace | kernels |
Classes | |
| class | ExplicitFvSolver |
| struct | FvGeometry |
| Cross-section closure for one conduit's cell chain. More... | |
| struct | FvOptions |
Knobs for FLOW_ROUTING FV. More... | |
| struct | FvStepForcing |
| class | INetworkSolver |
| Abstract time integrator for the explicit FV 1D network. More... | |
| struct | MeshBuildReport |
| struct | NetworkMeshData |
| SoA mesh geometry and topology for the FV network solver. More... | |
| struct | NetworkStateData |
| Mutable solver state — the conserved variables and the node volumes. More... | |
| class | PressurizedHeadSolver |
| struct | PressurizedView |
Enumerations | |
| enum class | RiemannSolver : int { HLL = 0 , HLLC = 1 } |
| enum class | Limiter : int { MINMOD = 0 , VANLEER = 1 , SUPERBEE = 2 } |
| Slope limiter used by the second-order (MUSCL) reconstruction. More... | |
| enum class | ScalarScheme : int { UPWIND = 0 , MUSCL = 1 , QUICKEST_ULTIMATE = 2 } |
| Reconstruction used for the advected scalar field. More... | |
| enum class | TimeIntegration : int { EULER = 0 , RK2 = 1 } |
| Temporal integrator. More... | |
| enum class | StructureCoupling : int { SUBSTEP = 0 , ROUTING_STEP = 1 } |
| When pump/orifice/weir/outlet structure equations are re-evaluated. More... | |
| enum class | Backend : int { CPU = 0 , AUTO = 1 , OMP = 2 , CUDA = 3 , HIP = 4 , SYCL = 5 } |
| Backend selection for the solver kernels. More... | |
| enum | : uint8_t { kNodeJunction = 0 , kNodeVirtual = 1 , kNodeStorage = 2 , kNodeOutfall = 3 } |
| Node kind codes stored in NetworkMeshData::node_kind. More... | |
Functions | |
| void | buildGeometry (const XSectParams &xs, bool is_open, double slot_celerity, FvGeometry &g, int barrels=1) |
| Populate one conduit's cross-section closure, including the tapered Preissmann slot and the first-moment table. | |
| MeshBuildReport | buildNetworkMesh (SimulationContext &ctx, const FvOptions &opts, NetworkMeshData &mesh) |
| Build the cell/face mesh and the per-conduit geometry closures. | |
| std::unique_ptr< INetworkSolver > | makeNetworkSolver (const FvOptions &opts, std::string *chosen, int n_cells) |
Construct the FV network solver for opts and a mesh of n_cells. | |
| double | limitSlope (double a, double b, Limiter lim) |
Variables | |
| constexpr int | kMaxLtsTiers = 8 |
| constexpr int | kI1Samples = 129 |
| constexpr int | kNodeVolSamples = 129 |
| Samples in a STORAGE node's flattened depth→volume table. | |
| anonymous enum : uint8_t |
Node kind codes stored in NetworkMeshData::node_kind.
| Enumerator | |
|---|---|
| kNodeJunction | |
| kNodeVirtual | |
| kNodeStorage | |
| kNodeOutfall | |
|
strong |
Backend selection for the solver kernels.
| Enumerator | |
|---|---|
| CPU | |
| AUTO | default: try plugins above the parallel gate, else CPU |
| OMP | |
| CUDA | |
| HIP | |
| SYCL | |
|
strong |
|
strong |
Face flux function. HLLC is the default and HLL exists only as a debugging/comparison baseline — see plan §3.2: the contact wave HLL averages away is exactly the wave that carries an advected scalar, so HLL is not a legitimate production choice once transport is on the same mesh.
| Enumerator | |
|---|---|
| HLL | baseline / debug only |
| HLLC | default |
|
strong |
|
strong |
|
strong |
| void openswmm::fv::buildGeometry | ( | const XSectParams & | xs, |
| bool | is_open, | ||
| double | slot_celerity, | ||
| FvGeometry & | g, | ||
| int | barrels = 1 ) |
Populate one conduit's cross-section closure, including the tapered Preissmann slot and the first-moment table.
Exposed for the unit tests, which exercise the closure directly (continuity of dA/dh through the crown, A↔h round-trip, the analytic I₁ extension).
| barrels | parallel identical barrels; area and top width are scaled by it so a cell is their aggregate section (hydraulic radius is per barrel and stays unscaled). |
| MeshBuildReport openswmm::fv::buildNetworkMesh | ( | SimulationContext & | ctx, |
| const FvOptions & | opts, | ||
| NetworkMeshData & | mesh ) |
Build the cell/face mesh and the per-conduit geometry closures.
| ctx | Model context — links, nodes and conduit side-table must be fully resolved, and Router::init must already have computed mod_length/rough_factor (the mesh reuses the Courant lengthening as its Δx floor). |
| opts | FV options (cell length, min cells, slot celerity). |
| mesh | [out] Cleared and filled. |
errors list means the mesh is unusable.
|
inline |
limitSlope moved to transport/fvkernels/SpeciesTransportKernels.hpp (phase E0) — shared between the species kernels and the hydrodynamic second-order reconstruction below.
| std::unique_ptr< INetworkSolver > openswmm::fv::makeNetworkSolver | ( | const FvOptions & | opts, |
| std::string * | chosen, | ||
| int | n_cells ) |
Construct the FV network solver for opts and a mesh of n_cells.
| opts | Solver options — backend and min_parallel_cells drive the choice. The OPENSWMM_FV_BACKEND environment variable (cpu|auto|omp|cuda|hip|sycl) overrides backend, matching the 2D module's OPENSWMM_2D_BACKEND. |
| chosen | [out, optional] Human-readable label of the selected backend. |
| n_cells | Mesh size for the small-problem gate; 0 = unknown ⇒ no gate. |
|
inlineconstexpr |
Samples in the per-geometry first-moment (I₁) table over [0, y_full]. I₁ is the antiderivative of A(h); above the crown the closure is exactly linear in h so the table is extended analytically rather than sampled (see FvKernels::i1OfDepth), which is what keeps deep surcharge accurate with a small table.
|
inlineconstexpr |
Hard ceiling on LTS tiers. Tier k advances at 2^k·dt₀, so 8 tiers already span a 128× stiffness ratio — beyond that the coarse tier's lag behind a moving front stops being a bounded integration-path difference. (A 14-tier cap was trialled for the MIN_SURFAREA-junction stiffness on macdonald-long-sub and did not help: the stiff set there is every junction, and the scheduler's base-step count is the cost floor. The remedy is the algebraic junction interface, which removes the bound.)
|
inlineconstexpr |
Samples in a STORAGE node's flattened depth→volume table.