summaryrefslogtreecommitdiff
path: root/1187/CH10/EX10.1/1.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /1187/CH10/EX10.1/1.sce
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '1187/CH10/EX10.1/1.sce')
-rwxr-xr-x1187/CH10/EX10.1/1.sce26
1 files changed, 26 insertions, 0 deletions
diff --git a/1187/CH10/EX10.1/1.sce b/1187/CH10/EX10.1/1.sce
new file mode 100755
index 000000000..66375d01c
--- /dev/null
+++ b/1187/CH10/EX10.1/1.sce
@@ -0,0 +1,26 @@
+clc
+
+Q=400; // m^3/s
+b2=20; // m
+g=9.81; // m/s^2
+b1=25; // m
+
+h2=(Q/b2/sqrt(g))^(2/3);
+// Since energy is conserved
+// h1 + u1^2/2g = h2 +u2^2/2g = h2 + h2/2 = 3h2/2
+
+// h1 + 1/2*g*(Q/(b1h1))^2 = 3*h2/2;
+
+// h1^3-5.16*h1^2+13.05 = 0;
+
+// By solving this cubic equation
+
+h1=4.52; // m
+
+disp("(a) The depth of the water under the brigde =")
+disp(h2)
+disp("m")
+
+disp("(b) the depth of water upstream =")
+disp(h1)
+disp("m")