Chapter 1:Units & Dimensions

Example no:1.1,Page no:9

In [8]:
#Variable declaration
# 1 Poise = 1g/cm s = ((1/453.6)lb)/((1/30.48)ft*1s)

#Calculation
be=30.48/453.6*3600  #be->british engineering unit
# 1 Poise = 1g/cm s = ((1/1000)kg)/((1/100)m*1s)
si=100/1000.0  #si->SI units

#Result
print" 1 Poise=",round(be),"lb/ft h" 
print"\n 1 Poise =",si,"N s/m**2 "
 1 Poise= 242.0 lb/ft h

 1 Poise = 0.1 N s/m**2 

Example no:1.2,Page no:10

In [4]:
#Variable declaration

# 1 kW= 103 W = 103 J/s = 10**3 * (1 kg*1 m**2)/1 s**3
#                       = (10**3 * (1/0.4536) lb x (1/0.3048)**2 ft**2)/1 s**3

#Calculation
lfs=(10**3*(1/0.4536)*(1/.3048)**2)  #lfs->lb ft**2/s**3
sfs=lfs/32.2  #sfs->slug ft**2/s**3
hp=sfs/550.0 

#Result
print"\n 1 kW =",round(hp,2),"h.p."
 1 kW = 1.34 h.p.