summaryrefslogtreecommitdiff
path: root/689/CH2
diff options
context:
space:
mode:
Diffstat (limited to '689/CH2')
-rw-r--r--689/CH2/EX2.1/1.sce17
-rw-r--r--689/CH2/EX2.2/2.sce23
-rw-r--r--689/CH2/EX2.3/3.sce17
-rw-r--r--689/CH2/EX2.4/4.sce14
-rw-r--r--689/CH2/EX2.5/5.sce17
-rw-r--r--689/CH2/EX2.6/6.sce17
-rw-r--r--689/CH2/EX2.7/7.sce21
-rw-r--r--689/CH2/EX2.8/8.sce26
-rw-r--r--689/CH2/EX2.9/9.sce14
9 files changed, 166 insertions, 0 deletions
diff --git a/689/CH2/EX2.1/1.sce b/689/CH2/EX2.1/1.sce
new file mode 100644
index 000000000..432479918
--- /dev/null
+++ b/689/CH2/EX2.1/1.sce
@@ -0,0 +1,17 @@
+//Example 2.1 On Law Of Continuity
+
+// Initialisation of variables
+dA_by_dS = -0.1;
+A = 4;
+V = 90;
+
+// Calculations
+dV_by_dS = -1*V*dA_by_dS/A;
+if(dV_by_dS > 0 ) then
+ flag = "Increasing";
+else flag = "Decreasing";
+end
+
+//Results
+disp(dV_by_dS,flag, "The Velocity (ft/sec)is :");
+
diff --git a/689/CH2/EX2.2/2.sce b/689/CH2/EX2.2/2.sce
new file mode 100644
index 000000000..0da671cc4
--- /dev/null
+++ b/689/CH2/EX2.2/2.sce
@@ -0,0 +1,23 @@
+//Example 2.2 On Bernoulli's Equation
+
+// Initialisation of variables
+D1 = 8;
+P1 = 20*144; //Gage Pressure in lb per square feet
+q = 1000; //Rate of flow in gallon per minute.
+D2 = 4;
+Patm = 2116.2;
+rho = 62.4;
+
+// Calculations
+q = q*231/(1728*60); //Rate of flow in ft^3/sec
+A1 = %pi*(D1/12/2)^2; // Area in ft^2
+A2 = %pi*(D2/12/2)^2;
+V1 = q/A1;
+V2 = q/A2;
+P1_abs = P1 + Patm;
+P2_abs = P1_abs + (1/2)*rho*(V1^2 - V2^2)/32.2; // Bernoulli's Equation
+P2 = (P2_abs - Patm)/144;
+
+//Results
+disp(P2, "The gage pressure in pipe at D = 4 inch (lb per sq in) :");
+
diff --git a/689/CH2/EX2.3/3.sce b/689/CH2/EX2.3/3.sce
new file mode 100644
index 000000000..cad8802a7
--- /dev/null
+++ b/689/CH2/EX2.3/3.sce
@@ -0,0 +1,17 @@
+//Example 2.3 On Venturi Tube
+
+// Initialisation of variables
+Da = 12 / 12;
+Db = 6 / 12;
+DP = 5*70.73; //Pressure difference in lb per sq feet
+rho = 62.4;
+
+// Calculations
+Ab = %pi*(Db/2)^2;
+Ab_Aa = (Db/Da)^2;
+Denominator = (rho/2)*(1 - Ab_Aa^2)/32.2;
+Q = Ab*sqrt(DP/Denominator); //Formula for venturi tube
+
+//Results
+disp(Q, "Flow rate (cu ft per sec) :");
+
diff --git a/689/CH2/EX2.4/4.sce b/689/CH2/EX2.4/4.sce
new file mode 100644
index 000000000..6780f099b
--- /dev/null
+++ b/689/CH2/EX2.4/4.sce
@@ -0,0 +1,14 @@
+//Example 2.4 On Stagnation Point
+
+// Initialisation of variables
+h = 50;
+v = 12*5280/3600; //Speed in feet/sec
+w = 62.4;
+
+// Calculations
+Po = w*h;
+Ps = Po + (1/2)*w*v^2/32.2;
+
+//Results
+disp(Ps/144, "Impact Pressure on nose (lb/sq-in):");
+
diff --git a/689/CH2/EX2.5/5.sce b/689/CH2/EX2.5/5.sce
new file mode 100644
index 000000000..7cbd5cf84
--- /dev/null
+++ b/689/CH2/EX2.5/5.sce
@@ -0,0 +1,17 @@
+//Example 2.5 On Stagnation Point
+
+// Initialisation of variables
+h = 50;
+v = 100*5280/3600; //Speed in feet/sec
+rho_0 = 0.002378;
+rho_10000 = 0.001756;
+
+// Calculations
+Po = w*h;
+Ps_Po1 = (1/2)*rho_0*v^2;
+Ps_Po2 = (1/2)*rho_10000*v^2;
+V = 0.682*sqrt(Ps_Po2/(rho_0/2));
+
+//Results
+disp(V, "Part(c) Reading of airspeed indicator (mph):", Ps_Po2,"Part (b) difference between impact and static pressure at altitude 10000 ft(lb/sq-ft):", Ps_Po1,"Part (a) difference between impact and static pressure at sea level (lb/sq-ft):");
+
diff --git a/689/CH2/EX2.6/6.sce b/689/CH2/EX2.6/6.sce
new file mode 100644
index 000000000..a8c19f359
--- /dev/null
+++ b/689/CH2/EX2.6/6.sce
@@ -0,0 +1,17 @@
+//Example 2.6 On Velocity and Stream Function
+
+// Initialisation of variables
+function[z] = shi(x,y)
+ z = x^2 - y^2;
+endfunction
+
+// Calculations
+h = 0.00001;
+u = (shi(3,2+h)-shi(3,2))/h; // Partial derivative wrt y
+v = -(shi(3+h,2)-shi(3,2))/h;
+Velo = sqrt(u^2+v^2);
+theta = atand(v/u);
+
+//Results
+disp(theta,"Anticlockwise angle at P(3,2) (Degree)", Velo, "Magnitude of velocity at P(3,2) (ft/sec)");
+
diff --git a/689/CH2/EX2.7/7.sce b/689/CH2/EX2.7/7.sce
new file mode 100644
index 000000000..6f2bbe803
--- /dev/null
+++ b/689/CH2/EX2.7/7.sce
@@ -0,0 +1,21 @@
+//Example 2.7 Uniform Flow Plus a Source
+
+// Initialisation of variables
+U = 100;
+m = 600;
+P0 = 2116.2;
+rho = 0.002378;
+function[z] = shi(x,y)
+ z = -U*y + (m/(2*%pi)*atan(y/x));
+endfunction
+
+// Calculations
+h = 0.000001;
+u = (shi(h,1.5+h)-shi(h,1.5))/h ; // Partial derivative is ts taken in just the neighbourhood of 0 as if we take absolute zero then there will be a divide by zero error.
+v = -(shi(2*h,1.5)-shi(h,1.5))/h ;
+Velo = sqrt(u^2+v^2);
+P = P0 - (rho/2)*(Velo^2-U^2);
+
+//Results
+disp(P,"Pressure at P(0, 1.5) (lb/sq-ft)");
+
diff --git a/689/CH2/EX2.8/8.sce b/689/CH2/EX2.8/8.sce
new file mode 100644
index 000000000..706c61575
--- /dev/null
+++ b/689/CH2/EX2.8/8.sce
@@ -0,0 +1,26 @@
+//Example 2.8 Source Plus Sink Plus Uniform Flow
+
+// Initialisation of variables
+
+U = -100;
+m = 314.2;
+P0 = 2116.2;
+rho = 0.002378;
+c = 1;
+x = 1.05;
+y = 0.6;
+P0 = 2116.2;
+function[z] = shi(x,y)
+ z = -U*y + (m/(2*%pi)*atan(2*c*y/(x^2-y^2-c^2)));
+endfunction
+
+// Calculations
+h = 0.00001;
+u = (shi(x,y+h)-shi(x,y))/h ;
+v = -(shi(x+h,y)-shi(x,y))/h ;
+Velo = sqrt(u^2+v^2);
+P = P0 - (rho/2)*(Velo^2-U^2);
+
+//Results
+disp(P,"Pressure at P(1.05, 0.6) (lb/sq-ft)");
+
diff --git a/689/CH2/EX2.9/9.sce b/689/CH2/EX2.9/9.sce
new file mode 100644
index 000000000..2eaa7755d
--- /dev/null
+++ b/689/CH2/EX2.9/9.sce
@@ -0,0 +1,14 @@
+//Example 2.9 Flow around a circular cylinder
+
+// Initialisation of variables
+P0 = 2116.2;
+U = 100;
+rho = 0.002378;
+theta = 15;
+
+// Calculations
+P = P0 + rho*U^2*(1 - 4*sind(theta)^2)/2;
+
+//Results
+disp(P,"Pressure at a point on the surface of cylinder (lb/sq-ft)");
+