OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches
openswmm::node Namespace Reference

Functions

double getVolume (const NodeData &nodes, int idx, double depth, TableData *tables=nullptr)
 Compute volume at a given depth for a single node.
 
double getSurfArea (const NodeData &nodes, int idx, double depth, TableData *tables=nullptr)
 Compute surface area at a given depth for a single node.
 
double getPondedArea (const NodeData &nodes, int idx, double depth)
 Get the ponded area (for overflow above rim).
 
double getMaxOutflow (const NodeData &nodes, int idx, double q, double dt)
 Compute max outflow limited by available volume.
 
double getOverflow (double new_volume, double full_volume, double dt)
 Compute overflow rate at a node.
 
void computeHeads (const double *invert, const double *depth, double *head, int n)
 Compute head = invert + depth for all nodes.
 
void computeVolumes (const NodeData &nodes, const double *depth, double *volume)
 Compute volumes for all nodes from their current depths.
 
void computeOverflows (const double *new_volume, const double *full_volume, double *overflow, double dt, int n)
 Compute overflow for all nodes.
 
double getHead (double invert_elev, double depth)
 Compute head from depth: head = invert + depth.
 

Function Documentation

◆ computeHeads()

void openswmm::node::computeHeads ( const double *  invert,
const double *  depth,
double *  head,
int  n 
)

Compute head = invert + depth for all nodes.

Parameters
invert[in] Invert elevation array.
depth[in] Depth array.
head[out] Head array.
nNumber of nodes.

◆ computeOverflows()

void openswmm::node::computeOverflows ( const double *  new_volume,
const double *  full_volume,
double *  overflow,
double  dt,
int  n 
)

Compute overflow for all nodes.

Parameters
new_volume[in] Current volume array.
full_volume[in] Full volume array.
overflow[out] Overflow rate array.
dtTimestep (seconds).
nNumber of nodes.

◆ computeVolumes()

void openswmm::node::computeVolumes ( const NodeData nodes,
const double *  depth,
double *  volume 
)

Compute volumes for all nodes from their current depths.

Parameters
nodesSoA node data (reads type, full_depth, storage params).
depth[in] Depth array (may differ from nodes.depth).
volume[out] Volume array.
Here is the call graph for this function:

◆ getHead()

double openswmm::node::getHead ( double  invert_elev,
double  depth 
)
inline

Compute head from depth: head = invert + depth.

◆ getMaxOutflow()

double openswmm::node::getMaxOutflow ( const NodeData nodes,
int  idx,
double  q,
double  dt 
)

Compute max outflow limited by available volume.

qMax = inflow + oldVolume / dt. Outflow cannot exceed this.

Parameters
nodesSoA node data.
idxNode index.
qProposed outflow (ft3/s).
dtTimestep (seconds).
Returns
Clamped outflow (ft3/s, >= 0).

◆ getOverflow()

double openswmm::node::getOverflow ( double  new_volume,
double  full_volume,
double  dt 
)

Compute overflow rate at a node.

overflow = max(0, (newVolume - fullVolume) / dt)

Parameters
nodesSoA node data.
idxNode index.
new_volumeCurrent volume (ft3).
full_volumeVolume at full depth (ft3).
dtTimestep (seconds).
Returns
Overflow rate (ft3/s).

◆ getPondedArea()

double openswmm::node::getPondedArea ( const NodeData nodes,
int  idx,
double  depth 
)

Get the ponded area (for overflow above rim).

If depth <= fullDepth, returns normal surface area. If depth > fullDepth and pondedArea > 0, returns pondedArea.

Parameters
nodesSoA node data.
idxNode index.
depthWater depth (ft).
Returns
Effective surface area (ft2).
Here is the call graph for this function:

◆ getSurfArea()

double openswmm::node::getSurfArea ( const NodeData nodes,
int  idx,
double  depth,
TableData tables = nullptr 
)

Compute surface area at a given depth for a single node.

For JUNCTION: returns MIN_SURFAREA (small constant). For STORAGE: uses functional or tabulated relationship.

Parameters
nodesSoA node data.
idxNode index.
depthWater depth (ft).
Returns
Surface area (ft2).
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getVolume()

double openswmm::node::getVolume ( const NodeData nodes,
int  idx,
double  depth,
TableData tables = nullptr 
)

Compute volume at a given depth for a single node.

For JUNCTION: V = fullVolume * (depth / fullDepth). For STORAGE: uses functional or tabulated relationship.

Parameters
nodesSoA node data.
idxNode index.
depthWater depth (ft).
Returns
Volume (ft3).
Here is the call graph for this function:
Here is the caller graph for this function: