import math
#Initialization of variables
v = 30. #velocity - m/s
nu = 1.5e-5 #m**2/s
#calculations
Re = 5*10**5
xc = Re*nu/v
#results
print "Transistion region = %.2f m"%(xc)
import math
#Initialization of variables
u = 2. #velocity - m/s
x = 0.15 #length - m
nu = 1.5e-5 #m**2/s
B = 0.5 #m
rho = 1.22 #kg/m**3
#calcualtions
Rx = u*x/nu
delta = 4.91*x/math.sqrt(Rx)
deltas = 1.729*x/math.sqrt(Rx)
Cf = 1.328/math.sqrt(Rx)
Ff = Cf*0.5*rho*u**2 *2*B*x
#results
print "Boundary layer thickness = %.2f cm"%(delta*100)
print " Displacement thickness = %.2f cm"%(deltas*100)
print " Average drag coeffcient = %.4f"%(Cf)
print " Drag force = %.4f N"%(Ff)
import math
#Initialization of variables
U = 172.*1000/3600 #m/s
w = 3. #m
h = 3. #m
L = 100. #m
nu = 1.5e-5 #m**2/s
rho = 1.22 #kg/m**3
#calculations
Rl = U*L/nu
Cf = 0.074 /(Rl**(1./5))
Ff = Cf*0.5*rho*U**2 *w*h*L
power = Ff*U
#results
print "power required = %.1f kW"%(power/1000)
#The answer is a bit different due to rounding off error
import math
#Initialization of variables
U = 4000. #m/s
L = 8. #m
nu = 3600.e-6 #m**2/s
rho = 1000. #kg/m**3
b = 5. #m
#calculations
Rl = U*L/nu
Cf = 0.074/Rl**(1./5) -1700/Rl
Ff = Cf*0.5*rho*(U/3600)**2 *L*b
#results
print "Skin friction drag = %.2f N"%(Ff)
# note : rounding off error.