summaryrefslogtreecommitdiff
path: root/557/CH4/EX4.2
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /557/CH4/EX4.2
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 '557/CH4/EX4.2')
-rwxr-xr-x557/CH4/EX4.2/2.sce17
1 files changed, 17 insertions, 0 deletions
diff --git a/557/CH4/EX4.2/2.sce b/557/CH4/EX4.2/2.sce
new file mode 100755
index 000000000..9275c7c86
--- /dev/null
+++ b/557/CH4/EX4.2/2.sce
@@ -0,0 +1,17 @@
+clc;funcprot(0);//Example 4.2
+
+//Initializing the variables all unknowns are assigned 0
+
+d = [0.05 0.075 0 0.030];
+Q = [0 0 0 0];
+V = [0 2 1.5 0];
+//Calculations
+A2 = %pi*d(2)^2/4;
+Q(2) =A2*V(2);
+Q = [Q(2) Q(2) Q(2)/1.5 0.5*Q(2)/1.5];
+d(3) = (Q(3)*4/(V(3)*%pi))^0.5;
+A = %pi*d^2/4;
+V(1) = V(2)*(A(2)/A(1));
+V(4)=Q(4)/A(4);
+
+disp([d*1000;A;Q;V]' , "! Diameter(mm) Area(m2) Flow Rate(m3/s) Velocity(m/s) !"); \ No newline at end of file