Learn R Programming

weirs (version 0.21)

weir3a5.sharpcrest: Compute Open-Channel Flow over Broad-Crested Weir by TWRI3A5

Description

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 = k_c k_t 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 + v_o = 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 $\alpha$ permits accommodation of a velocity head correction that is often attributable to cross section subdivision. The $\alpha$ is outside the scope of this documentation, is almost always $\alpha=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.

Usage

weir3a5.sharpcrest(h, ht=NULL, b=NULL, B=NULL, P=NULL, L=NULL,
                   r=0, A=NULL, alpha=1,
                   slopeus="vertical",
                   kc=NULL, kt=NULL, C=NULL,
                   contractratio=NULL,
                   extended=TRUE,
                   header="", resetkts=TRUE,
                   flowdigits=2, coedigits=3,
                   verbose=FALSE, eps=0.001, maxit=20)

Arguments

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 contractratio and A to bypass any computations normally involving $B$. This would be the mechanism to bypass the $B
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 $\alpha$ dimensionless. The default is unity ($\alpha=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 conven
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 slopeus. Optionally, this coefficient may be a vector;
contractratio
Optional vector of user specified contraction ratios, if provided, supercedes use of $b/B$. For example, b.over.B[i] <- contractratio[i];
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 attributes() of the returned data frame under the non-original label name of header;
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 + \alpha v^2/2g$ for the final $Q_H$ in item flow of the returned data frame.

Value

  • An R data.frame() is returned and the extended=TRUE version is described below:
  • headEchoed $h$ on the input in feet;
  • flowFlow $k_t Q_H$ in cubic feet per second based on total head $H$;
  • deltaFirst order difference of $k_t Q_H$;
  • flowfreeFlow $Q_H$ in cubic feet per second using free flow conditions, $h_t = 0$;
  • flowoFlow $Q_h$ in cubic feet per second using free flow conditions, $h_t = 0$ based on static head $h$;
  • errorAbsolute convergence error $\epsilon$ of $Q_H$ in cubic feet per second ;
  • velheadVelocity head $v_o = v^2/2g = (Q_H/A)^2/2g$ in feet;
  • HfreeTotal head $H = h + v_o$ in feet;
  • htEchoed $h_t$ on the input in feet;
  • LEchoed $L$ in feet;
  • b.over.BEchoed $b/B$;
  • h.over.LEchoed $h/L$;
  • h.over.PEchoed $h/P$;
  • ht.over.HComputed $h_t/H$;
  • H.over.PComputed $H/P$;
  • CDischarge coefficient $C$;
  • kcContraction coefficient $k_c$;
  • ktCoefficient to adjust for submergence $k_t$. Note that interpolated values $k_t > 1$ are set to $k_t = 1$, if resetkts=TRUE, because weir3a5.sharpcrest() uses iteration to determine $H$. This practice diverges slightly from TWRI3A5 (fig.4);
  • messageMessages concerning the computation of $Q$ for each value of $h$; and
  • sourceweir3a5.sharpcrest.
  • 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$.

concept

  • hydraulics
  • water
  • weir

References

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/

See Also

weir.sharpcrest

Examples

Run this code
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)

Run the code above in your browser using DataLab