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

Classes

struct  TransectData
 

Functions

void buildTables (TransectData &td)
 Build tabulated geometry from station-elevation data.
 
void buildCustomTables (TransectData &td, double y_full, const double *curve_x, const double *curve_y, int n_pts)
 Build tabulated geometry from a CUSTOM shape curve.
 
bool buildFromStore (const TransectStore &ts, int index, double ucf_length, TransectData &td)
 Build one transect's geometry tables from the raw [TRANSECTS] store.
 

Variables

constexpr int N_TRANSECT_TBL = 51
 

Function Documentation

◆ buildCustomTables()

void openswmm::transect::buildCustomTables ( TransectData & td,
double y_full,
const double * curve_x,
const double * curve_y,
int n_pts )

Build tabulated geometry from a CUSTOM shape curve.

The shape curve defines normalized (y/yFull) vs (width/wMax). This function integrates area and computes hyd-radius tables that can be used by XSectBatch's per-link lookup kernel.

Parameters
td[out] TransectData to populate (tables and full properties).
y_fullFull depth of the cross-section.
curve_xNormalized depth values (y/yFull) from shape curve.
curve_yNormalized width values (w/wMax) from shape curve.
n_ptsNumber of curve points.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ buildFromStore()

bool openswmm::transect::buildFromStore ( const TransectStore & ts,
int index,
double ucf_length,
TransectData & td )

Build one transect's geometry tables from the raw [TRANSECTS] store.

Copies the store entry into td, applies the legacy parse-time transforms (Station = x·Xfactor/UCF; Elev = (y + Yfactor)/UCF with Yfactor = y_factor/UCF; banks = (x/UCF)·Xfactor — see transect.c::setParams/addStation) to the COPY only, then calls buildTables(). The store itself stays raw/display so [TRANSECTS] round-trips losslessly. Shared by PostParseResolver (per-store resolve pass) and swmm_link_set_xsect (IRREGULAR assignment of a transect added after open) — the two must stay bit-identical.

Parameters
tsRaw transect store.
indexStore row to build.
ucf_lengthUCF(LENGTH) for the model's unit system.
td[out] Built tables.
Returns
false when the entry has no valid channel Manning's n (caller reports the error); true on success.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ buildTables()

void openswmm::transect::buildTables ( TransectData & td)

Build tabulated geometry from station-elevation data.

Computes area, hydraulic radius, and width at each of N_TRANSECT_TBL equal depth increments from thalweg to maximum depth, then normalizes.

Parameters
td[in/out] TransectData with stations/elevations filled. On output, tables and full-depth properties are set.
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ N_TRANSECT_TBL

int openswmm::transect::N_TRANSECT_TBL = 51
constexpr