summaryrefslogtreecommitdiff
path: root/3720/CH4
diff options
context:
space:
mode:
Diffstat (limited to '3720/CH4')
-rw-r--r--3720/CH4/EX4.1/Ex4_1.sce12
-rw-r--r--3720/CH4/EX4.2/Ex4_2.sce16
-rw-r--r--3720/CH4/EX4.3/Ex4_3.sce21
3 files changed, 49 insertions, 0 deletions
diff --git a/3720/CH4/EX4.1/Ex4_1.sce b/3720/CH4/EX4.1/Ex4_1.sce
new file mode 100644
index 000000000..23c6da177
--- /dev/null
+++ b/3720/CH4/EX4.1/Ex4_1.sce
@@ -0,0 +1,12 @@
+// Example 4_1
+clc;clear;funcprot(0);
+
+//Given values
+// u=0.5+0.8x
+// v=1.5-0.8y
+
+//Calculation
+//Since V is a vector, all its components must equal zero in order for V itself to be zero.
+x=-0.5/0.8;
+y=-1.5/-0.8;
+disp(y,x,"Stagnation point x&y in m");
diff --git a/3720/CH4/EX4.2/Ex4_2.sce b/3720/CH4/EX4.2/Ex4_2.sce
new file mode 100644
index 000000000..7a98b170c
--- /dev/null
+++ b/3720/CH4/EX4.2/Ex4_2.sce
@@ -0,0 +1,16 @@
+//Example 4_2
+clc;clear;funcprot(0);
+// Given values
+v=0.00187;// The volume flow rate in ft^3/s
+D_inlet=0.0350;// The diameter at inlet in ft
+D_outer=0.182/12;// The diameter at outlet in ft
+dx=0.325;// Length of the nozzle in ft
+
+// Calculation
+A_inlet=(%pi*D_inlet^2)/4;// Area at inlet in ft^2
+A_outer=(%pi*D_outer^2)/4;// Area at outer in ft^2
+u_in=v/A_inlet;// ft/s
+u_out=v/A_outer;;// ft/s
+a_x=(u_out^2-u_in^2)/(2*dx);// Axial acceleration in ft/s^2
+printf('Axial acceleration,a_x=%0.0f ft/s^2 \n',a_x);
+// The answer is bit different due to round off error in book
diff --git a/3720/CH4/EX4.3/Ex4_3.sce b/3720/CH4/EX4.3/Ex4_3.sce
new file mode 100644
index 000000000..5d5d34fda
--- /dev/null
+++ b/3720/CH4/EX4.3/Ex4_3.sce
@@ -0,0 +1,21 @@
+//Example 4_3
+clc;clear;funcprot(0);
+//Given values
+x=2;
+y=3;
+// Analysis
+function[ax,ay]=vecac(x,y)
+ [X,Y] = meshgrid(x,y);
+ ax = 0.4+0.64*X;
+ ay=-1.2+0.64*Y;
+endfunction
+x = linspace(-2,2,5);
+y = linspace(0,5,6);
+[ax,ay]=vecac(x,y);
+[ax1,ay1]=vecac(2,3);
+printf('\nThe material acceleration at point (x=2m,y=3m),a_x=%0.2f m/s^2 and a_y=%0.2f m/s^2',ax1,ay1);
+champ(x',y',ax',ay');
+xgrid(1);
+xtitle('Scale:10 m/s^2');
+xlabel('x');
+ylabel('y');