summaryrefslogtreecommitdiff
path: root/Physical_Chemistry_by_D._Farrington/Chapter19.ipynb
blob: 7e84c41eb4c74e1d763faadf72cc8afead0f2b37 (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
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter19 Statistical Mechanics"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 19.1,Page no.73"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Wabc = 6\n",
      "Waab = 3\n",
      "Waaa = 1\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "#initialisation of variables\n",
    "Na=1\n",
    "Nb=1\n",
    "Nc=1\n",
    "Na1=2\n",
    "Nb1=1\n",
    "Nc1=0\n",
    "Na2=3 \n",
    "Nb2=0 \n",
    "Nc2=0 \n",
    "#CALCULATIONS \n",
    "Wabc=math.factorial(Na+Nb+Nc)/(math.factorial(Na)*math.factorial( Nb)*math.factorial(Nc))\n",
    "Waab=math.factorial(Na1+Nb1+Nc1)/(math.factorial(Na1)*math.factorial(Nb1)*math.factorial(Nc1))\n",
    "Waaa=math.factorial(Na2+Nb2+Nc2)/(math.factorial(Na2)*math.factorial(Nb2)*math.factorial(Nc2))\n",
    "#RESULTS\n",
    "print 'Wabc =',Wabc\n",
    "print 'Waab =',Waab\n",
    "print 'Waaa =',Waaa"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 19.2,Page no.74"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Enthalpy = 36.586 cal degˆ−1 moleˆ−1\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "#initialisation of variables\n",
    "K=4.9860 # cal degˆ−1 moleˆ−1\n",
    "K1=-31.6 # cal degˆ−1 moleˆ−1\n",
    "#CALCULATIONS\n",
    "S=K-K1\n",
    "#RESULTS\n",
    "S=round(S,3)\n",
    "print 'Enthalpy =',S,'cal degˆ−1 moleˆ−1'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 19.4,Page no.74"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Transitional energy 31.704 cal degˆ−1 mole ˆ−1\n",
      "rotational energy = 5.916 cal degˆ−1 mole ˆ−1\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "#initialisation of variables\n",
    "No=0.979889\n",
    "v=2989.74 #cmˆ−1\n",
    "rc=1.2746 #A\n",
    "T=25 #C\n",
    "E1=6.8635 # cal degˆ−1 moleˆ−1\n",
    "E2=11.4392 # cal degˆ−1 moleˆ−1 \n",
    "E3= 7.2820 # cal degˆ−1 moleˆ−1 \n",
    "E4= 4.5757 # cal degˆ−1 moleˆ−1 \n",
    "E5= 2.7676 # cal degˆ−1 moleˆ−1 \n",
    "r1= 0.265 #A \n",
    "r= 35.99 #A \n",
    "#CALCULATIONS \n",
    "Et=E1*math.log10(r)+E2*math.log10 (273.15+T)-E3\n",
    "Ei=E4*math.log10(r1)+E4*math.log10 (273.15+T)-E5\n",
    "#RESULTS\n",
    "Et=round(Et,3)\n",
    "Ei=round(Ei,3)\n",
    "print 'Transitional energy',Et,'cal degˆ−1 mole ˆ−1'\n",
    "print 'rotational energy =',Ei,'cal degˆ−1 mole ˆ−1'"
   ]
  }
 ],
 "metadata": {
  "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
}