diff options
Diffstat (limited to 'sample_notebooks/MukteshChaudhary')
-rw-r--r-- | sample_notebooks/MukteshChaudhary/ch1_1.ipynb | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/sample_notebooks/MukteshChaudhary/ch1_1.ipynb b/sample_notebooks/MukteshChaudhary/ch1_1.ipynb new file mode 100644 index 00000000..079c7b6e --- /dev/null +++ b/sample_notebooks/MukteshChaudhary/ch1_1.ipynb @@ -0,0 +1,101 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1: Basic Ideas: Energy Bands in Solids" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1, Page 8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable decalaration\n", + "pd = 100 #potential difference, V\n", + "m0=9.11*(10**-31);#m0=rest mass of the electron in kg\n", + "\n", + "#Calculations&Results\n", + "#solving final velocity of the electron\n", + "Ek=1.6*(10**-19)*pd;#Ek=final kinetic energy of electron in Joules\n", + "print \"Final kinetic energy = %.1e J,%.f eV\"%(Ek,Ek*6.242*10**18)\n", + "v=math.sqrt((2*Ek)/m0)#v=final velocity of the electron\n", + "print \"Final velocity = %.3e m/s\"%v" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Final kinetic energy = 1.6e-17 J,100 eV\n", + "Final velocity = 5.927e+06 m/s\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2, Page 8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "m=7360*9.11*(10**-31);#m=mass of the ion in kg\n", + "q=2*1.6*(10**-19);#q=charge of the ion in Coulomb\n", + "V=2000;#V=potential difference in Volt\n", + "\n", + "#Calculations&Results\n", + "#solving velocity & kinetic energy of the ion\n", + "v=math.sqrt((2*q*V)/m)#v=velocity of the ion\n", + "print \"Velocity acquired by the ion = %.3e m/s\"%v\n", + "Ek=(1./2)*m*(v**2)#Ek=kinetic energy of the ion\n", + "print \"Kinetic energy of ion = %.1e J = %.f eV\"%(Ek,Ek*6.242*10**18)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity acquired by the ion = 4.369e+05 m/s\n", + "Kinetic energy of ion = 6.4e-16 J = 3995 eV\n" + ] + } + ], + "prompt_number": 2 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file |