Chapter 07: Dimensional Analysis and Modeling

Example 7.7-4, Page No:290

In [9]:
import math

#Variable Decleration
g_earth=9.81 #Acceleration due to gravity on earth in m/^2
theta=(pi*5)/180 #Angle above the horizon in radians
v=21 #Speed of the baseball in m/s
zo=2 #Height at wich the ball is left in m
t_star=2.75 #Time required to hit the ground in s

#Calculations
#Part(a)
g_moon=g_earth/6 #Acceleration due to gravity on the moon in m/s^2
w_o=v*sin(theta) #Vertical component of Speed in m/s
Fr_square=w_o**2/(g_moon*zo) #Value of froude number square 
t_a=(t_star*zo)/w_o #Estimated time required to hit the ground in s
#Part(b)
#simplfying the calculations
a=w_o**2+(2*zo*g_moon)
b=a**0.5
t_b=(w_o+b)/g_moon #Exact time required for the ball to hit the ground in s

#Result
print "The estimated time required to hit the ground is",round(t_a,2),"s"
print "The exact time required for the ball to hit the ground is",round(t_b,2),"s"
#Due to the decimal accuracy the answer in textbook differs 
The estimated time required to hit the ground is 3.01 s
The exact time required for the ball to hit the ground is 3.04 s

Example 7.7-5, Page No:293

In [16]:
import math

#Variable Decleration
Vp=50 #Velocity in the prototype in mi/h
um=1.754*10**-5 #Viscosity in the model in kg/m.s
up=1.849*10**-5 #Viscosity in the prototype in kg/m.s
rhop=1.184 #Density of air in prototype in kg/m^3
rhom=1.269 #Density of air in model in kg/m^3
Lp_Lm=5 #ratio of length 

#Calculations
a=um/up
b=rhop/rhom
Vm=Vp*a*b*Lp_Lm #Velocity in the model in mi/h

#result
print "The velocity in the wind tunnel required is",round(Vm),"mi/h"
The velocity in the wind tunnel required is 221.0 mi/h

Example 7.7-6, Page No:294

In [44]:
import math

#Variable Decleration
Fd=94.3 #Average Drag force on the model in N
Vp=float(50) #Velocity of the prototype in mi/h
Vm=float(221) #Velocity of the model in mi/h
rhop=1.184 #Density of air in prototype in kg/m^3
rhom=1.269 #Density of air in model in kg/m^3
Lp_Lm=5 #ratio of length 

#Calculations
a=(rhop/rhom)
c=(Lp_Lm**2)
b=Vm/Vp
Fd_p=(Fd*a*c)/(b**2) #Drag Force on the prototype in N

#Result
print "The Drag force on the prototype is",round(Fd_p),"N"
The Drag force on the prototype is 113.0 N

Example 7.7-10, Page No:313

In [1]:
import math
import matplotlib.pyplot as plt
%matplotlib inline

#Variable Decleration
Lm=0.991 #Length of the model truck in m
Hm=0.257 #height of the model truck in m
Wm=0.159 #Width of the model truck in m
rho=1.184 #Density of Air in kg/m^3
u=1.849*10**-5 #Viscosity of air in kg/m.s
FD_m=89.9 #Drag Force in the model in N
V_m=70 #Velocity in the model in m/s
C=16 #Geometric Ratio
Vp=26.8 #Velocity of the prototype in m/s

#Calculations

V=range(20,75,5) #Velocity array each in m/s
F=[12.4,19,22.1,29,34.3,39.9,47.2,55.5,66,77.6,89.9] #Drag force array in N
X=transpose(F) #Transpose of the matrix in order to mutliply
#Simplfying the calculations by using steps

CD_m1=(X/V)
CD_m2=CD_m1/V
CD_m=(2*CD_m2)/(rho*Wm*Hm) #Drag Coefficient 

Y=transpose(V)
Re_m=(rho*Y*Wm)/u  #Reynolds Number for each set

#Calculations for prototype
Re_p=(rho*Vp*C*Wm)/u #Reynolds Number for the prototype

#Aerodynamic Drag Calculations
FD_p=0.5*rho*Vp**2*C**2*Wm*Hm*CD_m[10] #Aerodynamic Drag on the Vehicle in N

#Result
print "The Aerodynamic Drag on the Vehicle is",round(FD_p),"N"

plt.plot(Re_m,CD_m,'ro')
plt.ylabel('Cd')
plt.xlabel('Re')
plt.show()

#The answer in the textbook has been rounded off to the nearest value
The Aerodynamic Drag on the Vehicle is 3373.0 N

Example 7.7-11, Page No:316

In [2]:
import math

#Variable Decleration
Lm_Lp=10**-2 #Length Scale Factor
vp=1.002*10**-6 #Kinematic viscosity of the prototype in m^2/s

#Calculations
vm=vp*(Lm_Lp)**1.5 #Required Kinematic Viscosity in m^2/s

#Result
print "Looking up in a table we cannot find a fluid of the kinematic viscosity",vm,"m^2/s"
Looking up in a table we cannot find a fluid of the kinematic viscosity 1.002e-09 m^2/s