From f270f72badd9c61d48f290c3396004802841b9df Mon Sep 17 00:00:00 2001 From: kinitrupti Date: Fri, 12 May 2017 18:53:46 +0530 Subject: Removed duplicates --- .../Chapter_2_Light_propagation_in.ipynb | 430 +++++++++++ .../Chapter_2_Light_propagation_in_optical.ipynb | 430 ----------- .../ManikandanD/Chapter_2_Motion_in_a.ipynb | 825 +++++++++++++++++++++ .../Chapter_2_Motion_in_a_straight.ipynb | 825 --------------------- 4 files changed, 1255 insertions(+), 1255 deletions(-) create mode 100755 sample_notebooks/ManikandanD/Chapter_2_Light_propagation_in.ipynb delete mode 100755 sample_notebooks/ManikandanD/Chapter_2_Light_propagation_in_optical.ipynb create mode 100755 sample_notebooks/ManikandanD/Chapter_2_Motion_in_a.ipynb delete mode 100755 sample_notebooks/ManikandanD/Chapter_2_Motion_in_a_straight.ipynb (limited to 'sample_notebooks/ManikandanD') diff --git a/sample_notebooks/ManikandanD/Chapter_2_Light_propagation_in.ipynb b/sample_notebooks/ManikandanD/Chapter_2_Light_propagation_in.ipynb new file mode 100755 index 00000000..fb6cc7a3 --- /dev/null +++ b/sample_notebooks/ManikandanD/Chapter_2_Light_propagation_in.ipynb @@ -0,0 +1,430 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:e126fa636efa72af4b20cd3702da45f085d125811e3d4b6de05ba5fde96d2c77" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2:Light propagation in optical ber" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1 , Page no:30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "ncore=1.46; #refractive index of core\n", + "nclad=1; #refractive index of cladding\n", + "c=3e5; #velocity of light in Km/s\n", + "L=1; #length of path in Km\n", + "\n", + "#CALCULATIONS\n", + "NA=math.sqrt(ncore**2-nclad**2); #Numerical aperture\n", + "delt_tau_by_L=(NA**2)/(2*c*ncore); #multipath pulse broadening in s/Km\n", + "delt_tau=delt_tau_by_L*L; #bandwidth distance product Hz\n", + "BL=(1/delt_tau)*L; #bandwidth distance product Hz\n", + "#case-2\n", + "ncore1=1.465; #refractive index of core\n", + "nclad1=1.45; #refractive index of cladding\n", + "NA1=math.sqrt(ncore1**2-nclad1**2); #Numerical aperture\n", + "delt_tau_by_L1=(NA1**2)/(2*c*ncore1); #multipath pulse broadening in s/m\n", + "BL1=(1/delt_tau_by_L1)*L; #bandwidth distance product Hz\n", + "\n", + "#RESULTS\n", + "print\"Numerical aperture=\",round(NA,5); #The answers vary due to round off error\n", + "print\"\\nMultipath pulse broadening=\",round(delt_tau_by_L*1e9,5),\"ns/Km\"; #The answer provided in the textbook is wrong//multiplication by 1e9 to convert s/Km to ns/Km \n", + "print\"\\nBandwidth distance product=\",round(BL*1e-6,5),\"GHz \"; #The answer provided in the textbook is wrong//multiplication by 1e-6 to convert Hz to MHz\n", + "print\"\\n\\nNumerical aperture=\",round(NA1,5);\n", + "print\"\\nMultipath pulse broadening=\",round(delt_tau_by_L1*1e9,5),\"ns/Km\"; #The answer provided in the textbook is wrong//multiplication by 1e9 to convert s/Km to ns/Km \n", + "print\"\\nBandwidth distance product=\",round(BL1*1e-9,5),\"GHz \"; #The answer provided in the textbook is wrong//multiplication by 1e-6 to convert Hz to GHz" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Numerical aperture= 1.06377\n", + "\n", + "Multipath pulse broadening= 1291.78082 ns/Km\n", + "\n", + "Bandwidth distance product= 0.77413 GHz \n", + "\n", + "\n", + "Numerical aperture= 0.20911\n", + "\n", + "Multipath pulse broadening= 49.74403 ns/Km\n", + "\n", + "Bandwidth distance product= 0.0201 GHz \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2 , Page no:30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "lamda1=0.7; #wavelength in um\n", + "lamda2=1.3; #wavelength in um\n", + "lamda3=2; #wavelength in um\n", + "\n", + "#CALCULATIONS\n", + "f_lambda1=(303.33*(lamda1**-1)-233.33); #equation for lambda1\n", + "f_lambda2=(303.33*(lamda2**-1)-233.33); #equation for lambda2\n", + "f_lambda3=(303.33*(lamda3**-1)-233.33); #equation for lambda3\n", + "\n", + "#RESULTS\n", + "print\"Material dispersion at Lambda 0.7um=\",round(f_lambda1,5);\n", + "print\"\\nMaterial dispersion at Lambda 1.3um=\",round(f_lambda2,5); #The answers vary due to round off error\n", + "print\"\\nMaterial dispersion at Lambda 2um=\",round(f_lambda3,5); #The answers vary due to round off error\n", + "print\"\\nIts is a standard silica fiber\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Material dispersion at Lambda 0.7um= 199.99857\n", + "\n", + "Material dispersion at Lambda 1.3um= 0.00077\n", + "\n", + "Material dispersion at Lambda 2um= -81.665\n", + "\n", + "Its is a standard silica fiber\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 , Page no:32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "ncore=1.505; #refractive index of core\n", + "nclad=1.502; #refractive index of cladding\n", + "V=2.4; #v no. for single mode \n", + "lambda1=1300e-9; #operating wavelength in m\n", + "\n", + "#CALCULATIONS\n", + "NA=math.sqrt(ncore**2-nclad**2); #numerical aperture\n", + "a=V*(lambda1)/(2*3.14*NA); #dimension of fiber core in m\n", + "\n", + "#RESULTS\n", + "print\"The numarical aperture =\",round(NA,5);\n", + "print\"\\n Dimension of fiber core =\",round(a*1e6,5),\"um\"; #multiplication by 1e6 to convert unit from m to um" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The numarical aperture = 0.09498\n", + "\n", + " Dimension of fiber core = 5.23079 um\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4 , Page no:33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "V=2; #v no. for single mode \n", + "a=4; #radius of fiber in um\n", + "\n", + "#CALCULATIONS\n", + "w=a*(0.65+1.619*V**(-3/2)+2.87*V**-6); #effective mode radius in um\n", + "\n", + "#RESULTS\n", + "print\"Effective mode radius =\",round(w,5),\"um\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Effective mode radius = 5.06899 um\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6 , Page no:34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "m=0; #for dominant mode\n", + "v=0; #for dominant mode\n", + "n1=1.5; #refractive index of core\n", + "delta=0.01; #core clad index difference\n", + "a=5; #fiber radius in um\n", + "lambda1=1.3; #wavelength of operation in um\n", + "\n", + "#CALCULATIONS\n", + "k0=(2*3.14/lambda1); #constant in /m\n", + "beta=math.sqrt((k0**2)*(n1**2)-(2*k0*n1*math.sqrt(2*delta)/a)); #propagation constant in rad/um\n", + "\n", + "#RESULTS\n", + "print\"Propagation constant=\",round(beta,5),\"rad/um\"; #The answers vary due to round off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Propagation constant= 7.21781 rad/um\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8 , Page no:34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "M=1000; #modes supported\n", + "lambda1=1.3; #operating wavelength in um\n", + "n1=1.5; #refractive index of core\n", + "n2=1.48; #refractive index of cladding\n", + "\n", + "#CALCULATIONS\n", + "V=math.sqrt(2*M); #normalised frequency V no.\n", + "NA=math.sqrt(n1**2-n2**2); #numerical apperture\n", + "R=lambda1*V/(2*3.14*NA); #radius of fiber in um\n", + "\n", + "#RESULTS\n", + "print\"Core Radius=\",round(R,5),\"um\"; #The answer provided in the textbook is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Core Radius= 37.92063 um\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.9 , Page no:35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "lambda1=1.3; #wavelength of operation in um\n", + "n1=1.5; #refractive index of core\n", + "n2=1.48; #refractive index of cladding\n", + "k0=2*3.14/lambda1; #constant in /m\n", + "\n", + "#CALCULATIONS\n", + "#case-1\n", + "b=0.5; #normalized propagation constant\n", + "k0=2*3.14/lambda1; #constant\n", + "beta=k0*math.sqrt(n2**2+b*(n1**2-n2**2)); #propagation constant\n", + "\n", + "#case-2\n", + "#given \n", + "lambda1=1.3; #wavelength of operation in um\n", + "n1=1.5; #refractive index of core\n", + "n2=1.48; #refractive index of cladding\n", + "k0=2*3.14/lambda1; #constant in /m\n", + "b=0.5; #normalized propagation constant\n", + "k0=2*3.14/lambda1; #constant\n", + "b1=(((n1+n2)/2)**2-n2**2)/(n1**2-n2**2); #normalized propagation constant\n", + "\n", + "#case-3\n", + "#given \n", + "lambda1=1.3; #wavelength of operation in um\n", + "n1=1.5; #refractive index of core\n", + "n21=1.0; #refractive index of cladding\n", + "k0=2*3.14/lambda1; #constant in /m\n", + "b=0.5; #normalized propagation constant\n", + "k0=2*3.14/lambda1; #constant\n", + "beta1=k0*math.sqrt(n21**2+b*(n1**2-n21**2)); #propagation constant\n", + "\n", + "#RESULTS\n", + "print\"Propagation constant=\",round(beta,5),\"rad/um\"; #The answers vary due to round off error\n", + "print\"\\nPropagation constant=\",round(b1,5); #The answers vary due to round off error\n", + "print\"\\nPropagation constant=\",round(beta1,5),\"rad/um\"; #The answers vary due to round off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Propagation constant= 7.19801 rad/um\n", + "\n", + "Propagation constant= 0.49832\n", + "\n", + "Propagation constant= 6.15805 rad/um\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.10 , Page no:35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "#case-1\n", + "n1=1.49; #refractive index of core\n", + "n2=1.46; #refractive index of cladding\n", + "c=3*10**5; #speed of light in Km/s\n", + "t1=n1/c; #time delay for one traveling along axis in s/Km\n", + "t2=(n1**2/n2)/c; #time delay for one traveling along path that is totally reflecting at the first interface in s/km\n", + "\n", + "#case-2\n", + "n11=1.47; #refractive index of core\n", + "n21=1.46; #refractive index of cladding\n", + "c1=3*10**5; #speed of light in Km/s\n", + "t11=n11/c1; #time delay for one traveling along axis in\n", + "t22=(n11**2/n21)/c1; #time delay for one traveling along path that is totally reflecting at the first interface\n", + "\n", + "\n", + "print\"time delay for traveling along axis =\",round(t1*1e6,5),\"us/Km\"; #multiplication by 1e6 to convert the unit from s/Km to us/Km\n", + "print\"\\ntime delay for traveling along path that is totally reflecting at the first interface =\",round(t2*1e6,5),\"us/Km\"; #multiplication by 1e6 to convert the unit from s/Km to us/Km\n", + "print\"\\ntime delay for traveling along axis =\",round(t11*1e6,5),\"us/Km\"; #multiplication by 1e6 to convert the unit from s/Km to us/Km\n", + "print\"\\ntime delay for traveling along path that is totally reflecting at the first interface =\",round(t22*1e6,5),\"us/Km\"; #multiplication by 1e6 to convert the unit from s/Km to us/Km\n", + "#The answer provided in the textbook is wrong it has got wrong unit" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "time delay for traveling along axis = 4.96667 us/Km\n", + "\n", + "time delay for traveling along path that is totally reflecting at the first interface = 5.06872 us/Km\n", + "\n", + "time delay for traveling along axis = 4.9 us/Km\n", + "\n", + "time delay for traveling along path that is totally reflecting at the first interface = 4.93356 us/Km\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/ManikandanD/Chapter_2_Light_propagation_in_optical.ipynb b/sample_notebooks/ManikandanD/Chapter_2_Light_propagation_in_optical.ipynb deleted file mode 100755 index fb6cc7a3..00000000 --- a/sample_notebooks/ManikandanD/Chapter_2_Light_propagation_in_optical.ipynb +++ /dev/null @@ -1,430 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:e126fa636efa72af4b20cd3702da45f085d125811e3d4b6de05ba5fde96d2c77" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 2:Light propagation in optical ber" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.1 , Page no:30" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#initialisation of variables\n", - "ncore=1.46; #refractive index of core\n", - "nclad=1; #refractive index of cladding\n", - "c=3e5; #velocity of light in Km/s\n", - "L=1; #length of path in Km\n", - "\n", - "#CALCULATIONS\n", - "NA=math.sqrt(ncore**2-nclad**2); #Numerical aperture\n", - "delt_tau_by_L=(NA**2)/(2*c*ncore); #multipath pulse broadening in s/Km\n", - "delt_tau=delt_tau_by_L*L; #bandwidth distance product Hz\n", - "BL=(1/delt_tau)*L; #bandwidth distance product Hz\n", - "#case-2\n", - "ncore1=1.465; #refractive index of core\n", - "nclad1=1.45; #refractive index of cladding\n", - "NA1=math.sqrt(ncore1**2-nclad1**2); #Numerical aperture\n", - "delt_tau_by_L1=(NA1**2)/(2*c*ncore1); #multipath pulse broadening in s/m\n", - "BL1=(1/delt_tau_by_L1)*L; #bandwidth distance product Hz\n", - "\n", - "#RESULTS\n", - "print\"Numerical aperture=\",round(NA,5); #The answers vary due to round off error\n", - "print\"\\nMultipath pulse broadening=\",round(delt_tau_by_L*1e9,5),\"ns/Km\"; #The answer provided in the textbook is wrong//multiplication by 1e9 to convert s/Km to ns/Km \n", - "print\"\\nBandwidth distance product=\",round(BL*1e-6,5),\"GHz \"; #The answer provided in the textbook is wrong//multiplication by 1e-6 to convert Hz to MHz\n", - "print\"\\n\\nNumerical aperture=\",round(NA1,5);\n", - "print\"\\nMultipath pulse broadening=\",round(delt_tau_by_L1*1e9,5),\"ns/Km\"; #The answer provided in the textbook is wrong//multiplication by 1e9 to convert s/Km to ns/Km \n", - "print\"\\nBandwidth distance product=\",round(BL1*1e-9,5),\"GHz \"; #The answer provided in the textbook is wrong//multiplication by 1e-6 to convert Hz to GHz" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Numerical aperture= 1.06377\n", - "\n", - "Multipath pulse broadening= 1291.78082 ns/Km\n", - "\n", - "Bandwidth distance product= 0.77413 GHz \n", - "\n", - "\n", - "Numerical aperture= 0.20911\n", - "\n", - "Multipath pulse broadening= 49.74403 ns/Km\n", - "\n", - "Bandwidth distance product= 0.0201 GHz \n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.2 , Page no:30" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#initialisation of variables\n", - "lamda1=0.7; #wavelength in um\n", - "lamda2=1.3; #wavelength in um\n", - "lamda3=2; #wavelength in um\n", - "\n", - "#CALCULATIONS\n", - "f_lambda1=(303.33*(lamda1**-1)-233.33); #equation for lambda1\n", - "f_lambda2=(303.33*(lamda2**-1)-233.33); #equation for lambda2\n", - "f_lambda3=(303.33*(lamda3**-1)-233.33); #equation for lambda3\n", - "\n", - "#RESULTS\n", - "print\"Material dispersion at Lambda 0.7um=\",round(f_lambda1,5);\n", - "print\"\\nMaterial dispersion at Lambda 1.3um=\",round(f_lambda2,5); #The answers vary due to round off error\n", - "print\"\\nMaterial dispersion at Lambda 2um=\",round(f_lambda3,5); #The answers vary due to round off error\n", - "print\"\\nIts is a standard silica fiber\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Material dispersion at Lambda 0.7um= 199.99857\n", - "\n", - "Material dispersion at Lambda 1.3um= 0.00077\n", - "\n", - "Material dispersion at Lambda 2um= -81.665\n", - "\n", - "Its is a standard silica fiber\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.3 , Page no:32" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#initialisation of variables\n", - "ncore=1.505; #refractive index of core\n", - "nclad=1.502; #refractive index of cladding\n", - "V=2.4; #v no. for single mode \n", - "lambda1=1300e-9; #operating wavelength in m\n", - "\n", - "#CALCULATIONS\n", - "NA=math.sqrt(ncore**2-nclad**2); #numerical aperture\n", - "a=V*(lambda1)/(2*3.14*NA); #dimension of fiber core in m\n", - "\n", - "#RESULTS\n", - "print\"The numarical aperture =\",round(NA,5);\n", - "print\"\\n Dimension of fiber core =\",round(a*1e6,5),\"um\"; #multiplication by 1e6 to convert unit from m to um" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The numarical aperture = 0.09498\n", - "\n", - " Dimension of fiber core = 5.23079 um\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.4 , Page no:33" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#initialisation of variables\n", - "V=2; #v no. for single mode \n", - "a=4; #radius of fiber in um\n", - "\n", - "#CALCULATIONS\n", - "w=a*(0.65+1.619*V**(-3/2)+2.87*V**-6); #effective mode radius in um\n", - "\n", - "#RESULTS\n", - "print\"Effective mode radius =\",round(w,5),\"um\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Effective mode radius = 5.06899 um\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.6 , Page no:34" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#initialisation of variables\n", - "m=0; #for dominant mode\n", - "v=0; #for dominant mode\n", - "n1=1.5; #refractive index of core\n", - "delta=0.01; #core clad index difference\n", - "a=5; #fiber radius in um\n", - "lambda1=1.3; #wavelength of operation in um\n", - "\n", - "#CALCULATIONS\n", - "k0=(2*3.14/lambda1); #constant in /m\n", - "beta=math.sqrt((k0**2)*(n1**2)-(2*k0*n1*math.sqrt(2*delta)/a)); #propagation constant in rad/um\n", - "\n", - "#RESULTS\n", - "print\"Propagation constant=\",round(beta,5),\"rad/um\"; #The answers vary due to round off error" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Propagation constant= 7.21781 rad/um\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.8 , Page no:34" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#initialisation of variables\n", - "M=1000; #modes supported\n", - "lambda1=1.3; #operating wavelength in um\n", - "n1=1.5; #refractive index of core\n", - "n2=1.48; #refractive index of cladding\n", - "\n", - "#CALCULATIONS\n", - "V=math.sqrt(2*M); #normalised frequency V no.\n", - "NA=math.sqrt(n1**2-n2**2); #numerical apperture\n", - "R=lambda1*V/(2*3.14*NA); #radius of fiber in um\n", - "\n", - "#RESULTS\n", - "print\"Core Radius=\",round(R,5),\"um\"; #The answer provided in the textbook is wrong" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Core Radius= 37.92063 um\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.9 , Page no:35" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#initialisation of variables\n", - "lambda1=1.3; #wavelength of operation in um\n", - "n1=1.5; #refractive index of core\n", - "n2=1.48; #refractive index of cladding\n", - "k0=2*3.14/lambda1; #constant in /m\n", - "\n", - "#CALCULATIONS\n", - "#case-1\n", - "b=0.5; #normalized propagation constant\n", - "k0=2*3.14/lambda1; #constant\n", - "beta=k0*math.sqrt(n2**2+b*(n1**2-n2**2)); #propagation constant\n", - "\n", - "#case-2\n", - "#given \n", - "lambda1=1.3; #wavelength of operation in um\n", - "n1=1.5; #refractive index of core\n", - "n2=1.48; #refractive index of cladding\n", - "k0=2*3.14/lambda1; #constant in /m\n", - "b=0.5; #normalized propagation constant\n", - "k0=2*3.14/lambda1; #constant\n", - "b1=(((n1+n2)/2)**2-n2**2)/(n1**2-n2**2); #normalized propagation constant\n", - "\n", - "#case-3\n", - "#given \n", - "lambda1=1.3; #wavelength of operation in um\n", - "n1=1.5; #refractive index of core\n", - "n21=1.0; #refractive index of cladding\n", - "k0=2*3.14/lambda1; #constant in /m\n", - "b=0.5; #normalized propagation constant\n", - "k0=2*3.14/lambda1; #constant\n", - "beta1=k0*math.sqrt(n21**2+b*(n1**2-n21**2)); #propagation constant\n", - "\n", - "#RESULTS\n", - "print\"Propagation constant=\",round(beta,5),\"rad/um\"; #The answers vary due to round off error\n", - "print\"\\nPropagation constant=\",round(b1,5); #The answers vary due to round off error\n", - "print\"\\nPropagation constant=\",round(beta1,5),\"rad/um\"; #The answers vary due to round off error" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Propagation constant= 7.19801 rad/um\n", - "\n", - "Propagation constant= 0.49832\n", - "\n", - "Propagation constant= 6.15805 rad/um\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.10 , Page no:35" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#initialisation of variables\n", - "#case-1\n", - "n1=1.49; #refractive index of core\n", - "n2=1.46; #refractive index of cladding\n", - "c=3*10**5; #speed of light in Km/s\n", - "t1=n1/c; #time delay for one traveling along axis in s/Km\n", - "t2=(n1**2/n2)/c; #time delay for one traveling along path that is totally reflecting at the first interface in s/km\n", - "\n", - "#case-2\n", - "n11=1.47; #refractive index of core\n", - "n21=1.46; #refractive index of cladding\n", - "c1=3*10**5; #speed of light in Km/s\n", - "t11=n11/c1; #time delay for one traveling along axis in\n", - "t22=(n11**2/n21)/c1; #time delay for one traveling along path that is totally reflecting at the first interface\n", - "\n", - "\n", - "print\"time delay for traveling along axis =\",round(t1*1e6,5),\"us/Km\"; #multiplication by 1e6 to convert the unit from s/Km to us/Km\n", - "print\"\\ntime delay for traveling along path that is totally reflecting at the first interface =\",round(t2*1e6,5),\"us/Km\"; #multiplication by 1e6 to convert the unit from s/Km to us/Km\n", - "print\"\\ntime delay for traveling along axis =\",round(t11*1e6,5),\"us/Km\"; #multiplication by 1e6 to convert the unit from s/Km to us/Km\n", - "print\"\\ntime delay for traveling along path that is totally reflecting at the first interface =\",round(t22*1e6,5),\"us/Km\"; #multiplication by 1e6 to convert the unit from s/Km to us/Km\n", - "#The answer provided in the textbook is wrong it has got wrong unit" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "time delay for traveling along axis = 4.96667 us/Km\n", - "\n", - "time delay for traveling along path that is totally reflecting at the first interface = 5.06872 us/Km\n", - "\n", - "time delay for traveling along axis = 4.9 us/Km\n", - "\n", - "time delay for traveling along path that is totally reflecting at the first interface = 4.93356 us/Km\n" - ] - } - ], - "prompt_number": 8 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file diff --git a/sample_notebooks/ManikandanD/Chapter_2_Motion_in_a.ipynb b/sample_notebooks/ManikandanD/Chapter_2_Motion_in_a.ipynb new file mode 100755 index 00000000..5e1116e7 --- /dev/null +++ b/sample_notebooks/ManikandanD/Chapter_2_Motion_in_a.ipynb @@ -0,0 +1,825 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:81e7e778194095c491cf9fdf7aefef02501d247d9b184528d44cff4b23142c68" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 :Motion in a straight line" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1 , Page no:11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "s=9 #miles\n", + "#since 45 min=3/4hr\n", + "t=3/4 #hr\n", + "\n", + "#CALCULATIONS\n", + "v=(s/t)\n", + "\n", + "#RESULTS\n", + "print \"Velocity in min/hr =\",round(v);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity in min/hr = 12.0\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2 , Page no:11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "s=(1100*3)\n", + "\n", + "#RESULTS\n", + "print\"Distance in ft =\",round(s);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Distance in ft = 3300.0\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 , Page no:11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "s=1.5*10**11; #m\n", + "v=3*10**8; #ms\n", + "\n", + "#CALCULATIONS\n", + "t=(s/v)\n", + "\n", + "#Result\n", + "print\"Time in second =\",round(t),\"sec\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time in second = 500.0 sec\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4 , Page no:11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "s=270; #mils\n", + "t=4.5; #hours\n", + "t2=7; #hours\n", + "s2=300; #mi\n", + "\n", + "#CALCULATIONS\n", + "v=(s/t)\n", + "vt=(v*t2)\n", + "t3=(s2/v)\n", + "\n", + "#RESULTS\n", + "print\"Velocity in min/hr =\",round(v),\"mi/hr\";\n", + "print\"Distance in mile =\",round(vt),\"mils\";\n", + "print\"Time in hr =\",round(t3),\"hours\";" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity in min/hr = 60.0 mi/hr\n", + "Distance in mile = 420.0 mils\n", + "Time in hr = 5.0 hours\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5 , Page no:11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "s=1000; #distance in mile\n", + "\n", + "#CALCULATIONS\n", + "v=400+120; #velocity in mile/hr\n", + "t=s/v;\n", + "\n", + "#RESULTS\n", + "print\"Time in hr =\",round(t,1); " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time in hr = 1.9\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6 , Page no:11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "v1=100; #speed in km/hr\n", + "v2=60; #speed in km/hr\n", + "v3=80; #speed in km/hr\n", + "t1=2; #time in hr\n", + "t2=2; #time in hr\n", + "t3=1; #time in hr\n", + "\n", + "#CALCULATIONS\n", + "v=((v1*t1)+(v2*t2)+(v3*t3))/(t1+t2+t3)\n", + "\n", + "#RESULTS\n", + "print\"Velocity in km/hr =\",round(v);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity in km/hr = 80.0\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7 , Page no:12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "v=40; #velocity in ft/sec\n", + "t=10; #time in sec\n", + "\n", + "#CALCULATIONS\n", + "a=v/t;\n", + "v1=a*t\n", + "\n", + "#RESULTS\n", + "print\"Accelaration in ft/sec square =\",round(a);\n", + "print\"Velocity in ft/sec =\",round(v1);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Accelaration in ft/sec square = 4.0\n", + "Velocity in ft/sec = 40.0\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8 , Page no:12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "v=30; #velocity in min/hr\n", + "v0=20; #velocity in min/hr\n", + "t=1.5; #time in sec\n", + "\n", + "#CALCULATIONS\n", + "a=((v-v0)/t); #calculating acc. \n", + "t1=(36-30)/a; #calculating time\n", + "\n", + "#RESULTS\n", + "print\"Accelaration in (min/h)/sec =\",round(a,3);\n", + "print\"Time in second =\",round(t1,2);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Accelaration in (min/h)/sec = 6.667\n", + "Time in second = 0.9\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.9 , Page no:12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "v=24; #velocity in m/sec\n", + "a=8; #acc. in m/sec square\n", + "\n", + "#CALCULATIONS\n", + "t=v/a; #using t=v/a\n", + "s=(1/2)*(a*t*t); #kinematical equation\n", + "\n", + "#RESULTS\n", + "print\"Time in sec =\",round(t);\n", + "print\"Distance in metre =\",round(s);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time in sec = 3.0\n", + "Distance in metre = 36.0\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.10 , Page no:12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "v=30; #velocity in m/sec\n", + "a=6; #acc. in m/sec square\n", + "\n", + "#CALCULATIONS\n", + "t=v/a; #using t=v/a\n", + "s=(1/2)*(a*t*t); #kinematical equation\n", + "\n", + "#RESULTS\n", + "print\"Time in sec =\",round(t);\n", + "print\"Distance in metre =\",round(s);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time in sec = 5.0\n", + "Distance in metre = 75.0\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.11 , Page no:12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "v=math.sqrt(2*5*600);\n", + "\n", + "#RESULTS\n", + "print\"Velocity in ft/sec =\",round(v);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity in ft/sec = 77.0\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.12 , Page no:12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "v=50; #velocity in m/sec\n", + "s=500; #distance in m\n", + "\n", + "#CALCULATIONS\n", + "a=((v*v)/(2*s));\n", + "\n", + "#RESULTS\n", + "print\"Acc. in m/sec square =\",round(a,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Acc. in m/sec square = 2.5\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.13 , Page no:13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "v=15; #velocity in m/sec\n", + "v0=30; #velocity in m/sec\n", + "a=-2; #acc. in m/sec square\n", + "\n", + "#CALCULATIONS\n", + "s=((v*v)-(v0*v0))/(2*a); #kinematical equation\n", + "v=0;\n", + "s1=(v*v)-(v0*v0)/(2*a);\n", + "\n", + "#RESULTS\n", + "print\"Distance in metre =\",round(s,2);\n", + "print\"Distance in metre =\",round(s1,2);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Distance in metre = 168.75\n", + "Distance in metre = 225.0\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.14 , Page no:13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "g=9.8; #gravitational constant in m/sec square\n", + "t=2.5; #time in sec\n", + "\n", + "#CALCULATIONS\n", + "v=g*t;\n", + "h=(1/2)*g*t*t; #kinematical equation\n", + "\n", + "#RESULTS\n", + "print\"Velocity in m/sec =\",round(v,2);\n", + "print\"Height in m =\",round(h,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity in m/sec = 24.5\n", + "Height in m = 30.625\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.15 , Page no:13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "g=32; #gravitational constant in ft/sec square\n", + "h=64; #height in ft\n", + "\n", + "#CALCULATIONS\n", + "t=(math.sqrt((2*h)/g)); #kinematical equation\n", + "v=g*t; #kinematical equation\n", + "\n", + "#RESULTS\n", + "print\"Time in sec =\",round(t);\n", + "print\"Velocity in ft/sec =\",round(v);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time in sec = 2.0\n", + "Velocity in ft/sec = 64.0\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.16 , Page no:13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "g=32; #gravitational constant in ft/sec square\n", + "h=100; #height in ft\n", + "\n", + "#CALCULATIONS\n", + "v=math.sqrt(2*g*h); #calculating velocity \n", + "\n", + "#RESULTS\n", + "print\"Velocity in ft/sec =\",round(v);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity in ft/sec = 80.0\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.17 , Page no:13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "h=0.78; #height in m\n", + "g=9.8; #gravitational constant in m/sec square\n", + "v=0.5; #velocity in m/sec\n", + "\n", + "#CALCULATIONS\n", + "t=math.sqrt((2*h)/g); #calculating t\n", + "s=v*t; #calculating distance\n", + "\n", + "#RESULTS\n", + "print\"Time required in sec =\",round(t,3);\n", + "print\"Horizontal distance in m =\",round(s,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time required in sec = 0.399\n", + "Horizontal distance in m = 0.199\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.18 , Page no:14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "v0=20; #velocity in ft/sec\n", + "g=32; #gravitational constant in ft/sec\n", + "t=2; #time in sec\n", + "\n", + "#CALCULATIONS\n", + "v=v0+(g*t); #kinematical equation\n", + "s=(v0*t)+(1/2)*g*t*t; #kinematical equation\n", + "\n", + "#RESULTS\n", + "print\"Velocity in ft/sec =\",round(v);\n", + "print\"Distance in ft =\",round(s);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity in ft/sec = 84.0\n", + "Distance in ft = 104.0\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.19 , Page no:14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "v0=20; #velocity in ft/sec\n", + "g=-32; #gravitational constant in ft/sec\n", + "t=0.5; #time in sec\n", + "\n", + "#CALCULATIONS\n", + "v=v0+(g*t); #kinematical equation\n", + "t=2; #time in sec\n", + "s=v0+(g*t); #kinematical equation\n", + "\n", + "#RESULTS\n", + "print\"Velocity in ft/sec =\",round(v);\n", + "print\"Distance in ft =\",round(s);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity in ft/sec = 4.0\n", + "Distance in ft = -44.0\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.20 , Page no:14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#initialisation of variables\n", + "h=6; #height in ft\n", + "g=32; #gravitaional constant in ft/sec square\n", + "\n", + "#CALCULATIONS\n", + "t=math.sqrt((2*h)/g); #calculating time\n", + "\n", + "#RESULTS\n", + "print\"Time in sec =\",round(t,3);" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time in sec = 0.612\n" + ] + } + ], + "prompt_number": 20 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/sample_notebooks/ManikandanD/Chapter_2_Motion_in_a_straight.ipynb b/sample_notebooks/ManikandanD/Chapter_2_Motion_in_a_straight.ipynb deleted file mode 100755 index 5e1116e7..00000000 --- a/sample_notebooks/ManikandanD/Chapter_2_Motion_in_a_straight.ipynb +++ /dev/null @@ -1,825 +0,0 @@ -{ - "metadata": { - "name": "", - "signature": "sha256:81e7e778194095c491cf9fdf7aefef02501d247d9b184528d44cff4b23142c68" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 2 :Motion in a straight line" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.1 , Page no:11" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#initialisation of variables\n", - "s=9 #miles\n", - "#since 45 min=3/4hr\n", - "t=3/4 #hr\n", - "\n", - "#CALCULATIONS\n", - "v=(s/t)\n", - "\n", - "#RESULTS\n", - "print \"Velocity in min/hr =\",round(v);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Velocity in min/hr = 12.0\n" - ] - } - ], - "prompt_number": 1 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.2 , Page no:11" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#initialisation of variables\n", - "s=(1100*3)\n", - "\n", - "#RESULTS\n", - "print\"Distance in ft =\",round(s);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Distance in ft = 3300.0\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.3 , Page no:11" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#initialisation of variables\n", - "s=1.5*10**11; #m\n", - "v=3*10**8; #ms\n", - "\n", - "#CALCULATIONS\n", - "t=(s/v)\n", - "\n", - "#Result\n", - "print\"Time in second =\",round(t),\"sec\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Time in second = 500.0 sec\n" - ] - } - ], - "prompt_number": 3 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.4 , Page no:11" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#initialisation of variables\n", - "s=270; #mils\n", - "t=4.5; #hours\n", - "t2=7; #hours\n", - "s2=300; #mi\n", - "\n", - "#CALCULATIONS\n", - "v=(s/t)\n", - "vt=(v*t2)\n", - "t3=(s2/v)\n", - "\n", - "#RESULTS\n", - "print\"Velocity in min/hr =\",round(v),\"mi/hr\";\n", - "print\"Distance in mile =\",round(vt),\"mils\";\n", - "print\"Time in hr =\",round(t3),\"hours\";" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Velocity in min/hr = 60.0 mi/hr\n", - "Distance in mile = 420.0 mils\n", - "Time in hr = 5.0 hours\n" - ] - } - ], - "prompt_number": 4 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.5 , Page no:11" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#initialisation of variables\n", - "s=1000; #distance in mile\n", - "\n", - "#CALCULATIONS\n", - "v=400+120; #velocity in mile/hr\n", - "t=s/v;\n", - "\n", - "#RESULTS\n", - "print\"Time in hr =\",round(t,1); " - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Time in hr = 1.9\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.6 , Page no:11" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#initialisation of variables\n", - "v1=100; #speed in km/hr\n", - "v2=60; #speed in km/hr\n", - "v3=80; #speed in km/hr\n", - "t1=2; #time in hr\n", - "t2=2; #time in hr\n", - "t3=1; #time in hr\n", - "\n", - "#CALCULATIONS\n", - "v=((v1*t1)+(v2*t2)+(v3*t3))/(t1+t2+t3)\n", - "\n", - "#RESULTS\n", - "print\"Velocity in km/hr =\",round(v);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Velocity in km/hr = 80.0\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.7 , Page no:12" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#initialisation of variables\n", - "v=40; #velocity in ft/sec\n", - "t=10; #time in sec\n", - "\n", - "#CALCULATIONS\n", - "a=v/t;\n", - "v1=a*t\n", - "\n", - "#RESULTS\n", - "print\"Accelaration in ft/sec square =\",round(a);\n", - "print\"Velocity in ft/sec =\",round(v1);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Accelaration in ft/sec square = 4.0\n", - "Velocity in ft/sec = 40.0\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.8 , Page no:12" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#initialisation of variables\n", - "v=30; #velocity in min/hr\n", - "v0=20; #velocity in min/hr\n", - "t=1.5; #time in sec\n", - "\n", - "#CALCULATIONS\n", - "a=((v-v0)/t); #calculating acc. \n", - "t1=(36-30)/a; #calculating time\n", - "\n", - "#RESULTS\n", - "print\"Accelaration in (min/h)/sec =\",round(a,3);\n", - "print\"Time in second =\",round(t1,2);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Accelaration in (min/h)/sec = 6.667\n", - "Time in second = 0.9\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.9 , Page no:12" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#initialisation of variables\n", - "v=24; #velocity in m/sec\n", - "a=8; #acc. in m/sec square\n", - "\n", - "#CALCULATIONS\n", - "t=v/a; #using t=v/a\n", - "s=(1/2)*(a*t*t); #kinematical equation\n", - "\n", - "#RESULTS\n", - "print\"Time in sec =\",round(t);\n", - "print\"Distance in metre =\",round(s);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Time in sec = 3.0\n", - "Distance in metre = 36.0\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.10 , Page no:12" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#initialisation of variables\n", - "v=30; #velocity in m/sec\n", - "a=6; #acc. in m/sec square\n", - "\n", - "#CALCULATIONS\n", - "t=v/a; #using t=v/a\n", - "s=(1/2)*(a*t*t); #kinematical equation\n", - "\n", - "#RESULTS\n", - "print\"Time in sec =\",round(t);\n", - "print\"Distance in metre =\",round(s);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Time in sec = 5.0\n", - "Distance in metre = 75.0\n" - ] - } - ], - "prompt_number": 10 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.11 , Page no:12" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#initialisation of variables\n", - "v=math.sqrt(2*5*600);\n", - "\n", - "#RESULTS\n", - "print\"Velocity in ft/sec =\",round(v);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Velocity in ft/sec = 77.0\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.12 , Page no:12" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#initialisation of variables\n", - "v=50; #velocity in m/sec\n", - "s=500; #distance in m\n", - "\n", - "#CALCULATIONS\n", - "a=((v*v)/(2*s));\n", - "\n", - "#RESULTS\n", - "print\"Acc. in m/sec square =\",round(a,2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Acc. in m/sec square = 2.5\n" - ] - } - ], - "prompt_number": 12 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.13 , Page no:13" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#initialisation of variables\n", - "v=15; #velocity in m/sec\n", - "v0=30; #velocity in m/sec\n", - "a=-2; #acc. in m/sec square\n", - "\n", - "#CALCULATIONS\n", - "s=((v*v)-(v0*v0))/(2*a); #kinematical equation\n", - "v=0;\n", - "s1=(v*v)-(v0*v0)/(2*a);\n", - "\n", - "#RESULTS\n", - "print\"Distance in metre =\",round(s,2);\n", - "print\"Distance in metre =\",round(s1,2);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Distance in metre = 168.75\n", - "Distance in metre = 225.0\n" - ] - } - ], - "prompt_number": 13 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.14 , Page no:13" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#initialisation of variables\n", - "g=9.8; #gravitational constant in m/sec square\n", - "t=2.5; #time in sec\n", - "\n", - "#CALCULATIONS\n", - "v=g*t;\n", - "h=(1/2)*g*t*t; #kinematical equation\n", - "\n", - "#RESULTS\n", - "print\"Velocity in m/sec =\",round(v,2);\n", - "print\"Height in m =\",round(h,3);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Velocity in m/sec = 24.5\n", - "Height in m = 30.625\n" - ] - } - ], - "prompt_number": 14 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.15 , Page no:13" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#initialisation of variables\n", - "g=32; #gravitational constant in ft/sec square\n", - "h=64; #height in ft\n", - "\n", - "#CALCULATIONS\n", - "t=(math.sqrt((2*h)/g)); #kinematical equation\n", - "v=g*t; #kinematical equation\n", - "\n", - "#RESULTS\n", - "print\"Time in sec =\",round(t);\n", - "print\"Velocity in ft/sec =\",round(v);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Time in sec = 2.0\n", - "Velocity in ft/sec = 64.0\n" - ] - } - ], - "prompt_number": 15 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.16 , Page no:13" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#initialisation of variables\n", - "g=32; #gravitational constant in ft/sec square\n", - "h=100; #height in ft\n", - "\n", - "#CALCULATIONS\n", - "v=math.sqrt(2*g*h); #calculating velocity \n", - "\n", - "#RESULTS\n", - "print\"Velocity in ft/sec =\",round(v);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Velocity in ft/sec = 80.0\n" - ] - } - ], - "prompt_number": 16 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.17 , Page no:13" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#initialisation of variables\n", - "h=0.78; #height in m\n", - "g=9.8; #gravitational constant in m/sec square\n", - "v=0.5; #velocity in m/sec\n", - "\n", - "#CALCULATIONS\n", - "t=math.sqrt((2*h)/g); #calculating t\n", - "s=v*t; #calculating distance\n", - "\n", - "#RESULTS\n", - "print\"Time required in sec =\",round(t,3);\n", - "print\"Horizontal distance in m =\",round(s,3);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Time required in sec = 0.399\n", - "Horizontal distance in m = 0.199\n" - ] - } - ], - "prompt_number": 17 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.18 , Page no:14" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#initialisation of variables\n", - "v0=20; #velocity in ft/sec\n", - "g=32; #gravitational constant in ft/sec\n", - "t=2; #time in sec\n", - "\n", - "#CALCULATIONS\n", - "v=v0+(g*t); #kinematical equation\n", - "s=(v0*t)+(1/2)*g*t*t; #kinematical equation\n", - "\n", - "#RESULTS\n", - "print\"Velocity in ft/sec =\",round(v);\n", - "print\"Distance in ft =\",round(s);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Velocity in ft/sec = 84.0\n", - "Distance in ft = 104.0\n" - ] - } - ], - "prompt_number": 18 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.19 , Page no:14" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#initialisation of variables\n", - "v0=20; #velocity in ft/sec\n", - "g=-32; #gravitational constant in ft/sec\n", - "t=0.5; #time in sec\n", - "\n", - "#CALCULATIONS\n", - "v=v0+(g*t); #kinematical equation\n", - "t=2; #time in sec\n", - "s=v0+(g*t); #kinematical equation\n", - "\n", - "#RESULTS\n", - "print\"Velocity in ft/sec =\",round(v);\n", - "print\"Distance in ft =\",round(s);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Velocity in ft/sec = 4.0\n", - "Distance in ft = -44.0\n" - ] - } - ], - "prompt_number": 19 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 2.20 , Page no:14" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "import math\n", - "from __future__ import division\n", - "\n", - "#initialisation of variables\n", - "h=6; #height in ft\n", - "g=32; #gravitaional constant in ft/sec square\n", - "\n", - "#CALCULATIONS\n", - "t=math.sqrt((2*h)/g); #calculating time\n", - "\n", - "#RESULTS\n", - "print\"Time in sec =\",round(t,3);" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Time in sec = 0.612\n" - ] - } - ], - "prompt_number": 20 - } - ], - "metadata": {} - } - ] -} \ No newline at end of file -- cgit