diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /557/CH16 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '557/CH16')
-rwxr-xr-x | 557/CH16/EX16.2/2.sce | 14 | ||||
-rwxr-xr-x | 557/CH16/EX16.3/3.sce | 28 |
2 files changed, 42 insertions, 0 deletions
diff --git a/557/CH16/EX16.2/2.sce b/557/CH16/EX16.2/2.sce new file mode 100755 index 000000000..09820f38c --- /dev/null +++ b/557/CH16/EX16.2/2.sce @@ -0,0 +1,14 @@ +clc; funcprot(0);//Example 16.2
+
+//Initializing the variables
+B = [1.4 0.9];
+D = [0.6 0.32];
+g = 9.81;
+h = 0.03;
+Z = 0.25;
+
+//Calculations
+Q1 = B(2)*D(2)*sqrt(2*g*h/(1-(B(2)*D(2)/B(1)*D(1))^2))
+E = D(1)-Z;
+Q2 = 1.705*B(2)*E^1.5;
+disp(Q2 , "Volume flow rate (m3/s) :");
diff --git a/557/CH16/EX16.3/3.sce b/557/CH16/EX16.3/3.sce new file mode 100755 index 000000000..58da30975 --- /dev/null +++ b/557/CH16/EX16.3/3.sce @@ -0,0 +1,28 @@ +clc; funcprot(0); //Example 16.3
+
+//Initializing the variables
+a =0.5;
+b = 0.5;
+Dn = 1.2;
+s = 1/1000;
+C = 55;
+g = 9.81;
+
+//Calculations
+c = (1 + a)/b;
+QbyB = Dn*C*sqrt(Dn*s);
+q = QbyB;
+Dc = (q^2/g)^(1/3);
+
+m = 2.4:-0.15:1.35;
+total = 0;Dm = 0; N = 0; D = 0; Lm = 0;
+for(i=1:length(m)-1)
+
+ Dm(i)= (m(i)+m(i+1))/2;
+ N(i) = 1 - (Dc/Dm(i))^3 ; // Numerator
+ D(i) = 1 - (Dn/Dm(i))^3; // Denominator
+ Lm(i) = 150*(N(i)/D(i));
+ total = total +Lm(i);
+end
+result = [Dm N D Lm];
+disp(total,"distance upstream covered (approx in m):",result,"Mean Depth(Dm) Numerator Denominaotor L(m)");
|