dscour<-function(u,d50,D,H,case){
# Input
#---------------------------
# u = [1 x 1] Velocity of water
# d50 = [1 x 1] Sediment size
# D = [n x 1] Pier diameters
# H = [n x 1] Water depths
# case = [1 x 1] Either open channel (1) or ice coverage (2)
#------------------------
# Output
# ds = [n x 1] Scour depth
#------------------------
# Parametric study
for(k in seq(1,length(H))){ # See the effect of D for a certain H
H=H[k] # change H after seeing the effect of D
for(j in seq(1,length(D))){ # change D at constant H
D=D[j]
}
}
plot(D/d50,ds/D)
plot(H/D,ds/D)
plot(((u^2)/(9.81*D)),ds/D)
}