summaryrefslogtreecommitdiff
path: root/Chemical_Reaction_Engineering/ch8.ipynb
blob: c66d684b111fd7d63b1a6dced60b41726490a207 (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
{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 8 : Potpourri of Multiple Reactions"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.3 page no : 198"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "import math \n",
      "\n",
      "# Variables\n",
      "CAo = 185.    \n",
      "CA = 100.\n",
      "t = 30.\n",
      "\n",
      "# Calculations\n",
      "K123 = math.log(CAo/CA)/t;\n",
      "m1 = 2.;\n",
      "k2 = m1/CAo;\n",
      "\n",
      "##From the initial rate of formation of R\n",
      "m2 = 1.3;\n",
      "k1 = m2/CAo;\n",
      "k3 = K123-k1-k2;\n",
      "\n",
      "k4 = 0.0001\n",
      "while k4 <= 0.1:\n",
      "    Csmax = CAo*(k1/K123)*((K123/k4)**(k4/(k4-K123)));\n",
      "    if  Csmax>31.8 and Csmax<32.2:\n",
      "        break\n",
      "    k4 += 0.0001\n",
      "    \n",
      "k5 = 0.001\n",
      "#similarly for T\n",
      "while k5 <= 0.2:\n",
      "    Ctmax = CAo*(k3/K123)*((K123/k5)**(k5/(k5-K123)));\n",
      "    if Ctmax>9.95 and Ctmax<10.08:\n",
      "        break\n",
      "    k5 += .0001\n",
      "\n",
      "# Results\n",
      "print \" The rate constants are\"\n",
      "print \" k1 =  %.4f min**-1\"%(k1)\n",
      "print \" k2 =  %.4f min**-1\"%(k2)\n",
      "print \" k3 =  %.4f min**-1\"%(k3)\n",
      "print \" k4 =  %.4f min**-1\"%(k4)\n",
      "print \" k5 =  %.4f min**-1\"%(k5)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " The rate constants are\n",
        " k1 =  0.0070 min**-1\n",
        " k2 =  0.0108 min**-1\n",
        " k3 =  0.0027 min**-1\n",
        " k4 =  0.0099 min**-1\n",
        " k5 =  0.0157 min**-1\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [],
     "language": "python",
     "metadata": {},
     "outputs": []
    }
   ],
   "metadata": {}
  }
 ]
}