weir3a5.broadcrest(weirs)
weir3a5.broadcrest()所属R语言包:weirs
Compute Open-Channel Flow over Broad-Crested Weir by TWRI3A5
计算宽顶堰明渠流过TWRI3A5
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Compute open-channel flow (discharge) over a broad-crested weir in 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.broadcrest() 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.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 weir3a5.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.
向量化的,这意味着,可选的weir3a5.broadcrest()向量可以指定一个可选的长度相等的向量h的h_t功能。函数假定矩形的方法计算方法区A,如果不通过可选的A参数,也可以是一个矢量取代。
The weir3a5.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 “crest” sloping is distinct from the downstream embankment slope—do not confuse the two.) 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_R, k_s, and C. In all cases, these coefficients can be superceded by user-specified scalars or vectors in various combinations.
weir3a5.broadcrest()功能也允许可选的向量L和b/B(参数contractratio),以便调整堰计算放电的测量放电可能作出。 ,坝顶长度L可以使用轻微增加排放,缩短在说一个略向下倾斜波峰的情况。 (这种潜在的“峰”倾斜下游堤防边坡不要混淆这两个是不同的。)b/B可用于减少排放,减少k_c说的情况下入口,粗糙或具有凹凸,略有增加的预期收缩,减少流程的效率。要澄清的是,其实这L和b/B可以量化的可选参数显示了一个机制,调整测量Q值的计算结果,可以在不更换的根本诺模图和查找表<acronym> TWRI3A5<>k_c,k_R,k_s和C/首字母缩写。在所有情况下,这些系数可以由用户指定的各种组合中的标量或向量取代。
用法----------Usage----------
weir3a5.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,
low.head.class=c("paved", "gravel"),
contractratio=NULL,
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 restriction 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 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 α 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垂直斜坡;
参数:slopeds
String signifying the downstream 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 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。任选地,这个系数可能会是一个向量;
参数:low.head.class
For h/L < 0.1, low head on the weir is concluded and alternative C nomograph and interpolation is made based on figure 23 of <acronym>TWRI3A5</acronym>. Use of the alternative C requires a “paved” and “gravel” classification in which total head H is used and not h as in the primary C nomographs. How well the paved classification applies to concrete, wood, and metal broad-crested weirs is not discussed in <acronym>TWRI3A5</acronym>. Finally, it is expected that most users can use (should use) the paved classification. More formal procedures for embankment flow are provided in <acronym>TWRI3A5</acronym>;
对于h/L < 0.1,堰头低的结论和替代C诺模图和插值的<acronym> TWRI3A5 </首字母缩写>图23的基础上作出的。使用的替代C需要一个“遍地”和“砾石”分类中,总水头H使用h在主C诺模图。如何铺就的分类适用于混凝土,木材,金属宽顶堰不讨论<acronym> TWRI3A5> </首字母缩写。最后,预计大多数用户可以使用(使用)铺成的分类。堤防流在<acronym>提供的更正式的程序TWRI3A5 </首字母缩写;
参数: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 + α 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 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>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>ht</td> <td> Echoed h_t on the input in feet;</td></tr> <tr valign="top"><td>H</td> <td> Total head H = h + v_o;</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>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> weir3a5.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>绝对收敛误差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>呼应ht输入脚; </ TD> < / TR> <tr valign="top"> <TD> h_t </ TD> <TD>总头H; </ TD> </ TR> <tr valign="top"> <TD>H = h + v_o </ TD> <TD>呼应L脚; </ TD> </ TR> <tr valign="top"> <TD>L</ TD> <TD>中引起共鸣的b.over.B; </ TD> </ TR> <tr valign="top"> <TD> b/B </ TD> <TD>回荡h.over.L; </ TD> </ TR> <tr valign="top"> <TD>h/L </ TD> <TD>呼应h.over.P; </ TD> </ TR> <TR VALIGN = “顶”> <TD>h/P </ TD> <TD>流量系数C; </ TD> </ TR> <tr valign="top"> <TD>C </ 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; </ TD> < / TR> <tr valign="top"> <TD> k_s </ TD> <TD>消息有关计算message的每个值Q; </ TD > </ TR> <tr valign="top"> <TD>h </ TD> <TD>source。</ TD> </ TR>
</table> The extended=FALSE version is restricted to the most salient items including Q_H, Q_h, v_o, C, k_c, k_R, and k_s.
</ TABLE> extended=FALSE版本被限制为最显着的项目,包括Q_H,Q_h,v_o,C,k_c, k_R和k_s。
注意----------Note----------
The weir3a5.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.
weir3a5.broadcrest()函数将stop()的条件下,未指定或令人难以置信的L,B和P以及不兼容的b和B,如B<b。此功能也将stop()的的向量参数或可选的向量参数的长度不匹配的长度h。唯一的例外是,如果h_t未指定,则在内部,它被视为一个向量的长度h值为零。还有其他的条件,这将导致函数停止和咨询if()报表的功能开始。
When the weir3a5.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 ≥ 0.85;
weir3a5.broadcrest()函数遇到非停止错误或警告时,会自动继续与message项目在返回的数据框错误报告。这种行为被认为是一个功能和必要支持的数据框的回报。该消息指出:<OL>如果h_t过大,然后淹没假定NA返回的所有项目。如果h_t/h ≥ 0.85淹没的评估;
If h is zero, then zero is returned for Q_H, Q_h, ε, and v_o and NA is returned for others;
如果h是零,然后返回零为Q_H,Q_h,ε和v_o和NA则返回给别人;
If a given h tests as too high for broad-crested weir flow and hence the weir is functioning as sharp-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 (>2), then C is indeterminant and NA is returned for all items;
如果上游的路堤边坡太浅(>2),然后C是不定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, ε, and v_o, but the estimated C, k_c, k_R, and k_s are returned; and
如果不收敛时或估计Q到无穷大(超临界方法或窒息),然后NA为所有的Q,ε和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.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 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----------
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(0.5, b=8, B=11, P=6, L=3.25);
# Vector of heads[向量的头]
weir.broadcrest(c(0.5,0.4,0.3), b=8, B=11, P=6, L=3.25);
# Vector of heads and "effective weir lengths"[向量的头和“有效堰的长度”]
# Nomograph TWRI3A5-fig7 is being tested here.[诺模图TWRI3A5 fig7正在这里进行测试。]
weir.broadcrest( c(0.51, 0.53, 0.70),
L=c(1, 1.1, 1.20), b=6.18, B=7.84, P=1.13);
# User specified contraction--superceds 8/11[用户指定的收缩 - superceds 8/11]
# Nomograph TWRI3A5-fig3 is being tested here.[诺模图TWRI3A5图3是在这里测试。]
weir.broadcrest(0.5, b=8, B=11, contractratio=9/11, P=6, L=3.25);
weir.broadcrest(0.5, b=8, B=11, P=6, L=3.25); # compare to previous[比较以前的]
# Randomly pick contraction ratios to span the nomograph[随机挑收缩率跨越诺模图]
# Nomograph TWRI3A5-fig3 is being tested here.[诺模图TWRI3A5图3是在这里测试。]
n <- 30; bB <- sort(runif(n));
weir.broadcrest(rep(1,n), b=8, B=11, contractratio=bB, P=6, L=3.25);
# Randomly pick lengths and likely kick-off some sharp-crested messages[随机挑选长度和可能的开球一些尖锐的峰的消息]
# Nomograph TWRI3A5-fig6 is being tested here.[诺模图TWRI3A5 extract_OS_06 Fig6选择在这里测试。]
L <- sort(runif(n, min=1, max=30));
weir.broadcrest(rep(10,n), b=8, B=11, P=6, L=L);
# Flow estimate in the non-low.head.classification[在的非-low.head.classification的流量估计]
# Nomograph TWRI3A5-fig23 is being tested here.[诺模图TWRI3A5 fig23正在这里进行测试。]
weir.broadcrest(.1, b=6, B=6, P=4, L=1);
# Slighly lower are a realistic step change in h. See how the C[性能稍微低了坚实的步伐变化在H。请参见如何在C]
# changes dramatically by (TWRI3A5-fig23), but at 0.01 feet there[显着的变化(TWRI3A5 fig23),但在0.01英尺]
#is some smoothness in the result.[是一些在结果中的平滑度。]
weir.broadcrest(.09, b=6, B=6, P=4, L=1);
# Now try extremely close to 0.10 feet[现在尝试非常接近至0.10米]
weir.broadcrest(.0999999, b=6, B=6, P=4, L=1);
# Now try switching from "paved" to "gravel" nomograph (TWRI3A5-fig23)[现在,尝试从“遍地”切换到“砾石”诺模图(TWRI3A5-fig23)]
weir.broadcrest(.09, b=6, B=6, P=4, L=1, low.head.class="gravel");
# Nomograph TWRI3A5-fig7 is being tested here for upstream slope[诺模图TWRI3A5 fig7正在这里测试的上游坡]
weir.broadcrest(0.5, slopeus="3:1", b=8, B=11, P=6, L=3.25);
weir.broadcrest(0.5, slopeus="2:1", b=8, B=11, P=6, L=3.25);
weir.broadcrest(0.5, slopeus="1.999:1", b=8, B=11, P=6, L=3.25);
weir.broadcrest(0.5, slopeus="0.51:1", b=8, B=11, P=6, L=3.25);
weir.broadcrest(0.5, slopeus="0.50:1", b=8, B=11, P=6, L=3.25);
weir.broadcrest(0.5, slopeus="0.49:1", b=8, B=11, P=6, L=3.25);
try(weir.broadcrest(0.5, slopeus="force-error", b=8, B=11, P=6, L=3.25));
# Nomograph TWRI3A5-p9 (table) is being tested here for[诺模图TWRI3A5-P9(表)正在这里测试]
# various downstream slopes[各种下游斜坡]
weir.broadcrest(3.5, slopeds="1:1", b=6, B=11, P=6, L=3.25);
weir.broadcrest(3.5, slopeds="2:1", b=6, B=11, P=6, L=3.25);
weir.broadcrest(3.5, slopeds="2.5:1", b=6, B=11, P=6, L=3.25);
weir.broadcrest(3.5, slopeds="3:1", b=6, B=11, P=6, L=3.25);
weir.broadcrest(3.5, slopeds="3.5:1", b=6, B=11, P=6, L=3.25);
weir.broadcrest(3.5, slopeds="4.99:1", b=6, B=11, P=6, L=3.25);
weir.broadcrest(3.5, slopeds="5:1", b=6, B=11, P=6, L=3.25);
weir.broadcrest(3.5, slopeds="5.1:1", b=6, B=11, P=6, L=3.25);
# Now configure some weirs for which kc, kr, ks, and C are all[现在,配置一些堰KC,KR,KS,和C都]
# looked up starting with some (R)ounding and then some more[抬起头来开始与一些(R)ounding的,然后多一些]
# (r)ounding and note the changes to kr[(R)ounding的变化,并注意KR]
weir.broadcrest(3.5, slopeds="3.5:1", R=0, b=6, B=11, P=6, L=3.25);
# change kr by crest rounding[改变KR波峰四舍五入]
weir.broadcrest(3.5, slopeds="3.5:1", R=1, b=6, B=11, P=6, L=3.25);
# change kc by abutment rounding[]
weir.broadcrest(3.5, slopeds="3.5:1", R=1, r=.5, b=6, B=11, P=6, L=3.25);
# Now force override of all coefficients[现在强制覆盖所有的系数]
weir.broadcrest(3.5, slopeds="3.5:1", R=1, r=.5, b=6, B=11, P=6, L=3.25,
kc=0.95, kr=1.01, ks=.94, C=3.1);
# Now vectorize the coefficients[现在,向量化系数]
weir.broadcrest(rep(0.5,3), b=8, B=11, P=6, L=3.25, C=c(3, 3.1, 3.2),
kc=c(0.95, 1, 1.05), kr=c(1, 1.03, 1.08), ks=c(0.99, 0.95, 0.90));
# Now create a rating curve[现在,创建一个等级曲线]
h <- seq(0.01,2,by=.01);
Q <- weir.broadcrest(h, b=8, B=11, P=6, L=3.25);
plot(Q$flow, Q$head, type="l", col=8, lwd=7,
xlab="DISCHARGE, IN CUBIC FEET PER SECOND",
ylab="HEAD ON WEIR, IN FEET");
lines(sort(Q$flow), Q$head, col=2, lty=2, lwd=3);
# Now take the Q, repeat the sort and then recompute the delta[现在采取的Q,重复的排序,然后重新计算Delta]
ii <- order(Q$flow);
Q <- Q[ii,]; # sort the entire data frame[整个数据框进行排序]
Q$delta <- c(NA, diff(Q$flow)); # recompute deltas[重新计算Delta]
# This insures a monotonic increasing relations between h and Q[这确保了单调递增关系h和Q]
# even though it might not be as smooth as hand-guided[虽然它可能不会像光滑,手导]
# interpolation would provide.[插值将提供。]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|