# All the quantities are expressed in SI units
# (a)
from math import sqrt
Re_c = 1.36e7; # as obtained from ex. 18.1a
rho_inf = 1.22; # freestream air denstiy
S = 40.; # plate planform area
# hence, from eq.(19.2)
Cf = 0.074/Re_c**0.2;
V_inf = 100.;
# hence, for one side of the plate
D_f = 1./2.*rho_inf*V_inf**2.*S*Cf;
# the total drag on both the surfaces is
D = 2.*D_f;
print"The total frictional drag is: (a)D =",D,"N"
# (b)
Re_c = 1.36e8; # as obtained from ex. 18.1b
# hence, from fig 19.1 we have
Cf = 1.34*10.**-3.;
V_inf = 1000.;
# hence, for one side of the plate
D_f = 1./2.*rho_inf*V_inf**2.*S*Cf;
# the total drag on both the surfaces is
D = 2.*D_f;
print"(b) D =",D,"N"
# All the quantities are expressed in SI units
# from ex 18.2
from math import sqrt
Re_c_star = 3.754e7; # Reynolds number at the trailing edge of the plate
rho_star = 0.574;
ue = 1000.; # velocity of the upper plate
S = 40.; # plate planform area
# from eq.(19.3) we have
Cf_star = 0.074/Re_c_star**0.2;
# hence, for one side of the plate
D_f = 1./2.*rho_star*ue**2.*S*Cf_star;
# the total drag on both the surfaces is
D = 2.*D_f;
print"The total frictional drag is:D =",D,"N"
# All the quantities are expressed in SI units
import math
Me = 2.94; # mach number of the flow over the upper plate
ue = 1000.;
Te = 288.; # temperature of the upper plate
ue = 1000.; # velocity of the upper plate
S = 40.; # plate planform area
Pr = 0.71; # Prandlt number of air at standard condition
gam = 1.4; # ratio of specific heats
# the recovery factor is given as
r = Pr**(1./3.);
# for M = 2.94
T_aw = Te*(1.+r*(2.74-1.));
T_w = T_aw; # since the flat plate has an adiabatic wall
# from the Meador-Smart equation
T_star = Te*(0.5*(1.+T_w/Te) + 0.16*r*(gam-1.)/2.*Me**2.);
# from the equation of state
p_star=1.
R=1.
rho_star = p_star/R/T_star;
# from eq.(15.3)
mue0=1.
T0=1.
c=1.
mue_star = mue0*(T_star/T0)**1.5*(T0+110.)/(T_star+110.);
# thus
Re_c_star = rho_star*ue*c/mue_star;
# from eq.(18.22)
Cf_star = 0.02667/Re_c_star**0.139;
# hence, the frictional drag on one surface of the plate is
D_f = 1./2.*rho_star*ue**2.*S*Cf_star;
# thus, the total frictional drag is given by
D = 2.*D_f;
print"The total frictional drag is:D =",D,"N"