![]() |
OpenSWMM Engine
6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
|
Namespaces | |
| namespace | implicit_wet |
| namespace | kernels |
| namespace | secgeom |
Classes | |
| struct | AcceptedWaterVolumes |
| class | ExplicitFvSolver |
| struct | FvClosure |
| One section's closure. Fixed-size POD: inline arrays, no pointers. More... | |
| struct | FvGeometry |
| Cross-section closure for one conduit's cell chain. More... | |
| struct | FvOptions |
Knobs for FLOW_ROUTING FV. More... | |
| struct | FvStepForcing |
| class | ImplicitNetworkSolver |
| class | ImplicitReachSolver |
| class | INetworkSolver |
| Abstract time integrator for the explicit FV 1D network. More... | |
| struct | MeshBuildReport |
| class | NativeGmres |
| 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 | NonlinearPressureStorage |
| class | PressurizedHeadSolver |
| struct | PressurizedView |
Enumerations | |
| enum | : uint8_t { kClosureTabulated = 0 , kClosurePolynomial = 1 } |
| The closure's representation class. More... | |
| 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 | |
| double | advanceNetworkChecked (INetworkSolver &solver, double start, double target, const FvStepForcing &forcing) |
| Advance an FV backend and verify it reached the full requested time window. | |
| void | buildGeometry (const XSectParams &xs, bool is_open, double slot_celerity, FvGeometry &g, int barrels=1) |
| Construct an aggregate-barrel FV section and its tapered slot/closure. | |
| 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 an uninitialized CPU or compatible plugin network solver. | |
| double | limitSlope (double a, double b, Limiter lim) |
Variables | |
| constexpr int | kClosurePanels = 128 |
| Panels of the closure table, uniform in depth on [0, y_full]. | |
| constexpr int | kMaxLtsTiers = 8 |
| constexpr int | kNodeVolSamples = 129 |
| Samples in a STORAGE node's flattened depth→volume table. | |
| anonymous enum : uint8_t |
| 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 |
|
inline |
Advance an FV backend and verify it reached the full requested time window.
Throws invalid_argument for unordered/nonfinite times, runtime_error for nonfinite/backward/partial reached time; backend exceptions propagate. Does not roll back backend state or publish Router means/receipts.
| [in,out] | solver | Borrowed initialized backend; advance may mutate it even if reached-time validation later fails. |
| [in] | start | Finite accepted elapsed start seconds. |
| [in] | target | Finite target elapsed seconds>=start. |
| [in] | forcing | Borrowed boundary/source forcing valid for the requested window; lifetime covers advance. |
| void openswmm::fv::buildGeometry | ( | const XSectParams & | xs, |
| bool | is_open, | ||
| double | slot_celerity, | ||
| FvGeometry & | g, | ||
| int | barrels = 1 ) |
Construct an aggregate-barrel FV section and its tapered slot/closure.
Depth/radius remain per-barrel, area/width multiply max(1,barrels). Closed slot uses g*A/c^2, caps at5% full width (fallback width1ft) and floors nonpositive result1e-6ft; crown uses SLOT_CROWN_CUTOFF. Calls buildClosure to replace provisional crown area/integral. No complete finite/physical validation or ownership transfer.
| [in] | xs | Borrowed initialized native scalar section; optional table pointers copy as non-owning references and must remain live. |
| [in] | is_open | True extends the open section above full depth with vertical-wall width; false creates a pressurization slot. |
| [in] | slot_celerity | Design speed ft/s; closed-section calculation floors nonpositive/<=1/NaN to1 through comparison. |
| [in,out] | g | Borrowed destination overwritten with copied geometry, barrel-scaled area/width and constructed closure; unrelated fields not assigned here retain prior values. |
| [in] | barrels | Parallel barrel count; <=0 becomes1. |
| 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 an uninitialized CPU or compatible plugin network solver.
OPENSWMM_FV_BACKEND overrides opts.backend after lowercasing; unknown names fall back to CPU. pressurized_implicit forces CPU even for an explicit plugin request. AUTO tries cuda, hip, sycl, omp in order unless below min_parallel_cells (overridden by atol(OPENSWMM_FV_MIN_PARALLEL_CELLS)). Plugin absence, load/probe/ABI/device/factory failures fall through to CPU. Filesystem/string/allocation errors and plugin-thrown exceptions can propagate; this is not a no-throw factory. Loaded modules remain mapped for process lifetime.
| [in] | opts | Options used synchronously for backend, minimum cell count and CPU-only pressurized_implicit selection; not retained. |
| [out] | chosen | Optional writable backend label, or nullptr; receives a CPU label or backend/device label before successful return. |
| [in] | n_cells | Mesh cell count for AUTO gating; <=0 disables that gate. Explicit backend requests bypass it. |
|
inlineconstexpr |
Panels of the closure table, uniform in depth on [0, y_full].
|
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.