summaryrefslogtreecommitdiff
path: root/Elements_of_Physical_Chemistry_by_Atkins_Peter/chapter0.ipynb
blob: 4cc1774a6bacf0bde6488b2fc911188396d2a3b7 (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
{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 0 - Introduction"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E1 - Pg 4"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Calculate the final pressure of the gas\n",
      "#Initialization of variables\n",
      "P=1.115 #bar\n",
      "#Calculations\n",
      "Conv_fac=1/1.01325\n",
      "FinalP=Conv_fac*P #Final pressure\n",
      "#Results\n",
      "print '%s %.3f' %('Final pressure in atmospheres (atm)= ',FinalP)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Final pressure in atmospheres (atm)=  1.100\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example I1 - Pg 5"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Calculate the pressure at the foot of the column\n",
      "#Initialization of variables\n",
      "h=0.760 #m\n",
      "d=1.36*10000 #kg/m^3\n",
      "#Calculations\n",
      "P=9.81*d*h\n",
      "#Results\n",
      "print '%s %.3e' %('Pressure at the foot of the column (Pa)= ',P)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Pressure at the foot of the column (Pa)=  1.014e+05\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example I2 - Pg 6"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the hydrostatic pressure and pressure in apparatus\n",
      "#Initialization of variables\n",
      "h=0.1 #m\n",
      "d=1000 #Kg/m^3\n",
      "Patm=100021. #Pa\n",
      "#Calculations\n",
      "P=9.81*h*d\n",
      "Papp=(Patm-P)/1000.\n",
      "#Results\n",
      "print '%s %.3f' %('Hydrostatic pressure(Pa) = ',P )\n",
      "print '%s %.3f' %('\\n Pressure in apparatus(kPa) = ',Papp)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Hydrostatic pressure(Pa) =  981.000\n",
        "\n",
        " Pressure in apparatus(kPa) =  99.040\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example I3 - Pg 8"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Calculate the no.of moles of copper required\n",
      "import math\n",
      "#Initialization of variables\n",
      "N=8.8*math.pow(10,22)\n",
      "NA=6.023*math.pow(10,23) #mol^-1\n",
      "#Calculations\n",
      "n=N/NA\n",
      "#Results\n",
      "print '%s %.2f' %('No. of moles of Cu ( mol Cu)= ',n)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "No. of moles of Cu ( mol Cu)=  0.15\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example I4 - Pg 9"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the amount of Carbon atoms \n",
      "#Initialization of variables\n",
      "m=21.5 #g\n",
      "Mc=12.01 #g/mol\n",
      "#Calculations\n",
      "nc=m/Mc\n",
      "#Results\n",
      "print '%s %.2f %s' %(\"Amount of C atoms=\",nc,\"mol C\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Amount of C atoms= 1.79 mol C\n"
       ]
      }
     ],
     "prompt_number": 5
    }
   ],
   "metadata": {}
  }
 ]
}