Loading [MathJax]/extensions/tex2jax.js
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
ChannelRoutingCommon.h
Go to the documentation of this file.
1/*!
2 * \file ChannelRoutingCommon.h
3 * \brief Define some common used function in channel routing related modules, e.g., MUSK_CH.
4 * \author Liang-Jun Zhu
5 * \date 2018-8-11
6 */
7#ifndef SEIMS_CHANNEL_ROUTING_COMMON_H
8#define SEIMS_CHANNEL_ROUTING_COMMON_H
9#include <seims.h>
10
11/*!
12 * \defgroup ChannelRouting
13 * \ingroup common_algorithm
14 * \brief Functions for channel routing related modules, e.g., MUSK_CH.
15 */
16
17/*!
18 * \ingroup ChannelRouting
19 * \brief Calculates flow rate or flow velocity using Manning's
20 * equation. If x1 is set to 1, the velocity is calculated. If x1 is set to
21 * cross-sectional area of flow, the flow rate is calculated.
22 * Refers code Qman.f in SWAT.
23 * \param[in] x1 cross-sectional flow area or 1, m^2 or none.
24 * \param[in] x2 hydraulic radius, m.
25 * \param[in] x3 Manning's "n" value for channel.
26 * \param[in] x4 average slope of channel, m/m.
27 * \return flow rate or flow velocity, m^3/s or m/s.
28 */
29FLTPT manningQ(FLTPT x1, FLTPT x2, FLTPT x3, FLTPT x4);
30
31/*!
32 * \ingroup ChannelRouting
33 * \brief Calculate channel bottom width by channel width, side slope, and depth.
34 * Refers code ttcoef.f in SWAT.
35 * \param[in] ch_wth Channel upper width
36 * \param[in,out] ch_sideslp The inverse of channel side slope (default is 2, slope = 0.5), which maybe updated when bottom width < 0
37 * \param[in,out] ch_depth Channel depth, which maybe updated when bottom width < 0
38 * \return Channel bottom width
39 */
40FLTPT ChannleBottomWidth(FLTPT ch_wth, FLTPT& ch_sideslp, FLTPT& ch_depth);
41
42/*!
43 * \ingroup ChannelRouting
44 * \brief Channel wetting perimeter for both floodplain and not full channel
45 * \param[in] ch_btmwth Channel bottom width
46 * \param[in] ch_depth Channel depth
47 * \param[in] wtr_depth Channel water depth
48 * \param[in] ch_sideslp The inverse of channel side slope (default is 2, slope = 0.5)
49 * \param[in] ch_wth Channel width at bankfull
50 * \param[in] fps The inverse of floodplain side slope (default is 4, slope = 0.25)
51 * \return Channel wetting perimeter
52 */
53FLTPT ChannelWettingPerimeter(FLTPT ch_btmwth, FLTPT ch_depth, FLTPT wtr_depth,
54 FLTPT ch_sideslp, FLTPT ch_wth, FLTPT fps = 4.);
55
56/*!
57 * \ingroup ChannelRouting
58 * \brief Channel wetting perimeter for not full channel
59 * \param[in] ch_btmwth Channel bottom width
60 * \param[in] wtr_depth Channel water depth
61 * \param[in] ch_sideslp The inverse of channel side slope (default is 2, slope = 0.5)
62 * \return Channel wetting perimeter
63 */
64FLTPT ChannelWettingPerimeter(FLTPT ch_btmwth, FLTPT wtr_depth, FLTPT ch_sideslp);
65
66/*!
67 * \ingroup ChannelRouting
68 * \brief Cross-sectional area of channel for both floodplain and not full channel
69 * \param[in] ch_btmwth Channel bottom width
70 * \param[in] ch_depth Channel depth
71 * \param[in] wtr_depth Channel water depth
72 * \param[in] ch_sideslp The inverse of channel side slope (default is 2, slope = 0.5)
73 * \param[in] ch_wth Channel width at bankfull
74 * \param[in] fps The inverse of floodplain side slope (default is 4, slope = 0.25)
75 * \return Channel cross-sectional area
76 */
77FLTPT ChannelCrossSectionalArea(FLTPT ch_btmwth, FLTPT ch_depth, FLTPT wtr_depth,
78 FLTPT ch_sideslp, FLTPT ch_wth, FLTPT fps = 4.);
79
80/*!
81 * \ingroup ChannelRouting
82 * \brief Cross-sectional area of channel for not full channel
83 * \param[in] ch_btmwth Channel bottom width
84 * \param[in] wtr_depth Channel water depth
85 * \param[in] ch_sideslp The inverse of channel side slope (default is 2, slope = 0.5)
86 * \return Channel cross-sectional area
87 */
88FLTPT ChannelCrossSectionalArea(FLTPT ch_btmwth, FLTPT wtr_depth, FLTPT ch_sideslp);
89
90/*!
91 * \ingroup ChannelRouting
92 * \brief Compute storage time constant for channel (ratio of storage to discharge)
93 * \param[in] ch_manning Manning's n value of channel
94 * \param[in] ch_slope Channel slope
95 * \param[in] ch_len Channel length, m
96 * \param[in] radius Hydraulic radius, m
97 * \return Storage time constant
98 */
99FLTPT StorageTimeConstant(FLTPT ch_manning, FLTPT ch_slope, FLTPT ch_len,
100 FLTPT radius);
101
102#endif /* SEIMS_CHANNEL_ROUTING_COMMON_H */
FLTPT manningQ(FLTPT x1, FLTPT x2, FLTPT x3, FLTPT x4)
Calculates flow rate or flow velocity using Manning's equation.
FLTPT StorageTimeConstant(FLTPT ch_manning, FLTPT ch_slope, FLTPT ch_len, FLTPT radius)
Compute storage time constant for channel (ratio of storage to discharge)
FLTPT ChannleBottomWidth(FLTPT ch_wth, FLTPT &ch_sideslp, FLTPT &ch_depth)
Calculate channel bottom width by channel width, side slope, and depth.
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.
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.
The SEIMS related definitions and utilities header.