Chapter 2 : Basic Chemical Calculations

Example 2.1 Page 17

In [1]:
# solution 

# Variables 
# NH4Cl
M = 14+4+35.5           # [g] (molar mass of NH4Cl)
n=5                     # [mol]

# Calculation 
m = M*n                 # [g]

# Result
print "5 mol of NH4Cl = ",m," [g]"
5 mol of NH4Cl =  267.5  [g]

Example 2.2 Page 17

In [2]:
# solution 
# Variables 

# CuSO4.5H2O
M1 = 159.5                  # [g] (molar mass of CuSO4)
M2 = 159.5+5.*(2.+16)       # (molar mass of CuSO4.5H2O)
m = 499.

# Calculation 
n = m/M2                    #[mol]

# Result
print "In the formula CuSO4.5H2O, the moles of CuSO4 is one hence,\
  the equivalent moles of CuSO4 in the crystal is ",n,"."
In the formula CuSO4.5H2O, the moles of CuSO4 is one hence,  the equivalent moles of CuSO4 in the crystal is  2.0 .

Example 2.3 Page 17

In [3]:
# solution 
# Variables 

# K2CO3
m = 117.            # [kg] (wt of K)
Mk = 39.            # [g] (at wt of K)

# Calculation 
a = m/Mk            # [kg atoms] 

# 1 mol of K2CO3 contains 2 atoms of K
n = a/2. # [kmol] (moles of K2CO3)

# Result
print " ",n," kmol of K2CO3 contains 117 kg of K." 
  1.5  kmol of K2CO3 contains 117 kg of K.

Example 2.4 Page 18

In [4]:
# solution 

# Variables 
# BaCl2
M = 137.3+2*35.5                # [g] (molar mass of BaCl2)
m = 416.6                       # [g]

# Calculation 
n = m/M                         # [mol]
N = n*6.022*10**23              # (no. of atoms)

# Result
print "Atoms present in 416.6 g BaCl2 = ",N,""
Atoms present in 416.6 g BaCl2 =  1.2044e+24 

Example 2.5 Page 19

In [5]:
# solution 

# Variables 
print "a  ",
#PO4 radical
M = 31+4*16.                #[g] 
V = 3.                      # (valence of PO4)

# Calculation and Result
eqm = M/V 
print "eq. mass of PO4 is ",eqm," [g]   "
print "b  ",
#Na3PO4
M = 3*23+95.                #[g]
V = 3.
eqm = M/V
print "eq. mass of Na3PO4 is ",eqm," [g]  "
a   eq. mass of PO4 is  31.6666666667  [g]   
b   eq. mass of Na3PO4 is  54.6666666667  [g]  

Example 2.6 Page 19

In [6]:
# solution 

# Variables 
# AlCl3
v = 3.                          # valency of Al ion

# Calculation 
eq = 3.*3                       # [mol]

# Result
print "no. of equivalents in 3 kmol of AlCl3 is ",eq," keq."
no. of equivalents in 3 kmol of AlCl3 is  9.0  keq.

Example 2.7 Page 20

In [1]:
# solution 

# Variables 
# (a)
print "a  ",
# mass %
m1 = 600.                   #[kg] (NaCl)
m2 = 200.                   #[kg] (KCl)

# Calculation 
m = m1+m2                   # total mass
Wa = (m1/m)*100.
Wb = (m2/m)*100.

# Result
print "mass percentage of NaCl is ",Wa," mass percentage of KCl is ",Wb,"   "

# (b)
print "b  ",
#mol %
M1 = 23+35.5                # molar mass of NaCl
n1 = m1/M1                  # no. of moles of NaCl
M2 = 39+35.5                # molar mass of KCl
n2 = m2/M2                  # no. of moles of KCl
n = n1+n2
N1 = (n1/n)*100.
N2 = (n2/n)*100.
print "mol percentage of NaCl is ",N1," mol percentage of KCl is ",N2," "
a   mass percentage of NaCl is  75.0  mass percentage of KCl is  25.0    
b   mol percentage of NaCl is  79.2553191489  mol percentage of KCl is  20.7446808511  

Example 2.8 Page 21

