Chapter9-The Flow of an Inviscid Fluid

Ex2-pg380

In [1]:
import math
#calculate Mass flow rate
import scipy
from scipy import integrate
## p_a-p_b=-1/2*rho*C^2*(1/R_A^2-1/R_B^2)

rho_w=1000.; ## kg/m^3
g=9.81; ## m/s^2
h=0.0115; ## m
rho=1.22; ## kg/m^3
R_A=0.4; ## m
R_B=0.2; ## m

C=math.sqrt(rho_w*g*h*2./(rho*(1./R_B**2-1./R_A**2)));

def function(R):
	y=1./R;
	return y;

new=scipy.integrate.quad(function, R_B, R_A);
m=rho*C*R_B*new[0]
print"%s %.4f %s"%("Mass flow rate =",m,"kg/s")
Mass flow rate = 0.5312 kg/s

Ex3-pg382

In [2]:
import math
#The maximum speed at which the paddles may rotate about their vertical axis
## p=1/2*rho*w^2*R^2 + C


## At z=0
rho=900.; ## kg/m^3
g=9.81; ## m/s^2
h=0.6; ## m

C=rho*g*h;

## p = -rho*K^2/(2*R^2)+D
## From this we get, D = 9*w^2 + C

## At z = 0
## p = D - rho*K^2/2/R^2;
p_max=150000.; ## Pa

## From the above equation we obtain,
w=135.6; ## rad/s

print'%s %.1f %s'%("The maximum speed at which the paddles may rotate about their vertical axis =",w,"rad/s")
The maximum speed at which the paddles may rotate about their vertical axis = 135.6 rad/s

Ex4-pg386

In [3]:
import math
#calculate the strength of the line source and the distance s the line source is located behind the leading edge of the step and Horizontal component andVertical Component 
U=40; ## m/s
h=0.01; ## m

m=2*U*h;
print'%s %.1f %s'%("the strength of the line source =",m,"m^2/s")


s = m/(2*math.pi*U);
print'%s %.2f %s'%(" the distance s the line source is located behind the leading edge of the step =",s*1000,"mm")



x=0; ## m
y=0.005; ## m

u=U + m/(2*math.pi)*(x/(x**2+y**2));
v=m/(2*math.pi)*(y/(x**2+y**2));
print'%s %.f %s'%("Horizontal component =",u,"m/s")


print'%s %.1f %s'%("Vertical Component =",v,"m/s")
the strength of the line source = 0.8 m^2/s
 the distance s the line source is located behind the leading edge of the step = 3.18 mm
Horizontal component = 40 m/s
Vertical Component = 25.5 m/s

Ex5-pg389

In [4]:
import math
#calculate length
b=0.0375; ## m
t=0.0625; ## m
U=5.; ## m/s

m=2*math.pi*U*t/math.atan(2*b*t/(t**2-b**2));

L=2.*b*(1+m/(math.pi*U*b))**(1/2.);

print'%s %.7f %s'%("L =",L,"m")
L = 0.1515673 m

Ex7-pg409

In [5]:
import math
#calculate Lift coefficient and Drag coefficient and Effective angle of attack
l1=10.; ## m
r1=2.; ## m
C_D1=0.0588;
theta1=6.5; ## degrees

AR1=l1/r1; ## Aspect ratio

C_L=0.914;

C_D2=C_L**2./(math.pi*AR1);
theta2=math.atan(C_L/(math.pi*AR1))*57.3

C_D3=C_D1-C_D2;
theta3=theta1-theta2;

AR2=8.;

C_Di=C_L**2./(math.pi*AR2);
C_D=C_Di+C_D3;

theta4=math.atan(C_L/(math.pi*AR2))*57.3;
theta=theta4+theta3;

print'%s %.3f %s'%("Lift coefficient =",C_L,"")


print'%s %.4f %s'%("Drag coefficient =",C_D,"")


print'%s %.3f %s'%("Effective angle of attack =",theta,"degrees")
Lift coefficient = 0.914 
Drag coefficient = 0.0389 
Effective angle of attack = 5.253 degrees