Description Usage Arguments Value Note Author(s) References See Also Examples
Compute open-channel flow (discharge) over a sharp-crested weir in general accordance with Hulsing (1967) [TWRI3A5]. The weir crest of opening (width) b in feet is P feet above the channel bottom and L feet long in the flow direction. A rectangular approach channel is specified by width B, but the area of the channel (and hence rectangular assumption) can be bypassed by function arguments, although B is used in the contraction ratio b/B unless this ratio is superceded. For the weir3a5.sharpcrest()
function, the computations are exclusively based on the foot-second unit system and careful adherance by the user is required as not all “coefficients” are dimensionless.
The discharge equation for an acceptable tail-water condition h_t is
Q = kc kt C b H^1.5
where Q is discharge in cubic feet per second, k_c is the contraction coefficient that also is a function of the abutment rounding r, k_t is the submergence adjustment coefficient, C is the discharge coefficient, b is the width in feet of the weir crest, and H is total free-flow head in feet on the weir assuming h_t = 0, which is computed by
H = h + alpha * v^2/2g
where h is static head in feet on the weir, v_o is velocity head in feet in the approach section, v is mean velocity in feet per second in the section computed by v=Q/A for cross section area A in square feet, which by default is computed by A=(h + P)B, but can be superceded. The quantity g is the acceleration of gravity and is hardwired to 32.2 feet per square second. The dimensionless quantity α permits accommodation of a velocity head correction that is often attributable to cross section subdivision. The α is outside the scope of this documentation, is almost always α=1, and is made available as an argument for advanced users.
The weir3a5.sharpcrest()
function is vectorized meaning that optional vectors of h can be specified along with an optional and equal length vector h_t. The function assumes rectangular approach conditions to compute approach area A if not superceded by the optional A
argument, which also can be a vector.
The weir3a5.sharpcrest()
function also permits optional vectors of L and b/B (by the argument contractratio
) so that tuning of the weir-computed discharge to a measured discharge potentially can be made. The crest length L can be used to increase discharge slightly by shortening in say the circumstances of a slightly downward sloping crest. The b/B can be used to decrease discharge by decreasing k_c in say the circumstance of an inlet that is rougher or has asperities that slightly increase the expected contraction and reduce flow efficiency. To clarify, the fact that L and b/B can be vectorized as optional arguments shows a mechanism by which tuning of the computational results to measured Q values can occur without replacing the fundamental nomographs and lookup tables of TWRI3A5 for k_c, k_t, and C. In all cases, these coefficients can be superceded by user-specified scalars or vectors in various combinations.
1 2 3 4 5 6 7 8 9 |
h |
Mandatory scalar or vector of static heads h in feet on the weir; |
ht |
Optional scalar or vector of tail water heads h_t in feet on the weir; |
b |
Mandatory scalar width of weir crest b in feet normal to flow; |
B |
Mandatory scalar width (or top width) of approach channel B in feet. Technically, it is possible with arguments |
P |
Mandatory scalar height of weir crest P in feet above channel bed; |
L |
Optional scalar or vector of lengths L in feet of broad-crested weir in direction of flow; |
r |
Optional scalar radius of curvature r in feet on the vertical abutments at inlet of weir crest; |
A |
Optional scalar or vector of approach cross-section area A in square feet for each h that supersedes the rectangular channel computation A=(h+P)B; |
alpha |
Optional scalar or vector of velocity head correction term α dimensionless. The default is unity (α=1), which is most certainly appropriate for the vast majority of weir computations; |
slopeus |
String signifying the approach embankment slope in the format “hz:vt”, thus, slope is defined as the ratio of the horizontal hz to vertical distance vt. (This is opposite of the more common convention for the trigometric function |
kc |
Contraction coefficient k_c, if provided, supercedes nomograph lookup and interpolation by h/P and b/B. Optionally, this coefficient may be a vector; |
kt |
Coefficient for submergence adjustment, if provided, supercedes nomograph lookup and interpolation by H/P and h_t/P. Optionally, this coefficient may be a vector; |
C |
Discharge coefficient, if provided, supercedes nomograph lookup and interpolation by h/L and |
contractratio |
Optional vector of user specified contraction ratios, if provided, supercedes use of b/B. For example, |
extended |
A logical that controls the contents of the data frame on return; |
header |
A string (usually) or any other content to add to the |
resetkts |
A logical controlling whether interpolated k_t > 1 values are reset to k_t = 1 and so diverges slightly from TWRI3A5 (fig.4); |
flowdigits |
The number of digits to report on flow, velocity head, total head, computed h_t/H, and computed H/P; |
coedigits |
The number of digits to report on weir coefficients; |
verbose |
A logical controlling intermediate messages. This might be reserved for development work and no verbose output in a released version of weirs could occur; |
eps |
An absolute error of discharge for convergence in cubic feet per second; and |
maxit |
Maximum number of iterations for the computation of the total head from summation of static and velocity head H = h + α v^2/2g for the final Q_H in item |
An R data.frame()
is returned and the extended=TRUE
version is described below:
head |
Echoed h on the input in feet; |
flow |
Flow k_t Q_H in cubic feet per second based on total head H; |
delta |
First order difference of k_t Q_H; |
flowfree |
Flow Q_H in cubic feet per second using free flow conditions, h_t = 0; |
flowo |
Flow Q_h in cubic feet per second using free flow conditions, h_t = 0 based on static head h; |
error |
Absolute convergence error ε of Q_H in cubic feet per second ; |
velhead |
Velocity head v_o = v^2/2g = (Q_H/A)^2/2g in feet; |
Hfree |
Total head H = h + v_o in feet; |
ht |
Echoed h_t on the input in feet; |
L |
Echoed L in feet; |
b.over.B |
Echoed b/B; |
h.over.L |
Echoed h/L; |
h.over.P |
Echoed h/P; |
ht.over.H |
Computed h_t/H; |
H.over.P |
Computed H/P; |
C |
Discharge coefficient C; |
kc |
Contraction coefficient k_c; |
kt |
Coefficient to adjust for submergence k_t. Note that interpolated values k_t > 1 are set to k_t = 1, if |
message |
Messages concerning the computation of Q for each value of h; and |
source |
|
The extended=FALSE
version is restricted to the most salient items including k_t Q_H, Q_H, Q_h, v_o, C, k_c, and k_t.
The weir3a5.sharpcrest()
function will stop()
under conditions of unspecified or implausible L, B, and P as well as incompatibility of b and B, such as B<b. This function will also stop()
if the length of the vector arguments or optional vector arguments do not match the length of h. The only exception is that if h_t is not specified, then internally it is treated a vector of length h having values of zero. There are other conditions that will cause the function to stop and consultation of the if()
statements at the beginning of the function is recommended.
When the weir3a5.sharpcrest()
function encounters non-stopping errors or warnings, it silently continues with error reporting in the message
item in the returned data frame. This behavior is considered a feature and necessary to support the return of the data frame. The message states are:
If h/P > 5, then C has much uncertainty and NA
is returned for all items;
If h is zero, then zero is returned for all Q, ε, and v_o and NA
is returned for others;
If a given h tests as too low for sharp-crested weir flow and hence the weir is functioning as broad-crested, then NA
is returned for all items; however, for very shallow approach embankment slopes (>1), then critical h/L=2.4 is used for all h/P and such weirs with h/L < 2.4 are treated as broad-crested;
If the contraction ratio b/B is too small (b/B < 0.20), then too much contraction is concluded and NA
is returned for all items;
If the upstream embankment slope is too shallow (> 1), then C is indeterminant and NA
is returned for all items;
If nonconvergence occurs or estimated Q_H goes to infinity (supercritical approach or choking), then NA
is returned for all Q, ε, and v_o, but the estimated C, k_c, and k_t are returned;
If h_t/H > 0.95 by H from free flow conditions, then too much submergence for k_t computation, and;
If no problems were detected, then ok
is the message.
The conditions important for k_t computation are:
If h_t/H > 0.95 for total H for free-flow (h_t=0) conditions, then too much submergence is concluded and k_t is NA
and hence flow
is NA
;
If h_t = 0, then k_t = 1 and flow
is equal to flowfree
;
If H/P < 0.20, then k_t can not be computed and is NA
and hence flow
is equal to NA
;
If H/P > 2, then k_t can not be computed and is NA
and hence flow
is equal to NA
;
If k_t > 1, then k_t = 1 by resetting dependent on the resetkts
logical argument. This practice differs from
TWRI3A5, but prevents submergence from producing more Q than free-flow conditions. The difference is that this function uses iteration to solve for the total head for the free-flow conditions and not a single computation step as seemingly implied in TWRI3A5.
The influence of abutment rounding by the ratio r/b > 0 on k_c is accommodated by prorating between (1) k_c from h/P and b/B or user-specified k_c and (2) k_c = 1 unless r/b > 0.12 for which k_c = 1.
Nomograph lookup and interpolation is made throughout the computations. The linear interpolating approx()
function is used for all interpolation. Most commonly, a form of bilinear interpolation is made. First, the two bounding curves for a given condition are interpolated in the horizontal direction and then the resulting two values are interpolated in the vertical. The horizontal interpolation by approx()
explicitly uses the rule=2
, which means that extrapolation to the left and right using the respective end point is made. In other words, the nomographs (and tables) are flat lined when extrapolation is needed. Within the code, the horizontal interpolations can be identified by rule=2
and the vertical interpolations lack the rule
argument. Finally, the nomographs are in the hashed environment .weir.nomographs, which sources from the file ‘sysdata.rda’ of the package. The file ‘./inst/Nomographs4R/nomographs.R’ is used to create the ‘sysdata.rda’ file.
W. Asquith with digitizing of nomograph contributions by W. Miller
Hulsing, Harry, 1967, Measurement of peak discharge at dams by indirect methods: U.S. Geological Survey Techniques of Water-Resources Investigations, Book 3, Chapter A5, 29 p., http://pubs.usgs.gov/twri/twri3-a5/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | weir3a5.sharpcrest(0.45, L=0.125, P=0.32, b=5.81, B=5.81)
h <- seq(0.15,0.64,by=.01)
Qo <- weir3a5.sharpcrest(h, L=0.125, P=0.32, b=5.81, B=5.81)
print(Qo)
ht <- seq(0.15,0.64,by=.01)/2
weir3a5.sharpcrest(h, ht=ht, L=0.125, P=0.32, b=5.81, B=5.81)
plot(Qo$flow, Qo$head, type="l", log="xy")
Q <- weir3a5.sharpcrest(h, ht=0.21*h, L=0.125, P=0.32, b=5.81, B=5.81)
lines(Q$flow, Q$head, lty=2)
Q <- weir3a5.sharpcrest(h, ht=0.4*h, L=0.125, P=0.32, b=5.81, B=5.81)
lines(Q$flow, Q$head, lty=2)
Q <- weir3a5.sharpcrest(h, ht=0.6*h, L=0.125, P=0.32, b=5.81, B=5.81)
lines(Q$flow, Q$head, lty=2)
Q <- weir3a5.sharpcrest(h, ht=0.8*h, L=0.125, P=0.32, b=5.81, B=5.81)
lines(Q$flow, Q$head, lty=2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.