In [8]:
# solution 

# Variables 
# CH.35O.35S.14
# mass %
C = 12.0107                     #[kg] 
H = 1.00794*.35                 # [kg]
O = 15.9994*.35                 # [kg]
S = 32.065*.14                  #[kg]

# Calculation 
m = C+H+O+S
m1 = (C/m)*100.
m2 = (H/m)*100.
m3 = (O/m)*100.
m4 = (S/m)*100.

# Result
print "mass percentage of C is ",m1
print " mass percentage of H is ",m2
print " mass percentage of O is ",m3
print " mass percentage of S is ",m4
M = m/(1+.35+.35+.14)
print "molar mass = ",M," kg/kmol."
mass percentage of C is  53.4941324009
 mass percentage of H is  1.57123286189
 mass percentage of O is  24.9407534679
 mass percentage of S is  19.9938812693
molar mass =  12.2023744565  kg/kmol.

Example 2.9 Page 22

In [9]:
# solution 

# Variables 
# basis 100kg urea
m1 = 45.                 #[kg] (mass of N present)
Mu = 60.                 # (molar mass of urea)
m2 = 14*2.               #[kg] (mass of N in 1 kmol of urea)

# Calculation 
m = (Mu/m2)*m1

# Result
print "The sample contains ",m," percent urea."
The sample contains  96.4285714286  percent urea.

Example 2.10 Page 22

In [10]:
# solution 

# Variables 
# NaOH
Impurity = 60.                   # [ppm] SiO2

# Calculation 
m = (60/1000000.)*100.

# Result
print "Mass percent of SiO2 is ",m,"."
Mass percent of SiO2 is  0.006 .

Example 2.11 Page 22

In [11]:
# solution 

# Variables 
Ca = 40.078                         # at. wt of Ca
F = 18.9984032                      # at wt of F

# Calculation 
M1 = 3*Ca +2*(30.97762+(4*15.9994)) # molar mass of Ca3PO4
M2 = Ca +12.0107+3*15.9994          # molar mass of CaCO3
M3 = Ca+2*F                         # molar mass of CaF2
m1 = 800.                           #[mg] Ca3PO4
m2 = 200.                           #[mg] CaCO3
m3 = 5.                             #[mg] CaF2
n1 = ((3*Ca)/M1)*m1+(Ca/M2)*m2+(Ca/M3)*m3       # [mg] total Ca ions
n2 = (F/M3)*2*5                     #[mg] total F ions

# Result
print "Total no. of Ca+ ions is ",n1," and total no. of F- ions is ",n2,"."
Total no. of Ca+ ions is  392.749838659  and total no. of F- ions is  2.43335898941 .

Example 2.12 Page 23

In [12]:
# solution 

# Variables 
# (a)
print "a  ",
# mass %
m1 = 100.                        #[kg] methanol (basis)
m2 = 64.                         #[kg] salicylic acid

# Calculation 
m = m1+m2                        # [kg] mass of solution
w1 = m2/m*100
w2 = 100-w1

# Result
print "mass percent of salicylic acid is ",w1," and mass percent of methanol is ",w2,".   "

#(b)
print "b  ",
#mole %
M1 = 32.                         # molar mass of methanol
M2 = 138.                        #molar mass of salicylic acid
n1 = m1/M1                       #[kmol] methanol
n2 = m2/M2                       #[kmol] salicylic acid
n = n1+n2
N1 = n1/n*100.
N2 = n2/n*100.
print "Mole percent of methanol is ",N1," and Mole percent of salicylic acid is ",N2,"."
a   mass percent of salicylic acid is  39.0243902439  and mass percent of methanol is  60.9756097561 .   
b   Mole percent of methanol is  87.0772337203  and Mole percent of salicylic acid is  12.9227662797 .

Example 2.13 Page 24

In [13]:
# solution 

# Variables 
#mass %
m1 = 13.70                      # HCl
m2 = 8.67                       # NaCl
m3 = 100.                       # H2O

# Calculation 
m = m1+m2+m3                    # mass of solution
w1 = m1/m*100.
w2 = m2/m*100.
w3 = m3/m*100.

