summaryrefslogtreecommitdiff
path: root/Chemical_Reaction_Engineering/ch4.ipynb
blob: cd660b673e630998e93815adf4cce50e9055e7ce (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
{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 4 : Introduction to Reactor Design"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.1 page no : 88"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "a = 1.\n",
      "b = 3.\n",
      "c = 6.\n",
      "#Initial concentrations\n",
      "CAo = 100.      # feed\n",
      "CBo = 200.      # feed\n",
      "Cio = 100.      # feed\n",
      "#Final concentrations\n",
      "CA = 40.        # reacter exit\n",
      "\n",
      "# Calculations\n",
      "# Find CB,XA,XB\n",
      "ea = (6.-4.)/4;\n",
      "XA = (CAo-CA)/(CAo+ea*CA);\n",
      "eb = (ea*CBo)/(b*CAo);\n",
      "XB = b*CAo*XA/CBo;\n",
      "CB = CBo*(1-XB)/(1+eb*XB);\n",
      "\n",
      "# Results\n",
      "print \"The final concentration of BCB is %.f\"%(CB)\n",
      "print \" XA and XB are %.2f ,%.2f\"%(XA,XB)\n",
      " \n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The final concentration of BCB is 40\n",
        " XA and XB are 0.50 ,0.75\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [],
     "language": "python",
     "metadata": {},
     "outputs": []
    }
   ],
   "metadata": {}
  }
 ]
}