summaryrefslogtreecommitdiff
path: root/557/CH4/EX4.2
diff options
context:
space:
mode:
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