summaryrefslogtreecommitdiff
path: root/Principles_of_Physics_by_F.J.Bueche/Chapter24_1.ipynb
blob: bce619dacd013f52fb7a9c6f67e30b77592c2a25 (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
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 24:Interference and Diffraction"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex24.1:pg-1130"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The angle at which the reinforcement line occurs is theta2= 44.0  degrees\n"
     ]
    }
   ],
   "source": [
    "  #Example 24_1\n",
    "import math \n",
    "  \n",
    "  #To find the angle at which the reinforcement line occurs\n",
    "n=2      #units in constant\n",
    "lamda=0.7         #units in cm\n",
    "d=2          #units in cm\n",
    "theta2=math.asin((n*lamda)/d)*180/math.pi       #Units in degrees\n",
    "print \"The angle at which the reinforcement line occurs is theta2=\",round(theta2),\" degrees\"\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex24.2:pg-1131"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The thickness of air gap increases by= 294.0  nm\n"
     ]
    }
   ],
   "source": [
    "  #Example 24_2\n",
    "import math \n",
    "  \n",
    "  #To find by how much does thickness of air gap increases\n",
    "lamda=589           #units in nm\n",
    "gap=round(lamda/2)          #units in nm\n",
    "print \"The thickness of air gap increases by=\",round(gap),\" nm\"\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex24.3:pg-1132"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The thickness that should be coated for minimum reflection is L= 99.6  nm\n"
     ]
    }
   ],
   "source": [
    "  #Example 24_3\n",
    "import math \n",
    "  \n",
    "  #To find the thickness that should be coated for minimum reflection\n",
    "lamda=550         #units in nm\n",
    "n=1.38            #units in constant\n",
    "L=(lamda/2)/(2*n)         #units in nm\n",
    "print \"The thickness that should be coated for minimum reflection is L=\",round(L,1),\" nm\"\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex24.4:pg-1133"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "For the first order theta1= 32.0  degrees\n",
      "For the second order theta2= 53.0  degrees\n",
      "\n",
      " As it is impossible for the sine of angle that is= 1.18  radians to be greater that unity this second order and higher order images doesnot exist\n"
     ]
    }
   ],
   "source": [
    "  #Example 24_4\n",
    "\n",
    "import math \n",
    "  \n",
    "#To find out the angle at which the line appears\n",
    "line=5.89*10**-7          #Units in meters\n",
    "noline=1/10.0**6         #units in Lines per meter\n",
    "theta1=math.sin(line/noline)*180/math.pi      #units in degrees\n",
    "#For second order\n",
    "theta2=math.sin(2*line/noline)*180/math.pi      #units in degrees\n",
    "print \"For the first order theta1=\",round(theta1),\" degrees\\nFor the second order theta2=\",round(theta2),\" degrees\"\n",
    "sinevalue=2*line/noline        #units in radians\n",
    "print \"\\n As it is impossible for the sine of angle that is=\",round(sinevalue,2),\" radians to be greater that unity this second order and higher order images doesnot exist\"\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "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
}