Академический Документы
Профессиональный Документы
Культура Документы
Engineering Chemistry
by P. N. Dave and S. G. Pillai1
Created by
Vishwa Shah
Instrumentation and Control
Instrumentation Engineering
Institute of Technology, Nirma University
College Teacher
None
Cross-Checked by
Lavitha Pereira
July 17, 2014
1 Funded
Book Description
Title: Engineering Chemistry
Author: P. N. Dave and S. G. Pillai
Publisher: Mahajan Publishing, Ahmedabad
Edition: 1
Year: 2011
ISBN: 978-93-81256-28-2
Scilab numbering policy used in this document and the relation to the
above book.
Exa Example (Solved example)
Eqn Equation (Particular equation of the above book)
AP Appendix to Example(Scilab Code that is an Appednix to a particular
Example of the above book)
For example, Exa 3.51 means solved example 3.51 of this book. Sec 2.3 means
a scilab code whose theory is explained in Section 2.3 of the book.
Contents
List of Scilab Codes
1 Water
2 Fuel
17
22
6 Electrochemical System
23
1.1
1.2
1.3
1.4
1.5
1.6
1.7
1.8
1.9
1.10
1.11
2.1
2.2
2.3
2.4
2.5
2.6
2.7
2.8
5.1
6.1
6.2
6.3
6.4
6.5
6.6
6.7
6.8
Calculating Hardness . . . . . . . .
Calculating Mass . . . . . . . . . . .
Calculating Hardness . . . . . . . .
Calculating Hardness . . . . . . . .
Calculating Hardness . . . . . . . .
Calculating Lime and Soda . . . . .
Calculating Hardness and Lime Soda
Calculating Lime and Soda . . . . .
Calculating Lime and Soda . . . . .
Calculating Volume . . . . . . . . .
Calculating Hardness . . . . . . . .
Calculating GCV and NCV . . . . .
Calculating GCV and NCV . . . . .
Calculating GCV and NCV . . . . .
Calculating GCV and NCV . . . . .
Proximate Analysis . . . . . . . . .
Calculating percentage C and H . .
Calculating percentage S and N . . .
Calculating percentage S . . . . . .
Calculating VI . . . . . . . . . . . .
Calculating emf . . . . . . . . . . .
Calculating pH . . . . . . . . . . . .
Calculating pH . . . . . . . . . . . .
Calculating potential . . . . . . . . .
Calculating solubility . . . . . . . .
Calculating Ksp . . . . . . . . . . .
Calculating Kc . . . . . . . . . . . .
Calculating Kc . . . . . . . . . . . .
4
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
6
6
7
8
9
10
12
13
14
15
16
17
17
18
19
19
20
21
21
22
23
23
24
24
24
25
25
26
Exa
Exa
Exa
Exa
6.9
6.10
6.11
6.12
Calculating
Calculating
Calculating
Calculating
deltaG and Kc .
Kc . . . . . . . .
Ecell and Energy
Kc . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
26
27
27
28
Chapter 1
Water
// c a l c u l a t i n g h a r d n e s s
// Example 1 . 1
clc
clear
// 100gm o f CaCO3 = 136gm o f CaSO4
m =204 // mass o f t h e s u b s t a n c e
wt =136 // m o l e c u l a r mass
Eq =( m *100) / wt // E q u i v a l e n t s o f CaCO3
printf ( Thus E q u i v a l e n t s o f CaCO3 = %3 . 2 f mg/L o r
ppm , Eq )
litre
is
%2 . 5 f g /L , m1 )
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
MgSO4
T = Th + Ph // T o t a l h a r d n e s s
printf ( Thus ( i ) i n mg/L Temporary h a r d n e s s = %2 . 2 f
, Th )
printf ( \n and permanent h a r d n e s s = %2 . 2 f , Ph )
printf ( \n and t o t a l h a r d n e s s = %2 . 2 f ,T )
printf ( \n\n ( i i ) i n ppm Temporary h a r d n e s s = %2 . 2 f ,
Th )
printf ( \n and permanent h a r d n e s s = %2 . 2 f , Ph )
printf ( \n and t o t a l h a r d n e s s = %2 . 2 f ,T )
ThC = Th *0.07 // t e m p e r o r y h a r d n e s s i n d e g r e e C l
PhC = Ph *0.07 // permanent h a r d n e s s i n d e g r e e C l
TC = T *0.07 // t o t a l h a r d n e s s i n d e g r e e C l
ThF = Th *0.1 // t e m p e r o r y h a r d n e s s i n d e g r e e F r
PhF = Ph *0.1 // permanent h a r d n e s s i n d e g r e e F r
TF = T *0.1 // t o t a l h a r d n e s s i n d e g r e e F r
printf ( \n\n ( i i i ) i n d e g r e e C l Temporary h a r d n e s s =
%2 . 4 f , ThC )
printf ( \n and permanent h a r d n e s s = %2 . 4 f , PhC )
printf ( \n and t o t a l h a r d n e s s = %2 . 4 f , TC )
printf ( \n\n ( i v ) i n d e g r e e F r Temporary h a r d n e s s = %2
. 4 f , ThF )
printf ( \n and permanent h a r d n e s s = %2 . 4 f , PhF )
printf ( \n and t o t a l h a r d n e s s = %2 . 4 f , TF )
// c a l c u l a t i n g h a r d n e s s
// Example 1 . 4
clc
clear
// For Ca (HCO3) 2 ,
q1 =40.5 // q u a n t i t y
wt1 =162 // m o l e c u l a r w e i g h t
M1 =100/ wt1 // m u l t i p l i c a t i o n f a c t o r
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
clear
// For Ca (HCO3) 2 ,
q1 =12.5 // q u a n t i t y
wt1 =162 // m o l e c u l a r w e i g h t
M1 =100/ wt1 // m u l t i p l i c a t i o n f a c t o r
Eq1 = M1 * q1 //CaCO3 e q u i v a l e n t s i n mg/L
// For CaCl2 ,
q2 =8.2 // q u a n t i t y
wt2 =111 // m o l e c u l a r w e i g h t
M2 =100/ wt2 // m u l t i p l i c a t i o n f a c t o r
Eq2 = M2 * q2 //CaCO3 e q u i v a l e n t s i n mg/L
// For MgSO4 ,
q3 =2.6 // q u a n t i t y
wt3 =120 // m o l e c u l a r w e i g h t
M3 =100/ wt3 // m u l t i p l i c a t i o n f a c t o r
Eq3 = M3 * q3 //CaCO3 e q u i v a l e n t s i n mg/L
Th = Eq1 // Temperory h a r d n e s s due t o Ca (HCO3) 2 i n ppm
Ph = Eq3 + Eq2 // Permanent h a r d n e s s due t o MgSO4 and
CaCl2 i n ppm
T = Th + Ph // T o t a l h a r d n e s s i n ppm
TF = T *0.1 // T o t a l h a r d n e s s i n d e g r e e F r
printf ( Thus i n ppm Temporary h a r d n e s s = %2 . 2 f ppm ,
Th )
printf ( \n and permanent h a r d n e s s = %2 . 2 f ppm , Ph )
printf ( \n i n d e g r e e F r t o t a l h a r d n e s s = %3 . 3 f , TF )
10
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
M1 =100/ wt1 // m u l t i p l i c a t i o n f a c t o r
Eq1 = M1 * q1 //CaCO3 e q u i v a l e n t s i n mg/L
// For Mg(HCO3) 2 ,
q2 =7.3 // q u a n t i t y
wt2 =146 // m o l e c u l a r w e i g h t
M2 =100/ wt2 // m u l t i p l i c a t i o n f a c t o r
Eq2 = M2 * q2 //CaCO3 e q u i v a l e n t s i n mg/L
// For CaSO4 ,
q3 =6.8 // q u a n t i t y
wt3 =136 // m o l e c u l a r w e i g h t
M3 =100/ wt3 // m u l t i p l i c a t i o n f a c t o r
Eq3 = M3 * q3 //CaCO3 e q u i v a l e n t s i n mg/L
// For MgCl2 ,
q4 =5.7 // q u a n t i t y
wt4 =95 // m o l e c u l a r w e i g h t
M4 =100/ wt4 // m u l t i p l i c a t i o n f a c t o r
Eq4 = M4 * q4 //CaCO3 e q u i v a l e n t s i n mg/L
// For MgSO4 ,
q5 =9 // q u a n t i t y
wt5 =120 // m o l e c u l a r w e i g h t
M5 =100/ wt5 // m u l t i p l i c a t i o n f a c t o r
Eq5 = M5 * q5 //CaCO3 e q u i v a l e n t s i n mg/L
// SiO2 and NaCl n e g l e c t e d
V =25000 // Volume o f w a t e r i n l i t r e s
L =74*( Eq1 +(2* Eq2 ) + Eq4 + Eq5 ) /100 // l i m e r e q u i r e m e n t i n
mg/L
L1 = L * V /1000000 // Lime r e q u i r e d f o r s o f t e n i n g 2 5 0 0 0
l i t r e s i n kg
S =106*( Eq3 + Eq4 + Eq5 ) /100 // s o d a r e q u i r e m e n t i n mg/L
S1 = S * V /1000000 // s o d a r e q u i r e d f o r s o f t e n i n g 2 5 0 0 0
l i t r e s i n kg
printf ( Thus amount o f l i m e r e q u i r e d t o s o f t e n 2 5 0 0 0
l i t r e s o f w a t e r = %2 . 5 f kg \n , L1 )
printf ( and amount o f s o d a r e q u i r e d t o s o f t e n 2 5 0 0 0
l i t r e s o f w a t e r = %2 . 5 f kg \n , S1 )
11
// c a l c u l a t i n g l i m e s o d a and h a r d n e s s
// Example 1 . 7
clc
clear
// For Ca (HCO3) 2 ,
q1 =40.5 // q u a n t i t y
wt1 =162 // m o l e c u l a r w e i g h t
M1 =100/ wt1 // m u l t i p l i c a t i o n f a c t o r
Eq1 = M1 * q1 //CaCO3 e q u i v a l e n t s i n mg/L
// For Mg(HCO3) 2 ,
q2 =36.5 // q u a n t i t y
wt2 =146 // m o l e c u l a r w e i g h t
M2 =100/ wt2 // m u l t i p l i c a t i o n f a c t o r
Eq2 = M2 * q2 //CaCO3 e q u i v a l e n t s i n mg/L
// For MgSO4 ,
q3 =30 // q u a n t i t y
wt3 =120 // m o l e c u l a r w e i g h t
M3 =100/ wt3 // m u l t i p l i c a t i o n f a c t o r
Eq3 = M3 * q3 //CaCO3 e q u i v a l e n t s i n mg/L
// For CaSO4 ,
q4 =34 // q u a n t i t y
wt4 =136 // m o l e c u l a r w e i g h t
M4 =100/ wt4 // m u l t i p l i c a t i o n f a c t o r
Eq4 = M4 * q4 //CaCO3 e q u i v a l e n t s i n mg/L
// For CaCl2 ,
q5 =27.75 // q u a n t i t y
wt5 =111 // m o l e c u l a r w e i g h t
M5 =100/ wt5 // m u l t i p l i c a t i o n f a c t o r
Eq5 = M5 * q5 //CaCO3 e q u i v a l e n t s i n mg/L
// NaCl n e g l e c t e d
V =20000 // Volume o f w a t e r i n l i t r e s
L =(74*( Eq1 +(2* Eq2 ) + Eq3 ) /100) *( V /1000) // Lime r e q u i r e d
12
33
34
35
36
37
38
39
40
41
f o r s o f t e n i n g 20000 l i t r e s i n g
S =(106*( Eq3 + Eq4 + Eq5 ) /100) *( V /1000) // s o d a r e q u i r e d
f o r s o f t e n i n g 20000 l i t r e s i n g
L1 =(100* L ) /(84*1000) // Lime r e q u i r e d f o r 84% p u r i t y
i n kg
S1 =(100* S ) /(92*1000) // Soda r e q u i r e d f o r 92% p u r i t y
i n kg
Th = Eq1 + Eq2 // Temperory h a r d n e s s due t o Mg(HCO3) 2 and
Ca (HCO3) 2
Ph = Eq3 + Eq4 + Eq5 // Permanent h a r d n e s s due t o CaSO4 and
MgSO4and CaCL2
printf ( Thus amount o f l i m e ( 8 4 p e r c e n t p u r e ) r e q u i r e d
t o s o f t e n 2 0 0 0 0 l i t r e s o f w a t e r = %2 . 5 f kg \n , L1
)
printf ( and amount o f s o d a ( 9 2 p e r c e n t p u r e ) r e q u i r e d
t o s o f t e n 2 0 0 0 0 l i t r e s o f w a t e r = %2 . 5 f kg \n , S1 )
printf ( \ n A l s o Temporary h a r d n e s s = %2 . 2 f ppm , Th )
printf ( \n and permanent h a r d n e s s = %2 . 2 f ppm , Ph )
// c a l c u l a t i n g l i m e and s o d a
// Example 1 . 8
clc
clear
// For raw w a t e r Ca+2 ,
q1 =240 // q u a n t i t y
wt1 =40 // m o l e c u l a r w e i g h t
M1 =100/ wt1 // m u l t i p l i c a t i o n f a c t o r
Eq1 = M1 * q1 //CaCO3 e q u i v a l e n t s i n mg/L
// For Mg+2 ,
q2 =96 // q u a n t i t y
wt2 =24 // m o l e c u l a r w e i g h t
M2 =100/ wt2 // m u l t i p l i c a t i o n f a c t o r
Eq2 = M2 * q2 //CaCO3 e q u i v a l e n t s i n mg/L
13
// For CO2 ,
q3 =44 // q u a n t i t y
wt3 =44 // m o l e c u l a r w e i g h t
M3 =100/ wt3 // m u l t i p l i c a t i o n f a c t o r
Eq3 = M3 * q3 //CaCO3 e q u i v a l e n t s i n mg/L
// For HCO3,
q4 =732 // q u a n t i t y
wt4 =122 // m o l e c u l a r w e i g h t
M4 =100/ wt4 // m u l t i p l i c a t i o n f a c t o r
Eq4 = M4 * q4 //CaCO3 e q u i v a l e n t s i n mg/L
// For FeSO4 . 7 H2O ,
q5 =278 // q u a n t i t y
wt5 =278 // m o l e c u l a r w e i g h t
M5 =100/ wt5 // m u l t i p l i c a t i o n f a c t o r
Eq5 = M5 * q5 //CaCO3 e q u i v a l e n t s i n mg/L
V =250000 // Volume o f w a t e r i n l i t r e s
L =(74*( Eq2 + Eq3 + Eq4 + Eq5 ) /100) *( V /1000000) // l i m e
r e q u i r e m e n t i n kg
32 S =(106*( Eq1 + Eq2 + Eq5 - Eq4 ) /100) *( V /1000000) // s o d a
r e q u i r e m e n t i n kg
33 printf ( Thus amount o f l i m e r e q u i r e d t o s o f t e n
2 5 0 0 0 0 l i t r e s o f w a t e r = %3 . 1 f kg \n ,L )
34 printf ( and amount o f s o d a r e q u i r e d t o s o f t e n 2 5 0 0 0 0
l i t r e s o f w a t e r = %3 . 1 f kg \n ,S )
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// c a l c u l a t i n g l i m e and s o d a
// Example 1 . 9
clc
clear
// For raw w a t e r Ca+2 ,
q1 =160 // q u a n t i t y
wt1 =40 // m o l e c u l a r w e i g h t
M1 =100/ wt1 // m u l t i p l i c a t i o n f a c t o r
14
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// c a l c u l a t i n g volume
// Example 1 . 1 0
15
3
4
5
6
7
8
9
10
clc
clear
v =100 // Amount o f NaCl s o l u t i o n i n l i t r e s
m =120* v // Amount o f NaCl i n g
wt =58.5*2 // m o l e c u l a r mass o f NaCl
Eq = m *100/ wt // E q u i v a l e n t s o f CaCO3 i n g
h =500 // h a r d n e s s i n ppm
V = Eq *1000/ h // w a t e r r e q u i r e d t o s o f t e n t h e z e o l i t e
softner in l i t r e s
11 printf ( Thus t h e z e o l i t e s o f t n e r can s o f t e n %5 . 2 f L
o f Hard w a t e r ,V )
16
Chapter 2
Fuel
18
13
printf ( \n and t h e n e t c a l o r i f i c v a l u e o f c o a l = %4
. 0 f k c a l / kg , NCV )
1 hr i n g
7 m3 =0.8 // mass o f r e s i d u e a f t e r h e a t i n g f o r 7 min i n g
19
m4 =0.1 // mass o f l a s t r e s i d u e
Mm = m1 - m2 // mass o f m o i s t u r e i n c o a l s a m p l e i n g
Mv = m2 - m3 // mass o f v o l a t i l e m a t t e r i n g
Ma = m4 // mass o f a s h
%m = Mm *100 // p e r c e n t a g e m o i s t u r e
%v = Mv *100 // p e r c e n t a g e o f v o l a t i l e m a t t e r
%a = Ma *100 // p e r c e n t a g e o f a s h
%c =100 -( %m + %v + %a ) // p e r c e n t a g e o f f i x e d c a r b o n
printf ( Thus ( i ) p e r c e n t a g e o f m o i s t u r e = %2 . 1 f
p e r c e n t \n , %m )
17 printf ( ( i i ) p e r c e n t a g e o f v o l a t i l e m a t t e r = %2 . 1 f
p e r c e n t \n , %v )
18 printf ( ( i i i ) p e r c e n t a g e o f a s h = %2 . 0 f p e r c e n t \n , %a
)
19 printf ( ( i v ) p e r c e n t a g e o f f i x e d c a r b o n = %2 . 0 f
p e r c e n t \n , %c )
8
9
10
11
12
13
14
15
16
20
quantitative
a n a l y s i s i n gm
wt =1.56 // w e i g h t o f c o a l s a m p l e t a k e n i n gm
v =50 -6.25 // volume o f H2SO4 u s e d
N =0.1 // n o r m a l i t y
m =0.1755 // wt o f BaSO4 ppt . o b t a i n e d
%n =( v * N *1.4) /( wt ) // p e r c e n t a g e o f n i t r o g e n
%su =( m *32*100) /( wt1 *233) // p e r c e n t a g e o f s u l p h u r
printf ( Thus ( i ) P e r c e n t a g e o f n i t r o g e n = %2 . 3 f
p e r c e n t , %n )
printf ( \n ( i i ) P e r c e n t a g e o f s u l p h u r =%2 . 3 f p e r c e n t ,
%su )
quantitative
a n a l y s i s i n gm
6 m =0.05 // wt o f BaSO4 ppt . o b t a i n e d
7 %su =( m *32*100) /( wt *233) // p e r c e n t a g e o f s u l p h u r
8 printf ( Thus P e r c e n t a g e o f s u l p h u r =%2 . 3 f p e r c e n t ,
%su )
21
Chapter 5
Lubricants and Greases
// c a l c u l a t i n g VI
// Example 5 . 1
clc
clear
L =674 // v i s c o s i t y o f low v i s c o s i t y i n d e x o i l
H =314 // v i s c o s i t y o f h i g h v i s c o s i t y i n d e x o i l
U =464 // v i s c o s i t y o f t e s t o i l i n S
VI =( L - U ) *100/( L - H ) // v i s c o s i t y i n d e x
printf ( Thus VI o f t h e o i l s a m p l e u n d e r t e s t =%2 . 2 f
, VI )
22
Chapter 6
Electrochemical System
// c a l c u l a t i n g emf
// Example 6 . 1
clc
clear
Es =1.5273 // emf o f known c e l l i n V
Ns =90 // n u l l p o i n t o f known c e l l i n cm
Nu =60 // n u l l p o i n t o f unknown c e l l i n cm
Eu = Nu * Es / Ns // Emf o f c e l l
printf ( Thus t h e emf o f c e l l = %2 . 4 f V , Eu )
23
// c a l c u l a t i n g p o t e n t i a l
// Example 6 . 4
clc
clear
Ag =1
Ksp =8.7*(10^ -17)
Agplus = sqrt ( Ksp )
X = Ag / Agplus
E1 =0.799 //E( Ag+/Ag )
E2 = E1 -(0.0591* log10 ( X ) )
printf ( Thus E( Ag+/Ag ) = %2 . 3 f V , E2 )
24
1
2
3
4
5
6
7
8
9
10
11
// c a l c u l a t i n g s o l u b i l i t y
// Example 6 . 5
clc
clear
Ecell =0.169
AgC =0.01
C1 = AgC /(10^( Ecell /0.0591) )
S = C1 *143.5 // s o l u b i l i t y o f AgCl i n g /L
Ksp = C1 ^2 // s o l u b i l i t y p r o d u c t o f AgCl i n Mol 2/L2
printf ( Thus s o l u b i l i t y o f AgCl = %e g /L ,S )
printf ( \n and Ksp = %e Mol 2/L2 , Ksp )
1
2
3
4
5
6
7
8
25
7 Ecu =0.34
8 Ecell = Eag - Ecu
9 n =2
10 Kc =10^( n * Ecell /0.059) // e q u i l i b r i u m c o n s t a n t
11 printf ( Thus t h e e q u i l i b r i u m c o n s t a n t f o r t h e
r e a c t i o n = %e , Kc )
r e a c t i o n = %e , Kc )
// c a l c u l a t i n g d e l t a G and Kc
// Example 6 . 9
clc
clear
Ecell =0.89 // i n V
n =6
F =96500 // i n 1/ mol
deltaG = - n * F * Ecell // i n C . V o r J
//Kc r e l a t e d t o d e l t a G
R =8.314 // i n J / molk
T =298 // i n K
26
r e a c t i o n = %e , Kc )
// c a l c u l a t i n g E c e l l and e n e r g y
// Example 6 . 1 1
clc
clear
Ec =0.4
Ea = -0.87
Ecell = Ec - Ea
F =96500
Wmax =(2* F * Ecell ) /1000
printf ( Thus ( i ) E c e l l = %2 . 2 f V , Ecell )
printf ( \n ( i i )Wmax= %3 . 0 f kJ , Wmax )
27
// c a l c u l a t i n g Kc
// Example 6 . 1 2
clc
clear
//E c e l l = 0 . 0 5 9 1 l o g K c / n
Ec =0.77
Ea =0.54
Ecell = Ec - Ea
n =2
Kc =10^( n * Ecell /0.059) // e q u i l i b r i u m c o n s t a n t
printf ( Thus t h e e q u i l i b r i u m c o n s t a n t f o r t h e
r e a c t i o n = %e , Kc )
28