# Result
print "mass percent of HCl is ",w1
print "mass percent of NaCl is ",w2
print "and mass percent of H2O is ",w3,".   "
M1=36.4609                      #HCl
M2=58.4428                      #NaCl
M3=18.0153                      #H2O
n1=m1/M1                        #HCl
n2=m2/M2                        #NaCl
n3=m3/M3                        #H2O
n=n1+n2+n3
N1=n1/n*100.
N2=n2/n*100.
N3=n3/n*100.
print "Mole percent of HCl is ",N1
print "Mole percent of NaCl is ",N2
print "and Mole percent of H2O is ",N3
mass percent of HCl is  11.195554466
mass percent of NaCl is  7.08506987007
and mass percent of H2O is  81.719375664 .   
Mole percent of HCl is  6.1851712101
Mole percent of NaCl is  2.44200543258
and Mole percent of H2O is  91.3728233573

Example 2.14 Page 24

In [14]:
# solution 
# Variables

m = 100.                                     #[kg] Lye (basis)
m1 = 73.                                     #[kg] NaOH
M1 = 40.                                     # NaOH
M2 = 62.                                     # Na2O

# Calculation
p = (M2*m1)/(2*M1)

# Result
print "percentage of Na2O in the solution is ",p,"."
percentage of Na2O in the solution is  56.575 .

Example 2.15 Page 25

In [15]:
# solution 

# Variables 
#(CH2OH)3
M = 92.                             # molar mass of glycerin
C = 600.                            #[mg/l] glycerin conc.

# Calculation 
TOC = (3.*12./92.)*600.             #[mg/l]

# by combustion reaction we see 3.5 O2 is required for 1 mol of (CH2OH)3
ThOD = (3.5*32.*600)/92             #[mg/l]

# Result
print "TOC = ",TOC," mg/l"
print "ThOD = ",ThOD," mg/l"
TOC =  234.782608696  mg/l
ThOD =  730.434782609  mg/l

Example 2.16 Page 25

In [16]:
# solution 

# Variables 
M1 = 100.                   # CaCO3
v1 = 2.                     # valence of CaCO3

# Calculation 
eqm1 = M1/v1                # equivalent mass of CaCO3
M2 = 162.                   # Ca(HCO3)2
v2 = 2.
eqm2 = M2/v2
m = 500.                    # [mg/l] CaCO3
C1 = (eqm2/eqm1)*m*.6       # [mg/l] conc. of Ca(HCO3)2
M3 = 146.3                  # Mg(HCO3)2
v3 = 2.
eqm3 = M3/v3
C2 = (eqm3/eqm1)*m*.4       #[mg/l] conc. of Mg(HCO3)2

# Result
print "Actual concentration of CaHCO32 in the sample\
 water is ",C1," mg/l and of MgHCO32 is ",C2," mg/l."
Actual concentration of CaHCO32 in the sample water is  486.0  mg/l and of MgHCO32 is  292.6  mg/l.

Example 2.17 Page 26

In [17]:
# solution 

# Variables 
S = .68                 # sulphur content by mass
d = .85                 # kg/l

# Calculation 
s = (S*d*10**6)/100.    # [mg/l] or [ppm]

# Result
print "Sulphur content in LDO is ",s," ppm."
Sulphur content in LDO is  5780.0  ppm.

Example 2.18 Page 26

In [18]:
# solution 

# Variables 
m1 = 100.                    #[kg] solution (basis)
m2 = 20.                     #[kg] NaCl
d = 1.127                    #[kg/l]

# Calculation 
V = m1/d                     # volume of 100 kg sol.
n = (m2/58.5)*100.           # [mol] NaCl
M = n/V                      #[M]
v = 1.                       # valence of NaCl so,
N = M
m = n/(m1-m2)                #[mol/kg]

# Result
print "Molarity = ",M,"M"
print "Normality = ",N,"N"
print "Molality = ",m," mol/kg."
Molarity =  0.385299145299 M
Normality =  0.385299145299 N
Molality =  0.42735042735  mol/kg.

Example 2.19 Page 27

In [19]:
# solution 

