Uses the direct step method to find the distance between two known depths in a trapezoidal channel
Source:R/direct_step.R
direct_step.Rd
This function applies the direct step method for a gradually-varying water surface profile for flow in an open channel with a trapezoidal shape.
Usage
direct_step(
So = NULL,
n = NULL,
Q = NULL,
y1 = NULL,
y2 = NULL,
b = NULL,
m = NULL,
nsteps = 1,
units = c("SI", "Eng"),
ret_units = FALSE
)
Arguments
- So
numeric channel bed slope [unitless]
- n
numeric vector that contains the Manning roughness coefficient
- Q
numeric vector that contains the flow rate [\(m^3 s^{-1}\) or \(ft^3 s^{-1}\)]
- y1
numeric vector that contains the initial water depth [\(m\) or \(ft\)]
- y2
numeric vector that contains the final water depth [\(m\) or \(ft\)]
- b
numeric vector that contains the channel bottom width [\(m\) or \(ft\)]
- m
numeric vector that contains the side slope of the channel (m:1 H:V) [unitless]
- nsteps
integer of the number of calculation steps between y1 and y2 [unitless]
- units
character vector that contains the system of units [options are
SI
for International System of Units andEng
for English (US customary) units. This is used for compatibility with iemisc package.- ret_units
If set to TRUE the value(s) returned are of class
units
with units attached to the value. [Default is FALSE]
Value
Returns a data frame (tibble) with the columns:
x - cumulative distance from position of y1
z - elevation of the channel bed at location x
y - depth of the water at location x
A - cross-sectional area at location x
Sf - slope of the energy grade line at location x
E - specific energy at location x
Fr - Froude number at location x
Details
The direct step method applies the energy equation to gradually-varied open channel flow conditions, assuming each increment is approximately uniform. This function works with a trapezoidal channel shape. The water depths at two locations are input with channel geometry and flow rate, and the distance between the two locations, \({\Delta}X\), is calculated: $${\Delta}X = \frac{E_1 - E_2}{S_f-S_o}$$ where \(E_1\) and \(E_2\) are the specific energy values at the locations of \(y_1\) and \(y_2\), \(S_f\) is the slope of the energy grade line, and \(S_o\) is the slope of the channel bed.
Examples
#Solving for profile between depths 3.1 ft and 3.4 ft in a rectangular channel
#Flow of 140 ft^3/s, bottom width = 6 ft:
direct_step(So=0.0015, n=0.013, Q=140, y1=3.1, y2=3.4, b=6, m=0, nsteps=2, units="Eng")
#> y1=3.100, y2=3.400, yn=3.750, yc=2.566646
#> Profile type = M2
#> # A tibble: 3 × 7
#> x z y A Sf E Fr
#> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 0 0 3.1 18.6 0.00247 3.98 0.753
#> 2 -85.6 0.128 3.25 19.5 0.00218 4.05 0.702
#> 3 -230. 0.346 3.4 20.4 0.00194 4.13 0.656