summaryrefslogtreecommitdiff
path: root/sample_notebooks/ajinkyakhair/Untitled3_1.ipynb
blob: c9360e0191b68a43e1d6d77a4aef7b4faffc1970 (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
{
 "metadata": {
  "celltoolbar": "Raw Cell Format",
  "name": "",
  "signature": "sha256:1b9250434a66c555344f74813ca967ce998b1c86d33424d56ca71d7c748c63ce"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 1: Interference"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1.7, Page number 1-19"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "#Given Data:\n",
      "i=30         #angle of incidence\n",
      "u=1.43               #Refractive index of a soap film\n",
      "lamda=6*10**-7          #wavelength of light\n",
      "n=1                  #For minimum thickness\n",
      "\n",
      "#Calculations:\n",
      "#u=sin i/sin r      #Snell's law   .So,\n",
      "r=math.degrees(math.asin(math.sin(i)/u))    #angle of reflection\n",
      "\n",
      "#Now, condition of minima in transmitted system is\n",
      "#2ut*cos(r)=(2n-1)lam/2\n",
      "t=lamda/(2*2*u*math.cos(r))      #minimum thickness of film\n",
      "print\"Minimum thickness of film is \",t,\"m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Minimum thickness of film is  1.09096619878e-07 m\n"
       ]
      }
     ],
     "prompt_number": 17
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1.8, Page number 1-19"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#Given Data:\n",
      "\n",
      "lamda = 5893*10**-10      #Wavelength of light\n",
      "theta = 1               #assuming value of theta\n",
      "\n",
      "#We know, B=lam/(2*u*theta). Here u=1\n",
      "B = lamda/(2*theta)       #fringe spacing\n",
      "n=20                  #interference fringes\n",
      "\n",
      "#Calculations:\n",
      "#t=n*B*tan(theta)\n",
      "t = 20*B*theta          #Thickness of wire\n",
      "print\"Thickness of wire is =\",t,\"m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Thickness of wire is = 5.893e-06 m\n"
       ]
      }
     ],
     "prompt_number": 18
    }
   ],
   "metadata": {}
  }
 ]
}