#include <MomentumPhysics2D.hpp>
|
| double | evaluate (const MeshData &m, const InertialEdges &edges, const std::vector< double > &h, const std::vector< double > &eta, const std::vector< double > &qx, const std::vector< double > &qy, double dry, double cs, std::vector< double > &rx, std::vector< double > &ry, double fixed_viscosity=-1, double background=0, double depth_coefficient=0) |
| |
| void | advance (const MeshData &m, const InertialEdges &edges, const std::vector< double > &h, const std::vector< double > &eta, std::vector< double > &qx, std::vector< double > &qy, double dry, double cs, double seconds, double background=0, double depth_coefficient=0) |
| |
| void | computeWallDistance (const MeshData &m) |
| |
|
| static double | wallDrag (const MeshData &m, const BoundaryData &b, const std::vector< int > &slots, const std::vector< double > &h, const std::vector< double > &eta, std::vector< double > &qx, std::vector< double > &qy, double dry, double seconds, bool vfr) |
| |
| static void | rotate (std::vector< double > &qx, std::vector< double > &qy, double angle) |
| |
| static double | energy (const MeshData &m, const std::vector< double > &h, const std::vector< double > &qx, const std::vector< double > &qy, double dry) |
| |
|
| static constexpr double | kappa = 0.41 |
| |
Conservative depth-averaged Smagorinsky face stresses. Least-squares gradients are corrected along the face normal to reproduce the actual centroid-to-centroid velocity difference on nonorthogonal meshes. Every shared face transfers equal/opposite momentum. Physical boundaries have zero viscous traction. Stage bounds and a global energy check qualify each nonlinear explicit mixing substep. Scratch is not checkpoint state.
◆ advance()
| void openswmm::twoD::MomentumPhysics2D::advance |
( |
const MeshData & | m, |
|
|
const InertialEdges & | edges, |
|
|
const std::vector< double > & | h, |
|
|
const std::vector< double > & | eta, |
|
|
std::vector< double > & | qx, |
|
|
std::vector< double > & | qy, |
|
|
double | dry, |
|
|
double | cs, |
|
|
double | seconds, |
|
|
double | background = 0, |
|
|
double | depth_coefficient = 0 ) |
SSP-RK2 mixing at fixed water storage. Reevaluate nonlinear viscosity at each stage; retry only momentum, before publishing it. Hydrodynamic sources/receipts are never replayed. Subcycling obeys both stage bounds and checks the discrete energy inequality. No viscosity clipping.
◆ computeWallDistance()
| void openswmm::twoD::MomentumPhysics2D::computeWallDistance |
( |
const MeshData & | m | ) |
|
Nearest-boundary-edge distance for every cell centroid (all exterior edges).
◆ energy()
| double openswmm::twoD::MomentumPhysics2D::energy |
( |
const MeshData & | m, |
|
|
const std::vector< double > & | h, |
|
|
const std::vector< double > & | qx, |
|
|
const std::vector< double > & | qy, |
|
|
double | dry ) |
|
static |
◆ evaluate()
| double openswmm::twoD::MomentumPhysics2D::evaluate |
( |
const MeshData & | m, |
|
|
const InertialEdges & | edges, |
|
|
const std::vector< double > & | h, |
|
|
const std::vector< double > & | eta, |
|
|
const std::vector< double > & | qx, |
|
|
const std::vector< double > & | qy, |
|
|
double | dry, |
|
|
double | cs, |
|
|
std::vector< double > & | rx, |
|
|
std::vector< double > & | ry, |
|
|
double | fixed_viscosity = -1, |
|
|
double | background = 0, |
|
|
double | depth_coefficient = 0 ) |
Evaluate conservative shared-face dq/dt. Cell viscosity is background + (cs*Delta)^2*|S| (m2/s), or background + l^2*|omega| with l = min(c*h, kappa*d_wall) when a depth_coefficient c > 0 selects the depth mixing length, unless fixed_viscosity >= 0 replaces it. The explicit bound uses the absolute row sums of the actual velocity operator, including gradient reconstruction and cross stresses. Dry or blocked faces are excluded.
◆ rotate()
| void openswmm::twoD::MomentumPhysics2D::rotate |
( |
std::vector< double > & | qx, |
|
|
std::vector< double > & | qy, |
|
|
double | angle ) |
|
static |
◆ wallDrag()
| double openswmm::twoD::MomentumPhysics2D::wallDrag |
( |
const MeshData & | m, |
|
|
const BoundaryData & | b, |
|
|
const std::vector< int > & | slots, |
|
|
const std::vector< double > & | h, |
|
|
const std::vector< double > & | eta, |
|
|
std::vector< double > & | qx, |
|
|
std::vector< double > & | qy, |
|
|
double | dry, |
|
|
double | seconds, |
|
|
bool | vfr ) |
|
static |
Exact tangential quadratic decay on each selected exterior wall face. Palindromic face composition is dissipative for arbitrary corners and second-order at fixed h. Uses actual wetted edge area for VFR, cell h for FLAT. Returns kinetic energy removed divided by water density.
◆ kappa
| double openswmm::twoD::MomentumPhysics2D::kappa = 0.41 |
|
staticconstexpr |
◆ last_limit
| double openswmm::twoD::MomentumPhysics2D::last_limit = std::numeric_limits<double>::infinity() |
◆ retries
| uint64_t openswmm::twoD::MomentumPhysics2D::retries = 0 |
◆ strain
| std::vector<double> openswmm::twoD::MomentumPhysics2D::strain |
◆ substeps
| uint64_t openswmm::twoD::MomentumPhysics2D::substeps = 0 |
◆ viscosity
| std::vector<double> openswmm::twoD::MomentumPhysics2D::viscosity |
◆ vorticity
| std::vector<double> openswmm::twoD::MomentumPhysics2D::vorticity |
per cell: m2/s, |S| and |omega| in 1/s
◆ wall_distance
| std::vector<double> openswmm::twoD::MomentumPhysics2D::wall_distance |
Distance from each centroid to the nearest mesh boundary edge (m); built on first use by the depth mixing length, which caps l = min(c h, kappa d).
The documentation for this class was generated from the following files: