summaryrefslogtreecommitdiff
path: root/Engineering_Physics_by_Bhattacharya_Bhaskaran/Chapter2.ipynb
blob: a5d2bc975578daecbd521fb3c6e42e168c26e964 (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:ac80f9dfe1725f11a5d4ce0fbda5ffed825d99c680f116629e5e3fcb8b69c198"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Lasers"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 2.1, Page number 52"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#To calculate the relative population \n",
      "\n",
      "#importing modules\n",
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "lamda = 590;        #wavelength(nm)\n",
      "h = 6.625*10**-34;       #planck's constant\n",
      "c = 3*10**8;            #velocity of light(m/s)\n",
      "k = 1.38*10**-23;       #boltzmann's constant\n",
      "T = 523;                #temperature(Kelvin)\n",
      "\n",
      "#Calculation\n",
      "lamda = lamda*10**-9;      #wavelength(m)      \n",
      "#n1byn2 = math.exp(-(E2-E1)/(k*T))\n",
      "#but E2-E1 = h*new and new = c/lamda\n",
      "#therefore n1byn2 = math.exp(-h*c/(lamda*k*T))\n",
      "n1byn2 = math.exp(-h*c/(lamda*k*T));\n",
      "\n",
      "#Result\n",
      "print \"relative population of Na atoms is\",n1byn2"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "relative population of Na atoms is 5.36748316686e-21\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 2.2, Page number 53"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#To calculate the ratio of stimulated to spontaneous emission \n",
      "\n",
      "#importing modules\n",
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "lamda = 590;        #wavelength(nm)\n",
      "h = 6.625*10**-34;       #planck's constant\n",
      "c = 3*10**8;            #velocity of light(m/s)\n",
      "k = 1.38*10**-23;       #boltzmann's constant\n",
      "T = 523;                #temperature(Kelvin)\n",
      "\n",
      "#Calculation\n",
      "lamda = lamda*10**-9;      #wavelength(m)      \n",
      "#n21dashbyn21 = 1/(math.exp(h*new/(k*T))-1)\n",
      "#but new = c/lamda\n",
      "#therefore n21dashbyn21 = 1/(math.exp(h*c/(lamda*k*T))-1)\n",
      "A = math.exp(h*c/(lamda*k*T))-1;\n",
      "n21dashbyn21 = 1/A;    \n",
      "\n",
      "#Result\n",
      "print \"ratio of stimulated to spontaneous emission is\",n21dashbyn21\n",
      "print \"answer given in the book is wrong\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "ratio of stimulated to spontaneous emission is 5.36748316686e-21\n",
        "answer given in the book is wrong\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 2.3, Page number 53"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#To calculate the number of photons emitted \n",
      "\n",
      "#importing modules\n",
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "lamda = 632.8;        #wavelength of laser(nm)\n",
      "h = 6.625*10**-34;       #planck's constant\n",
      "c = 3*10**8;            #velocity of light(m/s)\n",
      "p = 3.147;              #output power(mW)\n",
      "\n",
      "#Calculation\n",
      "p = p*10**-3;          #output power(W)\n",
      "lamda = lamda*10**-9;      #wavelength(m)      \n",
      "new = c/lamda;             #frequency(Hz)\n",
      "E = h*new;                 #energy of each photon(J)\n",
      "Em = p*60;                 #energy emitted per minute(J/min)\n",
      "N = Em/E;                  #number of photons emitted per second\n",
      "\n",
      "#Result\n",
      "print \"number of photons emitted per second is\",N"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "number of photons emitted per second is 6.01183879245e+17\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [],
     "language": "python",
     "metadata": {},
     "outputs": []
    }
   ],
   "metadata": {}
  }
 ]
}