In [10]:

```
import math
print"Introduction to heat transfer by S.K.Som, Chapter 6, Example 1"
#Oil of specific gravity 0.90 and dynamic viscosity (mu=0.1Pa*s) flows between two fixed plates kept 2*b=10mm apart,So b=5mm.
#The average velocity is Uav=1.60m/s
Uav=1.60;
mu=0.1;
b=0.005; #in metre
#Umax is maximum velocity
Umax=(3/2)*Uav
print"Umax in m/s is"
Umax=(3/2)*Uav
print"Umax=",Umax
#The shear stress at the plate is given by T=2*Âµ*(Umax/b)
print"The shear stress T in N/m**2"
T=2*mu*(Umax/b)
#The shear sress at a distance from plate is given by t=y*(dp/dx)
#(dp/dx)=X=-3*mu*(Uav/b**2)
print"T=",T
print"(dp/dx) in N/m**3 is"
X=-3*mu*(Uav/b**2)
#Taking modulus of X by multipying it with negative sign.
print"X=",X
print"The Shear stress at a distance of 0.002m from the lower plate in N/m**2"
y=b-0.002;
t=y*(X) #NOTE:Answer given in the book is incorrect (Calculation mistake)
print"t=",t
print"The shear stress at a distance of 0.002m from the upper plate in N/m**2"
t=-y*(X) #NOTE:Answer given in the book is incorrect (Calculation mistake)
print"t=",t
print"The opposite signs in t represents the opposite directions.The plus sign is in the direction of flow and the minus sign is in the direction opposite to the flow "
#deltaP is the pressure drop
print"The pressure drop over a distance of 2m in N/m**2 is"
#Since pressure drop is considered at a distance of 2m so L=2m
L=2;
deltaP=(-X)*L
print"deltaP=",deltaP
```

In [14]:

```
import math
print"Introduction to heat transfer by S.K.Som, Chapter 6, Example 3"
#Oil of specific gravity (sg)=0.90 is discharged at a rate(mdot)=3kg/s under a pressure difference dp=10KN/m**2 over a length dz=5m of a pipe having a diameter(D) of 50mm.
dp=10*10**3; #in N/m**2
dz=5;
D=0.05; #in metre
mdot=3;
sg=0.90;
#X=dp/dz is the rate of change of pressure
print"The rate of change of pressure with respect to length in N/m**3"
X=dp/dz
print"X=",X
#Flow rate is Q
print"Flow rate(Q) in m**3/s is)"
Q=mdot/(sg*10**3)
print"Q=",Q
#The viscosity of oil is mu=(pi*D**4*X)/(128*Q*dz)
print"The viscosity of oil(mu)in kg/(m*s)"
mu=(math.pi*D**4*X)/(128*Q)
print"mu=",mu
```

In [16]:

```
import math
print"Introduction to heat transfer by S.K.Som, Chapter 6, Example 7"
#A flat plate B=1.2m wide and of length L is kept parallel to a uniform stream of air of velocity Uinf=3m/s in a wind tunnel.
Uinf=3;
B=1.2;
#If it is desired to have a laminar boundary layer only on the plate
#Assume that the laminar flow exists up to a reynold number(ReL)=5*10**5.Take density of air as rhoair=1.2kg/m**3 and viscosity of air as nuair=1.5*10**-5 m**2/s.
nuair=1.5*10**-5;
rhoair=1.2;
ReL=5*10**5;
#For maximum length of the plate reynolds number is ReL=Uinf*L/nuair
#so L=ReL*nuair/Uinf
print"The maximum length of plate in m is "
L=ReL*nuair/Uinf
print"L=",L
#The average skin friction coefficient is cfL=1.328/(ReL)**(1/2)
print"The average skin friction coefficient is"
cfL=1.328/(ReL)**(1/2)
print"cfL=",cfL
#Fd is drag force
print"Drag force on one side of plate in N is"
Fd=cfL*(rhoair*Uinf**2/2)*B*L
print"Fd=",Fd
```

In [17]:

```
import math
print"Introduction to heat transfer by S.K.Som, Chapter 6, Example 10"
#Wind at a speed of U=36km/hr blows over a flat plate of length,L=6m .If the density and kinematic viscosity of air are rho=1.2kg/m**3 and mu=1.5*10**-5m**2/s respectively.
U=36;
L=6;
rho=1.2;
mu=1.5*10**-5;
#Wind velocity in m/s is Uinf
print"Wind velocity(Uinf)in m/s is"
Uinf=U*1000/3600
print"Uinf=",Uinf
#Reynolds number is given by ReL=L*Uinf/mu
print"Reynolds number is"
ReL=L*Uinf/mu
print"ReL=",ReL
#We consider that transition of boundary layer takes place from laminar to turbulent takes place at ReL=5*10**5.
#Therfore the corresponding friction coefficient is given by CbarfL=(0.074-ReL**(1/5))-(1742/ReL)
print"Friction coefficient is"
CbarfL=(0.074/ReL**(1/5))-(1742/ReL)
print"CbarfL=",CbarfL
#Drag force on one side of the plate per unit metre width is given by FD=CbarfL*rho*Uinf**2*L/2
print"Drag force on one side of the plate per unit metre width in Newton is "
FD=CbarfL*rho*Uinf**2*L/2
print"FD=",FD
#The turbulent boundary layer thickness at the trailing edge is given by delta=L*(0.379/ReL**(1/5))
print"The turbulent boundary layer thickness at the trailing edge in metre is "
delta=L*(0.379/ReL**(1/5))
print"delta=",delta
```