diff options
Diffstat (limited to 'sample_notebooks')
-rwxr-xr-x | sample_notebooks/ManikandanD/Chapter_2_Motion_in_a_straight_line.ipynb | 825 | ||||
-rwxr-xr-x | sample_notebooks/SandeshNaik/ch3.ipynb | 189 | ||||
-rwxr-xr-x | sample_notebooks/ShivaAmruthavakkula/chapter1.ipynb | 448 | ||||
-rwxr-xr-x | sample_notebooks/vedantharish/Chapter1.ipynb | 323 | ||||
-rwxr-xr-x | sample_notebooks/vedantharish/Chapter1_1.ipynb | 318 |
5 files changed, 2103 insertions, 0 deletions
diff --git a/sample_notebooks/ManikandanD/Chapter_2_Motion_in_a_straight_line.ipynb b/sample_notebooks/ManikandanD/Chapter_2_Motion_in_a_straight_line.ipynb new file mode 100755 index 00000000..5e1116e7 --- /dev/null +++ b/sample_notebooks/ManikandanD/Chapter_2_Motion_in_a_straight_line.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/SandeshNaik/ch3.ipynb b/sample_notebooks/SandeshNaik/ch3.ipynb new file mode 100755 index 00000000..2f2e44d3 --- /dev/null +++ b/sample_notebooks/SandeshNaik/ch3.ipynb @@ -0,0 +1,189 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:ab5dad51b8bb4848e05fe479e673fa81caef98b1e0130b3768c6e1580871f987" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3: Negative Feedback" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1, Page 75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Aol=200;\n", + "f2_ol=10000; # in Hz\n", + "B=0.04;\n", + "\n", + "#Calculations&Results\n", + "Asp=Aol/(1+B*Aol);\n", + "print \"Asp %.2f \\n \"%Asp; #Result\n", + "print \"Approximately Asp =1/B equal to %.0f \\n\"%(1/B);#result\n", + "S=Aol/Asp;\n", + "print \"S =%.0f \\n\"%S;\n", + "f2_sp=f2_ol*S;\n", + "print \"f2_sp %.0f Hz\"%f2_sp; #Result" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Asp 22.22 \n", + " \n", + "Approximately Asp =1/B equal to 25 \n", + "\n", + "S =9 \n", + "\n", + "f2_sp 90000 Hz\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2, Page 76" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Asp1=20.\n", + "Asp=10**(Asp1/20);\n", + "\n", + "#Calculations&Results\n", + "print \"Asp =%.0f\\n\"%Asp;#Result\n", + "#Rf/Ri=Asp-1;\n", + "print \"Rf/Ri=%.0f \\n\"%(Asp-1);#Result\n", + "print \"Rf must be 9 times larger than Ri. \\n There are many possibilities \";#Result" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Asp =10\n", + "\n", + "Rf/Ri=9 \n", + "\n", + "Rf must be 9 times larger than Ri. \n", + " There are many possibilities \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3, Page 82" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Zin_ol=300*10**3; #in Ohms\n", + "Zout=100; #in Ohms\n", + "Aol=50000.;\n", + "Zout_ol=100.;\n", + "Asp=100;\n", + "\n", + "#Calculations&Results\n", + "S=Aol/Asp;\n", + "print \"S = %.0f\"%S;#Result\n", + "Zin_sp=S*Zin_ol;\n", + "print \"Zin_sp = %.0f Ohm\"%Zin_sp;#Result\n", + "Zout_sp=Zout_ol/S;\n", + "print \"Zout_sp = %.1f Ohm\"%Zout_sp;#Result\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "S = 500\n", + "Zin_sp = 150000000 Ohm\n", + "Zout_sp = 0.2 Ohm\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4, Page 88" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "R1=9000; # in Ohm\n", + "R2=1000.; #in Ohm\n", + "\n", + "#Calculations&Results\n", + "B=R2/(R1+R2);\n", + "print \"B is %.2f\\n\"%B;#Result\n", + "#Aps=1/B;\n", + "Aps=(R1+R2)/R2;\n", + "print \"Aps = %.0f \\n \"%Aps;#Result" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "B is 0.10\n", + "\n", + "Aps = 10 \n", + " \n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/sample_notebooks/ShivaAmruthavakkula/chapter1.ipynb b/sample_notebooks/ShivaAmruthavakkula/chapter1.ipynb new file mode 100755 index 00000000..37ee420b --- /dev/null +++ b/sample_notebooks/ShivaAmruthavakkula/chapter1.ipynb @@ -0,0 +1,448 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the divergence of the beam is 8.05960631817e-05 in radians\n", + "the divergence of the beam is 0.00461781426568 in degrees\n" + ] + } + ], + "source": [ + "'''Example 1.1.1 :Divergence of a beam '''\n", + "\n", + "import math\n", + "\n", + " #decalring variables\n", + "Lambda=633*(10**-9) #wavelength of laser\n", + "s=10*10**-3 #spot size of the laser\n", + "w=s/2 # waist radius\n", + "\n", + "#calculations\n", + "\n", + "theta_radians=(4*Lambda)/(math.pi*(2*w))\n", + "num=math.pi*(w)\n", + "theta_degrees=math.degrees(theta_radians)\n", + "\n", + "#results\n", + "print \"the divergence of the beam is\",theta_radians,\"in radians\"\n", + "print \"the divergence of the beam is\",theta_degrees,\"in degrees\"\n" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Materials EpsilonR squareroot(EpsilonR)\n", + "\n", + "------------------------------------------\n", + "\n", + "silicon \t11.9 \t3.44963766213 \n", + "\n", + "Diamond \t5.7 \t2.38746727726 \n", + "\n", + "GaAs \t13.1 \t3.61939221417 \n", + "\n", + "SiO2 \t3.84 \t1.95959179423 \n", + "\n", + "Water \t80 \t8.94427191 \n", + "\n" + ] + } + ], + "source": [ + "'''Example 1.2.1: relative permittivity and refractive index n'''\n", + "\n", + "\n", + "import math\n", + "\n", + "numbers=[0,1,2,3,4]\n", + "\n", + "#declaring array variables\n", + "materials=['silicon','Diamond','GaAs ','SiO2 ','Water '] #declaring the materials\n", + "relative_permittivity=[11.9,5.7,13.1,3.84,80] #declaring the relative permittivity at low frequencies\n", + "\n", + "#calculations\n", + "refractive_index=[] #declaring result set \n", + "for i in relative_permittivity:\n", + " t=math.sqrt(i)\n", + " refractive_index.append(t)\n", + " \n", + "#Results and Table\n", + "print \"Materials EpsilonR squareroot(EpsilonR)\\n\"\n", + "print \"------------------------------------------\\n\"\n", + "for j in numbers:\n", + " print materials[j],\"\\t\",relative_permittivity[j],\"\\t\",refractive_index[j],\"\\n\"" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The phase velocity is 206896551.724\n", + "The group velocity is 205479452.055\n" + ] + } + ], + "source": [ + "'''Example 1.3.2:Group and phase velocities'''\n", + "\n", + "import math\n", + "\n", + "#declaring variables\n", + "Lambda=1*10**-6 #wavelength of light\n", + "n=1.450 #refractive index\n", + "c=3*10**8 #velocity of light in free space\n", + "group_index=1.46 #Group index(available from graph)\n", + "\n", + "#calculations\n", + "phase_velocity=c/n #calculation of phase velocity\n", + "group_velocity=c/group_index #calculation of group velocity\n", + "\n", + "#results\n", + "\n", + "print \"The phase velocity is \",phase_velocity\n", + "print \"The group velocity is \",group_velocity" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The Elctric field and Magnetic field of air are 86.7926073205 and 2.89308691068e-07 respectively\n", + "The Elctric field and Magnetic field of glass are 72.0773372269 and 3.48373796597e-07 respectively\n" + ] + } + ], + "source": [ + "'''Example 1.4.1: Electric and magnetic fields in light'''\n", + "\n", + "import math\n", + "\n", + "#Declaring variables\n", + "Irradiance=1*10**-3*10**4 #Declaring irradiance in standard units\n", + "ng=1.45 #declaring refractive index of glass\n", + "c=3*10**8 #declaring velocity of light\n", + "n=1 #Refractive index of free space\n", + "e=8.85*10**-12\n", + "\n", + "#calculations of magnitude of electrical and magnetic fields in air\n", + "El_air=math.sqrt((2*Irradiance)/(c*e*n)) #Electric field calculation(air)\n", + "B_air=(n*El_air)/c #Magnetic field calculation(air)\n", + "\n", + "#calculations of magnitude of electrical and magnetic fields in glass\n", + "El_glass=math.sqrt((2*Irradiance)/(c*e*ng)) #Electric field calculation(glass) \n", + "B_glass=(ng*El_glass)/c #magnetic field calculation(glass) \n", + "\n", + "#Results\n", + "print \"The Elctric field and Magnetic field of air are \",El_air,\"and\",B_air,\"respectively\"\n", + "print \"The Elctric field and Magnetic field of glass are \",El_glass,\"and\",B_glass,\"respectively\"" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "A\n", + "the crirical angle is equal to 0.986206896552 \n", + "\n", + "B\n", + "The phase change in medium 1 at incident angle=85 degrees with electrical component perpendicular to the plane of incidence is 116.45255621 degrees\n", + "The phase change in medium 1 at incident angle=85 degrees with electrical component parallel to the plane of incidence is -62.1314255434 degrees\n", + "The phase change in medium 1 at incident angle=90 degrees with electrical component perpendicular to the plane of incidence is 180.0 degrees\n", + "The phase change in medium 1 at incident angle=90 degrees with electrical component parallel to the plane of incidence is -2.84217094304e-14 degrees \n", + "\n", + "C\n", + "The penetration depth of medium 2 at incident angle of 85 degrees is 7.80048054638e-07 meters\n", + "The penetration depth of medium 2 at incident angle of 90 degrees is 6.63145596216e-07 meters\n" + ] + } + ], + "source": [ + "'''Example 1.6.2'''\n", + "import math\n", + "\n", + "#declaration of variables\n", + "\n", + "n1=1.450 #refractive index of first medium\n", + "n2=1.430 #refractive index of second medium\n", + "Lambda=1*10**-6 #wavelength of light at standard units\n", + "theta_i1=85 #declaration of incidence angle 1\n", + "theta_i2=90 #declaration of incidence angle 2\n", + "\n", + "#Calculation of minimum incidence angle\n", + "theta_c=n2/n1 #calculation of critical angle\n", + "\n", + "#Calculation of phase change in medium 1 at incident angle 85 with perpendicular electrical component\n", + "tanphi_pp_85m1=math.sqrt(math.pow(math.sin(math.radians(theta_i1)),2)-math.pow((n2/n1),2))/math.cos(math.radians(theta_i1))\n", + "phi_pp_85im1=2*math.degrees(math.atan(tanphi_pp_85m1))\n", + "\n", + "#Calculation of phase change in medium 1 at incident angle 85 with parallel electrical component\n", + "tanphi_prll_85m1=math.pow((n1/n2),2)*tanphi_pp_85m1\n", + "phi_prll_85m1=2*(math.degrees(math.atan(tanphi_prll_85m1)))-math.degrees(math.pi)\n", + "phi_prll_inv_85m1=180+phi_prll_85m1\n", + "\n", + "#Calculation of phase change in medium 1 at incident angle 90 with perpendicular electrical component\n", + "tanphi_pp_90m1=math.sqrt(math.pow(math.sin(math.radians(theta_i2)),2)-math.pow((n2/n1),2))/math.cos(math.radians(theta_i2))\n", + "phi_pp_90m1=2*math.degrees(math.atan(tanphi_pp_90m1))\n", + "\n", + "#Calculation of phase change in medium 1 at incident angle 85 with parallel electrical component\n", + "tanphi_prll_90m1=math.pow((n1/n2),2)*tanphi_pp_90m1\n", + "phi_prll_90m1=2*(math.degrees(math.atan(tanphi_prll_90m1)))-math.degrees(math.pi)\n", + "phi_prll_inv_90m1=180+phi_prll_90m1\n", + "\n", + "#Calculation of penetration depth in medium 2 at incident angle 85\n", + "alpha_85=(2*math.pi*n2/Lambda)*(math.sqrt((math.pow((n1/n2),2)*math.pow(math.sin(math.radians(theta_i1)),2))-1))\n", + "delta_85=1/alpha_85\n", + "\n", + "#calculation of penetration depth in medium 2 at incident angle 90\n", + "alpha_90=(2*math.pi*n2/Lambda)*(math.sqrt((math.pow((n1/n2),2)*math.pow(math.sin(math.radians(theta_i2)),2))-1))\n", + "delta_90=1/alpha_90\n", + "\n", + "#Results\n", + "print \"A\"\n", + "print \"the crirical angle is equal to \",theta_c,\"\\n\"\n", + "print \"B\"\n", + "print \"The phase change in medium 1 at incident angle=85 degrees with electrical component perpendicular to the plane of incidence is\",phi_pp_85im1,\"degrees\"\n", + "print \"The phase change in medium 1 at incident angle=85 degrees with electrical component parallel to the plane of incidence is\",phi_prll_85m1,\"degrees\"\n", + "print \"The phase change in medium 1 at incident angle=90 degrees with electrical component perpendicular to the plane of incidence is\",phi_pp_90m1,\"degrees\"\n", + "print \"The phase change in medium 1 at incident angle=90 degrees with electrical component parallel to the plane of incidence is\",phi_prll_90m1,\"degrees \\n\"\n", + "print \"C\"\n", + "print \"The penetration depth of medium 2 at incident angle of 85 degrees is \",delta_85,\"meters\"\n", + "print \"The penetration depth of medium 2 at incident angle of 90 degrees is \",delta_90,\"meters\"" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "A\n", + "the reflection coefficient when light travels from air to glass is -0.2\n", + "the reflectance when light passes from air to glass is 0.04\n", + "The phase change of the reflected light is \n", + "180\n", + "B\n", + "the reflection coefficient when light travels from glass to air is 0.2\n", + "the reflectance when light passes from glass to air is 0.04\n", + "The phase change of the reflected light is \n", + "180\n", + "C\n", + "The polarisation angle is 56.309932474\n" + ] + } + ], + "source": [ + "'''Example 1.6.3: Reflection at normal Incidence.Internal and external reflection'''\n", + "import math\n", + "\n", + "#declaration of variables\n", + "nglass=1.5\n", + "nair=1\n", + "\n", + "#declaration of phase change\n", + "def phasechange(r):\n", + " if r<0:\n", + " return 180\n", + " else:\n", + " return 0 \n", + "#Calculation of reflection coefficient and intensity from air to glass\n", + "r_coeffag=(nair-nglass)/(nair+nglass) #reflection coefficient\n", + "Rag=math.pow(r_coeffag,2) #Reflectance\n", + "pag=phasechange(r_coeffag)\n", + "\n", + "\n", + "#Calculation of relection and intensity from glass to aie\n", + "r_coeffga=(nglass-nair)/(nglass+nair)\n", + "Rga=math.pow(r_coeffga,2)\n", + "pga=phasechange(r_coeffga)\n", + "\n", + "#calculation of polarisation angle\n", + "theta_p=math.degrees(math.atan(nglass/nair))\n", + "\n", + "#Results\n", + "print \"A\"\n", + "print\"the reflection coefficient when light travels from air to glass is \",r_coeffag\n", + "print \"the reflectance when light passes from air to glass is \",Rag\n", + "print \"The phase change of the reflected light is \\n\",pag\n", + "print \"B\"\n", + "print\"the reflection coefficient when light travels from glass to air is \",r_coeffga\n", + "print \"the reflectance when light passes from glass to air is \",Rga\n", + "print \"The phase change of the reflected light is \\n\",pag\n", + "\n", + "print \"C\"\n", + "print \"The polarisation angle is \",theta_p" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the reflectance of the Silicon is 0.308641975309\n", + "the refractive index of coating must be 1.87082869339\n", + "the thickness of the coating is 9.21052631579e-08 meters\n" + ] + } + ], + "source": [ + "'''Example 1.6.4: Antireflection coatings on solarcells'''\n", + "import math\n", + "\n", + "#Declaration of variables\n", + "nair=1\n", + "nsi=3.5\n", + "ncoating=1.9\n", + "Lambda=700*10**-9\n", + "\n", + "#declaration of phase change\n", + "def phasechange(r):\n", + " if r<0:\n", + " return 180\n", + " else:\n", + " return 0 \n", + "\n", + "#Calculation of reflectance at Silicon\n", + "rsi=((nair-nsi)/(nair+nsi))\n", + "Rsi=math.pow(rsi,2)\n", + "psi=phasechange(rsi)\n", + "\n", + "#calculation of refractive index of coating\n", + "ncoating_theoritical=math.sqrt(nair*nsi)\n", + "\n", + "#calculation of thickness\n", + "d=Lambda/(4*ncoating)\n", + "\n", + "#results\n", + "print \"the reflectance of the Silicon is \",Rsi\n", + "print \"the refractive index of coating must be \",ncoating_theoritical\n", + "print \"the thickness of the coating is \",d,\" meters\"" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "# '''Example 1.7.1: Resonator modes and spectral width'''\n", + "import math\n", + "\n", + "#declaration of variables\n", + "L=100*10**-6\n", + "R=0.9\n", + "Lambda=900*10**-9\n", + "c=3*10**8\n", + "\n", + "#Calculation of seperation of modes\n", + "delta_vm=c/(2*L)\n", + "\n", + "#calculation of finesse\n", + "F=((math.pi)*math.sqrt(R))/(1-R)\n", + "\n", + "#calculation of modewidth\n", + "del_vm=delta_vm/F\n", + "\n", + "#calculation of mode frequency\n", + "vm=c/Lambda\n", + "\n", + "#calculation of spectral width\n", + "del_lambda=(c/math.pow(vm,2))*del_vm\n", + "\n", + "#Results\n", + "print \"The seperation of modes is \",delta_vm,\" Hertz\"\n", + "print \"The spectral width is\", del_lambda,\" meters\"" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + } + ], + "metadata": { + "celltoolbar": "Edit 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.10" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/sample_notebooks/vedantharish/Chapter1.ipynb b/sample_notebooks/vedantharish/Chapter1.ipynb new file mode 100755 index 00000000..e0d93a7e --- /dev/null +++ b/sample_notebooks/vedantharish/Chapter1.ipynb @@ -0,0 +1,323 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:436cc68a3a8c24e3b7ac0015b43ecd16f91e5c0db4fe34a46ea3f2fb33073dd6"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 1: Semiconductor Diodes"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.1(a), Page No.: 29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "V=0.5 #voltage of diode in V\n",
+ "I=2 #current of diode in mA\n",
+ "\n",
+ "#Calculation\n",
+ "R=(V/I)*1000 #resistance of diode,\n",
+ " #converting current in Ampere from mA in calculation\n",
+ "\n",
+ "#Result\n",
+ "print \"Resistance is \", R ,\"ohm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resistance is 250.0 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.1(b), Page No.: 29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "V=0.8 #voltage of diode in V\n",
+ "I=20 #current of diode in mA\n",
+ "\n",
+ "#Calculation\n",
+ "R=(V/I)*1000 #resistance of diode,\n",
+ " #converting current in Ampere from mA in calculation\n",
+ "\n",
+ "#Result\n",
+ "print \"Resistance is \", R ,\"ohm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resistance is 40.0 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.1(c), Page No.:29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "V= -10 #voltage of diode in V\n",
+ "I= -1 #current of diode in microAmpere\n",
+ "\n",
+ "#Calculation\n",
+ "R=(V/I)*1000*1000 #resistance of diode,\n",
+ " #converting current in Ampere from microAmpere in calculation\n",
+ "R=V/I*(1000/1000)*(1000/1000)#converting ohm into Mega-ohm \n",
+ "#Result\n",
+ "print \"Resistance is \", R ,\"Mega-ohm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resistance is 10 Mega-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.2(a), Page NO.:31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "I=2 #diode current in mA\n",
+ "I1=4 #diode current choosen by 2 mA swing above given diode current of 2 mA.\n",
+ "I2=0 #diode current choosen by 2 mA swing below given diode current of 2 mA.\n",
+ "V1=0.76 #diode voltage at I1= 4 mA.\n",
+ "V2=0.65 #diode voltage at I2= 0 mA.\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "R=((V1-V2)/(I1-I2))*1000 #R is AC resistance,\n",
+ " #V1-V2 is change in voltage and I1-I2 is chnage in current.\n",
+ " #multiplying by 1000 for converting current into A from mA.\n",
+ "#RESULT\n",
+ "print \"Ac resistance is\",R,\"ohm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ac resistance is 27.5 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.2(b),Page No.:31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "I=25 #diode current in mA\n",
+ "I1=30 #diode current choosen by 5 mA swing above given diode current of 25 mA.\n",
+ "I2=20 #diode current choosen by 5 mA swing below given diode current of 25 mA.\n",
+ "V1=0.8 #diode voltage at I1= 30 mA.\n",
+ "V2=0.78 #diode voltage at I2= 20 mA.\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "R=((V1-V2)/(I1-I2))*1000 #R is AC resistance,\n",
+ " #V1-V2 is change in voltage and I1-I2 is chnage in current.\n",
+ " #multiplying by 1000 for converting current into A from mA.\n",
+ "#RESULT\n",
+ "print \"Ac resistance is\",R,\"ohm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ac resistance is 2.0 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.2(c), Page No.:32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "I1=2 #diode current in mA. \n",
+ "V1=0.7 #diode voltage in V.\n",
+ "\n",
+ "I2=25 #diode current in mA.\n",
+ "V2=0.79 #diode voltage in V.\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "R1=(V1/I1)*1000 #R1 is DC resistance, \n",
+ " #multiplying by 1000 for converting current into A from mA.\n",
+ "\n",
+ "R2=(V2/I2)*1000 #R2 is DC rresistance \n",
+ " #mulipying by 1000 for converting current into A from mA.\n",
+ "\n",
+ "#RESULT\n",
+ "print \"Dc resistance at 2 mA is\",R1,\"ohm, which far exceeds AC resistance of 27.5 ohm\"\n",
+ "\n",
+ "print \"DC resistance at 25 mA is\",R2,\"ohm, which far exceeds AC resistance of 2 ohm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Dc resistance at 2 mA is 350.0 ohm, which far exceeds AC resistance of 27.5 ohm\n",
+ "DC resistance at 25 mA is 31.6 ohm, which far exceeds AC resistance of 2 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.3, Page No.: 48-49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "V=10 #zener voltage in V.\n",
+ "T=0.072 #Temperature coefficient.\n",
+ "T1=100 #given temperature in celsius.\n",
+ "To=25 #reference temperature in celsius\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "V1=(T*V*(T1-To))/100 #nominal voltage for zener diode in V.\n",
+ "\n",
+ " #Temperature coefficient is positive.\n",
+ " #new zener voltage is defined by V2.\n",
+ "V2=V+V1\n",
+ "\n",
+ "#RESULT\n",
+ "\n",
+ "print \"Voltage for zener diode is\",V2,\"V\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Voltage for zener diode is 10.54 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/sample_notebooks/vedantharish/Chapter1_1.ipynb b/sample_notebooks/vedantharish/Chapter1_1.ipynb new file mode 100755 index 00000000..2a2734b5 --- /dev/null +++ b/sample_notebooks/vedantharish/Chapter1_1.ipynb @@ -0,0 +1,318 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:3b07252198e90cfd9ac3c1a323508af3c3781f3c224f206ef55b7d5cdbd305fc"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 1: Semiconductor Diodes"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.1(a), Page No.: 29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "V=0.5 #voltage of diode in V\n",
+ "I=2 #current of diode in mA\n",
+ "\n",
+ "#Calculation\n",
+ "R=(V/I)*1000 #resistance of diode,\n",
+ " #converting current in Ampere from mA in calculation\n",
+ "\n",
+ "#Result\n",
+ "print \"Resistance is \", R ,\"ohm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resistance is 250.0 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.1(b), Page No.: 29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "V=0.8 #voltage of diode in V\n",
+ "I=20 #current of diode in mA\n",
+ "\n",
+ "#Calculation\n",
+ "R=(V/I)*1000 #resistance of diode,\n",
+ " #converting current in Ampere from mA in calculation\n",
+ "\n",
+ "#Result\n",
+ "print \"Resistance is \", R ,\"ohm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resistance is 40.0 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.1(c), Page No.:29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "V= -10 #voltage of diode in V\n",
+ "I= -1 #current of diode in microAmpere\n",
+ "\n",
+ "#Calculation\n",
+ "R=(V/I)*1000*1000 #resistance of diode,\n",
+ " #converting current in Ampere from microAmpere in calculation\n",
+ "R=V/I*(1000/1000)*(1000/1000)#converting ohm into Mega-ohm \n",
+ "#Result\n",
+ "print \"Resistance is \", R ,\"Mega-ohm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resistance is 10 Mega-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.2(a), Page NO.:31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "I=2 #diode current in mA\n",
+ "I1=4 #diode current choosen by 2 mA swing above given diode current of 2 mA.\n",
+ "I2=0 #diode current choosen by 2 mA swing below given diode current of 2 mA.\n",
+ "V1=0.76 #diode voltage at I1= 4 mA.\n",
+ "V2=0.65 #diode voltage at I2= 0 mA.\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "R=((V1-V2)/(I1-I2))*1000 #R is AC resistance,\n",
+ " #V1-V2 is change in voltage and I1-I2 is chnage in current.\n",
+ " #multiplying by 1000 for converting current into A from mA.\n",
+ "#RESULT\n",
+ "print \"Ac resistance is\",R,\"ohm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ac resistance is 27.5 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.2(b),Page No.:31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "I=25 #diode current in mA\n",
+ "I1=30 #diode current choosen by 5 mA swing above given diode current of 25 mA.\n",
+ "I2=20 #diode current choosen by 5 mA swing below given diode current of 25 mA.\n",
+ "V1=0.8 #diode voltage at I1= 30 mA.\n",
+ "V2=0.78 #diode voltage at I2= 20 mA.\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "R=((V1-V2)/(I1-I2))*1000 #R is AC resistance,\n",
+ " #V1-V2 is change in voltage and I1-I2 is chnage in current.\n",
+ " #multiplying by 1000 for converting current into A from mA.\n",
+ "#RESULT\n",
+ "print \"Ac resistance is\",R,\"ohm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ac resistance is 2.0 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.2(c), Page No.:32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "I1=2 #diode current in mA. \n",
+ "V1=0.7 #diode voltage in V.\n",
+ "\n",
+ "I2=25 #diode current in mA.\n",
+ "V2=0.79 #diode voltage in V.\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "R1=(V1/I1)*1000 #R1 is DC resistance, \n",
+ " #multiplying by 1000 for converting current into A from mA.\n",
+ "\n",
+ "R2=(V2/I2)*1000 #R2 is DC rresistance \n",
+ " #mulipying by 1000 for converting current into A from mA.\n",
+ "\n",
+ "#RESULT\n",
+ "print \"Dc resistance at 2 mA is\",R1,\"ohm, which far exceeds AC resistance of 27.5 ohm\"\n",
+ "\n",
+ "print \"DC resistance at 25 mA is\",R2,\"ohm, which far exceeds AC resistance of 2 ohm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Dc resistance at 2 mA is 350.0 ohm, which far exceeds AC resistance of 27.5 ohm\n",
+ "DC resistance at 25 mA is 31.6 ohm, which far exceeds AC resistance of 2 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.3, Page No.: 48-49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "V=10 #zener voltage in V.\n",
+ "T=0.072 #Temperature coefficient.\n",
+ "T1=100 #given temperature in celsius.\n",
+ "To=25 #reference temperature in celsius\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "V1=(T*V*(T1-To))/100 #nominal voltage for zener diode in V.\n",
+ "\n",
+ " #Temperature coefficient is positive.\n",
+ " #new zener voltage is defined by V2.\n",
+ "V2=V+V1\n",
+ "\n",
+ "#RESULT\n",
+ "\n",
+ "print \"Voltage for zener diode is\",V2,\"V\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Voltage for zener diode is 10.54 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file |