# 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)
Run the code above in your browser using DataLab