# Variables 
m1 = 100.                #[kg] TEA solution (basis)
m2 = 50.                 #[kg] TEA
M1 = 149.                # molar mass of TEA
d = 1.05                 #[kg/l]

# Calculation 
V = m1/d                 # volume of 100 kg sol.
n = (m2/M1)*100.         # [mol] NaCl
M = n/V                  #[M]

# Result
print "Molarity of solution = ",M," M."
Molarity of solution =  0.352348993289  M.

Example 2.20 Page 27

In [20]:
# solution 

# Variables 
m1 = 100.                   #[kg] MEA solution (basis)
m2 = 20.                    #[kg] MEA
M1 = 61.                    # molar mass of MEA
n1 = m2/M1                  # [kmol]
C = .206 

# Calculation 
n2 = C*n1                   #[kmol] dissolved CO2
m3 = n2*44                  # [kg] mass of CO2
n3 = (m1-m2-m3)/18          #[kmol] water
n = (n2/(n1+n2+n3))*100.
m = (m3/100)*100.

# Result
print "Mass percent of CO2 = ",m," and Mol percent = ",n,"."
Mass percent of CO2 =  2.97180327869  and Mol percent =  1.44480291766 .

Example 2.21 Page 27

In [21]:
import math
# solution 
# Variables 
#HOCl
Ma = .1                     #molarity

# Calculation 
Ka = 9.6*10**-7
C = (Ma*Ka)**.5             # conc. of H+ ions
pH = -math.log10(C)

# Result
print "pH of the sol is ",pH,"."
pH of the sol is  3.50886438348 .

Example 2.22 Page 39

In [2]:
# solution 
# Variables 
n = 100.                     # [mol] air (basis)
n1 = 21.                     #[mol] O2
n2 = 78.                     #[mol] N2
n3 = 1.                      #[mol] Ar
M1 = 31.9988                 # O2
M2 = 28.0134                 # N2
M3 = 39.948                  # Ar

# Calculation 
m1 = n1*M1
m2 = n2*M2
m3 = n3*M3
Ma = (m1+m2+m3)/n

# Result
print "average molar mass of air is ",Ma," g."
average molar mass of air is  28.96968  g.

Example 2.23 Page 39

In [23]:
# solution 
# Variables 
# (a)
print "a  ",
n = 100.                         # [kmol] cracked gas (basis)
n1 = 45.                         # methane
n2 = 10.                         # ethane
n3 = 25.                         # ethylene
n4 = 7.                          # propane
n5 = 8.                          # propylene
n6 = 5.                          # n-butane
M1 = 16.                    
M2 = 30.
M3 = 28.
M4 = 44.
M5 = 42.
M6 = 58.

# Calculation 
m1 = n1*M1
m2 = n2*M2
m3 = n3*M3
m4 = n4*M4
m5 = n5*M5
m6 = n6*M6
m = m1+m2+m3+m4+m5+m6
M = m/n

# Result
print "Average molar mass of gas is ",M," g."
#(b)
print "b  ",

# composition
p1 = (m1/m)*100.
p2 = m2*100./m
p3 = m3*100./m
p4 = m4*100./m
p5 = m5*100./m
p6 = m6*100./m
print "   GAS            Mass Percent  "
print "  Methane         ",p1
print "  Ethane          ",p2
print "  Ethylene        ",p3
print "  Propane         ",p4
print "  Propylene       ",p5
print "  n-Butane        ",p6
# (c)
print "c  ",
# specific gravity
g = M/28.97
print "Specific gravity is ",g,"."
a   Average molar mass of gas is  26.54  g.
b      GAS            Mass Percent  
  Methane          27.128862095
  Ethane           11.3036925396
  Ethylene         26.3752825923
  Propane          11.6051243406
  Propylene        12.6601356443
  n-Butane         10.9269027882
c   Specific gravity is  0.916120124266 .

Example 2.24 Page 40

In [24]:
# solution 
# Variables 
p = 100.                     #[bar]
T = 623.15                   #[K]
R = .083145

# Calculation 
V = R*T/p                    # [l/mol] molar volume
v = V/18.0153 

# Result 
print "Specific volume = ",v," m**3/kg."
Specific volume =  0.0287598911758  m**3/kg.

