![]() |
OpenSWMM Engine
6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
|
#include <DynamicWave.hpp>
Public Member Functions | |
| void | resize (std::size_t n) |
| Reset every conduit DPS history array to the requested length. | |
Public Attributes | |
| std::vector< double > | As |
| Accumulated slot area (ft²) | |
| std::vector< double > | hs |
| Current surcharge head (ft) | |
| std::vector< double > | hs_prev_iter |
| hs at start of current timestep (ft) | |
| std::vector< double > | P |
| Current Preissmann Number (smoothed) | |
| std::vector< double > | P_hat |
| Provisional Preissmann Number (before smoothing) | |
| std::vector< double > | P_hat_0 |
| Initial P for unpressurized conduit. | |
| std::vector< double > | T_s_target |
| g · A_C / c_pT² (cached at init) | |
| std::vector< double > | t_s |
| Time when element last became surcharged (sec) | |
| std::vector< uint8_t > | surcharged |
| Currently surcharged flag. | |
Per-conduit DPS state — Structure of Arrays (persistent across timesteps). Each vector is indexed by conduit index [0..n_conduits_).
The head-first link-node formulation treats hs as a diagnostic of the node-head solution (hs = max(depth_mid − y_full, 0)) and accumulates As from dAs = T_s · dhs so the slot storage is path-dependent and invariant under P-only evolution. hs_prev_iter records the last geometry-update head, so each Picard geometry pass accumulates only its increment dhs = hs_iter - hs_prev_iter; the anchor is advanced to hs_iter during that pass. T_s_target = g · A_C / c_pT² is cached so the per-iter T_s = T_s_target · P² reduces to a single multiply.
|
inline |
Reset every conduit DPS history array to the requested length.
Areas/heads/times/flags reset to zero, all Preissmann-number arrays reset to one, target widths reset to zero. assign discards old history and can invalidate element references; allocation failure may leave partial reset. Native dimensions are ft, ft2 and seconds; n is the real-conduit count, excluding DUMMY.
| [in] | n | Required element count; must fit vector allocation limits. |
| std::vector<double> openswmm::dynwave::DPSLinkArrays::As |
Accumulated slot area (ft²)
| std::vector<double> openswmm::dynwave::DPSLinkArrays::hs |
Current surcharge head (ft)
| std::vector<double> openswmm::dynwave::DPSLinkArrays::hs_prev_iter |
hs at start of current timestep (ft)
| std::vector<double> openswmm::dynwave::DPSLinkArrays::P |
Current Preissmann Number (smoothed)
| std::vector<double> openswmm::dynwave::DPSLinkArrays::P_hat |
Provisional Preissmann Number (before smoothing)
| std::vector<double> openswmm::dynwave::DPSLinkArrays::P_hat_0 |
Initial P for unpressurized conduit.
| std::vector<uint8_t> openswmm::dynwave::DPSLinkArrays::surcharged |
Currently surcharged flag.
| std::vector<double> openswmm::dynwave::DPSLinkArrays::t_s |
Time when element last became surcharged (sec)
| std::vector<double> openswmm::dynwave::DPSLinkArrays::T_s_target |
g · A_C / c_pT² (cached at init)