From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 557/CH7/EX7.3/3.sce | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 557/CH7/EX7.3/3.sce (limited to '557/CH7/EX7.3/3.sce') 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 -- cgit