diff options
Diffstat (limited to 'Engineering_Physics_by_Shyam_Rajeev/Chapter4.ipynb')
-rwxr-xr-x | Engineering_Physics_by_Shyam_Rajeev/Chapter4.ipynb | 196 |
1 files changed, 196 insertions, 0 deletions
diff --git a/Engineering_Physics_by_Shyam_Rajeev/Chapter4.ipynb b/Engineering_Physics_by_Shyam_Rajeev/Chapter4.ipynb new file mode 100755 index 00000000..ff17ab66 --- /dev/null +++ b/Engineering_Physics_by_Shyam_Rajeev/Chapter4.ipynb @@ -0,0 +1,196 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:cf0df6ad8ed22fd758025ea5993932acd38bbb0ea0e95c0a8bdc6e4a7c75be59"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "4: Fiber Optics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 4.1, Page number 126"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "mew = 1.5; #refractive angle for glass\n",
+ "\n",
+ "#Calculation\n",
+ "ip = math.atan(mew); #brewster's angle(radian)\n",
+ "ip = ip*180/math.pi; #brewster's angle(degree)\n",
+ "ip = math.ceil(ip*100)/100; #rounding off to 2 decimals\n",
+ "r = 90-ip; #angle of refraction(degree)\n",
+ "r = math.ceil(r*10)/10; #rounding off to 1 decimal\n",
+ "\n",
+ "#Result\n",
+ "print \"brewster's angle is\",ip,\"degrees\"\n",
+ "print \"angle of refraction is\",r,\"degrees\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "brewster's angle is 56.31 degrees\n",
+ "angle of refraction is 33.7 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 4.2, Page number 126"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "mew0 = 1.658; #refractive index of calcite\n",
+ "mew_layer = 1.550; #refractive index of canada balsam\n",
+ "\n",
+ "#Calculation\n",
+ "sinC = mew_layer/mew0; \n",
+ "C = math.asin(sinC); #critical angle(radian)\n",
+ "C = C*180/math.pi; #critical angle(degrees)\n",
+ "i = 90-C; #maximum possible inclination(degrees)\n",
+ "i = math.ceil(i*10)/10; #rounding off to 1 decimal\n",
+ "\n",
+ "#Result\n",
+ "print \"maximum possible inclination is\",i,\"degrees\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum possible inclination is 20.8 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 4.3, Page number 126"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "mew0 = 1.544; #refractive index of calcite\n",
+ "mewe = 1.533; #refractive index of canada balsam\n",
+ "lamda = 5000; #wavelength(angstrom)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda = lamda*10**-10; #wavelength(m)\n",
+ "t = lamda/(2*(mew0-mewe)); #thickness of half wave plate(m)\n",
+ "t = t*10**4;\n",
+ "t = math.ceil(t*10**4)/10**4; #rounding off to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"thickness of half wave plate is\",t,\"*10**-4 m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "thickness of half wave plate is 0.2273 *10**-4 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 4.4, Page number 126"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "l = 20; #length of glass tube(cm)\n",
+ "theta = 26.2; #polarisation angle(degrees)\n",
+ "s = 20; #weight of sugar(gm)\n",
+ "w = 100; #quantity of water(ml)\n",
+ "\n",
+ "#Calculation\n",
+ "l = l/10; #length of glass tube(dm)\n",
+ "C = s/w; #concentration(gm/cc)\n",
+ "S = theta/(l*C); #specific rotation(degrees per dm per(gm/cc))\n",
+ "\n",
+ "#Result\n",
+ "print \"specific rotation of sugar is\",S,\"degrees per dm per(gm/cc)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "specific rotation of sugar is 65.5 degrees per dm per(gm/cc)\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file |