weir3a5.sharpcrest(weirs)
weir3a5.sharpcrest()所属R语言包:weirs
Compute Open-Channel Flow over Broad-Crested Weir by TWRI3A5
计算宽顶堰明渠流过TWRI3A5
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Compute open-channel flow (discharge) over a sharp-crested weir in general accordance with Hulsing (1967) [<acronym>TWRI3A5</acronym>]. 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.
计算明渠流(放)一个尖锐的顶堰一般按照Hulsing(1967)[<acronym>TWRI3A5 </首字母缩写>]。堰顶开(宽)b脚是P英尺以上的通道底部,L英尺长的流动方向。一个矩形的方法的信道被指定的宽度B,但在小区的信道(并因此矩形的假设)可绕过函数参数,虽然B被用来在收缩比b/B除非这个比例取代。对于weir3a5.sharpcrest()功能,仅基于上的脚的第二单元的系统和小心adherance由用户计算是必需的,因为不是所有的“系数”是无量纲的。
The discharge equation for an acceptable tail-water condition h_t is
放电方程是一个可以接受的尾水条件h_t
<p align="center">H = h + alpha * v^2/2g
<p ALIGN="CENTER"> H = h + alpha * v^2/2g
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.
向量化的,这意味着,可选的weir3a5.sharpcrest()向量可以指定一个可选的长度相等的向量h的h_t功能。函数假定矩形的方法计算方法区A,如果不通过可选的A参数,也可以是一个矢量取代。
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 <acronym>TWRI3A5</acronym> for k_c, k_t, and C. In all cases, these coefficients can be superceded by user-specified scalars or vectors in various combinations.
weir3a5.sharpcrest()功能也允许可选的向量L和b/B(参数contractratio),以便调整堰计算放电的测量放电可能作出。 ,坝顶长度L可以使用轻微增加排放,缩短在说一个略向下倾斜波峰的情况。 b/B可以用来减少通过减小放电k_c说的入口的情况下,是粗糙的或有凹凸,稍微增加预期的收缩和降低流动效率。要澄清的是,其实这L和b/B可以量化的可选参数显示了一个机制,调整测量Q值的计算结果,可以在不更换的根本诺模图和查找表<acronym> TWRI3A5<>k_c,k_t和C/首字母缩写。在所有情况下,这些系数可以由用户指定的各种组合中的标量或向量取代。
用法----------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;
的强制性标量或矢量的静态头h英尺堰;
参数:ht
Optional scalar or vector of tail water heads h_t in feet on the weir;
可选的标量或矢量尾水头h_t脚堰;
参数:b
Mandatory scalar width of weir crest b in feet normal to flow;
的强制性标量宽堰顶b在脚正常流动;
参数: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 as a scalar requirement;
航道B的脚的的强制性标宽度(或顶部宽)。从技术上讲,它是可以带参数的contractratio和A绕过任何计算通常涉及B。这将是绕过B作为一个标量的规定的机制;
参数:P
Mandatory scalar height of weir crest P in feet above channel bed;
强制性标堰顶高度P在河床英尺以上;
参数:L
Optional scalar or vector of lengths L in feet of broad-crested weir in direction of flow;
可选的标量或矢量的长度L英尺宽顶堰流的方向;
参数:r
Optional scalar radius of curvature r in feet on the vertical abutments at inlet of weir crest;
可选的标量曲率半径r的入口堰顶的垂直基牙的脚;
参数: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;
可选的标量或矢量的方法截面积A平方呎,每一个h,取代了矩形通道计算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;
可选的标量或矢量的速度水头修正项α无量纲的。默认的是有统一(α=1),这肯定是最适合绝大多数的堰计算;
参数:slopeus
String signifying the approach embankment slope in the format “<VAR>hz</VAR>:<VAR>vt</VAR>”, thus, slope is defined as the ratio of the horizontal <VAR>hz</VAR> to vertical distance <VAR>vt</VAR>. (This is opposite of the more common convention for the trigometric function tan().) The string “vertical” must be provided as the value for slopeus for vertical slopes;
象征的方法路基边坡的格式字符串“<VAR>赫兹</ VAR>:<VAR> VT </ VAR>”,因此,斜坡被定义为赫兹的比例水平<VAR> </ VAR>垂直距离<VAR> VT </ VAR>。 (这是相反的trigometric功能tan()比较常见的惯例。)的字符串必须提供“垂直”的值slopeus垂直斜坡;
参数: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;
收缩系数k_c,如果提供的话,取代诺模图查找和内插h/P和b/B。任选地,这个系数可能会是一个向量;
参数: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;
淹没调整系数,如果提供的话,取代诺模图查找和内插H/P和h_t/P。任选地,这个系数可能会是一个向量;
参数:C
Discharge coefficient, if provided, supercedes nomograph lookup and interpolation by h/L and slopeus. Optionally, this coefficient may be a vector;
如果提供的话,流量系数,取代诺模图查找和内插h/L和slopeus。任选地,这个系数可能会是一个向量;
参数:contractratio
Optional vector of user specified contraction ratios, if provided, supercedes use of b/B. For example, b.over.B[i] <- contractratio[i];
可选的矢量用户指定的收缩比,如果提供的话,会取代使用b/B。对于例如,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;
一个字符串(通常情况下)或任何其他内容添加到非原标签名称attributes()header返回的数据框的下;
参数:resetkts
A logical controlling whether interpolated k_t > 1 values are reset to k_t = 1 and so diverges slightly from <acronym>TWRI3A5</acronym> (fig.4);
一个逻辑控制是否插值k_t > 1值复位到k_t = 1的,所以稍微偏离从<acronym> TWRI3A5 </首字母缩写词(图4);
参数:flowdigits
The number of digits to report on flow, velocity head, total head, computed h_t/H, and computed H/P;
报告流量,流速头,总水头,计算的位数h_t/H,并计算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;
一个逻辑控制,中间消息。这可能是保留在发布的版本的weirs可能发生的研发工作,并没有详细输出;
参数: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 flow of the returned data frame.
最大的迭代次数计算的总头从静态和速度头H = h + α v^2/2g总和最终Q_H项flow返回的数据框。
值----------Value----------
An R data.frame() is returned and the extended=TRUE version is described below: <table summary="R valueblock"> <tr valign="top"><td>head</td> <td> Echoed h on the input in feet;</td></tr> <tr valign="top"><td>flow</td> <td> Flow k_t Q_H in cubic feet per second based on total head H;</td></tr> <tr valign="top"><td>delta</td> <td> First order difference of k_t Q_H;</td></tr> <tr valign="top"><td>flowfree</td> <td> Flow Q_H in cubic feet per second using free flow conditions, h_t = 0;</td></tr> <tr valign="top"><td>flowo</td> <td> Flow Q_h in cubic feet per second using free flow conditions, h_t = 0 based on static head h;</td></tr> <tr valign="top"><td>error</td> <td> Absolute convergence error ε of Q_H in cubic feet per second ;</td></tr> <tr valign="top"><td>velhead</td> <td> Velocity head v_o = v^2/2g = (Q_H/A)^2/2g in feet;</td></tr> <tr valign="top"><td>Hfree</td> <td> Total head H = h + v_o in feet;</td></tr> <tr valign="top"><td>ht</td> <td> Echoed h_t on the input in feet;</td></tr> <tr valign="top"><td>L</td> <td> Echoed L in feet;</td></tr> <tr valign="top"><td>b.over.B</td> <td> Echoed b/B;</td></tr> <tr valign="top"><td>h.over.L</td> <td> Echoed h/L;</td></tr> <tr valign="top"><td>h.over.P</td> <td> Echoed h/P;</td></tr> <tr valign="top"><td>ht.over.H</td> <td> Computed h_t/H;</td></tr> <tr valign="top"><td>H.over.P</td> <td> Computed H/P;</td></tr> <tr valign="top"><td>C</td> <td> Discharge coefficient C;</td></tr> <tr valign="top"><td>kc</td> <td> Contraction coefficient k_c;</td></tr> <tr valign="top"><td>kt</td> <td> Coefficient 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 <acronym>TWRI3A5</acronym> (fig.4);</td></tr> <tr valign="top"><td>message</td> <td> Messages concerning the computation of Q for each value of h; and</td></tr> <tr valign="top"><td>source</td> <td> weir3a5.sharpcrest.</td></tr>
Rdata.frame()返回extended=TRUE版本说明如下:<table summary="R valueblock"> <tr valign="top"> <TD>head</ TD> <TD>中引起共鸣的h输入脚; </ TD> </ TR> <tr valign="top"> <TD> flow </ TD> <TD>流量<X >立方英尺每秒的基础上总水头k_t Q_H; </ TD> </ TR> <tr valign="top"> <TD>H </ TD> <TD>一阶差delta; </ TD> </ TR> <tr valign="top"> <TD> k_t Q_H </ TD> <TD>流flowfree立方英尺每秒自由流动条件下,Q_H; </ TD> </ TR> <tr valign="top"> <TD> h_t = 0</ TD> <TD>流量flowo立方米英尺每秒的自由流动条件下,Q_h的基础上静压头h_t = 0; </ TD> </ TR> <tr valign="top"> <TD>h</ TD > <TD>绝对收敛误差errorε立方英尺每秒; </ TD> </ TR> <tr valign="top"> <TD>Q_H</ TD> <TD>速度头velhead脚; </ TD> </ TR> <tr valign="top"> <TD>v_o = v^2/2g = (Q_H/A)^2/2g </ TD> <TD>总扬程所述>脚; </ TD> </ TR> <tr valign="top"> <TD> Hfree </ TD> <TD>回荡H = h + v_o脚输入; / TD> </ TR> <tr valign="top"> <TD> ht </ TD> <TD>中引起共鸣的h_t脚; </ TD> </ TR> <TR VALIGN =“”> <TD>L </ TD> <TD>呼应L; </ TD> </ TR> <tr valign="top"> <TD>b.over.B </ TD> <TD>呼应b/B; </ TD> </ TR> <tr valign="top"> <TD>:h.over.L </ TD> <TD>回荡的<X ></ TD> </ TR> <tr valign="top"> <TD>h/L </ TD> <TD>计算h.over.P; </ TD> </ TR> < TR VALIGN =“顶”<TD>h/P </ TD> <TD>计算ht.over.H; </ TD> </ TR> <tr valign="top"> <TD> X> </ TD> <TD>流量系数h_t/H; </ TD> </ TR> <tr valign="top"> <TD> H.over.P</ TD> <TD>收缩系数H/P; </ TD> </ TR> <tr valign="top"> <TD> C</ TD> <TD>系数调整淹没C的。需要注意的是插补值kc设置为k_c,如果kt,因为k_t使用迭代,以确定k_t > 1。这种做法偏离略有<acronym> k_t = 1 </首字母缩写词(图4); </ TD> </ TR> <tr valign="top"> <TD>resetkts=TRUE</ TD有关计算weir3a5.sharpcrest()的每个值H; </ TD> </ TR> <tr valign="top"> <TD>TWRI3A5<> <TD>消息/ TD> <TD>message。</ TD> </ TR>
</table> 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.
</ TABLE> extended=FALSE版本被限制为最显着的项目,包括k_t Q_H,Q_H,Q_h,v_o,C, k_c和k_t。
注意----------Note----------
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.
weir3a5.sharpcrest()函数将stop()的条件下,未指定或令人难以置信的L,B和P以及不兼容的b和B,如B<b。此功能也将stop()的的向量参数或可选的向量参数的长度不匹配的长度h。唯一的例外是,如果h_t未指定,则在内部,它被视为一个向量的长度h值为零。还有其他的条件,这将导致函数停止和咨询if()报表的功能开始。
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:
weir3a5.sharpcrest()函数遇到非停止错误或警告时,会自动继续与message项目在返回的数据框错误报告。这种行为被认为是一个功能和必要支持的数据框的回报。该消息指出:
<ol> If h/P > 5, then C has much uncertainty and NA is returned for all items;
<OL>如果h/P > 5,那么C有很大的不确定性和NA返回的所有项目;
If h is zero, then zero is returned for all Q, ε, and v_o and NA is returned for others;
h如果是零,零,则返回所有的Q,ε和v_o和NA其他人返回;
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;
如果一个给定的h测试太低,锋利的顶堰流,因此堰宽顶,然后NA返回的所有项目运作,但是,很浅的做法路堤边坡( >1),然后关键h/L=2.4被用于所有的h/P和这样堰h/L < 2.4宽顶被视为;
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;
如果收缩比b/B太小(b/B < 0.20),那么太多的收缩结束,NA返回的所有项目;
If the upstream embankment slope is too shallow (> 1), then C is indeterminant and NA is returned for all items;
如果上游的路堤边坡太浅(> 1),然后C是不定NA返回的所有项目;
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;
如果不收敛时或估计Q_H到无穷大(超临界方法或窒息),然后NA为所有的Q,ε和v_o返回,但估计C,k_c和k_t返回;
If h_t/H > 0.95 by H from free flow conditions, then too much submergence for k_t computation, and;
如果h_t/H > 0.95H自由流动的条件,然后k_t计算,和太多淹没;
If no problems were detected, then ok is the message. </ol>
如果没有发现问题,那么ok是该消息。 </ OL>
The conditions important for k_t computation are:
的条件重要的k_t计算的:
<ol> 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;
<OL>如果h_t/H > 0.95总H(h_t=0)的条件,那么太多淹没的结论和k_t是NA“,因此自由流动flow是NA;
If h_t = 0, then k_t = 1 and flow is equal to flowfree;
如果h_t = 0,那么k_t = 1和flow等于flowfree;
If H/P < 0.20, then k_t can not be computed and is NA and hence flow is equal to NA;
如果H/P < 0.20,那么k_t无法计算,是NA,因此flow等于NA;
If H/P > 2, then k_t can not be computed and is NA and hence flow is equal to NA;
如果H/P > 2,那么k_t无法计算,是NA,因此flow等于NA;
If k_t > 1, then k_t = 1 by resetting dependent on the resetkts logical argument. This practice differs from <acronym>TWRI3A5</acronym>, 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 <acronym>TWRI3A5</acronym>. </ol>
如果k_t > 1,k_t = 1复位依赖于resetkts的逻辑论证。这种做法不同于<acronym> TWRI3A5> </首字母缩写,但防止产生更多的Q比自由流动的条件下淹没。不同的是,该函数使用迭代的自由流动条件下的总头解决,而不是一个单一的计算步骤,似乎暗示在<acronym> TWRI3A5> </首字母缩写。 </ OL>
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.
影响基牙倒圆的比例r/b > 0k_c容纳之间的按比例分配(1)k_ch/P和b/B或用户指定的 X>(2)k_c除非k_c = 1r/b > 0.12。
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.
整个计算是由诺模图查找和内插。线性内插approx()函数被用于所有的插补。最常用的是,由一种形式的双线性插值。首先,对于一个给定的条件下的两个边界曲线在水平方向上内插,然后将所得的两个值在垂直方向内插。水平内插由approx()明确使用的rule=2,这意味着外推到左侧和右侧使用相应的终点。换句话说,共线图(和表)的平坦的外推法,需要时,内衬。在代码中,可以通过rule=2和垂直插值缺乏rule参数的水平插值。最后,诺模图是在的散列环境.weir.nomographs,源文件sysdata.rda的包。文件./inst/Nomographs4R/nomographs.R使用创建sysdata.rda文件。
(作者)----------Author(s)----------
W. Asquith with digitizing of nomograph contributions by W. Miller
参考文献----------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
weir.sharpcrest
实例----------Examples----------
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)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|