Functions for channel routing related modules, e.g., MUSK_CH. More...

Functions

FLTPT manningQ (FLTPT x1, FLTPT x2, FLTPT x3, FLTPT x4)
 Calculates flow rate or flow velocity using Manning's equation. More...
 
FLTPT ChannleBottomWidth (FLTPT ch_wth, FLTPT &ch_sideslp, FLTPT &ch_depth)
 Calculate channel bottom width by channel width, side slope, and depth. More...
 
FLTPT ChannelWettingPerimeter (FLTPT ch_btmwth, FLTPT ch_depth, FLTPT wtr_depth, FLTPT ch_sideslp, FLTPT ch_wth, FLTPT fps=4.)
 Channel wetting perimeter for both floodplain and not full channel. More...
 
FLTPT ChannelWettingPerimeter (FLTPT ch_btmwth, FLTPT wtr_depth, FLTPT ch_sideslp)
 Channel wetting perimeter for not full channel. More...
 
FLTPT ChannelCrossSectionalArea (FLTPT ch_btmwth, FLTPT ch_depth, FLTPT wtr_depth, FLTPT ch_sideslp, FLTPT ch_wth, FLTPT fps=4.)
 Cross-sectional area of channel for both floodplain and not full channel. More...
 
FLTPT ChannelCrossSectionalArea (FLTPT ch_btmwth, FLTPT wtr_depth, FLTPT ch_sideslp)
 Cross-sectional area of channel for not full channel. More...
 
FLTPT StorageTimeConstant (FLTPT ch_manning, FLTPT ch_slope, FLTPT ch_len, FLTPT radius)
 Compute storage time constant for channel (ratio of storage to discharge) More...
 

Detailed Description

Functions for channel routing related modules, e.g., MUSK_CH.

Function Documentation

◆ ChannelCrossSectionalArea() [1/2]

FLTPT ChannelCrossSectionalArea ( FLTPT  ch_btmwth,
FLTPT  ch_depth,
FLTPT  wtr_depth,
FLTPT  ch_sideslp,
FLTPT  ch_wth,
FLTPT  fps = 4. 
)

Cross-sectional area of channel for both floodplain and not full channel.

Parameters
[in]ch_btmwthChannel bottom width
[in]ch_depthChannel depth
[in]wtr_depthChannel water depth
[in]ch_sideslpThe inverse of channel side slope (default is 2, slope = 0.5)
[in]ch_wthChannel width at bankfull
[in]fpsThe inverse of floodplain side slope (default is 4, slope = 0.25)
Returns
Channel cross-sectional area

◆ ChannelCrossSectionalArea() [2/2]

FLTPT ChannelCrossSectionalArea ( FLTPT  ch_btmwth,
FLTPT  wtr_depth,
FLTPT  ch_sideslp 
)

Cross-sectional area of channel for not full channel.

Parameters
[in]ch_btmwthChannel bottom width
[in]wtr_depthChannel water depth
[in]ch_sideslpThe inverse of channel side slope (default is 2, slope = 0.5)
Returns
Channel cross-sectional area

◆ ChannelWettingPerimeter() [1/2]

FLTPT ChannelWettingPerimeter ( FLTPT  ch_btmwth,
FLTPT  ch_depth,
FLTPT  wtr_depth,
FLTPT  ch_sideslp,
FLTPT  ch_wth,
FLTPT  fps = 4. 
)

Channel wetting perimeter for both floodplain and not full channel.

Parameters
[in]ch_btmwthChannel bottom width
[in]ch_depthChannel depth
[in]wtr_depthChannel water depth
[in]ch_sideslpThe inverse of channel side slope (default is 2, slope = 0.5)
[in]ch_wthChannel width at bankfull
[in]fpsThe inverse of floodplain side slope (default is 4, slope = 0.25)
Returns
Channel wetting perimeter

◆ ChannelWettingPerimeter() [2/2]

FLTPT ChannelWettingPerimeter ( FLTPT  ch_btmwth,
FLTPT  wtr_depth,
FLTPT  ch_sideslp 
)

Channel wetting perimeter for not full channel.

Parameters
[in]ch_btmwthChannel bottom width
[in]wtr_depthChannel water depth
[in]ch_sideslpThe inverse of channel side slope (default is 2, slope = 0.5)
Returns
Channel wetting perimeter

◆ ChannleBottomWidth()

FLTPT ChannleBottomWidth ( FLTPT  ch_wth,
FLTPT &  ch_sideslp,
FLTPT &  ch_depth 
)

Calculate channel bottom width by channel width, side slope, and depth.

Refers code ttcoef.f in SWAT.

Parameters
[in]ch_wthChannel upper width
[in,out]ch_sideslpThe inverse of channel side slope (default is 2, slope = 0.5), which maybe updated when bottom width < 0
[in,out]ch_depthChannel depth, which maybe updated when bottom width < 0
Returns
Channel bottom width

◆ manningQ()

FLTPT manningQ ( FLTPT  x1,
FLTPT  x2,
FLTPT  x3,
FLTPT  x4 
)

Calculates flow rate or flow velocity using Manning's equation.

If x1 is set to 1, the velocity is calculated. If x1 is set to cross-sectional area of flow, the flow rate is calculated. Refers code Qman.f in SWAT.

Parameters
[in]x1cross-sectional flow area or 1, m^2 or none.
[in]x2hydraulic radius, m.
[in]x3Manning's "n" value for channel.
[in]x4average slope of channel, m/m.
Returns
flow rate or flow velocity, m^3/s or m/s.

◆ StorageTimeConstant()

FLTPT StorageTimeConstant ( FLTPT  ch_manning,
FLTPT  ch_slope,
FLTPT  ch_len,
FLTPT  radius 
)

Compute storage time constant for channel (ratio of storage to discharge)

Parameters
[in]ch_manningManning's n value of channel
[in]ch_slopeChannel slope
[in]ch_lenChannel length, m
[in]radiusHydraulic radius, m
Returns
Storage time constant