summaryrefslogtreecommitdiff
path: root/Chemical_Engineering_Thermodynamics/ch6_2.ipynb
blob: 71808e1572810e1fc3770dde1256e98b54eb9948 (plain)
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
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
{
 "metadata": {
  "name": "",
  "signature": "sha256:5875fd58ba5a3eb4a34d80c6cbf01fc2219f223f8352a521a425e02950a18a26"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 6 :Chemical reactions"
     ]
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 6.1  Page Number : 217"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "import math \n",
      "from scipy.integrate import quad \n",
      "\t\t\t\n",
      "\n",
      "# Variables\n",
      "T_1 = 298.15;\t\t\t#[K] - Smath.tan(math.radiansard temperature\n",
      "T_2 = 880;\t\t\t#[K] - Reaction temperature\n",
      "\n",
      "a_SO2 = 6.157;\n",
      "a_SO3 = 3.918;\n",
      "a_O2 = 6.732;\n",
      "b_SO2 = 1.384*10**(-2);\n",
      "b_SO3 = 3.483*10**(-2);\n",
      "b_O2 = 0.1505*10**(-2);\n",
      "c_SO2 = -0.9103*10**(-5);\n",
      "c_SO3 = -2.675*10**(-5);\n",
      "c_O2 = -0.01791*10**(-5);\n",
      "d_SO2 = 2.057*10**(-9);\n",
      "d_SO3 = 7.744*10**(-9);\n",
      "\n",
      "delta_H_rkn_298 = -23.45*10**(3);\t\t\t#[cal] - Rkn enthalpy at 298.15 K\n",
      "delta_H_SO2_for_298 = -70.94*10**(3);\t\t\t#[cal/mol] - Enthalpy of formation of S02 at 298.15 K\n",
      "delta_H_SO3_for_298 = -94.39*10**(3);\t\t\t#[cal/mol] - Enthalpy of formation of SO3 at 298.15 K\n",
      "delta_G_SO2_for_298 = -71.68*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of SO2 at 298.15 K\n",
      "delta_G_SO3_for_298 = -88.59*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of SO3 at 298.15 K\n",
      "\n",
      "# Calculations and Results\n",
      "\t\t\t#(1)\n",
      "\t\t\t#Smath.tan(math.radiansard enthalpy change of reaction at temperature T is given by,\n",
      "\t\t\t#delta_H_rkn_T = delta_rkn_298 + delta_Cp_0*delta_T\n",
      "delta_a = a_SO3 - a_SO2 - (a_O2/2);\n",
      "delta_b = b_SO3 - b_SO2 - (b_O2/2);\n",
      "delta_c = c_SO3 - c_SO2 - (c_O2/2);\n",
      "delta_d = d_SO3 - d_SO2;\n",
      "\n",
      "\t\t\t#Cp_0 = delta_a + (delta_b*T) + (delta_c*T**(2)) + (delta_d*T**(3));\n",
      "\t\t\t#Therefore we get,\n",
      "\n",
      "def f44(T): \n",
      "\t return delta_a+(delta_b*T)+(delta_c*T**(2))+(delta_d*T**(3))\n",
      "\n",
      "delta_H_rkn_880 = delta_H_rkn_298 +  quad(f44,T_1,T_2)[0]\n",
      "\n",
      "\n",
      "\t\t\t#On manual simplification of the above expression,we will get the expression for 'delta_H_rkn_880' as a function of T,\n",
      " \n",
      "print \" 1.The expression for smath.tan(math.radiansard enthalpy change of reaction as a function of temperature is given by\";\n",
      "print \"      delta_H_rkn_880 = -22534.57 - 5.605*T + 1.012*10**-2*T**2 - 0.585*10**-5*T**3 + 1.422*10**-9*T**4\"\n",
      "\n",
      "print \" 2).Staandard enthalpy change of reaction at 880 K is %f cal\"%(delta_H_rkn_880);\n",
      "\n",
      "\t\t\t#(3)\n",
      "\t\t\t#Let us determine the smath.tan(math.radiansard entropy change of reaction at 298.15 K\n",
      "delta_S_SO2_298 = (delta_H_SO2_for_298 - delta_G_SO2_for_298)/298.15;\t\t\t#[cal/mol-K]\n",
      "delta_S_SO3_298 = (delta_H_SO3_for_298 - delta_G_SO3_for_298)/298.15;\t\t\t#[cal/mol-K]\n",
      "delta_S_O2_298 = 0;\t\t\t#[cal/mol-K]\n",
      "\n",
      "delta_S_rkn_298 = delta_S_SO3_298 - delta_S_SO2_298 - (delta_S_O2_298/2);\t\t\t#[cal/K]\n",
      "\n",
      "def f45(T): \n",
      "\t return (delta_a+delta_b*T+delta_c*T**(2)+delta_d*T**(3))/T\n",
      "\n",
      "delta_S_rkn_880 = delta_S_rkn_298 +  quad(f45,T_1,T_2)[0]\n",
      "\n",
      "\n",
      "print \" 3).Standard entropy change of reaction at 880 K is %f cal/K\"%(delta_S_rkn_880);\n",
      "\n",
      "\t\t\t#(4)\n",
      "delta_G_rkn_880 = delta_H_rkn_880 - 880*delta_S_rkn_880;\t\t\t#[cal]\n",
      "\n",
      "print \" 4).Standard Gibbs free energy change of reaction at 880 K is %f cal\"%(delta_G_rkn_880);\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " 1.The expression for smath.tan(math.radiansard enthalpy change of reaction as a function of temperature is given by\n",
        "      delta_H_rkn_880 = -22534.57 - 5.605*T + 1.012*10**-2*T**2 - 0.585*10**-5*T**3 + 1.422*10**-9*T**4\n",
        " 2).Staandard enthalpy change of reaction at 880 K is -22766.609215 cal\n",
        " 3).Standard entropy change of reaction at 880 K is -21.002783 cal/K\n",
        " 4).Standard Gibbs free energy change of reaction at 880 K is -4284.160417 cal\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 6.2  Page Number : 219"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "T_1 = 298.15;\t\t\t#[K] - Smath.tan(math.radiansard temperature\n",
      "T_2 = 400;\t\t\t#[K] - Reaction temperature\n",
      "\n",
      "a_CH3OH = 4.55;\n",
      "a_CO = 6.726;\n",
      "a_H2 = 6.952;\n",
      "b_CH3OH = 2.186*10**(-2);\n",
      "b_CO = 0.04001*10**(-2);\n",
      "b_H2 = -0.04576*10**(-2);\n",
      "c_CH3OH = -0.291*10**(-5);\n",
      "c_CO = 0.1283*10**(-5);\n",
      "c_H2 = 0.09563*10**(-5);\n",
      "d_CH3OH = -1.92*10**(-9);\n",
      "d_CO = -0.5307*10**(-9);\n",
      "d_H2 = -0.2079*10**(-9);\n",
      "\n",
      "delta_H_rkn_298 = -21.6643*10**(3);\t\t\t#[cal] - Reaction enthalpy at 298.15 K\n",
      "delta_H_CO_for_298 = -26.4157*10**(3);\t\t\t#[cal/mol] - Enthalpy of formation of CO at 298.15 K\n",
      "delta_H_CH3OH_for_298 = -48.08*10**(3);\t\t\t#[cal/mol] - Enthalpy of formation of CH3OH at 298.15 K\n",
      "delta_G_CO_for_298 = -32.8079*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of CO at 298.15 K\n",
      "delta_G_CH3OH_for_298 = -38.69*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of CH3OH at 298.15 K\n",
      "\n",
      "# Calculations and Results\n",
      "\t\t\t#Smath.tan(math.radiansard enthalpy change of reaction at temperature T is given by,\n",
      "\t\t\t#delta_H_rkn_T = delta_rkn_298 + delta_Cp_0*delta_T\n",
      "delta_a = a_CH3OH - a_CO - 2*(a_H2);\n",
      "delta_b = b_CH3OH - b_CO - 2*(b_H2);\n",
      "delta_c = c_CH3OH - c_CO - 2*(c_H2);\n",
      "delta_d = d_CH3OH - d_CO - 2*(d_H2);\n",
      "\n",
      "\t\t\t#Cp_0 = delta_a + (delta_b*T) + (delta_c*T**(2)) + (delta_d*T**(3));\n",
      "\t\t\t#Therefore we get,\n",
      "\n",
      "def f56(T): \n",
      "\t return delta_a+(delta_b*T)+(delta_c*T**(2))+(delta_d*T**(3))\n",
      "\n",
      "delta_H_rkn_400 = delta_H_rkn_298 +  quad(f56,T_1,T_2)[0]\n",
      "\n",
      "\n",
      "print \" Standard enthalpy change of reaction at 400 K is %f cal\"%(delta_H_rkn_400);\n",
      "\n",
      "\t\t\t#Let us determine the smath.tan(math.radiansard Gibbs free energy change of reaction at 298.15 K\n",
      "delta_G_rkn_298 = delta_G_CH3OH_for_298 - delta_G_CO_for_298;\t\t\t#[cal]\n",
      "\n",
      "\t\t\t#Now determining the smath.tan(math.radiansard entropy change of reaction at 298.15 K\n",
      "delta_S_rkn_298 = (delta_H_rkn_298 - delta_G_rkn_298)/298.15;\t\t\t#[cal/mol-K]\n",
      "\n",
      "\n",
      "def f57(T): \n",
      "\t return (delta_a+delta_b*T+delta_c*T**(2)+delta_d*T**(3))/T\n",
      "\n",
      "delta_S_rkn_400 = delta_S_rkn_298 +  quad(f57,T_1,T_2)[0]\n",
      "\n",
      "\t\t\t#Therefore,the smath.tan(math.radiansard Gibbs free energy change of the reaction is given by,\n",
      "delta_G_rkn_400 = delta_H_rkn_400 - 400*delta_S_rkn_400;\t\t\t#[cal]\n",
      "\n",
      "print \" Standard Gibbs free energy change of reaction at 400 K is %f cal\"%(delta_G_rkn_400);\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Standard enthalpy change of reaction at 400 K is -22587.159576 cal\n",
        " Standard Gibbs free energy change of reaction at 400 K is -343.363287 cal\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 6.3  Page Number : 220"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "T_1 = 298.15;\t\t\t#[K] - Smath.tan(math.radiansard temperature\n",
      "T_2 = 1200;\t\t\t#[K] - Reaction temperature\n",
      "\n",
      "\n",
      "a_CO2 = 5.316;\n",
      "a_H2 = 6.952;\n",
      "a_CO = 6.726;\n",
      "a_H2O = 7.700;\n",
      "b_CO2 = 1.4285*10**(-2);\n",
      "b_H2 = -0.04576*10**(-2);\n",
      "b_CO = 0.04001*10**(-2);\n",
      "b_H2O = 0.04594*10**(-2);\n",
      "c_CO2 = -0.8362*10**(-5);\n",
      "c_H2 = 0.09563*10**(-5);\n",
      "c_CO = 0.1283*10**(-5);\n",
      "c_H2O = 0.2521*10**(-5);\n",
      "d_CO2 = 1.784*10**(-9);\n",
      "d_H2 = -0.2079*10**(-9);\n",
      "d_CO = -0.5307*10**(-9);\n",
      "d_H2O = -0.8587*10**(-9);\n",
      "\n",
      "# Calculations and Results\n",
      "delta_H_rkn_298 = -9.8382*10**(3);\t\t\t#[cal] - Reaction enthalpy at 298.15 K\n",
      "delta_H_CO2_for_298 = -94.0518*10**(3);\t\t\t#[cal/mol-K] - Enthalpy of formation of CO2 at 298.15 K\n",
      "delta_H_CO_for_298 = -26.4157*10**(3);\t\t\t#[cal/mol-K] - Enthalpy of formation of CO at 298.15 K\n",
      "delta_H_H2O_for_298 = -57.7979*10**(3);\t\t\t#[cal/mol-K] - Enthalpy of formation of H2O at 298.15 K\n",
      "delta_G_CO2_for_298 = -94.2598*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of CO at 298.15 K\n",
      "delta_G_CO_for_298 = -32.8079*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of CH3OH at 298.15 K\n",
      "delta_G_H2O_for_298 = -54.6357*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of H2O at 298.15 K\n",
      "\n",
      "\t\t\t#Smath.tan(math.radiansard enthalpy change of reaction at temperature T is given by,\n",
      "\t\t\t#delta_H_rkn_T = delta_rkn_298 + delta_Cp_0*delta_T\n",
      "delta_a = a_CO2 + a_H2 - a_CO - a_H2O;\n",
      "delta_b = b_CO2 + b_H2 - b_CO - b_H2O;\n",
      "delta_c = c_CO2 + c_H2 - c_CO - c_H2O;\n",
      "delta_d = d_CO2 + d_H2 - d_CO - d_H2O;\n",
      "\n",
      "\t\t\t#Cp_0 = delta_a + (delta_b*T) + (delta_c*T**(2)) + (delta_d*T**(3));\n",
      "\t\t\t#Therefore we get,\n",
      "\n",
      "def f11(T): \n",
      "\t return delta_a+(delta_b*T)+(delta_c*T**(2))+(delta_d*T**(3))\n",
      "\n",
      "delta_H_rkn_1200 = delta_H_rkn_298 +  quad(f11,T_1,T_2)[0]\n",
      "\n",
      "\n",
      "print \" Standard enthalpy change of reaction at 1200 K is %f cal\"%(delta_H_rkn_1200);\n",
      "\n",
      "\t\t\t#Let us determine the smath.tan(math.radiansard Gibbs free energy change of reaction at 298.15 K\n",
      "delta_G_rkn_298 = delta_G_CO2_for_298 - delta_G_CO_for_298 - delta_G_H2O_for_298;\t\t\t#[cal]\n",
      "\n",
      "\t\t\t#Now determining the smath.tan(math.radiansard entropy change of reaction at 298.15 K\n",
      "delta_S_rkn_298 = (delta_H_rkn_298 - delta_G_rkn_298)/298.15;\t\t\t#[cal/mol-K]\n",
      "\n",
      "\n",
      "def f12(T): \n",
      "\t return (delta_a+delta_b*T+delta_c*T**(2)+delta_d*T**(3))/T\n",
      "\n",
      "delta_S_rkn_1200 = delta_S_rkn_298 +  quad(f12,T_1,T_2)[0]\n",
      "\n",
      "\t\t\t#Therefore,the smath.tan(math.radiansard Gibbs free energy change of the reaction is given by,\n",
      "delta_G_rkn_1200 = delta_H_rkn_1200 - 1200*delta_S_rkn_1200;\t\t\t#[cal]\n",
      "\n",
      "print \" Standard Gibbs free energy change of reaction at 1200 K is %f cal\"%(delta_G_rkn_1200);\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Standard enthalpy change of reaction at 1200 K is -7850.182811 cal\n",
        " Standard Gibbs free energy change of reaction at 1200 K is 953.652749 cal\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 6.4  Page Number : 221"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "T_1 = 298.15;\t\t\t#[K] - Smath.tan(math.radiansard temperature\n",
      "T_2 = 500;\t\t\t#[K] - Reaction temperature\n",
      "\n",
      "a_NH3 = 6.5846;\n",
      "a_N2 = 6.903;\n",
      "a_H2 = 6.952;\n",
      "b_NH3 = 0.61251*10**(-2);\n",
      "b_N2 = -0.03753*10**(-2);\n",
      "b_H2 = -0.04576*10**(-2);\n",
      "c_NH3 = 0.23663*10**(-5);\n",
      "c_N2 = 0.1930*10**(-5);\n",
      "c_H2 = 0.09563*10**(-5);\n",
      "d_NH3 = -1.5981*10**(-9);\n",
      "d_N2 = -0.6861*10**(-9);\n",
      "d_H2 = -0.2079*10**(-9);\n",
      "\n",
      "delta_H_rkn_298 = -22.08*10**(3);\t\t\t#[cal] - Reaction enthalpy at 298.15 K\n",
      "delta_H_NH3_for_298 = -11.04*10**(3);\t\t\t#[cal/mol] - Enthalpy of formation of NH3 at 298.15 K\n",
      "delta_G_NH3_for_298 = -3.976*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of NH3 at 298.15 K\n",
      "\n",
      "# Calculations and Results\n",
      "\t\t\t#Smath.tan(math.radiansard enthalpy change of reaction at temperature T is given by,\n",
      "\t\t\t#delta_H_rkn_T = delta_rkn_298 + delta_Cp_0*delta_T\n",
      "delta_a = 2*a_NH3 - a_N2 - 3*a_H2;\n",
      "delta_b = 2*b_NH3 - b_N2 - 3*b_H2;\n",
      "delta_c = 2*c_NH3 - c_N2 - 3*c_H2;\n",
      "delta_d = 2*d_NH3 - d_N2 - 3*d_H2;\n",
      "\n",
      "\t\t\t#Cp_0 = delta_a + (delta_b*T) + (delta_c*T**(2)) + (delta_d*T**(3));\n",
      "\t\t\t#Therefore we get,\n",
      "\n",
      "def f5(T): \n",
      "\t return delta_a+(delta_b*T)+(delta_c*T**(2))+(delta_d*T**(3))\n",
      "\n",
      "delta_H_rkn_500 = delta_H_rkn_298 +  quad(f5,T_1,T_2)[0]\n",
      "\n",
      "\n",
      "print \" Standard enthalpy change of reaction at 500 K is %f cal\"%(delta_H_rkn_500);\n",
      "\n",
      "\t\t\t#Let us determine the smath.tan(math.radiansard Gibbs free energy change of reaction at 298.15 K\n",
      "delta_G_rkn_298 = 2*delta_G_NH3_for_298;\t\t\t#[cal]\n",
      "\n",
      "\t\t\t#Now determining the smath.tan(math.radiansard entropy change of reaction at 298.15 K\n",
      "delta_S_rkn_298 = (delta_H_rkn_298 - delta_G_rkn_298)/298.15;\t\t\t#[cal/mol-K]\n",
      "\n",
      "\n",
      "def f6(T): \n",
      "\t return (delta_a+delta_b*T+delta_c*T**(2)+delta_d*T**(3))/T\n",
      "\n",
      "delta_S_rkn_500 = delta_S_rkn_298 +  quad(f6,T_1,T_2)[0]\n",
      "\n",
      "\t\t\t#Therefore,the smath.tan(math.radiansard Gibbs free energy change of the reaction is given by,\n",
      "delta_G_rkn_500 = delta_H_rkn_500 - 500*delta_S_rkn_500;\t\t\t#[cal]\n",
      "\n",
      "print \" Standard Gibbs free energy change of reaction at 500 K is %f cal\"%(delta_G_rkn_500);\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Standard enthalpy change of reaction at 500 K is -23925.267197 cal\n",
        " Standard Gibbs free energy change of reaction at 500 K is 2159.910425 cal\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 6.5  Page Number : 222"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "\n",
      "delta_H_rkn_298 = -57.7979*10**(3);\t\t\t#[cal/mol] - Reaction enthalpy at 298.15 K\n",
      "delta_G_rkn_298 = -54.6351*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of H2O at 298.15 K\n",
      "\n",
      "\t\t\t#Smath.tan(math.radiansard enthalpy change of reaction at temperature T is given by,\n",
      "\t\t\t#delta_H_rkn_T = delta_rkn_298 + delta_Cp_0*delta_T\n",
      "T_1 = 298.15;\t\t\t#[K] - Smath.tan(math.radiansard temperature\n",
      "T_2_1 = 873.15;\t\t\t#[K] - Reaction temperature\n",
      "T_2_2 = 1000;\t\t\t#[K] - Reaction temperature\n",
      "\n",
      "# Calculations and Results\n",
      "\t\t\t#Therefore we get,\n",
      "\n",
      "def f34(T): \n",
      "\t return 7.7+0.04594*10**(-2)*T+0.2521*10**(-5)*T**(2)-0.8587*10**(-9)*T**(3)\n",
      "\n",
      "delta_H_rkn_873 = delta_H_rkn_298 +  quad(f34,T_1,T_2_1)[0]\n",
      "\n",
      "\n",
      "def f35(T): \n",
      "\t return 7.7+0.04594*10**(-2)*T+0.2521*10**(-5)*T**(2)-0.8587*10**(-9)*T**(3)\n",
      "\n",
      "delta_H_rkn_1000 = delta_H_rkn_298 +  quad(f35,T_1,T_2_2)[0]\n",
      "\n",
      "\n",
      "print \" Standard enthalpy change of reaction at 873 K is %f cal/mol\"%(delta_H_rkn_873);\n",
      "print \" Standard enthalpy change of reaction at 1000 K is %f cal/mol\"%(delta_H_rkn_1000);\n",
      "\n",
      "\t\t\t#Now determining the smath.tan(math.radiansard entropy change of reaction at 298.15 K\n",
      "delta_S_rkn_298 = (delta_H_rkn_298 - delta_G_rkn_298)/298.15;\t\t\t#[cal/mol-K]\n",
      "\n",
      "\n",
      "def f36(T): \n",
      "\t return (7.7+0.04594*10**(-2)*T+0.2521*10**(-5)*T**(2)-0.8587*10**(-9)*T**(3))/T\n",
      "\n",
      "delta_S_rkn_873 = delta_S_rkn_298 +  quad(f36,T_1,T_2_1)[0]\n",
      "\n",
      "\n",
      "def f37(T): \n",
      "\t return (7.7+0.04594*10**(-2)*T+0.2521*10**(-5)*T**(2)-0.8587*10**(-9)*T**(3))/T\n",
      "\n",
      "delta_S_rkn_1000 = delta_S_rkn_298 +  quad(f37,T_1,T_2_2)[0]\n",
      "\n",
      "\t\t\t#Therefore,the smath.tan(math.radiansard Gibbs free energy change of the reaction is given by,\n",
      "delta_G_rkn_873 = (delta_H_rkn_873 - 873.15*delta_S_rkn_873)*10**(-3);\t\t\t#[kcal/mol]\n",
      "delta_G_rkn_1000 = (delta_H_rkn_1000 - 1000*delta_S_rkn_1000)*10**(-3);\t\t\t#[kcal/mol]\n",
      "\n",
      "print \" Standard Gibbs free energy change of reaction at 873 K is %f kcal/mol\"%(delta_G_rkn_873);\n",
      "print \" Standard Gibbs free energy change of reaction at 1000 K is %f kcal/mol\"%(delta_G_rkn_1000);\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Standard enthalpy change of reaction at 873 K is -52801.656303 cal/mol\n",
        " Standard enthalpy change of reaction at 1000 K is -51579.290952 cal/mol\n",
        " Standard Gibbs free energy change of reaction at 873 K is -51.575573 kcal/mol\n",
        " Standard Gibbs free energy change of reaction at 1000 K is -51.481661 kcal/mol\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 6.6  Page Number : 223"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "T_1 = 298.15;\t\t\t#[K] - Smath.tan(math.radiansard temperature\n",
      "T_2 = 500.;\t\t\t#[K] - Reaction temperature\n",
      "\n",
      "a_C2H6 = 1.648;\n",
      "a_O2 = 6.085;\n",
      "a_CO2 = 5.316;\n",
      "a_H2O = 7.700;\n",
      "b_C2H6 = 4.124*10**(-2);\n",
      "b_O2 = 0.3631*10**(-2);\n",
      "b_CO2 = 1.4285*10**(-2);\n",
      "b_H2O = 0.04594*10**(-2);\n",
      "c_C2H6 = -1.530*10**(-5);\n",
      "c_O2 = -0.1709*10**(-5);\n",
      "c_CO2 = -0.8362*10**(-5);\n",
      "c_H2O = 0.2521*10**(-5);\n",
      "d_C2H6 = 1.740*10**(-9);\n",
      "d_O2 = 0.3133*10**(-9);\n",
      "d_CO2 = 1.784*10**(-9);\n",
      "d_H2O = -0.8587*10**(-9);\n",
      "\n",
      "# Calculations and Results\n",
      "\t\t\t#Since excess is entering and leaving at the same temperature,therefore it does not take or give any heat to the system.\n",
      "\t\t\t#Therefore the heat exchange is only due to heat of raction at temperature T, or Q = delta_H_rkn_T\n",
      "\n",
      "delta_H_C2H6_for_298 = -20.236*10**(3);\t\t\t#[cal/mol] - Enthalpy of formation of C2H6 at 298.15 K\n",
      "delta_H_CO2_for_298 = -94.0518*10**(3);\t\t\t#[cal/mol] - Enthalpy of formation of CO2 at 298.15 K\n",
      "delta_H_H2O_for_298 = -57.7979*10**(3);\t\t\t#[cal/mol] - Enthalpy of formation of H2O at 298.15 K\n",
      "\n",
      "delta_H_rkn_298 = 2*delta_H_CO2_for_298 + 3*delta_H_H2O_for_298 - delta_H_C2H6_for_298;\t\t\t#[cal] - Reaction enthalpy at 298.15 K\n",
      "\n",
      "\t\t\t#Smath.tan(math.radiansard enthalpy change of reaction at temperature T is given by,\n",
      "\t\t\t#delta_H_rkn_T = delta_rkn_298 + delta_Cp_0*delta_T\n",
      "delta_a = 2*a_CO2 + 3*a_H2O - a_C2H6 - 7./2*(a_O2);\n",
      "delta_b = 2*b_CO2 + 3*b_H2O - b_C2H6 - 7./2*(b_O2);\n",
      "delta_c = 2*c_CO2 + 3*c_H2O - c_C2H6 - 7./2*(c_O2);\n",
      "delta_d = 2*d_CO2 + 3*d_H2O - d_C2H6 - 7./2*(d_O2);\n",
      "\n",
      "\t\t\t#Cp_0 = delta_a + (delta_b*T) + (delta_c*T**(2)) + (delta_d*T**(3));\n",
      "\t\t\t#Therefore we get,\n",
      "\n",
      "def f55(T): \n",
      "\t return delta_a+(delta_b*T)+(delta_c*T**(2))+(delta_d*T**(3))\n",
      "\n",
      "delta_H_rkn_500 = delta_H_rkn_298 +  quad(f55,T_1,T_2)[0]\n",
      "\n",
      "delta_H_rkn_500 = delta_H_rkn_500*10**(-3);\t\t\t#[kcal]\n",
      "\n",
      "print \" The heat exchange of the reaction at 500 K is %f kcal\"%(delta_H_rkn_500);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " The heat exchange of the reaction at 500 K is -340.644585 kcal\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 6.7  Page Number : 224"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "T_1 = 298.15;\t\t\t#[K] - Smath.tan(math.radiansard temperature\n",
      "T_2 = 600.;\t\t\t#[K] - Reaction temperature\n",
      "\n",
      "a_C2H6 = -8.65;\n",
      "a_H2O = 7.700;\n",
      "a_CH4 = 4.750;\n",
      "a_O2 = 6.085;\n",
      "b_C2H6 = 11.578*10**(-2);\n",
      "b_H2O = 0.04594*10**(-2);\n",
      "b_CH4 = 1.200*10**(-2);\n",
      "b_O2 = 0.3631*10**(-2);\n",
      "c_C2H6 = -7.540*10**(-5);\n",
      "c_H2O = 0.2521*10**(-5);\n",
      "c_CH4 = 0.3030*10**(-5);\n",
      "c_O2 = -0.1709*10**(-5);\n",
      "d_C2H6 = 18.54*10**(-9);\n",
      "d_H2O = -0.8587*10**(-9);\n",
      "d_CH4 = -2.630*10**(-9);\n",
      "d_O2 = 0.3133*10**(-9);\n",
      "\n",
      "delta_S_CH4_for_298 = 44.50;\t\t\t#[cal/mol-K] - Entropy of formation of CH4 at 298.15 K\n",
      "delta_S_O2_for_298 = 49.00;\t\t\t#[cal/mol-K] - Entropy of formation of O2 at 298.15 K\n",
      "delta_S_C2H6_for_298 = 64.34;\t\t\t#[cal/mol-K] - Entropy of formation of C2H6 at 298.15 K\n",
      "delta_S_H2O_for_298 = 45.11;\t\t\t#[cal/mol-K] - Entropy of formation of C2H6 at 298.15 K\n",
      "\n",
      "# Calculations and Results\n",
      "\t\t\t#Cp_0 = delta_a + (delta_b*T) + (delta_c*T**(2)) + (delta_d*T**(3));\n",
      "\n",
      "\t\t\t#Smath.tan(math.radiansard entropy change of reaction at temperature T is given by,\n",
      "\t\t\t#delta_S_rkn_T = delta_rkn_298 + delta_Cp_0*delta_T\n",
      "delta_a = 1./6*(a_C2H6) + 3./2*(a_H2O) - a_CH4 - 3./4*(a_O2);\n",
      "delta_b = 1./6*(b_C2H6) + 3./2*(b_H2O) - b_CH4 - 3./4*(b_O2);\n",
      "delta_c = 1./6*(c_C2H6) + 3./2*(c_H2O) - c_CH4 - 3./4*(c_O2);\n",
      "delta_d = 1./6*(d_C2H6) + 3./2*(d_H2O) - d_CH4 - 3./4*(d_O2);\n",
      "\n",
      "delta_S_rkn_298 = 1./6*(delta_S_C2H6_for_298) + 3./2*(delta_S_H2O_for_298) - delta_S_CH4_for_298 - 3./4*(delta_S_O2_for_298);\t\t\t#[cal/K]\n",
      "\n",
      "def f27(T): \n",
      "\t return (delta_a+delta_b*T+delta_c*T**(2)+delta_d*T**(3))/T\n",
      "\n",
      "delta_S_rkn_600 = delta_S_rkn_298 +  quad(f27,T_1,T_2)[0]\n",
      "\n",
      "\n",
      "print \" Change in entropy of the reaction at 298.15 K is %f cal/K\"%(delta_S_rkn_298);\n",
      "print \" Standard entropy change of reaction at 600 K is %f cal/K\"%(delta_S_rkn_600);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Change in entropy of the reaction at 298.15 K is -2.861667 cal/K\n",
        " Standard entropy change of reaction at 600 K is -1.880233 cal/K\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 6.8  Page Number : 225"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "T_1 = 298.15;\t\t\t#[K] - Smath.tan(math.radiansard temperature\n",
      "T_2 = 973.15;\t\t\t#[K] - Reaction temperature\n",
      "\n",
      "\t\t\t#At 298.15 K\n",
      "delta_H_CH4_for_298 = -17.889*10**(3);\t\t\t#[cal/mol] - Enthalpy of formation of CH4 at 298.15 K\n",
      "delta_H_C_for_298 = 0.00;\t\t\t#[cal/mol] - Enthalpy of formation of C (s, graphite) at 298.15 K\n",
      "delta_H_H2_for_298 = 0.00;\t\t\t#[cal/mol] - Enthalpy of formation of H2 at 298.15 K\n",
      "delta_G_CH4_for_298 = -12.140*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of H2 at 298.15 K\n",
      "delta_G_C_for_298 = 0.00;\t\t\t#[cal/mol] - Gibbs free energy change for formation of C (s, graphite) at 298.15 K\n",
      "delta_G_H2_for_298 = 0.00;\t\t\t#[cal/mol] - Gibbs free energy change for formation of H2 at 298.15 K\n",
      "\n",
      "# Calculations and Results\n",
      "\t\t\t#/Smath.tan(math.radiansaerd heat capacity data in cal/mol-K are given below, T is in K\n",
      "\t\t\t#Cp_0_CH4 = 4.75 + 1.2*10**(-2)*T + 0.303*10**(-5)*T**(2) - 2.63*10**(-9)*T**(3)\n",
      "\t\t\t#Cp_0_C = 3.519 + 1.532*10**(-3)*T - 1.723*10**(5)*T**(-2)\n",
      "\t\t\t#Cp_0_H2 = 6.952 - 0.04576*10**(-2)*T + 0.09563*10**(-5)*T**(2) - 0.2079*10**(-9)*T**(3)\n",
      "\n",
      "\t\t\t#Therefore smath.tan(math.radiansard heat capacity of reaction is given by,\n",
      "\t\t\t#Cp_0_rkn = 2*Cp_0_H2 + Cp_0_C - Cp_0_CH4\n",
      "\t\t\t#On simplification,we get the relation\n",
      "\t\t\t#Cp_0_rkn = 12.673 - 0.0113832*T - 1.1174*10**(-6)*T**(2) + 2.2142*10**(-9)*T**(3) - 1.723*10**(5)*T**(-2)\n",
      "\n",
      "delta_H_rkn_298 = -delta_H_CH4_for_298;\t\t\t#[cal] - Enthalpy of reaction at 298.15 K\n",
      "delta_G_rkn_298 = -delta_G_CH4_for_298;\t\t\t#[cal] - Gibbs free energy of the reaction at 298.15 K\n",
      "\n",
      "\n",
      "def f63(T): \n",
      "\t return 12.673-0.0113832*T-1.1174*10**(-6)*T**(2)+2.2142*10**(-9)*T**(3)-1.723*10**(5)*T**(-2)\n",
      "\n",
      "delta_H_rkn_973 = delta_H_rkn_298 +  quad(f63,T_1,T_2)[0]\n",
      "\n",
      "\n",
      "print \" Standard enthalpy change of reaction at 973.15 K is %f cal\"%(delta_H_rkn_973);\n",
      "\n",
      "\t\t\t#Now determining the smath.tan(math.radiansard entropy change of reaction at 298.15 K\n",
      "delta_S_rkn_298 = (delta_H_rkn_298 - delta_G_rkn_298)/298.15;\t\t\t#[cal/K]\n",
      "\n",
      "def f64(T): \n",
      "\t return (12.673-0.0113832*T-1.1174*10**(-6)*T**(2)+2.2142*10**(-9)*T**(3)-1.723*10**(5)*T**(-2))/T\n",
      "\n",
      "delta_S_rkn_973 = delta_S_rkn_298 +  quad(f64,T_1,T_2)[0]\n",
      "\n",
      "\n",
      "\t\t\t#Therefore,the smath.tan(math.radiansard Gibbs free energy change of the reaction is given by,\n",
      "delta_G_rkn_973 = delta_H_rkn_973 - 973.15*delta_S_rkn_973;\t\t\t#[cal]\n",
      "\n",
      "print \" Standard Gibbs free energy change of reaction at 973 K is %f cal\"%(delta_G_rkn_973);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Standard enthalpy change of reaction at 973.15 K is 21316.998642 cal\n",
        " Standard Gibbs free energy change of reaction at 973 K is -3880.803382 cal\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 6.9  Page Number : 226"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "T_1 = 298.15;\t\t\t#[K] - Smath.tan(math.radiansard temperature\n",
      "T_2 = 1000;\t\t\t#[K] - Reaction temperature\n",
      "\n",
      "\t\t\t#At 298.15 K\n",
      "delta_H_C_for_298 = 0.00;\t\t\t#[cal/mol] - Enthalpy of formation of C(s,graphite) at 298.15 K\n",
      "delta_H_H2O_for_298 = -57.7979*10**(3);\t\t\t#[cal/mol] - Enthalpy of formation of H2O at 298.15 K\n",
      "delta_H_CO_for_298 = -26.4157*10**(3);\t\t\t#[cal/mol] - Enthalpy of formation of CO at 298.15 K\n",
      "delta_H_H2_for_298 = 0.00;\t\t\t#[cal/mol] - Enthalpy of formation of H2 at 298.15 K\n",
      "delta_G_C_for_298 = 0.00;\t\t\t#[cal/mol] - Gibbs free energy change for formation of C(s, graphite) at 298.15 K\n",
      "delta_G_H2O_for_298 = -54.6357*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of H2O at 298.15 K\n",
      "delta_G_CO_for_298 = -32.8079*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of CO at 298.15 K\n",
      "delta_G_H2_for_298 = 0.00;\t\t\t#[cal/mol] - Gibbs free energy change for formation of H2 at 298.15 K\n",
      "\n",
      "\n",
      "# Calculations and Results\n",
      "\t\t\t#/Smath.tan(math.radiansaerd heat capacity data in cal/mol-K are given below, T is in K\n",
      "\t\t\t#Cp_0_C = 3.519 + 1.532*10**(-3)*T - 1.723*10**(5)*T**(-2)\n",
      "\t\t\t#Cp_0_H2O = 7.7 + 0.04594*10**(-2)*T + 0.2521*10**(-5)*T**(2) - 0.8587*10**(-9)*T**(3)\n",
      "\t\t\t#Cp_0_CO = 6.726 + 0.04001*10**(-2)*T + 0.1283*10**(-5)*T**(2) - 0.5307*10**(-9)*T**(3)\n",
      "\t\t\t#Cp_0_H2 = 6.952 - 0.04576*10**(-2)*T + 0.09563*10**(-5)*T**(2) - 0.2079*10**(-9)*T**(3)\n",
      "\n",
      "\t\t\t#Therefore smath.tan(math.radiansard heat capacity of reaction is given by,\n",
      "\t\t\t#Cp_0_rkn = Cp_0_H2 + Cp_0_CO - Cp_0_C - Cp_0_H2O\n",
      "\t\t\t#On simplification,we get the relation\n",
      "\t\t\t#Cp_0_rkn = 2.459 - 2.0489*10**(-3)*T - 2.817*10**(-7)*T**(2) + 1.201*10**(-10)*T**(3) + 1.723*10**(5)*T**(-2)\n",
      "\n",
      "delta_H_rkn_298 = delta_H_CO_for_298 + delta_H_H2_for_298 - delta_H_C_for_298 - delta_H_H2O_for_298;\t\t\t#[cal] - Enthalpy of reaction at 298.15 K\n",
      "delta_G_rkn_298 = delta_G_CO_for_298 + delta_G_H2_for_298 - delta_G_C_for_298 - delta_G_H2O_for_298;\t\t\t#[cal] - Gibbs free energy of the reaction at 298.15 K\n",
      "\n",
      "\n",
      "def f13(T): \n",
      "\t return 2.459-2.0489*10**(-3)*T-2.817*10**(-7)*T**(2)+1.201*10**(-10)*T**(3)+1.723*10**(5)*T**(-2)\n",
      "\n",
      "delta_H_rkn_1000 = delta_H_rkn_298 +  quad(f13,T_1,T_2)[0]\n",
      "\n",
      "\n",
      "print \" Standard enthalpy change of reaction at 1000 K is %f cal\"%(delta_H_rkn_1000);\n",
      "\n",
      "\t\t\t#Now determining the smath.tan(math.radiansard entropy change of reaction at 298.15 K\n",
      "delta_S_rkn_298 = (delta_H_rkn_298 - delta_G_rkn_298)/298.15;\t\t\t#[cal/K]\n",
      "\n",
      "def f14(T): \n",
      "\t return (2.459-2.0489*10**(-3)*T-2.817*10**(-7)*T**(2)+1.201*10**(-10)*T**(3)+1.723*10**(5)*T**(-2))/T\n",
      "\n",
      "delta_S_rkn_1000 = delta_S_rkn_298 +  quad(f14,T_1,T_2)[0]\n",
      "\n",
      "\n",
      "\t\t\t#Therefore,the smath.tan(math.radiansard Gibbs free energy change of the reaction is given by,\n",
      "delta_G_rkn_1000 = delta_H_rkn_1000 - 1000*delta_S_rkn_1000;\t\t\t#[cal]\n",
      "\n",
      "print \" Standard Gibbs free energy change of reaction at 1000 K is %f cal\"%(delta_G_rkn_1000);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Standard enthalpy change of reaction at 1000 K is 32518.639475 cal\n",
        " Standard Gibbs free energy change of reaction at 1000 K is -1858.365607 cal\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 6.10  Page Number : 228"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "T_1 = 298.15;\t\t\t#[K] - Smath.tan(math.radiansard temperature\n",
      "T_2 = 1042;\t\t\t#[K] - Reaction temperature\n",
      "\n",
      "\t\t\t#At 298.15 K\n",
      "delta_H_CaCO3_for_298 = -289.5*10**(3);\t\t\t#[cal/mol] - Enthalpy of formation of CaCO3 at 298.15 K\n",
      "delta_H_CaO_for_298 = -151.7*10**(3);\t\t\t#[cal/mol] - Enthalpy of formation of CaO at 298.15 K\n",
      "delta_H_CO2_for_298 = -94.052*10**(3);\t\t\t#[cal/mol] - Enthalpy of formation of CO2 at 298.15 K\n",
      "delta_G_CaCO3_for_298 = -270.8*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of CaCO3 at 298.15 K\n",
      "delta_G_CaO_for_298 = -144.3*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of CaO at 298.15 K\n",
      "delta_G_CO2_for_298 = -94.260*10**(3);\t\t\t#[cal/mol] - Gibbs free energy change for formation of CO2 at 298.15 K\n",
      "\n",
      "# Calculations and Results\n",
      "\t\t\t#/Smath.tan(math.radiansaerd heat capacity data in cal/mol-K are given below, T is in K\n",
      "\t\t\t#Cp_0_CO2 = 5.316 + 1.4285*10**(-2)*T - 0.8362*10**(-5)*T**(2) + 1.784*10**(-9)*T**(3)\n",
      "\t\t\t#Cp_0_CaO = 12.129 + 0.88*10**(-3)*T + 2.08*10**(5)*T**(-2)\n",
      "\t\t\t#Cp_0_CaCO3 = 24.98 + 5.240*10**(-3)*T + 6.199*10**(5)*T**(-2)\n",
      "\n",
      "\t\t\t#Therefore smath.tan(math.radiansard heat capacity of reaction is given by,\n",
      "\t\t\t#Cp_0_rkn = Cp_0_CO2 + Cp_0_CaO - Cp_0_CaCO3\n",
      "\t\t\t#On simplification,we get the relation\n",
      "\t\t\t#Cp_0_rkn = -7.535 + 9.925*10**(-3)*T - 0.8362*10**(-5)*T**(2) + 1.784*10**(-9)*T**(3) + 4.119*10**(5)*T**(-2)\n",
      "\n",
      "delta_H_rkn_298 = delta_H_CaO_for_298 + delta_H_CO2_for_298 - delta_H_CaCO3_for_298;\t\t\t#[cal] - Enthalpy of reaction at 298.15 K\n",
      "delta_G_rkn_298 = delta_G_CaO_for_298 + delta_G_CO2_for_298 - delta_G_CaCO3_for_298;\t\t\t#[cal] - Gibbs free energy of the reaction at 298.15 K\n",
      "\n",
      "\n",
      "def f38(T): \n",
      "\t return -7.535+9.925*10**(-3)*T-0.8362*10**(-5)*T**(2)+1.784*10**(-9)*T**(3)+4.119*10**(5)*T**(-2)\n",
      "\n",
      "delta_H_rkn_1042 = delta_H_rkn_298 +  quad(f38,T_1,T_2)[0]\n",
      "\n",
      "\n",
      "print \" Standard enthalpy change of reaction at 1042 K is %f cal\"%(delta_H_rkn_1042);\n",
      "\n",
      "\t\t\t#Now determining the smath.tan(math.radiansard entropy change of reaction at 298.15 K\n",
      "delta_S_rkn_298 = (delta_H_rkn_298 - delta_G_rkn_298)/298.15;\t\t\t#[cal/K]\n",
      "\n",
      "def f39(T): \n",
      "\t return (-7.535+9.925*10**(-3)*T-0.8362*10**(-5)*T**(2)+1.784*10**(-9)*T**(3)+4.119*10**(5)*T**(-2))/T\n",
      "\n",
      "delta_S_rkn_1042 = delta_S_rkn_298 +  quad(f39,T_1,T_2)[0]\n",
      "\n",
      "\n",
      "\t\t\t#Therefore,the smath.tan(math.radiansard Gibbs free energy change of the reaction is given by,\n",
      "delta_G_rkn_1042 = delta_H_rkn_1042 - 1042*delta_S_rkn_1042;\t\t\t#[cal]\n",
      "\n",
      "print \" Standard Gibbs free energy change of reaction at 1042 K is %f cal\"%(delta_G_rkn_1042);\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Standard enthalpy change of reaction at 1042 K is 41518.919956 cal\n",
        " Standard Gibbs free energy change of reaction at 1042 K is 4873.416608 cal\n"
       ]
      }
     ],
     "prompt_number": 11
    }
   ],
   "metadata": {}
  }
 ]
}