summaryrefslogtreecommitdiff
path: root/3720/CH13/EX13.9/Ex13_9.sce
blob: fdcc25aa090dc7a4bceee4448170ee8d309fd1c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//Example 13_9
clc;clear;funcprot(0)
// Given values
V_1=1.2;// The velocity in m/s
y_1=0.80;// The flow depth in m
gradz_b=0.15;// m
g=9.81;// m/s^2

// Calculation
Fr_1=(V_1/sqrt(g*y_1));// The upstream Froude number
y_c=(((y_1)^2*(V_1)^2)/(g))^(1/3);// The critical depth in m
E_s1=y_1+(((V_1)^2)/(2*g));// The upstream specific energy in m
// Solving equation y_2^3-(E_s1-gradz_b)y^2+(V_1^2)/(2*g)*y_1^2
coeff=[1,-(E_s1-gradz_b),0,((V_1^2)/(2*g)*y_1^2)];
y=roots(coeff);
d=y_1-(y(1)+gradz_b);// Depression in m
printf("The water surface is depressed over the bump in the amount of %0.2f m \n",d);