找回密码
 注册
查看: 697|回复: 0

R语言 weirs包 weirbos.broadcrest()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-10-1 21:03:28 | 显示全部楼层 |阅读模式
weirbos.broadcrest(weirs)
weirbos.broadcrest()所属R语言包:weirs

                                        Compute Open-Channel Flow over Broad-Crested Weir by Bos (1989)
                                         计算明渠宽顶堰流过BOS(1989年)

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Compute open-channel flow (discharge) over a broad-crested weir in accordance with Bos (1989) [<acronym>BOS</acronym>] with extension into the coefficients k_c, k_R, and k_s from Hulsing (1967). 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 weirbos.broadcrest() function, the computations are exclusively based on the foot-second unit system and careful adherance by the user is required.
计算明渠流动(放电)超过广泛的凤头堰在根据博斯(1989)[<acronym>BOS</的缩写>]与延伸到所述系数k_c,k_R 和k_s从Hulsing(1967年)。堰顶开(宽)b脚是P英尺以上的通道底部,L英尺长的流动方向。一个矩形的方法的信道被指定的宽度B,但在小区的信道(并因此矩形的假设)可绕过函数参数,虽然B被用来在收缩比b/B除非这个比例取代。对于weirbos.broadcrest()功能,仅基于上的脚的第二单元的系统和小心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 discharge equation is solved for two conditions that consider the approach velocity head. First, the equation is solved as shown above for H through iteration and C_v=1. Second, the equation is solved using h and C_v, which is determined by nomograph lookup.
放电方程的求解认为,这一作法速度水头两个条件。第一,方程的求解如上所示的H通过迭代和C_v=1。二,方程的求解使用h和C_v,这是由诺模图查找。

The weirbos.broadcrest() 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.
向量化的,这意味着,可选的weirbos.broadcrest()向量可以指定一个可选的长度相等的向量h的h_t功能。函数假定矩形的方法计算方法区A,如果不通过可选的A参数,也可以是一个矢量取代。

The weirbos.broadcrest() 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. (Such potential &ldquo;crest&rdquo; sloping is distinct from the downstream embankment slope&mdash;do not confuse the two.)  The b/B can be used to decrease discharge by decreasing k_R 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 C and C_v nomographs of <acronym>BOS</acronym> and nomograph and lookup tables for k_c, k_R, and k_s of <acronym>TWRI3A5</acronym> (Hulsing, 1967). In all cases, these coefficients can be superceded by user-specified scalars or vectors in various combinations.
weirbos.broadcrest()功能也允许可选的向量L和b/B(参数contractratio),以便调整堰计算放电的测量放电可能作出。 ,坝顶长度L可以使用轻微增加排放,缩短在说一个略向下倾斜波峰的情况。 (这种潜在的“峰”倾斜下游堤防边坡不要混淆这两个是不同的。)b/B可用于减少排放,减少k_R说的情况下入口,粗糙或具有凹凸,略有增加的预期收缩,减少流程的效率。要澄清的是,其实这L和b/B可以量化的可选参数显示了一种机制,通过调整测量Q值的计算结果可以在不更换的根本<X >和C诺模图的<acronym> C_v </首字母缩写词>和诺模图和查找表BOS,k_c和k_R的<acronym> k_s</首字母缩写(Hulsing,1967年)。在所有情况下,这些系数可以由用户指定的各种组合中的标量或向量取代。


用法----------Usage----------


