diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /557/CH7 | |
download | Scilab-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/CH7')
-rwxr-xr-x | 557/CH7/EX7.2/2.sce | 24 | ||||
-rwxr-xr-x | 557/CH7/EX7.3/3.sce | 25 | ||||
-rwxr-xr-x | 557/CH7/EX7.4/4.sce | 17 | ||||
-rwxr-xr-x | 557/CH7/EX7.5/5.sce | 12 |
4 files changed, 78 insertions, 0 deletions
diff --git a/557/CH7/EX7.2/2.sce b/557/CH7/EX7.2/2.sce new file mode 100755 index 000000000..d68695774 --- /dev/null +++ b/557/CH7/EX7.2/2.sce @@ -0,0 +1,24 @@ +clc;funcprot(0); //Example 7.2
+
+//Initializing the variables
+x = 120*(2*%pi)/180; //Theta
+r = 1;
+v0 = 0.5;
+q = 2;
+
+//Calculations
+function[y] =shi(r,theta)
+ y = v0*r*sin(theta) +q*theta/(2*%pi);
+endfunction
+
+
+//--Approx differentiation at a point using central difference formula--//
+h=0.0000001;
+at_theta=x;
+at_r = r;
+Vr = (shi(r,at_theta+h)-shi(r,at_theta-h))/(r*2*h);
+Vth = (shi(r+h,at_theta)-shi(r-h,at_theta))/(2*h);
+V = sqrt(Vr^2+Vth^2);
+alpha = atand(abs(Vth/Vr));
+bet = x*180/(2*%pi)-alpha;
+disp(bet, "Beta (Degree):",alpha,"Alpha (Degree) :", V, "Fluid Velocity(m/s) :");
diff --git a/557/CH7/EX7.3/3.sce b/557/CH7/EX7.3/3.sce new file mode 100755 index 000000000..48797cfbf --- /dev/null +++ b/557/CH7/EX7.3/3.sce @@ -0,0 +1,25 @@ +clc;funcprot(0); //Example 7.3
+
+//Initializing the variables
+q = 10;
+function[Z] = shi(x,y)
+ Z = (q/2/%pi)*(atan(y/(x-1))-atan(y/(x+1))) - 25*y;
+endfunction
+h = 0.0000001;
+Vinf = 25;
+
+//Calculations
+x = poly(0,'x');
+f = x^2 - 2/(5*%pi) -1;
+root = roots(f);
+l = abs(root(1))+abs(root(2));
+Ymax = 0.047;
+width = 2*Ymax;
+Vx = (shi(1-h,1)-shi(1-h,1-h))/h; // At x=1 the function atan is not defined hence taking x a little smaller.
+Vy = -1*(shi(1-2*h,1)-shi(1-h,1))/h; // At x=1 the function atan is not defined hence taking x a little smaller.
+
+V = sqrt(Vx^2+Vy^2);
+rho = poly(0,'rho');
+dP = rho/2 *(V^2 - Vinf^2); //difference in pressure
+
+disp(dP, 'Pressure Difference(N/m2) :',V, 'Velocity (m/s):', l, 'Length of Rankine Body(m ) :', width,'Width of Rankine Body (m):' );
\ No newline at end of file diff --git a/557/CH7/EX7.4/4.sce b/557/CH7/EX7.4/4.sce new file mode 100755 index 000000000..b7adedbfe --- /dev/null +++ b/557/CH7/EX7.4/4.sce @@ -0,0 +1,17 @@ +funcprot(0);clc; //Example 7.4
+
+//Initializing the variables
+a = 0.02;
+r = 0.05;
+V0 = 1;
+x = 135; // Theta
+function[Z] = shi(r,x)
+ Z = V0*sind(x)*(r - ((a^2)/r));
+endfunction
+h = 0.0001;
+
+//Calculations
+Vr = 57*(shi(r,x+h)-shi(r,x))/(r*h);
+Vx = -1*(shi(r+h,x)-shi(r,x))/h;
+
+disp(Vr, 'Radial Velocity (m/s):',Vx, 'Normal component of velocity (m/s):');
\ No newline at end of file diff --git a/557/CH7/EX7.5/5.sce b/557/CH7/EX7.5/5.sce new file mode 100755 index 000000000..3c46989f9 --- /dev/null +++ b/557/CH7/EX7.5/5.sce @@ -0,0 +1,12 @@ +clc;funcprot(0); //Example 7.5
+
+//Initializing the variables
+rho = 1000;
+r = 2;
+psi = 2*log(r);
+
+//Calculations
+y = psi/log(r); // y = GammaC / 2*pi
+v = y/r;
+dPbydr = rho*v^2/r;
+disp(dPbydr, 'Pressuer Gradient (N/m3 ) :');
\ No newline at end of file |