summaryrefslogtreecommitdiff
path: root/Physics_for_BSc(Paper-3)/Chapter8.ipynb
blob: 5ea804c395599436ae6d096139fea352ad0ba392 (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:7c85091bd4e24d60bc3e76c728778479287ddcc4fa6749b5ce2d1adbd2e10621"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "8: Maxwell's equations"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 8.1, Page number 234"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "K=4.3;     #dielectric constant\n",
      "c=3*10**8;   #velocity of light in vacuum\n",
      "\n",
      "#Calculation\n",
      "n=round(math.sqrt(K),2);    #refractive index of quartz\n",
      "v=c/n;    #velocity of light in quartz(m/s)\n",
      "\n",
      "#Result\n",
      "print \"refractive index of quartz is\",n\n",
      "print \"velocity of light in quartz is\",round(v/10**8,2),\"*10**8 m/s\"\n",
      "print \"answer for velocity given in the book is wrong\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "refractive index of quartz is 2.07\n",
        "velocity of light in quartz is 1.45 *10**8 m/s\n",
        "answer for velocity given in the book is wrong\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 8.2, Page number 235"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "epsilon0=8.87*10**-12;   #dielectric permittivity of free space\n",
      "E=1.2*10**6;     #electric field intensity(N/C)\n",
      "\n",
      "#Calculation\n",
      "Ed=(1/2)*epsilon0*(E**2);     #energy density(J/m**2)\n",
      "\n",
      "#Result\n",
      "print \"energy density is\",round(Ed,3),\"J/m**2\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "energy density is 6.386 J/m**2\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 8.3, Page number 235"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "E0=3*10**6;    #dielectric voltage(V/m)\n",
      "c=3*10**8;   #velocity of light in vacuum\n",
      "mew0=4*math.pi*10**-7;   \n",
      "\n",
      "#Calculation\n",
      "Av=(E0**2)/(2*c*mew0);    #average value of Poynting vector(W/m**2)\n",
      "\n",
      "#Result\n",
      "print \"average value of Poynting vector is\",round(Av/10**11,2),\"*10**11 W/m**2\"\n",
      "print \"answer given in the book is wrong\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "average value of Poynting vector is 0.12 *10**11 W/m**2\n",
        "answer given in the book is wrong\n"
       ]
      }
     ],
     "prompt_number": 13
    }
   ],
   "metadata": {}
  }
 ]
}