OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
LidNode.cpp File Reference

Layered LID node storage, water exchange, and lifecycle operations. More...

#include "core/ProcessPerf.hpp"
#include "LidNode.hpp"
#include "LidNodeRichardsState.hpp"
#include "../core/SimulationContext.hpp"
#include "../core/UnitConversion.hpp"
#include "../input/Tokenizer.hpp"
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <limits>
#include <set>
#include "../hydraulics/Node.hpp"
Include dependency graph for LidNode.cpp:

Namespaces

namespace  openswmm
 
namespace  openswmm::lidnode
 

Functions

std::vector< LidNodeLayer > openswmm::lidnode::layers (const SimulationContext &ctx, int control)
 Copy an authored node layer stack or adapt a supported conventional LID control.
 
bool openswmm::lidnode::validLayer (const LidNodeLayer &l)
 Check one authored node-layer material record.
 
std::string openswmm::lidnode::validateStack (const std::vector< LidNodeLayer > &stack)
 Validate layer material/order and optional Richards requirements.
 
double openswmm::lidnode::thickness (const std::vector< LidNodeLayer > &stack)
 Sum all physical layer thicknesses while excluding the bottom boundary record.
 
void openswmm::lidnode::readNodes (SimulationContext &ctx, const std::vector< std::string > &lines)
 Parse LID storage-node assignments and bottom-boundary modes.
 
void openswmm::lidnode::readOutlets (SimulationContext &ctx, const std::vector< std::string > &lines)
 Parse hydraulic outlet anchors to numbered LID layer interfaces.
 
double openswmm::lidnode::portOffset (const SimulationContext &ctx, int link, int node)
 Resolve the actual hydraulic port elevation relative to a selected node invert.
 
void openswmm::lidnode::validate (SimulationContext &ctx)
 Validate node-LID model references, layers, supported physics and anchored geometry.
 
void openswmm::lidnode::sync (SimulationContext &ctx, int control)
 Synchronize dependent storage depth and authored outlet anchors after a control edit.
 
bool openswmm::lidnode::active (const SimulationContext &ctx, int node)
 Check whether a node has initialized physical LID cells.
 
double openswmm::lidnode::heldVolume (const SimulationContext &ctx, int node)
 Read retained node-LID water outside the mobile hydraulic volume.
 
void openswmm::lidnode::initializeInfiltration (SimulationContext &ctx, int node)
 Initialize/reconstruct node-LID surface Green-Ampt history from physical moisture.
 
void openswmm::lidnode::initialize (SimulationContext &ctx)
 Build node-LID hydraulic cells and initial retained/mobile water state.
 
void openswmm::lidnode::prepareStep (SimulationContext &ctx, double dt, double evaporation)
 Prepare one node-LID moisture/routing interval before hydraulic mutation.
 
void openswmm::lidnode::prepareStepAfterMesh (SimulationContext &ctx, double dt, double evaporation)
 Prepare mixed-mode LID rows after Mesh Richards owners accepted this interval.
 
void openswmm::lidnode::finishStep (SimulationContext &ctx)
 Finish all node-LID port transfers at a common accepted boundary.
 
void openswmm::lidnode::finishRichardsNodes (SimulationContext &ctx, double start, double end, const std::vector< int > &nodes)
 Finish exactly one connected accepted Mesh Richards owner cohort.
 
LidNodeBottom openswmm::lidnode::bottomMode (const SimulationContext &c, int node)
 Read the assigned bottom-boundary policy for a node.
 
double openswmm::lidnode::bottomConductivity (const SimulationContext &c, int storage_row)
 Select the authored conductivity driving native storage bottom exfiltration.
 
double openswmm::lidnode::bottomCloggingFactor (const SimulationContext &c, int storage_row)
 Evaluate the node-LID bottom clogging multiplier from cumulative treated water.
 
int openswmm::lidnode::portCell (const LidNodeState &state, double offset)
 Map a hydraulic port offset to a physical LID cell with stable interface ownership.
 
void openswmm::lidnode::resetPorts (SimulationContext &ctx)
 Clear trial port-transfer accumulators before a fresh hydraulic iteration.
 
double openswmm::lidnode::portDepth (const SimulationContext &ctx, int node, double offset)
 Read the port hydraulic head as a node-relative depth.
 
double openswmm::lidnode::exchangePorts (SimulationContext &ctx, int link, double flow, double dt)
 Limit and book one trial link transfer through LID mobile/retained ports.
 

Detailed Description

Layered LID node storage, water exchange, and lifecycle operations.

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License
Apache-2.0