Creates a system curve for a piping system using the static head and a coefficient.
Source:R/systemcurve.R
systemcurve.Rd
Creates a system curve for a piping system using the static head and a coefficient.
Usage
systemcurve(hs = NULL, K = NULL, units = c("SI", "Eng"))
Arguments
- hs
Numeric value of the static head [\(m\) or \(ft\)]
- K
Numeric value of the coefficient in the equation \(h = hs + {K}{Q}^2\) where Q has units of \(m^3 s^{-1}\) or \(ft^3 s^{-1}\)
- units
character vector that contains the system of units [options are
SI
for International System of Units andEng
for English (US customary) units.
Value
Returns an object of class systemcurve
consisting of a list including:
curve - a function defining the system curve
eqn - a character vector of the equation for the curve
units - the units system passed to the function
Examples
#Input in Eng units. Coefficient can be calculated manually or using
#other package functions for friction loss in a pipe system using \eqn{Q=1}
ans <- darcyweisbach(Q = 1,D = 20/12, L = 3884, ks = 0.0005, nu = 1.23e-5, units = "Eng")
#> hf missing: solving a Type 1 problem
systemcurve(hs = 30, K = ans$hf, units = "Eng")
#> $curve
#> function (x)
#> hs + x^2 * K
#> <bytecode: 0x5601b9a58120>
#> <environment: 0x5601b9a57be0>
#>
#> $eqn
#> [1] "h == 30 + 0.16*Q^2"
#>
#> $units
#> [1] "Eng"
#>
#> attr(,"class")
#> [1] "systemcurve"