![]() |
OpenSWMM Engine
6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
|
Functions | |
| double | circTheta (double r, double y) |
| Evaluate the central angle of a circular water segment. | |
| double | circArea (double r, double y) |
| Evaluate the exact wetted area of a circular segment. | |
| double | circWidth (double r, double y) |
| Evaluate the exact circular free-surface chord width. | |
| double | circPerim (double r, double y) |
| Evaluate the exact submerged circular arc length. | |
| template<class F> | |
| double | simpsonStep (F &f, double a, double b, double fa, double fm, double fb, double whole, double eps, int depth) |
| Recursively refine a cached Simpson panel to an absolute error target. | |
| template<class F> | |
| double | integrate (F f, double a, double b, double eps=1.0e-12, int depth=40) |
| Integrate a scalar function with adaptive Simpson quadrature. | |
| double | ellipsePerim (double ax, double by, double y) |
| Integrate the submerged arc of a mathematical ellipse. | |
|
inline |
Evaluate the exact wetted area of a circular segment.
Uses the exact segment formula between invert and crown, without a lookup table.
| [in] | r | Positive circle radius in ft. |
| [in] | y | Finite water depth from the invert in ft. |
|
inline |
Evaluate the exact submerged circular arc length.
The chord/free surface is excluded from wetted perimeter.
| [in] | r | Positive circle radius in ft. |
| [in] | y | Finite water depth from the invert in ft. |
|
inline |
Evaluate the central angle of a circular water segment.
Clamps 1-y/r to [-1,1]; positive finite radius is required and NaN is not diagnosed.
| [in] | r | Positive circle radius in ft. |
| [in] | y | Finite water depth from the invert in ft. |
|
inline |
Evaluate the exact circular free-surface chord width.
Uses 2*sqrt(y*(2*r-y)) only in the wet sub-crown interval.
| [in] | r | Positive circle radius in ft. |
| [in] | y | Finite water depth from the invert in ft. |
|
inline |
Integrate the submerged arc of a mathematical ellipse.
Uses adaptive angular quadrature with absolute target 1e-12*(ax+by). This mathematical ellipse helper is not the table-defined SWMM HORIZ_ELLIPSE/VERT_ELLIPSE profile evaluator.
| [in] | ax | Positive horizontal semi-axis in ft. |
| [in] | by | Positive vertical semi-axis in ft. |
| [in] | y | Finite depth from the bottom in ft; <=0 returns zero and depths above 2*by saturate. |
| double openswmm::fv::secgeom::detail::integrate | ( | F | f, |
| double | a, | ||
| double | b, | ||
| double | eps = 1.0e-12, | ||
| int | depth = 40 ) |
Integrate a scalar function with adaptive Simpson quadrature.
No heap workspace is used by the quadrature itself. Callable copy/evaluation exceptions propagate; numerical error bounds are not certified for singular or nonfinite integrands.
| [in] | f | Integrand copied for this call and invoked synchronously; no callable is retained. |
| [in] | a | Lower finite integration coordinate. |
| [in] | b | Upper finite coordinate; b<=a returns zero without evaluating f. |
| [in] | eps | Positive absolute integral error target; defaults to 1e-12. |
| [in] | depth | Maximum recursive refinement depth; default 40. Exhaustion accepts the latest corrected estimate. |
| double openswmm::fv::secgeom::detail::simpsonStep | ( | F & | f, |
| double | a, | ||
| double | b, | ||
| double | fa, | ||
| double | fm, | ||
| double | fb, | ||
| double | whole, | ||
| double | eps, | ||
| int | depth ) |
Recursively refine a cached Simpson panel to an absolute error target.
Samples two quarter points per call; stops when abs(delta)<=15*eps or the depth budget is exhausted. No convergence status or nonfinite check is returned. Recursion uses stack storage, and integrand exceptions propagate.
| [in,out] | f | Synchronous scalar integrand callable, borrowed by reference; its own side effects/exceptions are permitted. |
| [in] | a | Lower finite integration coordinate. |
| [in] | b | Upper finite coordinate, greater than a. |
| [in] | fa | Cached f(a). |
| [in] | fm | Cached f((a+b)/2). |
| [in] | fb | Cached f(b). |
| [in] | whole | Simpson estimate over [a,b], in integral units. |
| [in] | eps | Positive absolute error target in integral units; halved on each recursive child. |
| [in] | depth | Remaining subdivision depth; <=0 accepts the next refined estimate regardless of error. |