summaryrefslogtreecommitdiff
path: root/sample_notebooks/MeenaChandrupatla/Chapter2_Gases.ipynb
blob: 88d5cb73c6878e4d4ab1f14c4674261ff269d782 (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
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 2 Gases"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 2.1,Page no.9"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "volume occupied by 20 grams of carbon dioxide= 11.61 liter\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "#given\n",
    "G= 20      #in grams\n",
    "R= 0.08205 #l−atm/mole K\n",
    "T= 30      #in Celsius\n",
    "P= 740     #in mm\n",
    "M= 44.01 \n",
    "#CALCULATIONS\n",
    "V= G*R*(273.15+T)*760/(P*M)\n",
    "#RESULTS\n",
    "V=round(V,2)\n",
    "print 'volume occupied by 20 grams of carbon dioxide=',V,'liter'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 2.2, Page no.9"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "molecular weight of hydrocarbon= 102.32 g.mole\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "#given\n",
    "G= 0.110    #in grams\n",
    "R= 0.08205  #l−atm /mole K\n",
    "T= 26.1     #Celsius\n",
    "P= 743      #in mm\n",
    "V= 0.0270\n",
    "#CALCULATIONS\n",
    "M= G*R*(273.15+T)*760/(P*V)\n",
    "#RESULTS\n",
    "M=round(M,2)\n",
    "print 'molecular weight of hydrocarbon=',M,'g.mole'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 2.4,Pg.no.10"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "pressure calculated using ideal gas law= 48.93 atm\n",
      "pressure calculated using vander wals equation= 39.12 atm\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "#given\n",
    "R= 0.08205      #l−atm degˆ−1 moleˆ−1\n",
    "T= 25           #in K\n",
    "n= 1            #mole\n",
    "V= 0.5          #liter \n",
    "b= 0.04267      #lit moleˆ−1\n",
    "a= 3.592        #lit ˆ2 atm molˆ−2\n",
    "#CALCULATIONS\n",
    "P= R*(273.15+T)/V\n",
    "P1= (R*(273.15+T)/(V-b))-(a/V**2)\n",
    "#RESULTS\n",
    "P=round(P,2)\n",
    "P1=round(P1,2)\n",
    "print 'pressure calculated using ideal gas law=',P,'atm'\n",
    "print 'pressure calculated using vander wals equation=',P1,'atm'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 2.5,Pg.no.10"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "volume occupied by mole of oxygen= 0.272 litre moleˆ−1\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "#given\n",
    "T= -88         #in Celsius\n",
    "Tc= 154.4      #in Kelvin\n",
    "Pc= 49.7       #pressure in atm\n",
    "P= 44.7        #pressure in atm\n",
    "R= 0.08205     #atm mˆ3 moleˆ−1 Kˆ−1\n",
    "r= 0.8\n",
    "#CALCULATIONS\n",
    "V= r*R*(273.15+T)/P\n",
    "#RESULTS\n",
    "V=round(V,3)\n",
    "print 'volume occupied by mole of oxygen=',V,'litre moleˆ−1'"
   ]
  }
 ],
 "metadata": {
  "anaconda-cloud": {},
  "kernelspec": {
   "display_name": "Python [Root]",
   "language": "python",
   "name": "Python [Root]"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.11"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}