1
2
3
4
5
6
7
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
|
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 6:The Question of Ideality"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.2,Page no:144"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Find molar volume of CO2\n",
"\n",
"from scipy.optimize import fsolve\n",
"\n",
"#Variable declaration:\n",
"#For CO2:\n",
"a=3.61 #atm L**2 mol**-2\n",
"b=4.29*10**-2 #L mol**-1\n",
"R=0.082 #L atm K**-1 mol**-1\n",
"T=500 #K\n",
"P=100 #atm\n",
"\n",
"#CALCULATION\n",
"\n",
"#(P+a/Vm^2)(Vm-b)=RT\n",
"#or Vm^2(P+a/Vm^2)(Vm-b)=RTVm^2\n",
"#or P*Vm**3+a*Vm-Pb*Vm**2-a*b=Rt*Vm**2\n",
"#or Vm^^3-(b+RT/P)Vm**2+a/P*Vm-(a*b)/P=0\n",
"#Let\n",
"C1=b+(R*T/P) #L mol**-1 [aSsume]\n",
"C2=a/P #L^2 mol^-2 [assume]\n",
"C3=C2*b #L^3mol**-3\n",
"def f(x):\n",
" return(x**3-C1*x**2+C2*x-C3)\n",
"x=fsolve(f,0.3)\n",
"\n",
"#RESULT\n",
"\n",
"print \"x=\",round(x,3)\n",
"Vm=round(x,3)\n",
"print\"Therefore,the value of molar volume,Vm=\",Vm,\"L mol^-1\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"x= 0.366\n",
"Therefore,the value of molar volume,Vm= 0.366 L mol^-1\n"
]
}
],
"prompt_number": 4
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.5,Page no:149"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#example 6.5\n",
"#To find the fugacity and fugacity coefficient\n",
"#Variable declaration\n",
"b=0.0391 \t\t\t#Van der waals constant[dm3/mol]\n",
"R=0.082 \t\t\t#Universal gas constant[dm3*atm/mol]\n",
"P2=1000 \t\t\t#pressure [atm]\n",
"P1=0 \t\t\t\t#pressure [atm]\n",
"T=1273\t\t \t\t#Temperature [K]\n",
"import math\n",
"#Calculation\n",
"\n",
"x=b*(P2-P1) \n",
"y=R*T \n",
"fc=math.exp(x/y) \t\t#fugacity coefficient\n",
"\n",
"f=P2*fc #fugacity[atm]\n",
"#Result\n",
"print\"The fugacity coefficient is\",round(fc,3) \n",
"print\"The fugacity is\",round(f),\"atm\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The fugacity coefficient is 1.454\n",
"The fugacity is 1454.0 atm\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.10,Page no:"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#example 6.10\n",
"#To find the partial pressure of CO2 gas \n",
"#Variable declaration\n",
"m1=0.03 #mass of CO2(g)[gm]\n",
"w1=44.01 #molecular weight of CO2(g)[gm/mol]\n",
"m2=250 #mass of water[gm]\n",
"w2=18.02 #molecular weight of water[gm/mol]\n",
"k=1.25*10**6 #Henry's law constant[Torr]\n",
"T=298 #Temperature[K]\n",
"#Calculation\n",
"\n",
"n1=m1/w1 #no. of moles of CO2\n",
"n2=m2/w2 #no. of moles of water\n",
"x1=n1/(n1+n2) #mole fraction of CO2\n",
"Pco2=k*x1 #Partial pressure of CO2[Torr]\n",
"#Result\n",
"print\"The partial pressure of CO2 gas is\",round(Pco2,2),\"Torr\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The partial pressure of CO2 gas is 61.41 Torr\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.11,Page no:161"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#example 6.11\n",
"\n",
"#To find the Volume of the solution\n",
"#Variable declaration\n",
"W=1000 \t\t\t#Total mass of a solution[gm]\n",
"x1=0.5 \t\t\t#mole fraction of Chloroform\n",
"x2=0.5 \t\t\t#mole fraction of Acetone\n",
"V1m=80.235 \t\t#Partial molar volume of chloroform[cm3/mol]\n",
"V2m=74.166 \t\t#Partial molar volume of Acetone[cm3/mol]\n",
"M1=119.59 \t\t#molecular weight of chloroform[gm/mol]\n",
"M2=58 \t\t\t#molecular weight of Acetone[gm/mol]\n",
"#Calculation\n",
"\n",
"nT=W/(x1*M1+x2*M2) \t#Total no. of moles\n",
"V=nT*(x1*V1m+x2*V2m) \t#Total volume[cm3]\n",
"#Result\n",
"print\"The volume of the solution is\",round(V,1),\"cm^3 (approx)\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The volume of the solution is 869.4 cm^3 (approx)\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.12,Page no:163"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#example 6.12\n",
"#to find the excess volume \n",
"#Variable declaration\n",
"x1=0.5 #mole fraction of chloroform\n",
"x2=0.5 #mole fraction of p-xylene\n",
"T=298 #Temperature[K]\n",
"#Calculation\n",
"\n",
"Ve=x1*x2*(0.585+0.085*(x1-x2)-0.165*(x1-x2)**2) #Excess volume measured by using a dilatometer\n",
"#Result\n",
"print\"Ve/(cm3.mol**-1) = \",round(Ve,3) "
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Ve/(cm3.mol**-1) = 0.146\n"
]
}
],
"prompt_number": 4
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.14,Page no:169"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#example 6.14\n",
"\n",
"#To find the activity , molality of the electrolytes\n",
"#Variable declaration\n",
"m1=0.01 \t\t#molality[m]\n",
"v11=1.0 \n",
"v12=2.0 \n",
"Y1=0.71 \n",
"m2=0.005 \t\t#molality[m]\n",
"v21=1.0 \n",
"v22=1.0 \n",
"Y2=0.53 \n",
"\n",
"#Calculation\n",
"\n",
"v1=(v11)+(v12) \n",
"v2=(v21)+(v22) \n",
"a1=(m1**v1)*(v11**v11)*(v12**v12)*(Y1**v1) \n",
"a2=(m2**v2)*(v21**v21)*(v22**v22)*(Y2**v2) \n",
"x=1.0/v1 \n",
"a1m=a1**x \n",
"m1m=m1*(v11**v11*v12**v12)**x #molality[m]\n",
"y=1.0/v2 \n",
"m2m=m2*(v21*v21*v22**v22)**y #molality[m]\n",
"a2m=a2**y \n",
"#Result\n",
"print\"The activity of the electrolyte ZnCl2 is\",round(a1,8)\n",
"print\"The activity of the electrolyte CuSO4 is\",round(a2,8)\n",
"#print\"The mean activity of ZnCl2 is\",a1m\n",
"print\"The mean molality of ZnCl2 in [m]\",round(m1m,4)\n",
"#print\"The mean activity of CuSO4 is\",a2m \n",
"print\"The mean molality of CuSO4 in [m]\",m2m \n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The activity of the electrolyte ZnCl2 is 1.43e-06\n",
"The activity of the electrolyte CuSO4 is 7.02e-06\n",
"The mean molality of ZnCl2 in [m] 0.0159\n",
"The mean molality of CuSO4 in [m] 0.005\n"
]
}
],
"prompt_number": 5
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.15,Page no:172"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#example 6.15\n",
"\n",
"#To find the molecular weight of sucrose\n",
"#Variable declaration\n",
"m2=3 \t\t\t#mass of the sucrose[gm]\n",
"m1=0.1 \t\t\t#mass of water [Kg]\n",
"Kf=1.86 \t\t#cryoscopic constant of water[K*Kg/mol]\n",
"dTf=0.16 \t\t#Lowering in freezing point[K]\n",
"#Calculation\n",
"\t\n",
"a=m1*dTf \n",
"b=Kf*m2 \n",
"M2=b/a \t\t\t#molecular weight\n",
"#Result\n",
"print\"M2=molecular weight , then M2=\",M2 "
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"M2=molecular weight , then M2= 348.75\n"
]
}
],
"prompt_number": 6
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.16,Page no:173"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#example 5.16\n",
"\n",
"#To find the molecular formula of sulphur\n",
"#Variable declaration\n",
"dTf=0.088 \t\t\t#Lowering in freezing point[K]\n",
"m2=0.45 \t\t\t#mass of sulphur[gm]\n",
"m1=0.09955 \t\t\t#mass of benzene[gm]\n",
"Kf=5.07 \t\t\t#cryoscopic constant for benzene[K*Kg/mol]\n",
"#Calculation\n",
"\n",
"a=m1*dTf \n",
"b=Kf*m2 \n",
"M2=b/a \t\t\t\t#molecular weight of sulphur\n",
"#Result\n",
"print\"The molecular weight of sulphur is\",round(M2,1) \n",
"x=M2/32 \t\t\t#no. of sulphur atoms\n",
"print\"\\n The molecular formula of sulphur is S\",round(x) "
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The molecular weight of sulphur is 260.4\n",
"\n",
" The molecular formula of sulphur is S 8.0\n"
]
}
],
"prompt_number": 7
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.17,Page no:174"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#example 6.17\n",
"#To find the molar mass of macromolecule\n",
"#Variable declaration\n",
"m2=1.35 \t\t\t#mass of a macromolecule[gm]\n",
"V=100\t \t\t\t#volume of solution[cm^3]\n",
"R=82 \t\t\t\t#Universal gas constant[atm.cm^3.K^-1]\n",
"T=300 \t\t\t\t#Temperature[K]\n",
"II=9.9 \t\t\t\t#osmotic pressure of the solution[cm]\n",
"d=1 \t\t\t\t#density\n",
"p=1013250 \t\t\t#Atmospheric pressure\n",
"g=980.67 \t\t\t#gravitational field\n",
"#Calculation\n",
"\n",
"\n",
"a=m2*R*T*p \n",
"b=V*9.9*d*g \n",
"M2=a/b #molar mass of macromolecule\n",
"#Result\n",
"print\" M2 = molar mass of macromolecule , therefore M2 = \",round(M2),\"g.mol^-1\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" M2 = molar mass of macromolecule , therefore M2 = 34660.0 g.mol^-1\n"
]
}
],
"prompt_number": 8
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.18,Page no:175"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#example 6.18\n",
"\n",
"#To find the osmotic pressure of a solution\n",
"#Variable declaration\n",
"R=82 \t\t\t#Universal gas constant[atm.ml.K^-1.mol^-1]\n",
"T=298 \t\t\t#Temperature[K]\n",
"V=250 \t\t\t#volume of water[ml]\n",
"m2=2.6 \t\t\t#mass of the protein\n",
"M2=85000 \t\t#molar mass of protein[g.mol^-1]\n",
"\n",
"#Calculation\n",
"\t\n",
"n2=m2/M2 \t\t\t#no. of moles of protein\n",
"II=(n2*R*T)/V \t\t\t#Osmotic pressure of a solution[atm]\n",
"#Result\n",
"print\"The osmotic pressure is\",round(II,5),\"atm \"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The osmotic pressure is 0.00299 atm \n"
]
}
],
"prompt_number": 9
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.19,Page no:175"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#example 6.19\n",
"#To find the Ebullioscopic constant of water\n",
"#Variable declaration\n",
"R=8.314 \t\t\t#Universal gas constant[J.K**-1.mol**-1]\n",
"Tb=373.15 \t\t\t#Boiling point temperature[K]\n",
"M1=0.018 \t\t\t# mass of water[kg]\n",
"Hvap=40.7 \t\t\t#Enthalpy of vaporization[KJ.mol**-1]\n",
"#Calculation\n",
"\n",
"a=R*0.001*Tb**2*M1 \n",
"b=Hvap \n",
"Kb=a/b \t\t\t\t#Ebullioscopic constant of water[K.Kg.mol**-1]\n",
"#Result\n",
"print\"The Ebullioscopic constant of water is\",round(Kb,2),\"K.Kg.mol-1\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The Ebullioscopic constant of water is 0.51 K.Kg.mol-1\n"
]
}
],
"prompt_number": 10
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.20,Page no:176"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#example 6.20\n",
"#To find the value of activity coefficient\n",
"print\"CaF2(s)<=>CaF2(aq)<=>Ca+2(aq) + 2F-(aq)\"\n",
"\n",
"#Variable declaration\n",
"Ksp=4.0*(10**-11) \t#Solubility product of sparingly soluble salt CaF2\n",
"#Calculation\n",
"\n",
"x=Ksp/4.0 \n",
"Cs=x**(1.0/3.0) \t\t#Solubility \n",
"y=Cs**2 \n",
"Y=(x/y)**(1.0/3.0) \t\t#activity coefficient\n",
"#Result\n",
"print\"The activity coefficient is\",Y \n",
"print\"NOTE:please note that the value of Cs is wrongly calculated as 4.64*10^-11 in book\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"CaF2(s)<=>CaF2(aq)<=>Ca+2(aq) + 2F-(aq)\n",
"The activity coefficient is 0.0599484250319\n",
"NOTE:please note that the value of Cs is wrongly calculated as 4.64*10^-11 in book\n"
]
}
],
"prompt_number": 11
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.21,Page no:177"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#example 6.21\n",
"\n",
"#To find the mean activity coefficient of ZnCl2 solution\n",
"#Variable declaration\n",
"R=8.314 \t\t\t#Universal gas constant[J/K/mol]\n",
"T=298 \t\t\t\t#Temperature[K]\n",
"F=96500 \t\t\t#Faraday's constant\n",
"Eo=0.98 \t\t\t#Standard e.m.f of the cell[Volts]\n",
"E=1.16 \t\t\t\t#e.m.f of the cell[Volts]\n",
"m=0.01 \n",
"import math\n",
"#Calculation\n",
"\n",
"a=R*T \n",
"b=2*F \n",
"x=a/b \n",
"Y=math.exp((Eo-E-(x*math.log(4*m*m*m)))/(3*x)) #mean activity coefficient\n",
"#Result\n",
"print\"The mean activity coefficient is\",round(Y,2) "
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The mean activity coefficient is 0.59\n"
]
}
],
"prompt_number": 12
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.22,Page no:184"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#example 6.22\n",
"#To find the ionic strength in a solution\n",
"#Variable declaration\n",
"M1=0.01 \t\t\t#no. of moles of KCl\n",
"M2=0.005 \t\t\t#no. of moles of MgCl2\n",
"M3=0.002 \t\t\t#no. of moles of MgSO4\n",
"M=0.1 \t\t\t\t#mass of water[Kg]\n",
"z11=1 \n",
"z12=1 \n",
"z21=2 \n",
"z22=1 \n",
"z31=2 \n",
"z32=2 \n",
"#Calculation\n",
"\t\n",
"m1=M1/M \t\t\t#molality of KCL[m]\n",
"m2=M2/M \t\t\t#molality of MgCl2[m]\n",
"m3=M3/M \t\t\t#molality of MgSO4[m]\n",
"\n",
"I=0.5*((m1*z11**2+m1*z12**2+m2*z21**2+2*m2*z22**2+m3*z31**2+m3*z32**2)) #[mol/Kg]\n",
"#Result\n",
"print\"The Ionic strength of a solution is\",I,\"mol/Kg\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The Ionic strength of a solution is 0.33 mol/Kg\n"
]
}
],
"prompt_number": 13
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.23,Page no:185"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#example 6.23\n",
"#To find the mean activity coefficient\n",
"#Variable declaration\n",
"T=298 \t\t\t\t#Temperature[K]\n",
"P=1 \t\t\t\t#pressure [atm]\n",
"m=0.02\t \t\t\t#Ionic strength of HCl solution in CH3OH[mol/Kg]\n",
"E=32.6 \t\t\t\t#Di-electric constant\n",
"d=0.787 \t\t\t#Density[gm/cm3]\n",
"#Calculation\n",
"\t\n",
"I=0.5*(0.02*1*1+0.02*1*1) \t#Ionic strength of HCl solution[mol/Kg]\n",
"a=I*d \n",
"b=(E**3)*(298**3) \n",
"x=(a/b)**0.5 \n",
"Y=10**(-1.825*1000000*1*1*x) \t#mean activity coefficient\n",
"#Result\n",
"print\"The mean activity coefficient is\",round(Y,2) "
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The mean activity coefficient is 0.58\n"
]
}
],
"prompt_number": 14
}
],
"metadata": {}
}
]
}
|