From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 1379/CH5/EX5.1.8/example5_8.sce | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 1379/CH5/EX5.1.8/example5_8.sce (limited to '1379/CH5/EX5.1.8') diff --git a/1379/CH5/EX5.1.8/example5_8.sce b/1379/CH5/EX5.1.8/example5_8.sce new file mode 100755 index 000000000..47945281f --- /dev/null +++ b/1379/CH5/EX5.1.8/example5_8.sce @@ -0,0 +1,29 @@ + + +//exapple 5.8 +clc; funcprot(0); +// Initialization of Variable +pi=3.14; +theta=pi/3; +h=1/tan(theta); +B=0.845; +E=0.375; +g=9.81; +//calculation +//part1 +//deducing a polynomial(quadratic) in Dc +a=5*h; +b=3*B-4*h*E; +c=-2*E*B; +y=poly([c b a],'x','coeff'); +x=roots(y); +disp(x(2),"critical depth in (m):"); +//part2 +Ac=x(2)*(B+x(2)*tan(theta/2)); +Btc=B+x(2)*tan(theta/2)*2; +Dcbar=Ac/Btc; +uc=sqrt(g*Dcbar); +disp(uc,"critical velocity (m/s):"); +//part3 +Qc=Ac*uc; +disp(Qc,"Critical volumetric flow (m^3/s):"); -- cgit