Chapter 2 : Units and Dimensions

Example 2.1 page no : 24

In [1]:
import math 

# Variables 
V1 = 15.            #ft**3/min volumetric flow rate
ft = 0.3048         #m relationship
min = 60.           #secs relationship

# Calculation 
V = V1*ft**3/min;

# Result 
print "Volumetric flowrate = %.3e m**3/s"%V
D = 1000            #kg/m**3
M = V * D;
print "mass flowrate = %.3f kg/s"%M
Volumetric flowrate = 7.079e-03 m**3/s
mass flowrate = 7.079 kg/s

Example 2.2 page no : 24

In [1]:
# Variables 
ft = 0.3048;            #m 
lb = 0.4536;            #kg

# Calculation 
P = ft*lb;

# Result 
print "1 poundal is 1 ft*lb/s**2 = %.4f N"%P
1 poundal is 1 ft*lb/s**2 = 0.1383 N

Example 2.3 page no : 24

In [2]:
# Variables 
kgf = 9.80665;          #N KGF

# Calculation and Result 
cm = 10**-2;            #m
P = kgf/cm**2;
print "1 kgf/cm**2 = %0.3e N/m**2"%P
lbf = 32.174;           #lb*ft#s**2
lb = 0.4535924;         #kg
ft = 0.3048;            #m
in_ = 0.0254;            #m
P1 = lbf*lb*ft/in_**2;
print "1 lbf/in**2 = %.2f N/m**2"%P1
1 kgf/cm**2 = 9.807e+04 N/m**2
1 lbf/in**2 = 6894.75 N/m**2

Example 2.4 page no : 25

In [4]:
# Variables 
Q1 = 10000.             #kJ/hr rate of heat transfer
kJ = 1000.              #J 
hr = 3600.              #s 

# Calculation 
Q = Q1*kJ/hr;           #J/s
print "Q = %.2f J/s"%Q
x = 0.1;                #m
A = 1.                  #m**2
T = 800.                #K
k = x*Q/(A*T);

# Result 
print "thermal conductivity = %.3f W/(m*k)"%k
J = 1/4.1868            #cal
k1 = k*J*hr/1000
print "thermal conductivity = %.3F kcal/(h*m*C)"%k1

# note : answers may vary because of rounding off error.
Q = 2777.78 J/s
thermal conductivity = 0.347 W/(m*k)
thermal conductivity = 0.299 kcal/(h*m*C)

Example 2.5 page no : 26

In [4]:
# Variables 
F = 300.                #N weight of object
a = 9.81;               #m/s**2 gravity

# Calculation 
m = F/a;                #kg

# Result 
print "mass in kg = %.2f kg"%m
lb = 4.535924/10;       #kG
m1 = m/lb
print "mass in pounds = %.2f LB"%m1
mass in kg = 30.58 kg
mass in pounds = 67.42 LB

Example 2.6 page no : 26

In [6]:
# Variables 
z = 15.                 #m height
PE = 2000.;             #J potential energy
g = 9.8067;             #m/s**2 

# Calculation 
m = PE/(z*g);

# Result 
print "mass = %.3f kg"%m
v = 50;                 #m/s
KE = 1./2*m*(v**2)/1000.;
print "kinetic energy = %.3f kj"%KE
mass = 13.596 kg
kinetic energy = 16.995 kj

Example 2.7 page no : 26

In [7]:
# Variables 
g = 9.81;                   #m/s**2 gravity
m = 100 * 0.4536;           #kg     weight  
P = 101325.;                #N/m**2  standard atomosphere
D1 = 4.;                    #inch

# Calculation 
D = D1 * 2.54 * 10**-2;     #m
A = 3.1415 * (D**2)/4;      #m**2
F1 = P * A;                 #N
F2 = m * g;                 #N
F = F1 + F2;

# Result 
print "Total force acting on the gas = %.2f N"%F
P1 = F / A;                 #N/m**2
P2 = P1/100000.;            #bar
P3 = P1/(6.894757 * 10**3); #psi
print "Pressure in N/m**2 = %.3e N/m**2"%P1
print "Pressure in bar = %.3f bar"%P2
print "Pressure in psi = %.2f psi"%P3
d = 0.4;                    #m
W = F * d;
print "Work done = %.2f J"%W
PE = m * g * d;
print "Change in potential energy = %.2f J"%PE
Total force acting on the gas = 1266.43 N
Pressure in N/m**2 = 1.562e+05 N/m**2
Pressure in bar = 1.562 bar
Pressure in psi = 22.66 psi
Work done = 506.57 J
Change in potential energy = 177.99 J

Example 2.8 page no : 28

In [7]:
# Variables 
#kG = (6.7 * 10**-4) * (( G * (ds + dt) / ds)**0.8) / ((ds**0.4)*(dG**0.2))

#kG - lbmol/(h ft**2 atm), G - lb/(ft**2 h), ds, dG, dt - feet
#kG1 - kmol/(m**2 h atm), G1 - kg/(m**2 h), ds1, dG1, dt1 - m
G = 0.2048;             #G1 * lb/(ft**2 h)  velocity
d = 3.2808;             #d1 * ft   clearance between grids
ds = d;                 # clearance between grids
dt = d;                 # clearance between grids
dG = d;                 # clearance between grids
kG = 4.885;             #kG1 (lbmol/(h ft**2 atm) = 4.885 * kmol/(m**2 h atm))

# Calculation 
C = (6.7 * 10**-4) * (( G * d / ds)**0.8) / ((ds**0.4)*(dG**0.2))* kG;

# Result 
print "Co-efficient = %.2e (kmol)(kg)**-0.8 (m)**0.2 (h)**-0.2 (atm)**-1"%C
# this is the constant for the equation
# the equation thus becomes,
# kG1 = C * (( G1 * (ds1 + dt1) / ds1)**0.8) / ((ds1**0.4)*(dG1**0.2))
Co-efficient = 4.51e-04 (kmol)(kg)**-0.8 (m)**0.2 (h)**-0.2 (atm)**-1

Example 2.9 page no : 29

In [10]:
from sympy import Symbol

# Variables 
#Cp = 7.13 + 0.577 * (10**-3) * t + 0.0248 * (10**-6) * t**2 

#Cp - Btu/lb-mol F, t - F
#Cp1 - kJ/kmol K , t1 - K
a = 7.13                          # first term
b = 0.577 * 10**-3                # second term
c = 0.0248 * 10**-6               # third term
#t = 1.8 * t1 - 459.67
Cp = 4.1868;            #Cp1 (Btu/lb-mol F = 4.1868 * (kJ/kmol K) )
t = Symbol('T')
#substituting the above, we get,
#Cp1 = 28.763 + 4.763 * (10**-3) * t1 + 0.3366 * (10**-6) * t**2
a1 = 28.763

# Calculation 
b1 = 4.763 * (10**-3)
c1 = 0.3366 * (10**-6)

Cp = a1 + b1*t + c1*t**2
# Result 
print "a1 = ",a1
print "b1 = ",b1
print "c1 = ",c1
# this are the co efficents for the following equation;
# Cp1 = a1 + b1 * t1 + c1 * (t1)**2
print "Equation Cp = ",Cp
a1 =  28.763
b1 =  0.004763
c1 =  3.366e-07
Equation Cp =  3.366e-7*T**2 + 0.004763*T + 28.763