weirbos.broadcrest(h, ht=NULL, b=NULL, B=NULL, P=NULL, L=NULL,
                   R=0, r=0, A=NULL, alpha=1,
                   slopeus="vertical", slopeds="vertical",
                   kc=NULL, kr=NULL, ks=NULL, C=NULL,
                   contractratio=NULL,
                   hhptest=TRUE, extended=TRUE,
                   header="",
                   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 restriction;
航道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 of vertical upstream face;
可选择性地标半径曲率R英尺的垂直上游面;


参数: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 &alpha; dimensionless. The default is unity (&alpha;=1), which is most certainly appropriate for the vast majority of weir computations;
可选的标量或矢量的速度水头修正项&alpha;无量纲的。默认的是有统一(&alpha;=1),这肯定是最适合绝大多数的堰计算;


参数:slopeus
String signifying the approach embankment slope in the format &ldquo;<VAR>hz</VAR>:<VAR>vt</VAR>&rdquo;, 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 &ldquo;vertical&rdquo; must be provided as the value for slopeus for vertical slopes;
象征的方法路基边坡的格式字符串“<VAR>赫兹</ VAR>:<VAR> VT </ VAR>”,因此,斜坡被定义为赫兹的比例水平<VAR> </ VAR>垂直距离<VAR> VT </ VAR>。 (这是相反的trigometric功能tan()比较常见的惯例。)的字符串必须提供“垂直”的值slopeus垂直斜坡;


参数:slopeds
String signifying the downstream embankment slope in the format &ldquo;<VAR>hz</VAR>:<VAR>vt</VAR>&rdquo;, 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 &ldquo;vertical&rdquo; must be provided as the value for slopeds for vertical slopes;
着下游的路堤边坡的格式字符串“<VAR>赫兹</ VAR>:<VAR> VT </ VAR>”,因此,斜坡被定义为赫兹的比例水平<VAR> </ VAR>垂直距离<VAR> VT </ VAR>。 (这是相反的trigometric功能tan()比较常见的惯例。)的字符串必须提供“垂直”的值slopeds垂直斜坡;


参数: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。任选地,这个系数可能会是一个向量;


参数:kr
Rounding coefficient k_R, if provided, supercedes tabular lookup and interpolation by R/h. Optionally, this coefficient may be a vector;
舍入系数k_R,如果提供的话,取代表格的查找和插值R/h的。任选地,这个系数可能会是一个向量;


参数:ks
Downstream embankment slope coefficient k_s, if provided supercedes tabular lookup and interpolation by h/L and downstream slope slopeds. Optionally, this coefficient may be a vector;
下游路堤边坡系数k_s,如果h/L和下游坝坡slopeds会取代表格查找和内插。任选地,这个系数可能会是一个向量;


参数: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。任选地,这个系数可能会是一个向量;


参数:hhptest
Logical for test of h/(h+P) &le; 0.35 to follow Bos (1989) to determine C, but the test can be ignored with this logical argument;
逻辑测试h/(h+P) &le; 0.35遵循BOS(1989年),以确定C,但可以忽略不计的测试与此逻辑参数;


参数: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返回的数据框的下;


参数:flowdigits
The number of digits to report on flow, velocity head, and total head;
报告流量,流速的头,总头数的数字;


参数: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 + &alpha; v^2/2g for the final Q_H in item flow of the returned data frame.
最大的迭代次数计算的总头从静态和速度头H = h + &alpha; 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 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 Q_H;</td></tr> <tr valign="top"><td>flowo</td> <td> Flow Q_h in cubic feet per second based on static head h;</td></tr> <tr valign="top"><td>flowcv</td> <td> Flow Q_{cv} in cubic feet per second based on C_v \ne 1 nomograph lookup by h/L and static head h;</td></tr> <tr valign="top"><td>error</td> <td> Absolute convergence error &epsilon; 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>H</td> <td> Total head H = h + v_o;</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>C</td> <td> Discharge coefficient C;</td></tr> <tr valign="top"><td>Cv</td> <td> Approach velocity coefficient;</td></tr> <tr valign="top"><td>kc</td> <td> Contraction coefficient k_c;</td></tr> <tr valign="top"><td>kr</td> <td> Rounding coefficient k_R;</td></tr> <tr valign="top"><td>ks</td> <td> Downstream slope coefficient k_s;</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> weirbos.broadcrest.</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 >立方英尺每秒的基础上总水头Q_H; </ TD> </ TR> <tr valign="top"> <TD>H </ TD> <TD>一阶差delta; </ TD> </ TR> <tr valign="top"> <TD> Q_H </ TD> <TD>流flowo立方英尺每秒根据静压头Q_h; </ TD> </ TR> <tr valign="top"> <TD> h</ TD> <TD>流flowcv立方英尺每秒的基础上Q_{cv} C_v \ne 1和静压头h/L; </ TD> </ TR> <tr valign="top"> <TD>h诺模图查找</ TD> <TD>绝对收敛误差error&epsilon;立方英尺每秒; </ 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>总头H; </ TD> </ TR> <tr valign="top"> <TD> H = h + v_o </ TD> <TD>回荡ht脚输入; </ TD> </ TR> <tr valign="top"> <TD> h_t </ TD> <TD>中引起共鸣的L脚; </ TD> </ TR> <TR VALIGN =“”> <TD> L </ TD> <TD>中引起共鸣的b.over.B; </ TD> </ TR> <tr valign="top"> <TD><X > </ TD> <TD>呼应b/B; </ TD> </ TR> <tr valign="top"> <TD>h.over.L </ TD> <TD>回荡h/L; </ TD> </ TR> <tr valign="top"> <TD>h.over.P</ TD> <TD>流量系数h/P; </ TD> </ TR > <tr valign="top"> <TD> C </ TD> <TD>方法速度系数; </ TD> </ TR> <tr valign="top"> <TD><X ></ TD> <TD>收缩系数C; </ TD> </ TR> <tr valign="top"> <TD>Cv </ TD> <TD>圆整系数kc; </ TD> </ TR> <tr valign="top"> <TD>k_c</ TD> <TD>下行斜率系数kr; </ TD> </ TR> <tr valign="top"> <TD>k_R </ TD> <TD>中有关计算的消息ks的每个值k_s</ TD> </ TR> <tr valign="top"> <TD>message </ TD> <TD>Q。</ TD> </ TR>

</table> The extended=FALSE version is restricted to the most salient items including Q_H, Q_h, Q_{cv}, v_o, C, C_v, k_c, k_R, and k_s.
</ TABLE> extended=FALSE版本被限制为最显着的项目,包括Q_H,Q_h,Q_{cv},v_o,C, C_v,k_c,k_R和k_s。


注意----------Note----------

The weirbos.broadcrest() 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.
weirbos.broadcrest()函数将stop()的条件下,未指定或令人难以置信的L,B和P以及不兼容的b和< x>,比如B。此功能也将B<b的的向量参数或可选的向量参数的长度不匹配的长度stop()。唯一的例外是,如果h未指定,则在内部,它被视为一个向量的长度h_t值为零。还有其他的条件,这将导致函数停止和咨询h报表的功能开始。

When the weirbos.broadcrest() 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:  <ol> If h_t is too large, then submergence is assumed and NA is returned for all items. The evaluation of submergence is made if h_t/h &ge; 0.66;
当weirbos.broadcrest()函数遇到非停止错误或警告,它静静地继续在返回的数据框错误报告message项目这种行为被认为是一个功能和必要支持的数据框的回报。该消息指出:<OL>如果h_t过大,然后淹没假定NA返回的所有项目。如果h_t/h &ge; 0.66淹没的评估;




If h/(h+P) &le; 0.35 then C can be determined and computation progress, otherwise NA is returned for all items;
如果h/(h+P) &le; 0.35C可确定和计算的进步,否则NA返回的所有项目;




If h is zero, then zero is returned for Q_H, Q_h, Q_{cv}, &epsilon;, and v_o and NA is returned for others;
如果h是零,那么零返回Q_H,Q_h,Q_{cv},&epsilon;和v_o和NA,返回他人;




If a given h/L tests as too high (h/L < 1.5) for broad-crested weir flow and hence the weir is functioning as sharp-crested, then NA is returned for all items. Weirs with h/L < 0.08 are treated as low head, then NA is returned for all items;
如果给定的h/L测试过高(h/L < 1.5)宽顶堰流和堰尖锐的峰,然后NA返回的所有项目运作。堰h/L < 0.08被视为低扬程,然后NA返回的所有项目;




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 downstream embankment slope is too shallow (>5, then k_s is indeterminant and only the values for C, k_c, and k_R are returned;
如果下游的路堤边坡太浅(>5,那么k_s是不定和C,k_c和k_R返回的值;




If nonconvergence occurs or estimated Q goes to infinity (supercritical approach or choking), then NA is returned for all Q, &epsilon;, and v_o, but the estimated C, k_c, k_R, and k_s are returned, and;
如果不收敛时或估计Q到无穷大(超临界方法或窒息),然后NA为所有的Q,&epsilon;和v_o返回,但估计C,k_c,k_R和k_s被返回,;




If no problems were detected, then ok is the message. </ol>
如果没有发现问题,那么ok是该消息。 </ 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.10 for which k_c = 1.
影响基牙倒圆的比例r/b > 0k_c容纳之间的按比例分配(1)k_ch/P和b/B或用户指定的 X>(2)k_c除非k_c = 1r/b > 0.10。

Nomograph and tabular 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----------

Bos, M.G., 1989, Discharge measurement structures: International Institute for Land Reclamation and Improvement Publication 20, Wageningen, The Netherlands, 401 p. http://content.alterra.wur.nl/Internet/webdocs/ilri-publicaties/publicaties/Pub20/pub20.pdf
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.broadcrest
weir.broadcrest


实例----------Examples----------



# Simple, scalar inputs and results[很简单,标量输入和结果]
weir.broadcrest(type="BOS", 0.5, b=8, B=11, P=6, L=3.25);

# Vector of heads[向量的头]
weir.broadcrest(type="BOS", c(0.5,0.4,0.3), b=8, B=11, P=6, L=3.25);

# Now compare two solutions by weirbos.broadcrest() to weir3a5.broadcrest()[现在比较两种解决方案,以weir3a5.broadcrest由weirbos.broadcrest()()]
h <- seq(0.01,1.5, by=0.001)
Qtank     <- weir3a5.broadcrest(h, b=7.97, B=10.97, P=1.125, L=3.76, flowdigits=4)
QtankbosA <- weirbos.broadcrest(h, b=7.97, B=10.97, P=1.125, L=3.76, flowdigits=4)
QtankbosB <- weirbos.broadcrest(h, b=7.97, B=10.97, P=1.125, L=3.76,
                                   hhptest=FALSE, flowdigits=4)
plot(Qtank$flow, h, type="l", col=8, lwd=6,
     xlab="FLOW, CFS", ylab="HEAD, FEET")
lines(QtankbosA$flow, h, col=2, lwd=4) # see the trunction in the red line[看到的trunction的红线]
lines(QtankbosB$flow, h, col=3, lwd=2)

# See examples for weir3a5.broadcrest() for additional examples that[更多的例子,例子的weir3a5.broadcrest()]
# explore higher complexity of argument settings, which test the[探索更复杂的参数设置,测试]
# nomographs for k_c, k_R, and k_s[为k_c,K_R,并k_s的诺模图]

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2024-11-25 10:14 , Processed in 0.024522 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表