Example 2.25 Page 40

In [3]:
# solution 
# Variables 
p = 4.                   #[bar]
T = 773.15               #[K]
R = .083145
V = R*T/p                # [l/mol] molar volume
print "Molar volume = ",V," l/mol.  "

# Calculation 
 # using appendix III
 # calculating Tc and Pc of different gases according to their mass fractions
Tc1 = .352*32.20            # H2
Tc2 = .148*190.56           # methane
Tc3 = .128*282.34           #ethylene
Tc4 = .339*132.91           # CO
Tc5 = .015*304.10           # CO2
Tc6 = .018*126.09           # N2
Tc = Tc1+Tc2+Tc3+Tc4+Tc5+Tc6            # Tc of gas

 # similarly finding Pc
Pc1=.352*12.97 
Pc2=.148*45.99
Pc3=.128*50.41
Pc4=.339*34.99
Pc5=.015*73.75
Pc6=.018*33.94
Pc=Pc1+Pc2+Pc3+Pc4+Pc5+Pc6              # Pc of gas
a = (27*R**2*Tc**2)/(64*Pc)             # [bar/mol**2]
b = (R*Tc)/(8*Pc)                       # l/mol

# substituting these values in vanderwall eq and solving by Newton Rhapson method we get
V = 15.74                               # [l/mol]

# Result
print "by Vanderwall eq molar volume = ",V," l/mol"
Molar volume =  16.0708891875  l/mol.  
by Vanderwall eq molar volume =  15.74  l/mol

Example 2.26 Page 43

In [26]:
# solution 
# Variables 
m = 6.5065                      #[g] mixture (basis)
Pv = 2.175                      #[kPa] V.P. of water over KOH
Pa = 102.5-2.175                #[kPa] Partial P of n-butane and 1butene
V = 415.1*10**-3                #[l]
R = 8.314472
T = 296.4                       #[K]

# Calculation 
n = (Pa*V)/R*T                  # moles of butene and butane
n1 = n*.431                     # n-butane
m1 = n1*58                      # [g]
n2 = n-n1                       # 1 butene
m2 = n2*56                      #[g]
m3 = m-m1                       # [g] furfural
n3 = m3/96.

# Result
print "component        mol percent        mass percent"
print " n-Butane       ",n1/n*100,"        ",m1/m*100
print " 1-Butene       ",n2/n*100,"        ",m2/m*100
print " Furfural       %.4f"%(n3/n*100),"     ",m1/m*100
component        mol percent        mass percent
 n-Butane        43.1          570378.642948
 1-Butene        56.9          727039.966353
 Furfural       -26.0350       570378.642948

Example 2.27 Page 44

In [27]:
# solution 

# Variables 
P = 5.7+1.01                    #[bar] absolute total P

# Calculation 
# using Roult's law
vp = 3.293*.7737                #[kPa] vap P of furfural
# using Dalton's law of partial P
n1 = vp/(P*100)                 # mol fraction of furfural
n2 = 1-n1                       # mol fraction of 1 -butene

# Result
print "mol fraction of Furfural is ",n1,"mol fraction of 1-Butene is ",n2,"."
mol fraction of Furfural is  0.00379701058122 mol fraction of 1-Butene is  0.996202989419 .

Example 2.28 Page 44

In [28]:
# solution 

# Variables 
P = 100.                     #[kPa] total P
Pw = 2.5326                  #[kPa] V.P> of water at dew point

# Calculation 
#absolute humity = mass of water vapour/ mass of dry air
H = (Pw/(P-Pw))*(18.0153/28.9697)       # absolute humidity

# Result
print "absolute humidity = ",H,"."
absolute humidity =  0.0161586369044 .

Example 2.29 Page 45

In [29]:
# solution 

# Variables 
#Ti-Tf = mu*(Pi-Pf)
Pi = 20.7                   #[bar]
Pf = 8.7                    # [bar]
mu = 1.616                  #[K/bar]
Ti = 355.15                 #[K]

# Calculation 
Tf = Ti-mu*(Pi-Pf)

# Result
print "Outlet temperature is ",Tf," K"
Outlet temperature is  335.758  K