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 --- 1727/CH7/EX7.20/7_20.sce | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 1727/CH7/EX7.20/7_20.sce (limited to '1727/CH7/EX7.20') diff --git a/1727/CH7/EX7.20/7_20.sce b/1727/CH7/EX7.20/7_20.sce new file mode 100755 index 000000000..a40bba9a0 --- /dev/null +++ b/1727/CH7/EX7.20/7_20.sce @@ -0,0 +1,28 @@ +clc +//Initialization of variables +h=[1 2 1.9 1.96] +z1=10 //m +z2=5 //m +z3=7.5 //m +f=0.04 +l1=100 //m +l2=50 //m +l3=70 //m +d1=0.1 //m +d2=0.075 //m +d3=0.06 //m +g=9.81 //m/s^2 +//calculations +Q1=sqrt(d1^5 *(%pi/4)^2 *2*g/(f*l1)) .*sqrt(z1-h) +Q2=sqrt(d2^5 *(%pi/4)^2 *2*g/(f*l2)) .*sqrt(h+z2) +Q3=sqrt(d3^5 *(%pi/4)^2 *2*g/(f*l3)) .*sqrt(h+z3) +len=length(h) +for i=1:len + Q=Q2(i)+Q3(i) + if (Q1(i) == Q) then + break; + end +end +printf("height h = %.2f m",h(i)) +printf("\nDischarge in BC Q2 = %.2f lps",Q2(i)*1000) +printf("\nDischarge in BD Q3 = %.2f lps",Q3(i)*1000) -- cgit