wetted_area | R Documentation |
Calculates the wetted area of a CSarbitrary or CScircle object for given water levels.
wetted_area(object, h, ret = "A")
object |
An object of class CSarbitrary or CScircle. |
h |
A numeric vector of water levels (m). For CScircle, only a single numeric value is allowed. |
ret |
A character string. If 'A', returns total wetted area. If 'Aii', returns wetted area by segment. |
A numeric vector or matrix of wetted areas based on the 'ret' argument.
# Example for CSarbitrary object
x <- c(0, 4, 9, 13)
z <- c(2, 0, 0, 2)
cs <- CSarbitrary(x = x, z = z, xb_l = 4, xb_r = 9, kSt_B = 35,
kSt_l = 45, kSt_r = 45)
# Calculate total wetted area at water levels 1 m and 2 m
h <- c(1, 2)
wetted_area(cs, h, ret = "A")
# Calculate wetted area for each segment at the same water levels
wetted_area(cs, h, ret = "Aii")
# Example for CScircle object
csC <- CScircle(Di = 1, kSt = 75)
# Calculate total wetted area at water level 1 m
h <- 1
wetted_area(csC, h)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.