diff options
Diffstat (limited to 'Applied_Physics_by_P_K_Palanisamy')
16 files changed, 4684 insertions, 0 deletions
diff --git a/Applied_Physics_by_P_K_Palanisamy/Chapter10_1.ipynb b/Applied_Physics_by_P_K_Palanisamy/Chapter10_1.ipynb new file mode 100755 index 00000000..4ad21f3b --- /dev/null +++ b/Applied_Physics_by_P_K_Palanisamy/Chapter10_1.ipynb @@ -0,0 +1,167 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:04df0fd624434d43d67fac6cabd770a44e2109835e3a6832f168a8a4e92f27c9"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "10: Lasers"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 10.1, Page number 10.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "c = 3*10**8 #speed of light(m/sec)\n",
+ "h = 6.6*10**-34 #planck's constant\n",
+ "e = 1.6*10**-19\n",
+ "T = 300 #temperature(K)\n",
+ "K = 8.61*10**-5\n",
+ "lamda = 6943 #wavelength, angstrom\n",
+ "\n",
+ "#Calculation\n",
+ "lamda = lamda*10**-10 #wavelength(m)\n",
+ "#let E2 - E1 be E\n",
+ "E = h*c/lamda #energy(J)\n",
+ "E = E/e #energy(eV)\n",
+ "#let population ratio N2/N1 be N\n",
+ "N = math.exp(-E/(K*T));\n",
+ "\n",
+ "#Result\n",
+ "print \"relative population of 2 states is\",round(N/1e-30,3),\"*10^-30\"\n",
+ "print \"answer given in the book is wrong\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "relative population of 2 states is 1.076 *10^-30\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 10.2, Page number 10.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a2 = 6 #spot diameter(mm)\n",
+ "a1 = 4 #spot diameter(mm)\n",
+ "d2 = 2 #distance from laser(m)\n",
+ "d1 = 1 #distance from laser(m)\n",
+ "\n",
+ "#Calculation\n",
+ "a2 = a2*10**-3 #spot diameter(m)\n",
+ "a1 = a1*10**-3 #spot diameter(m)\n",
+ "theta = (a2-a1)/(2*(d2-d1)) #divergence(radian)\n",
+ "theta = theta*10**3 #divergence(milli radian)\n",
+ "\n",
+ "#Result\n",
+ "print \"divergence is\",theta,\"milli radian\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "divergence is 1.0 milli radian\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 10.3, Page number 10.46"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n = 1 #for air\n",
+ "lamda = 650 #wavelength(nm)\n",
+ "bs = 1 #beam size(mm)\n",
+ "fl = 1 #focal length of lens(mm)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda = lamda*10**-9 #wavelength(m)\n",
+ "bs = bs*10**-3 #beam size(m)\n",
+ "fl = fl*10**-3 #focal length of lens(m)\n",
+ "tan_theta = fl/(2*bs) #value of tan_theta\n",
+ "theta = math.atan(tan_theta)\n",
+ "NA = n*math.sin(theta)\n",
+ "NA = math.ceil(NA*10**2)/10**2; #rounding off to 2 decimals\n",
+ "ss = 0.6*lamda/NA #spot size(m)\n",
+ "ss = ss*10**6; #spot size(micro metre)\n",
+ "ss = math.ceil(ss*10**3)/10**3; #rounding off to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"spot size is\",ss,\"micro metre\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "spot size is 0.867 micro metre\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Applied_Physics_by_P_K_Palanisamy/Chapter11_1.ipynb b/Applied_Physics_by_P_K_Palanisamy/Chapter11_1.ipynb new file mode 100755 index 00000000..04367b22 --- /dev/null +++ b/Applied_Physics_by_P_K_Palanisamy/Chapter11_1.ipynb @@ -0,0 +1,277 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:99fe784c923b9389b1b34d49f0a0fc6c7079e6fd55741e762bc73de0fe21384b"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "11: Fibre Optics and Holography"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 11.1, Page number 11.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.55 #refractive index of core\n",
+ "n2 = 1.50 #refractive index of cladding\n",
+ "\n",
+ "#Calculation\n",
+ "NA = math.sqrt(n1**2 - n2**2)\n",
+ "NA = math.ceil(NA*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"numerical aperture is\",NA"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "numerical aperture is 0.391\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 11.2, Page number 11.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.563 #refractive index of core\n",
+ "n2 = 1.498; #refractive index of cladding\n",
+ "\n",
+ "#Calculation\n",
+ "NA = math.sqrt(n1**2 - n2**2) #numerical aperture \n",
+ "NA = math.ceil(NA*10**4)/10**4; #rounding off to 4 decimals\n",
+ "alpha_i = math.asin(NA) #angle of acceptance(radians)\n",
+ "alpha_i = alpha_i*180/math.pi #angle(degrees)\n",
+ "deg = int(alpha_i)\n",
+ "t = 60*(alpha_i-deg)\n",
+ "mint = int(t) #angle(minutes)\n",
+ "\n",
+ "#Result\n",
+ "print \"the angle of acceptance is\",deg,\"degrees and\",mint,\"minutes\"\n",
+ "print \"answer given in the book differs due to rounding off errors\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the angle of acceptance is 26 degrees and 29 minutes\n",
+ "answer given in the book differs due to rounding off errors\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 11.3, Page number 11.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "delta = 0.05 #difference in refractive indices of core and cladding\n",
+ "NA = 0.39 #numerical aperture\n",
+ "\n",
+ "#Calculation\n",
+ "n1 = NA/math.sqrt(2*delta) #refractive index of core\n",
+ "n1 = math.ceil(n1*10**4)/10**4; #rounding off to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"refractive index of the core is\",n1"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "refractive index of the core is 1.2333\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 11.4, Page number 11.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.563 #refractive index of core\n",
+ "n2 = 1.498 #refractive index of cladding\n",
+ "\n",
+ "#Calculation\n",
+ "delta = (n1-n2)/n1 #fractional index change\n",
+ "delta = math.ceil(delta*10**4)/10**4; #rounding off to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"fractional index change is\",delta"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "fractional index change is 0.0416\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 11.5, Page number 11.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1.48 #refractive index of core\n",
+ "n2 = 1.45 #refractive index of cladding\n",
+ "\n",
+ "#Calculation\n",
+ "NA = math.sqrt(n1**2 - n2**2) #numerical aperture \n",
+ "NA = math.ceil(NA*10**4)/10**4; #rounding off to 4 decimals\n",
+ "alpha_i = math.asin(NA) #angle of acceptance(radian)\n",
+ "alpha_i = alpha_i*180/math.pi #angle(degrees)\n",
+ "deg = int(alpha_i)\n",
+ "t = 60*(alpha_i-deg)\n",
+ "mint = round(t) #angle(minutes)\n",
+ "\n",
+ "#Result\n",
+ "print \"numerical aperture is\",NA\n",
+ "print \"the angle of acceptance is\",deg,\"degrees and\",mint,\"minutes\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "numerical aperture is 0.2965\n",
+ "the angle of acceptance is 17 degrees and 15.0 minutes\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 11.6, Page number 11.15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Pin = 100 #power of signal(mW)\n",
+ "Pout = 40 #outcoming signal power(mW)\n",
+ "\n",
+ "#Calculation\n",
+ "l = -10*math.log10(Pout/Pin) #attenuation loss(dB)\n",
+ "l = math.ceil(l*10**2)/10**2; #rounding off to 2 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"the attenuation loss is\",l,\"dB\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the attenuation loss is 3.98 dB\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Applied_Physics_by_P_K_Palanisamy/Chapter1_1.ipynb b/Applied_Physics_by_P_K_Palanisamy/Chapter1_1.ipynb new file mode 100755 index 00000000..49ab34ca --- /dev/null +++ b/Applied_Physics_by_P_K_Palanisamy/Chapter1_1.ipynb @@ -0,0 +1,214 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:358f4a01b294025154ed5b68aa4867e70b7293d6e35ba5318010f0ecabaea268"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "1: Bonding in Solids"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 1.1, Page number 1.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "IE_1 = 502 #first ionisation energy(kJ/mol)\n",
+ "EA_B = -335 #electron affinity for B atom(kJ/mol)\n",
+ "e = 1.602*10**-19\n",
+ "r = 0.3 #inter ionic seperation(nm)\n",
+ "epsilon0 = 8.85*10**-12 #permittivity of free space(C/N-m)\n",
+ "\n",
+ "#Calculation\n",
+ "r = r*10**-9 #inter ionic seperation(m)\n",
+ "N = 6.022*10**23*10**-3\n",
+ "E = (-e**2*N)/(4*math.pi*epsilon0*r) #electrostatic attraction energy(kJ/mol)\n",
+ "dE = IE_1+EA_B+E; #net change in energy per mole\n",
+ "\n",
+ "#Result\n",
+ "print \"electrostatic attraction energy is\",int(E),\"kJ/mol\"\n",
+ "print \"net change in energy is\",int(dE),\"kJ/mol\"\n",
+ "print \"A+B- molecule will be stable\"\n",
+ "print \"answer for net change,dE given in the book is wrong\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "electrostatic attraction energy is -463 kJ/mol\n",
+ "net change in energy is -296 kJ/mol\n",
+ "A+B- molecule will be stable\n",
+ "answer for net change,dE given in the book is wrong\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 1.2, Page number 1.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "IP_K = 4.1 #IP of K(eV)\n",
+ "EA_Cl = 3.6 #EA of Cl(eV)\n",
+ "e = 1.602*10**-19\n",
+ "epsilon0 = 8.85*10**-12 \n",
+ "\n",
+ "#Calculation\n",
+ "delta_E = IP_K - EA_Cl #energy required(eV)\n",
+ "#if their total energy is 0, delta_E = Ec\n",
+ "Ec = delta_E\n",
+ "R = e/(4*math.pi*epsilon0*Ec) #seperation between ion pair(m)\n",
+ "R = R*10**9 #seperation between ion pair(nm)\n",
+ "R = math.ceil(R*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"energy required to form K+Cl- ion pair is\",delta_E,\"eV\"\n",
+ "print \"seperation between ion pair is\",R,\"nm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "energy required to form K+Cl- ion pair is 0.5 eV\n",
+ "seperation between ion pair is 2.881 nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 1.3, Page number 1.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "e = 1.602*10**-19\n",
+ "EA = 3.65 #electron affinity of Cl(eV)\n",
+ "IP = 5.14 #ionisation energy of Na(eV)\n",
+ "epsilon0 = 8.85*10**-12\n",
+ "r0 = 236 #equilibrium distance(pm)\n",
+ "\n",
+ "#Calculation\n",
+ "r0 = r0*10**-12 #equilibrium distance(m)\n",
+ "V = (-e**2)/(4*math.pi*epsilon0*r0) ##potential energy(J)\n",
+ "V = V/e #potential energy(eV)\n",
+ "Ue = V\n",
+ "BE = -Ue - IP + EA #bond energy(eV)\n",
+ "BE = math.ceil(BE*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"bond energy for NaCl molecule is\",BE,\"eV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "bond energy for NaCl molecule is 4.614 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 1.4, Page number 1.19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "e = 1.602*(10**-19)\n",
+ "epsilon0 = 8.85*(10**-12)\n",
+ "r0 = 0.281 #equilibrium seperation(nm)\n",
+ "A = 1.748 #Madelung constant\n",
+ "n = 9 #born repulsive exponent\n",
+ "\n",
+ "#Calculation\n",
+ "r0 = r0*10**-9 #equilibrium seperation(m)\n",
+ "CE = (A*e**2)*(1-(1/n))/(4*math.pi*epsilon0*r0) #cohesive energy(J)\n",
+ "CE = CE/e #cohesive energy(eV)\n",
+ "CE = math.ceil(CE*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"cohesive energy of NaCl is\",CE,\"eV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "cohesive energy of NaCl is 7.966 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Applied_Physics_by_P_K_Palanisamy/Chapter2_1.ipynb b/Applied_Physics_by_P_K_Palanisamy/Chapter2_1.ipynb new file mode 100755 index 00000000..85f9fd71 --- /dev/null +++ b/Applied_Physics_by_P_K_Palanisamy/Chapter2_1.ipynb @@ -0,0 +1,1031 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:dc7951185c6d2c2020409b6a4f6420009478010f311e90b1a30732a0039ca5cf"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ " 2: Crystal Structures and X-ray Diffraction"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.1, Page number 2.16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r = 1; #assume value of r as 1\n",
+ " \n",
+ "#Calculation\n",
+ "#since 4*r = math.sqrt(3)*a\n",
+ "a = 4*r/math.sqrt(3); \n",
+ "R = (a-(2*r))/2; #since 2*r+2*R = a\n",
+ "R = math.ceil(R*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"radius of interstitial sphere is\",R,\"r\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "radius of interstitial sphere is 0.155 r\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.2, Page number 2.17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r_BCC = 1.258; #atomic radius(Angstrom)\n",
+ "r_FCC = 1.292; #atomic radius(Angstrom)\n",
+ "\n",
+ "#Calculation\n",
+ "a_BCC = (4*r_BCC)/math.sqrt(3); #In BCC(Angstrom)\n",
+ "a_BCCm = a_BCC*10**-10; #converting a from Angstrom to m\n",
+ "V_BCC = a_BCCm**3; #volume of unit cell(m^3)\n",
+ "n_BCC = ((1/8)*8)+1; #number of atoms per unit cell\n",
+ "V1_BCC = V_BCC/n_BCC; #volume occupied by 1 atom(m^3)\n",
+ "a_FCC = 2*math.sqrt(2)*r_FCC; #In FCC(Angstrom)\n",
+ "a_FCCm = a_FCC*10**-10; #converting a from Angstrom to m\n",
+ "V_FCC = a_FCCm**3; #volume of unit cell(m^3)\n",
+ "n_FCC = ((1/2)*6) + ((1/8)*8); #number of atoms per unit cell\n",
+ "V1_FCC = V_FCC/n_FCC; #volume occupied by 1 atom(m^3)\n",
+ "delta_V = (V1_BCC - V1_FCC)*100/V1_BCC; #change in volume in %\n",
+ "delta_V = math.ceil(delta_V*10)/10; #rounding off to 1 decimal\n",
+ "\n",
+ "#Result\n",
+ "print \"decrease of volume during conversion from BCC to FCC is\",delta_V,\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "decrease of volume during conversion from BCC to FCC is 0.5 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.3, Page number 2.17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a = 0.27; #nearest neighbour distance(nm)\n",
+ "c = 0.494; #height of unit cell(nm)\n",
+ "N = 6.023*10**26; #avagadro number(k/mol)\n",
+ "M = 65.37; #atomic weight(kg)\n",
+ "\n",
+ "#Calculation\n",
+ "a_m = a*10**-9; #nearest neighbour distance(m)\n",
+ "c_m = c*10**-9; #height of unit cell(m)\n",
+ "V = 3*math.sqrt(3)*(a_m**2)*c_m/2; #volume of unit cell(m^3)\n",
+ "#if rho is density then mass = V*rho\n",
+ "#V*rho = 6*M/N\n",
+ "rho = (6*M)/(N*V); #density(kg/m^3)\n",
+ "\n",
+ "#Result\n",
+ "print \"Volume of the unit cell is\",round(V/1e-29,2),\"*10^-29 m^3\"\n",
+ "print \"density of Zinc is\",round(rho),\"kg/m^3\"\n",
+ "print \"answer for density given in the book differs due to rounding off errors\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Volume of the unit cell is 9.36 *10^-29 m^3\n",
+ "density of Zinc is 6960.0 kg/m^3\n",
+ "answer for density given in the book differs due to rounding off errors\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.4, Page number 2.18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r = 1; #assume value of r as 1\n",
+ "\n",
+ "#Calculation\n",
+ "a = 4*r/math.sqrt(2); #for FCC structure\n",
+ "R = (a/2)-r; #since 2*r+2*R = a\n",
+ "R = math.ceil(R*10**4)/10**4; #rounding off to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"maximum radius of the sphere that can fit into the void is\",R,\"r\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum radius of the sphere that can fit into the void is 0.4143 r\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.5, Page number 2.19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a = 0.356; #cube edge of diamond(nm)\n",
+ "aw = 12.01; #atomic weight of carbon(kg)\n",
+ "N = 6.023*10**26; #avagadro's number\n",
+ "\n",
+ "#Calculation\n",
+ "a_m = a*10**-9; #cube edge of diamond(m)\n",
+ "n = 8/(a_m**3); #number of atoms(per m^3)\n",
+ "n = n/10**29;\n",
+ "n = math.ceil(n*10**3)/10**3; #rounding off to 3 decimals\n",
+ "n = n*10**29;\n",
+ "M = aw/N; #mass of 1 carbon atom(kg)\n",
+ "rho = M*n;\n",
+ "\n",
+ "#Result\n",
+ "print \"number of atoms per m^3 is\",n\n",
+ "print \"density of diamond is\",int(rho),\"kg/m^3\"\n",
+ "print \"answer for density given in the book differs due to rounding off errors\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "number of atoms per m^3 is 1.774e+29\n",
+ "density of diamond is 3537 kg/m^3\n",
+ "answer for density given in the book differs due to rounding off errors\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.6, Page number 2.19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "MW = 23+35.5; #molecular weight of NaCl(gm)\n",
+ "N = 6.023*10**23; #avagadro number(mol-1)\n",
+ "rho = 2.18; #density of NaCl(gm/cm^3)\n",
+ "V = 1; #volume of unit cube(cm^3)\n",
+ "\n",
+ "#Calculation\n",
+ "M = MW/N; #mass of NaCl molecule(gm)\n",
+ "n = rho/M; #number of molecules per unit volume\n",
+ "n = 2*n; #since NaCl is diatomic(atoms/cm^3)\n",
+ "#length of edge of unit cube is n*a\n",
+ "#volume V = n^3*a^3 = 1 cm^3 \n",
+ "a = (V/n)**(1/3); #distance between two adjacent atoms(cm)\n",
+ "a = a*10**8; #distance between two adjacent atoms(A)\n",
+ "a = math.ceil(a*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"distance between two adjacent atoms is\",a,\"Angstrom\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "distance between two adjacent atoms is 2.814 Angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.7, Page number 2.20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "AW = 63.5; #atomic weight of Cu(gm/mol)\n",
+ "N = 6.023*10**23; #avagadro's number(mol-1)\n",
+ "r = 1.278; #atomic radius(A)\n",
+ "n = 4; #number of atoms in unit cell\n",
+ "\n",
+ "#Calculation\n",
+ "r = r*10**-8; #atomic radius(cm)\n",
+ "M = AW/N; #mass of each Copper atom(gm)\n",
+ "a = 4*r/math.sqrt(2); #lattice constant(cm)\n",
+ "m = n*M; #mass of unit cell(gm)\n",
+ "rho = m/a**3; #density of copper crystal(gm/cm^3)\n",
+ "rho = math.ceil(rho*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"density of Copper crystal is\",rho,\"gm/cm^3\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "density of Copper crystal is 8.929 gm/cm^3\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.8, Page number 2.21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r = 0.1249; #atomic radius(nm)\n",
+ "PF = 0.68; #packing factor for BCC\n",
+ "\n",
+ "#Calculation\n",
+ "a = 4*r/math.sqrt(3); #lattice constant(nm)\n",
+ "a_m = a*10**-9; #lattice constant(m)\n",
+ "V = a_m**3; #volume of unit cell(m^3)\n",
+ "FV = 1-PF; #free volume\n",
+ "FV1 = FV*V; #free volume per unit cell(m^3)\n",
+ "\n",
+ "#Result\n",
+ "print \"free volume per unit cell is\",round(FV1/1e-30,4),\"*10^-30 m^3\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "free volume per unit cell is 7.6795 *10^-30 m^3\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.11, Page number 2.27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "#in (100) plane the total number of atoms are n\n",
+ "n = (1/4)*4;\n",
+ "\n",
+ "#Calculation\n",
+ "#in (111) plane, area = (1/2)*base*height = (1/2)*a*sqrt(2)*a*sqrt(2)*cosd(30)\n",
+ "x = math.cos(30);\n",
+ "#area = (1/2)*a*sqrt(2)*a*sqrt(2)*x = 0.866*a^2 = 0.58/a^2\n",
+ "n1 = (1/360)*60*3;\n",
+ "\n",
+ "#Result\n",
+ "print \"number of atoms in (100) plane are\",n;\n",
+ "#A = a^2. number of atoms per mm^2 is n/a^2\n",
+ "print \"number of atoms per mm^2 is 1/a^2\";\n",
+ "print \"number of atoms in (110) plane is 1\";\n",
+ "#in (110) plane, area is sqrt(2)*a*a = sqrt(2)*a^2\n",
+ "print \"unit area contains 1/(sqrt(2)*a^2) = 0.707/a^2 atoms/mm^2\";\n",
+ "print \"total number of atoms in (111) plane is\",n1\n",
+ "#number of atoms per unit area is 0.5/(0.866*a^2)\n",
+ "print \"number of atoms per unit area is 0.58/a^2 atoms/mm^2\";"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "number of atoms in (100) plane are 1.0\n",
+ "number of atoms per mm^2 is 1/a^2\n",
+ "number of atoms in (110) plane is 1\n",
+ "unit area contains 1/(sqrt(2)*a^2) = 0.707/a^2 atoms/mm^2\n",
+ "total number of atoms in (111) plane is 0.5\n",
+ "number of atoms per unit area is 0.58/a^2 atoms/mm^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.12, Page number 2.28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "h1 = 1;\n",
+ "k1 = 1;\n",
+ "l1 = 0; #for (110) plane\n",
+ "h2 = 2;\n",
+ "k2 = 1;\n",
+ "l2 = 2; #for (212) plane\n",
+ "r = 0.1278; #atomic radius(nm)\n",
+ "\n",
+ "#Calculation\n",
+ "r = r*10**-9; #atomic radius(m) \n",
+ "x1 = math.sqrt(h1**2+k1**2+l1**2);\n",
+ "a = 4*r/x1; #nearest neighbouring distance(m)\n",
+ "a = a*10**9; #nearest neighbouring distance(nm)\n",
+ "d_110 = a/x1; #interplanar spacing for (110),(nm)\n",
+ "x2 = math.sqrt(h2**2+k2**2+l2**2);\n",
+ "d_212 = a/x2; #interplanar spacing for (212),(nm)\n",
+ "d_212 = math.ceil(d_212*10**4)/10**4; #rounding off to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"interplanar spacing for (110) is\",d_110,\"nm\"\n",
+ "print \"interplanar spacing for (212) is\",d_212,\"nm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "interplanar spacing for (110) is 0.2556 nm\n",
+ "interplanar spacing for (212) is 0.1205 nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.13, Page number 2.29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "h1 = 1;\n",
+ "k1 = 0;\n",
+ "l1 = 0; #for (100) plane\n",
+ "h2 = 1;\n",
+ "k2 = 1;\n",
+ "l2 = 0; #for (110) plane \n",
+ "h3 = 1;\n",
+ "k3 = 1;\n",
+ "l3 = 1; #for (111) plane\n",
+ "\n",
+ "#Calculation\n",
+ "x1 = math.sqrt(1/(h1**2+k1**2+l1**2)); #for (100) plane\n",
+ "x2 = math.sqrt(1/(h2**2+k2**2+l2**2)); #for (110) plane \n",
+ "x3 = math.sqrt(1/(h3**2+k3**2+l3**2)); #for (111) plane\n",
+ "x2 = math.ceil(x2*10**2)/10**2; #rounding off to 2 decimals\n",
+ "x3 = math.ceil(x3*10**2)/10**2; #rounding off to 2 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"ratio of the seperation between successive lattice planes is %d:%.2f:%.2f\"%(x1,x2,x3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ratio of the seperation between successive lattice planes is 1:0.71:0.58\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.14, Page number 2.30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Calculation\n",
+ "#plane intercepts at a,b/2,3*c\n",
+ "#therefore intercepts are (1 1/2 3)\n",
+ "x = 1;\n",
+ "y = 1/2;\n",
+ "z = 3;\n",
+ "def lcm(x, y):\n",
+ " if y > z:\n",
+ " greater = y\n",
+ " else:\n",
+ " greater = z\n",
+ "\n",
+ " while(True):\n",
+ " if((greater % y == 0) and (greater % z == 0)):\n",
+ " lcm = greater\n",
+ " break\n",
+ " greater += 1\n",
+ "\n",
+ " return lcm\n",
+ "\n",
+ "lcm = lcm(y,z); \n",
+ "x_dash = (1/x)*lcm; #miller index of x plane\n",
+ "y_dash = (1/y)*lcm; #miller index of y plane \n",
+ "z_dash = (1/z)*lcm; #miller index of z plane\n",
+ "\n",
+ "#Result\n",
+ "print \"miller indices of the plane are (\",x_dash,y_dash,z_dash,\")\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "miller indices of the plane are ( 3.0 6.0 1.0 )\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.15, Page number 2.37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "d = 0.282; #lattice spacing(nm)\n",
+ "n = 1; #first order\n",
+ "theta = (8+(35/60))*(math.pi/180); #glancing angle(radian)\n",
+ "theeta = 90; #maximum value possible(degrees)\n",
+ "\n",
+ "#Calculation\n",
+ "theeta = theeta*math.pi/180; #maximum value possible(radian) \n",
+ "d = d*10**-9; #lattice spacing(m)\n",
+ "lamda = 2*d*math.sin(theta)/n; #wavelength of X-rays(m)\n",
+ "lamda_nm = lamda*10**9; #wavelength of X-rays(nm)\n",
+ "lamda_nm = math.ceil(lamda_nm*10**4)/10**4; #rounding off to 4 decimals\n",
+ "n1 = 2*d*math.sin(theeta)/lamda; #maximum order of diffraction possible\n",
+ "\n",
+ "#Result\n",
+ "print \"wavelength of X-rays is\",lamda_nm,\"nm\"\n",
+ "print \"maximum order of diffraction possible is\",int(n1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "wavelength of X-rays is 0.0842 nm\n",
+ "maximum order of diffraction possible is 6\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.16, Page number 2.37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda = 1.5; #wavelength(A.U)\n",
+ "d = 1.6; #interplanar spacing(A.U)\n",
+ "theta = 90; #maximum glancing angle possible(degrees)\n",
+ "\n",
+ "#Calculation\n",
+ "theta = theta*math.pi/180; #maximum glancing angle possible(radian)\n",
+ "n = 2*d*math.sin(theta)/lamda; #maximum possible diffraction order\n",
+ "\n",
+ "#Result\n",
+ "print \"maximum possible diffraction order is\",int(n)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum possible diffraction order is 2\n"
+ ]
+ }
+ ],
+ "prompt_number": 38
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.17, Page number 2.38"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "h = 1;\n",
+ "k = 1;\n",
+ "l = 1; #for (111) plane\n",
+ "theta = 30; #glancing angle(degrees)\n",
+ "n = 1; #first order\n",
+ "lamda = 1.5418; #wavelength of X-rays(A)\n",
+ "\n",
+ "#Calculation\n",
+ "theta = theta*math.pi/180; #glancing angle(radian)\n",
+ "x = math.sqrt(h**2+k**2+l**2);\n",
+ "lamda = lamda*10**-10; #wavelength of X-rays(m)\n",
+ "d = lamda/(2*math.sin(theta));\n",
+ "a = d*x; #interatomic spacing(m)\n",
+ "a = a*10**10; #interatomic spacing(A)\n",
+ "a = math.ceil(a*10**4)/10**4; #rounding off to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"the interatomic spacing is\",a,\"Angstrom\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the interatomic spacing is 2.6705 Angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.18, Page number 2.38"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "d100 = 0.28; #lattice constant(nm)\n",
+ "h = 1;\n",
+ "k = 1;\n",
+ "l = 0; #for (110) plane\n",
+ "n = 2; #second order\n",
+ "lamda = 0.071; #wavelength of X-rays(nm)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda_m = lamda*10**-9; #wavelength of X-rays(m)\n",
+ "d110 = d100/math.sqrt(h**2+k**2+l**2); #interatomic spacing(nm)\n",
+ "d110 = d110*10**-9; #interatomic spacing(m)\n",
+ "theta = math.asin(n*lamda_m/(2*d110)); #glancing angle(radian)\n",
+ "theta = theta*180/math.pi; #glancing angle(degrees)\n",
+ "\n",
+ "#Result\n",
+ "print \"the glancing angle is\",int(theta),\"degrees\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the glancing angle is 21 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 46
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.19, Page number 2.39"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a = 0.38; #lattice constant(nm)\n",
+ "h = 1;\n",
+ "k = 1;\n",
+ "l = 0; #for (110) plane\n",
+ "\n",
+ "#Calculation\n",
+ "d = a/math.sqrt(h**2+k**2+l**2);\n",
+ "d = math.ceil(d*10**2)/10**2; #rounding off to 2 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"the distance between (110) planes is\",d,\"nm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the distance between (110) planes is 0.27 nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 48
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.20, Page number 2.39"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "#area of (110) plane is a*sqrt(2)*a = sqrt(2)*a^2\n",
+ "theta = 30; #glancing angle(degrees)\n",
+ "\n",
+ "#Calculation\n",
+ "theta = theta*math.pi/180; #glancing angle(radian)\n",
+ "n = (1/4)*4; #number of atoms\n",
+ "x = math.cos(theta);\n",
+ "#area of (111) plane is (a/sqrt(2))*x*a*sqrt(2)\n",
+ "#hence area is (sqrt(3)/2)*a^2\n",
+ "n1 = 3*(1/6); #number of atoms\n",
+ "\n",
+ "#Result\n",
+ "print \"area of (110) plane contains\",n,\"atom\"\n",
+ "print \"density of lattice points is 1/(sqrt(2)*a^2)\"\n",
+ "print \"area of (111) plane contains\",n1,\"atom\"\n",
+ "#density of lattice points is (1/2)/(sqrt(3)*a^2/2)\n",
+ "print \"density of lattice points is 1/(sqrt(3)*a^2)\"\n",
+ "#density of lattice points (111) plane : (110) plane is 1/(sqrt(3)*a^2) : 1/(sqrt(2)*a^2) = sqrt(2):sqrt(3)\n",
+ "print \"density of lattice points (111) plane : (110) plane is sqrt(2):sqrt(3)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "area of (110) plane contains 1.0 atom\n",
+ "density of lattice points is 1/(sqrt(2)*a^2)\n",
+ "area of (111) plane contains 0.5 atom\n",
+ "density of lattice points is 1/(sqrt(3)*a^2)\n",
+ "density of lattice points (111) plane : (110) plane is sqrt(2):sqrt(3)\n"
+ ]
+ }
+ ],
+ "prompt_number": 49
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.21, Page number 2.40"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n = 2; #second order\n",
+ "h = 1;\n",
+ "k = 1;\n",
+ "l = 0; #plane (110)\n",
+ "lamda = 0.065; #wavelength of X-rays(nm)\n",
+ "a = 0.26; #axial length(nm)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda_m = lamda*10**-9; #wavelength of X-rays(m)\n",
+ "a_m = a*10**-9; #axial length(m)\n",
+ "x = math.sqrt(h**2+k**2+l**2);\n",
+ "theta = math.asin(n*lamda_m*x/(2*a_m)); #glancing angle(radian)\n",
+ "theta = theta*180/math.pi; #glancing angle(degrees)\n",
+ "deg = int(theta); #glancing angle(degrees)\n",
+ "t = 60*(theta-deg);\n",
+ "mint = int(t); #glancing angle(minutes)\n",
+ "\n",
+ "#Result\n",
+ "print \"the glancing angle is\",deg,\"degrees\",mint,\"minutes\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the glancing angle is 20 degrees 42 minutes\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.22, Page number 2.41"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n = 1; #first order\n",
+ "h = 1;\n",
+ "k = 1;\n",
+ "l = 1; #for (111) plane\n",
+ "lamda = 1.54; #wavelength(A.U)\n",
+ "theta = 19.2; #Bragg's angle(degrees)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda_m = lamda*10**-10; #wavelength(m)\n",
+ "theta = theta*math.pi/180; #Bragg's angle(radian)\n",
+ "d = n*lamda_m/(2*math.sin(theta)); #interplanar spacing(m)\n",
+ "a = d*math.sqrt(h**2+k**2+l**2); #cube edge(m)\n",
+ "a_AU = a*10**10; #cube edge(A.U)\n",
+ "a_AU = math.ceil(a_AU*10**4)/10**4; #rounding off to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"the cube edge is\",a_AU,\"A.U\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the cube edge is 4.0554 A.U\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 2.23, Page number 2.41"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n = 1; #first order\n",
+ "h = 1;\n",
+ "k = 1;\n",
+ "l = 1; #for (111) plane\n",
+ "lamda = 1.54; #wavelength(A.U)\n",
+ "theta = 19.2; #Bragg's angle(degrees)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda_m = lamda*10**-10; #wavelength(m)\n",
+ "theta = theta*math.pi/180; #Bragg's angle(radian)\n",
+ "d = n*lamda_m/(2*math.sin(theta)); #interplanar spacing(m)\n",
+ "a = d*math.sqrt(h**2+k**2+l**2); #cube edge(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"the cube edge is\",round(a/1e-10,3),\"*10^-10 m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the cube edge is 4.055 *10^-10 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Applied_Physics_by_P_K_Palanisamy/Chapter3_1.ipynb b/Applied_Physics_by_P_K_Palanisamy/Chapter3_1.ipynb new file mode 100755 index 00000000..afe7637e --- /dev/null +++ b/Applied_Physics_by_P_K_Palanisamy/Chapter3_1.ipynb @@ -0,0 +1,586 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:50d61ee8fa972cdf457beff8302930b51b8d1018696b3dbcc148db2d3f471c34"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "3: Principles of Quantum Mechanics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 3.1, Page number 3.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "c = 3*10**8 #velocity of light(m/sec)\n",
+ "m = 1.67*10**-27 #mass of proton(kg)\n",
+ "h = 6.626*10**-34 #planck's constant\n",
+ "\n",
+ "#Calculation\n",
+ "v = (1/10)*c #velocity of proton(m/sec)\n",
+ "lamda = h/(m*v) #de Broglie wavelength(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"de Broglie wavelength of proton is\",round(lamda/1e-14,3),\"*10^-14 m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "de Broglie wavelength of proton is 1.323 *10^-14 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 3.2, Page number 3.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "V = 400 #potential(V)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda = 12.26/math.sqrt(V) #de Broglie wavelength(angstrom)\n",
+ "\n",
+ "#Result\n",
+ "print \"de Broglie wavelength of electron is\",lamda,\"angstrom\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "de Broglie wavelength of electron is 0.613 angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 3.3, Page number 3.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "m = 1.674*10**-27 #mass of neutron(kg)\n",
+ "h = 6.626*10**-34 #planck's constant\n",
+ "e = 1.6*10**-19\n",
+ "KE = 0.025 #kinetic energy(eV)\n",
+ "\n",
+ "#Calculation\n",
+ "E = KE*e #kinetic energy(J)\n",
+ "lamda = h/math.sqrt(2*m*E) #de Broglie wavelength(m)\n",
+ "lamda_nm = lamda*10**9 #de Broglie wavelength(nm)\n",
+ "lamda_nm = math.ceil(lamda_nm*10**4)/10**4 #rounding off to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"de Broglie wavelength is\",lamda_nm,\"nm\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "de Broglie wavelength is 0.1811 nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 3.4, Page number 3.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "V = 1600 #potential(V)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda = 12.26/math.sqrt(V) #de Broglie wavelength(angstrom)\n",
+ "\n",
+ "#Result\n",
+ "print \"de Broglie wavelength of electron is\",lamda,\"angstrom\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "de Broglie wavelength of electron is 0.3065 angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 3.5, Page number 3.18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "delta_x = 0.2 #electron distance(angstrom)\n",
+ "h = 6.626*10**-34 #planck's constant\n",
+ "\n",
+ "#Calculation\n",
+ "delta_x = delta_x*10**-10 #electron distance(m)\n",
+ "delta_p = h/(2*math.pi*delta_x) #uncertainity in momentum(kg.m/s)\n",
+ "\n",
+ "#Result\n",
+ "print \"uncertainity in momentum is\",round(delta_p/1e-24,3),\"*10^-24 kg m/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " uncertainity in momentum is 5.273 *10^-24 kg m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 3.6, Page number 3.27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1\n",
+ "n2 = 1\n",
+ "n3 = 1 #for lowest energy\n",
+ "e = 1.6*10**-19\n",
+ "h = 6.62*10**-34 #planck's constant\n",
+ "m = 9.1*10**-31 #mass of electron(kg)\n",
+ "L = 0.1 #side of box(nm)\n",
+ "\n",
+ "#Calculation\n",
+ "L = L*10**-9 #side of box(m)\n",
+ "E1 = h**2*(n1**2+n2**2+n3**2)/(8*m*L**2) #lowest energy(J)\n",
+ "E1 = E1/e #lowest energy(eV)\n",
+ "E1 = math.ceil(E1*10)/10 #rounding off to 1 decimal\n",
+ "\n",
+ "#Result\n",
+ "print \"lowest energy of electron is\",E1,\"eV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "lowest energy of electron is 112.9 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 3.7, Page number 3.27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1\n",
+ "n2 = 1\n",
+ "n3 = 2 #for level next to the lowest\n",
+ "e = 1.6*10**-19\n",
+ "h = 6.62*10**-34 #planck's constant\n",
+ "m = 9.1*10**-31 #mass of electron(kg)\n",
+ "L = 0.1 #side of box(nm)\n",
+ "\n",
+ "#Calculation\n",
+ "L = L*10**-9 #side of box(m)\n",
+ "E1 = h**2*(n1**2+n2**2+n3**2)/(8*m*L**2) #lowest energy(J)\n",
+ "E1 = E1/e #lowest energy(eV)\n",
+ "E1 = math.ceil(E1*10**2)/10**2 #rounding off to 2 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"energy of electron is\",E1,\"eV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "energy of electron is 225.75 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 3.8, Page number 3.28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "m = 9.1*10**-31 #mass of electron(kg)\n",
+ "h = 6.626*10**-34 #planck's constant\n",
+ "e = 1.6*10**-19\n",
+ "E = 2000 #energy(eV)\n",
+ "\n",
+ "#Calculation\n",
+ "E = E*e #energy(J)\n",
+ "lamda = h/math.sqrt(2*m*E) #wavelength(m)\n",
+ "lamda_nm = lamda*10**9 #velength(nm)\n",
+ "lamda_nm = math.ceil(lamda_nm*10**4)/10**4 #rounding off to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"wavelength is\",lamda_nm,\"nm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "wavelength is 0.0275 nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 3.9, Page number 3.28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n = 1 #for minimum energy\n",
+ "h = 6.626*10**-34 #planck's constant(J sec)\n",
+ "m = 9.91*10**-31 #mass of electron(kg)\n",
+ "L = 4*10**-10 #side of box(m)\n",
+ "\n",
+ "#Calculation\n",
+ "E1 = ((h**2)*(n**2))/(8*m*(L**2)) #lowest energy(J)\n",
+ "E1 = E1*10**18;\n",
+ "E1 = math.ceil(E1*10**4)/10**4 #rounding off to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"energy of electron is\",E1,\"*10**-18 J\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "energy of electron is 0.3462 *10**-18 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 3.10, Page number 3.29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1 #for ground state\n",
+ "n2 = 2 #for 1st excited state\n",
+ "n3 = 3 #for 2nd excited state\n",
+ "h = 6.626*10**-34 #planck's constant(J sec)\n",
+ "m = 9.1*10**-31 #mass of electron(kg)\n",
+ "L = 1*10**-10 #width(m)\n",
+ "\n",
+ "#Calculation\n",
+ "E1 = h**2*n1**2/(8*m*L**2) #energy in ground state(J)\n",
+ "E2 = n2**2*E1 #energy in 1st excited state(J)\n",
+ "E3 = n3**2*E1 #energy in 2nd excited state(J)\n",
+ "\n",
+ "#Result\n",
+ "print \"energy in ground state is\",round(E1/1e-18,3),\"*10^-18 J\"\n",
+ "print \"energy in 1st excited state is\",round(E2/1e-17,3),\"*10^-17 J\"\n",
+ "print \"energy in 2nd excited state is\",round(E3/1e-17,3),\"*10^-17 J\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "energy in ground state is 6.031 *10^-18 J\n",
+ "energy in 1st excited state is 2.412 *10^-17 J\n",
+ "energy in 2nd excited state is 5.428 *10^-17 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 3.11, Page number 3.30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "h = 6.626*10**-34 #planck's constant(J sec)\n",
+ "m = 9.1*10**-31 #mass of electron(kg)\n",
+ "e = 1.6*10**-19\n",
+ "lamda = 1.66*10**-10 #wavelength(m)\n",
+ "\n",
+ "#Calculation\n",
+ "v = h/(m*lamda) #velocity of electron(m/sec)\n",
+ "v_km = v*10**-3 #velocity of electron(km/sec)\n",
+ "KE = (1/2)*m*v**2 #kinetic energy(J)\n",
+ "KE_eV = KE/e #kinetic energy(eV)\n",
+ "KE_eV = math.ceil(KE_eV*10**3)/10**3 #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"velocity of electron is\",int(v_km),\"km/sec\"\n",
+ "print \"kinetic energy of electron is\",KE_eV,\"eV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "velocity of electron is 4386 km/sec\n",
+ "kinetic energy of electron is 54.714 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 3.12, Page number 3.31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "V = 15 #potential(kV)\n",
+ "\n",
+ "#Calculation\n",
+ "V = V*10**3 #potential(V)\n",
+ "lamda = 12.26/math.sqrt(V) #de Broglie wavelength(angstrom)\n",
+ "lamda = math.ceil(lamda*100)/100 #rounding off to 2 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"wavelength of electron waves is\",lamda,\"angstrom\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "wavelength of electron waves is 0.11 angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 3.13, Page number 3.31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "V = 344 #potential(V)\n",
+ "n = 1 #for 1st reflection maximum\n",
+ "theta = 60 #glancing angle(degrees)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda = 12.26/math.sqrt(V) #de Broglie wavelength(angstrom)\n",
+ "lamda_m = lamda*10**-10 #de Broglie wavelength(m)\n",
+ "theta = theta*math.pi/180 ##glancing angle(radians)\n",
+ "d = n*lamda_m/(2*math.sin(theta)) #interatomic spacing(m)\n",
+ "d = d*10**10 #interatomic spacing(angstrom)\n",
+ "d = math.ceil(d*10**5)/10**5 #rounding off to 5 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"interatomic spacing of crystal is\",d,\"angstrom\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "interatomic spacing of crystal is 0.38164 angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Applied_Physics_by_P_K_Palanisamy/Chapter4_1.ipynb b/Applied_Physics_by_P_K_Palanisamy/Chapter4_1.ipynb new file mode 100755 index 00000000..d55516d5 --- /dev/null +++ b/Applied_Physics_by_P_K_Palanisamy/Chapter4_1.ipynb @@ -0,0 +1,390 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:7ccac901d3d7a8c9dde630e169f5e7e52a039a9eb5d4b37586cb97d5a7fe1fca"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "4: Electron Theory of Metals"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 4.1, Page number 4.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "rho_s = 10.5*10**3 #density of silver(kg/m^3)\n",
+ "NA = 6.02*10**26 #avagadro number(per k-mol)\n",
+ "MA = 107.9 #atomic weight of silver\n",
+ "sigma = 6.8*10**7; #conductivity of silver(ohm-1 m-1)\n",
+ "e = 1.6*10**-19\n",
+ "\n",
+ "#Calculation\n",
+ "n = rho_s*NA/MA #molar volume of silver\n",
+ "mew = sigma/(n*e) #mobility of electrons(m^2/Vs)\n",
+ "mew = mew*10**2\n",
+ "mew = math.ceil(mew*10**4)/10**4; #rounding off to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"density of electrons in silver is\",round(n/1e28,2),\"*10^28\"\n",
+ "print \"mobility of electrons is\",mew,\"*10**-2 m**2/Vs\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "density of electrons in silver is 5.86 *10^28\n",
+ "mobility of electrons is 0.7255 *10**-2 m**2/Vs\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 4.2, Page number 4.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "d = 8.92*10**3 #density(kg/m^3)\n",
+ "e = 1.6*10**-19\n",
+ "m = 9.1*10**-31 #mass of electron(kg)\n",
+ "N = 6.02*10**26 #avagadro's number(per k-mol)\n",
+ "AW = 63.5 #atomic weight\n",
+ "rho = 1.73*10**-8 #resistivity of copper, ohm-m\n",
+ "\n",
+ "#Calculation\n",
+ "n = d*N/AW #number of cu atoms(per m^3)\n",
+ "mew = 1/(rho*n*e) #mobility of electrons(m/Vs)\n",
+ "mew = mew*10**2\n",
+ "mew = math.ceil(mew*10**4)/10**4; #rounding off to 4 decimals\n",
+ "tow = m/(n*e**2*rho) #relaxation time(s)\n",
+ "\n",
+ "#Result\n",
+ "print \"mobility of electrons is\",round(mew,3),\"*10**-2 m/Vs\"\n",
+ "print \"relaxation time is\",round(tow/1e-14,3),\"*10^-14 sec\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "mobility of electrons is 0.427 *10**-2 m/Vs\n",
+ "relaxation time is 2.43 *10^-14 sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 4.3, Page number 4.7"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "rho = 1.54*10**-8 #resistivity(ohm-m)\n",
+ "n = 5.8*10**28 #conduction electrons(per m^3)\n",
+ "m = 9.108*10**-31 #mass of electron(kg)\n",
+ "e = 1.602*10**-19\n",
+ "\n",
+ "#Calculation\n",
+ "tow = m/(n*(e**2)*rho) #relaxation time(sec)\n",
+ "\n",
+ "#Result\n",
+ "print \"relaxation time of conduction electrons is\",round(tow/1e-14,2),\"*10^-14 sec\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "relaxation time of conduction electrons is 3.97 *10^-14 sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 4.4, Page number 4.8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "R = 0.06 #resistance(ohm)\n",
+ "D = 5 #length of Al wire(m)\n",
+ "e = 1.602*10**-19\n",
+ "rho = 2.7*10**-8 #resistivity of Al(ohm-m)\n",
+ "MA = 26.98 #atomic weight\n",
+ "NA = 6.025*10**26 #avagadro number(k/mol)\n",
+ "rho_s = 2.7*10**3 #density(kg/m^3)\n",
+ "I = 15 #current(A)\n",
+ "\n",
+ "#Calculation\n",
+ "n = 3*rho_s*NA/MA #free electron concentration(electrons/m^3)\n",
+ "mew = 1/(n*e*rho) #mobility(m/Vs)\n",
+ "E = I*R/D #electric field(V/m)\n",
+ "vd = mew*E #drift velocity(m/s)\n",
+ "vd = vd*10**3\n",
+ "mew = mew*10**3\n",
+ "mew = math.ceil(mew*10**4)/10**4; #rounding off to 4 decimals\n",
+ "vd = math.ceil(vd*10**4)/10**4; #rounding off to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"free electron concentration is\",round(n/1e29,4),\"*10^29 electrons/m^2\"\n",
+ "print \"mobility is\",round(mew,3),\"*10^-3 m/Vs\"\n",
+ "print \"drift velocity is\",round(vd,2),\"*10^-3 m/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "free electron concentration is 1.8088 *10^29 electrons/m^2\n",
+ "mobility is 1.278 *10^-3 m/Vs\n",
+ "drift velocity is 0.23 *10^-3 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 4.5, Page number 4.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "n1 = 1\n",
+ "n2 = 1\n",
+ "n3 = 1 #for lowest energy\n",
+ "h = 6.62*10**-34 #planck's constant(Js)\n",
+ "e = 1.6*10**-19\n",
+ "m = 9.1*10**-31 #mass of electron(kg)\n",
+ "L = 0.1 #side of box(nm)\n",
+ "\n",
+ "#Calculation\n",
+ "L = L*10**-9 #side of box(m)\n",
+ "E1 = (h**2)*(n1**2+n2**2+n3**2)/(8*m*L**2) #lowest energy(J)\n",
+ "E1 = E1/e #lowest energy(eV)\n",
+ "E1 = math.ceil(E1*10)/10 #rounding off to 1 decimal\n",
+ "\n",
+ "#Result\n",
+ "print \"lowest energy of electron is\",E1,\"eV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "lowest energy of electron is 112.9 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 4.6, Page number 4.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "\n",
+ "#Calculation\n",
+ "#Fermi function F(E) = 1/(1+exp((E-Ef)/(kT)))\n",
+ "#given E-Ef = kT. therefore F(E) = 1/(1+exp(1))\n",
+ "F_E = 1/(1+math.exp(1))\n",
+ "F_E = math.ceil(F_E*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"fermi function is\",F_E"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "fermi function is 0.269\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 4.7, Page number 4.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "F_E = 10 #probability in percent\n",
+ "k = 1.38*10**-23\n",
+ "EF = 5.5 #fermi energy(eV)\n",
+ "\n",
+ "#Calculation\n",
+ "E = EF+(EF/100) #energy(eV)\n",
+ "X = E-EF #E-EF(eV)\n",
+ "X = X*e #E-EF(J)\n",
+ "T = X/(k*math.log(F_E-1)) #temperature(K)\n",
+ "T = math.ceil(T*10**2)/10**2 #rounding off to 2 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"temperature is\",round(T,1),\"K\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "temperature is 290.2 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 4.8, Page number 4.17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "F_E = 0.01 #probability in percent\n",
+ "k = 1.38*10**-23\n",
+ "e = 1.6*10**-19\n",
+ "#let E-EF be X\n",
+ "X = 0.5 #E-EF(eV)\n",
+ "\n",
+ "#Calculation\n",
+ "kT = X/(2.303*math.log10((1-F_E)*100)) #value of kT(eV)\n",
+ "T = kT*e/k #temperature(K)\n",
+ "T = math.ceil(T*10)/10 #rounding off to 1 decimal\n",
+ "\n",
+ "#Result\n",
+ "print \"temperature is\",T,\"K\"\n",
+ "print \"answer given in the book is wrong by a decimal point\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "temperature is 1261.4 K\n",
+ "answer given in the book is wrong by a decimal point\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Applied_Physics_by_P_K_Palanisamy/Chapter6_1.ipynb b/Applied_Physics_by_P_K_Palanisamy/Chapter6_1.ipynb new file mode 100755 index 00000000..a6f7f46a --- /dev/null +++ b/Applied_Physics_by_P_K_Palanisamy/Chapter6_1.ipynb @@ -0,0 +1,429 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:d8c62a33cdb998cb212b402408ceb0e19f54a33922b51cf1b80232d50d8d2341"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "6: Dielectric Properties"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 6.1, Page number 6.23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "C = 2 #capacitance(micro-farad)\n",
+ "V = 1000 #voltage applied(V)\n",
+ "epsilon_r = 100 #permitivity\n",
+ "\n",
+ "#Calculation\n",
+ "C = C*10**-6 #capacitance(farad)\n",
+ "W = (C*V**2)/2 #energy stored in capacitor(J)\n",
+ "C0 = C/epsilon_r #capacitance removing the dielectric\n",
+ "W0 = C0*(V**2)/2 #energy stored without dielectric(J)\n",
+ "E = 1-W0 #energy stored in dielectric(J)\n",
+ "\n",
+ "#Result\n",
+ "print \"energy stored in capacitor is\",W,\"J\"\n",
+ "print \"energy stored in the dielectric is\",E,\"J\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "energy stored in capacitor is 1.0 J\n",
+ "energy stored in the dielectric is 0.99 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 6.2, Page number 6.24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "epsilon_r = 4.94\n",
+ "n_2 = 2.69 #square of index of refraction\n",
+ "alpha_i = 0 #at optical frequencies\n",
+ "\n",
+ "#Calculation\n",
+ "#(epsilon_r-1)/(epsilon_r+2) = N*(alpha_e+alpha_i)/(3*epsilon0)\n",
+ "X = (epsilon_r-1)/(epsilon_r+2)\n",
+ "#epsilon_r = n**2. therefore (n**2-1)/(n**2+2) = N*alpha_e/(3*epsilon0)\n",
+ "Y = (n_2-1)/(n_2+2)\n",
+ "#N*(alpha_e+alpha_i)/N*alpha_e = X/Y\n",
+ "#let alpha = alpha_i/alpha_e\n",
+ "alphai_e = (X/Y)-1 #ratio between electronic ionic and electronic polarizability\n",
+ "alphai_e = math.ceil(alphai_e*10**4)/10**4 #rounding off to 4 decimals\n",
+ "alphae_i = 1/alphai_e #ratio between electronic and ionic polarizability\n",
+ "alphae_i = math.ceil(alphae_i*10**3)/10**3 #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"ratio between electronic ionic and electronic polarizability is\",alphai_e\n",
+ "print \"ratio between electronic and ionic polarizability is\",alphae_i"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ratio between electronic ionic and electronic polarizability is 0.5756\n",
+ "ratio between electronic and ionic polarizability is 1.738\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 6.3, Page number 6.25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "epsilon_r = 2.56\n",
+ "tan_delta = 0.7*10**-4\n",
+ "f = 1 #frequency(MHz)\n",
+ "A = 8 #area(cm**2)\n",
+ "d = 0.08 #diameter(mm)\n",
+ "epsilon0 = 8.85*10**-12\n",
+ "\n",
+ "#Calculation\n",
+ "A = A*10**-4 #area(m**2)\n",
+ "d = d*10**-3 #diameter(m)\n",
+ "epsilon_rdash = epsilon_r*tan_delta\n",
+ "omega = 2*math.pi*10**6\n",
+ "Rp = d/(omega*epsilon0*epsilon_rdash*A) #parallel loss resistance(ohm)\n",
+ "Rp = Rp*10**-6 #parallel loss resistance(Mega ohm)\n",
+ "Rp = math.ceil(Rp*10**3)/10**3 #rounding off to 3 decimals\n",
+ "Cp = A*epsilon0*epsilon_r/d #capacitance(farad)\n",
+ "\n",
+ "#Result\n",
+ "print \"parallel loss resistance is\",Rp,\"ohm\"\n",
+ "print \"capacitance in Farad is\",Cp,\"Farad\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "parallel loss resistance is 10.036 ohm\n",
+ "capacitance in Farad is 2.2656e-10 Farad\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 6.4, Page number 6.26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "N = 3*10**28 #density(atoms/m**3)\n",
+ "alpha_e = 10**-40 #electronic polarizability(Farad-m**2)\n",
+ "epsilon0 = 8.854*10**-12\n",
+ "\n",
+ "#Calculation\n",
+ "epsilon_r = 1+(N*alpha_e/epsilon0) #dielectric constant of material\n",
+ "epsilon_r = math.ceil(epsilon_r*10**3)/10**3 #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"dielectric constant of material is\",epsilon_r "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "dielectric constant of material is 1.339\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 6.5, Page number 6.27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "epsilon0 = 8.854*10**-12\n",
+ "epsilon_r = 1.0000684 #dielectric constant\n",
+ "N = 2.7*10**25 #density(atoms/m**3)\n",
+ "\n",
+ "#Calculation\n",
+ "alpha_e = epsilon0*(epsilon_r-1)/N #electronic polarizability(Fm**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"electronic polarizability is\",round(alpha_e/1e-41,3),\"*10^-41 Fm**2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "electronic polarizability is 2.243 *10^-41 Fm**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 6.6, Page number 6.27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "epsilon0 = 8.85*10**-12\n",
+ "V = 100 #potential(V)\n",
+ "A = 100 #area(cm**2)\n",
+ "d = 1 #plate seperation(cm)\n",
+ "\n",
+ "#Calculation\n",
+ "A = A*10**-4 #area(m**2)\n",
+ "d = d*10**-2 #plate seperation(m)\n",
+ "C = epsilon0*A/d #capacitance(farad)\n",
+ "Q = C*V #charge on plates\n",
+ "\n",
+ "#Result\n",
+ "print \"capacitance of capacitor is\",C,\"F\"\n",
+ "print \"charge on plates in coulomb is\",Q,\"coulomb\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "capacitance of capacitor is 8.85e-12 F\n",
+ "charge on plates in coulomb is 8.85e-10 coulomb\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 6.7, Page number 6.28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "N = 6.02*10**26 #avagadro number\n",
+ "d = 2050 #density(kg/m**3)\n",
+ "AW = 32 #atomic weight of sulphur\n",
+ "epsilon_r = 3.75 #relative dielectric constant\n",
+ "epsilon0 = 8.55*10**-12\n",
+ "\n",
+ "#Calculation\n",
+ "n = N*d/AW #number of atoms(per m**3)\n",
+ "alpha_e = ((epsilon_r-1)/(epsilon_r+2))*3*epsilon0/n #electronic polarizability(Fm**2) \n",
+ "\n",
+ "#Result\n",
+ "print \"electronic polarizability is\",round(alpha_e/1e-40,3),\"*10^-40 Fm**2\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "electronic polarizability is 3.181 *10^-40 Fm**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 6.8, Page number 6.29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Q = 2*10**-10 #charge(coulomb)\n",
+ "d = 4 #plate seperation(mm)\n",
+ "epsilon_r = 3.5 #dielectric constant\n",
+ "A = 650 #area(mm**2)\n",
+ "epsilon0 = 8.85*10**-12\n",
+ "\n",
+ "#Calculation\n",
+ "d = d*10**-3 #plate seperation(m)\n",
+ "A = A*10**-6 #area(m**2)\n",
+ "V = Q*d/(epsilon0*epsilon_r*A) #voltage across capacitors(V)\n",
+ "V = math.ceil(V*10**3)/10**3 #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"resultant voltage across capacitors is\",V,\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "resultant voltage across capacitors is 39.735 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 6.9, Page number 6.30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "V = 10 #potential(V)\n",
+ "d = 2*10**-3 #plate seperation(m)\n",
+ "epsilon_r = 6\n",
+ "epsilon0 = 8.85*10**-12\n",
+ "\n",
+ "#Calculation\n",
+ "E = V/d #electric field(V/m)\n",
+ "D = epsilon0*epsilon_r*E #dielectric displacement(C/m**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"dielectric displacement is\",D,\"Cm^-2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "dielectric displacement is 2.655e-07 Cm^-2\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Applied_Physics_by_P_K_Palanisamy/Chapter7_1.ipynb b/Applied_Physics_by_P_K_Palanisamy/Chapter7_1.ipynb new file mode 100755 index 00000000..e3eb080f --- /dev/null +++ b/Applied_Physics_by_P_K_Palanisamy/Chapter7_1.ipynb @@ -0,0 +1,465 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:1ba9d8e44f464fdd4be85263413cd33050741f89efba47984e88555948ca8361"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "7: Magnetic Properties"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 7.1, Page number 7.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "M = 1.4 #field(T)\n",
+ "H = 6.5*10**-4 #magnetic field(T)\n",
+ "\n",
+ "#Calculation\n",
+ "chi = M/H #susceptibility\n",
+ "mew_r = 1+chi #relative permeability\n",
+ "\n",
+ "#Result\n",
+ "print \"relative permeability of iron is\",round(mew_r)\n",
+ "print \"answer given in the book is wrong\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "relative permeability of iron is 2155.0\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 7.2, Page number 7.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "M = 3300 #magnetisation(amp/m)\n",
+ "H = 220 #field strength(amp/m)\n",
+ "\n",
+ "#Calculation\n",
+ "mew_r = (M/H)+1 #relative permeability\n",
+ "\n",
+ "#Result\n",
+ "print \"relative permeability of material is\",mew_r"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "relative permeability of material is 16.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 7.3, Page number 7.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "H = 10**6 #magnetic field intensity(amp/m)\n",
+ "chi = 1.5*10**-3 #susceptibility\n",
+ "\n",
+ "#Calculation\n",
+ "mew0 = 4*math.pi*10**-7\n",
+ "M = chi*H #magnetisation(A/m)\n",
+ "B = mew0*(M+H) #flux density(T)\n",
+ "M = M*10**-3\n",
+ "B = math.ceil(B*10**3)/10**3 #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"magnetisation of material is\",M,\"*10**3 A/m\"\n",
+ "print \"flux density is\",B,\"T\"\n",
+ "print \"answer for flux density B given in the book is wrong\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "magnetisation of material is 1.5 *10**3 A/m\n",
+ "flux density is 1.259 T\n",
+ "answer for flux density B given in the book is wrong\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 7.4, Page number 7.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "H = 10**4 #magnetic field intensity(amp/m)\n",
+ "chi = 3.7*10**-3 #susceptibility\n",
+ "\n",
+ "#Calculation\n",
+ "mew0 = 4*math.pi*10**-7\n",
+ "M = chi*H #magnetisation(A/m)\n",
+ "B = mew0*(M+H) #flux density(Wb/m**2)\n",
+ "B = math.ceil(B*10**5)/10**5 #rounding off to 5 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"magnetisation of material is\",M,\"A/m\"\n",
+ "print \"flux density is\",B,\"Wb/m**2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "magnetisation of material is 37.0 A/m\n",
+ "flux density is 0.01262 Wb/m**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 7.5, Page number 7.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "I = 500 #current(mA)\n",
+ "d = 10 #diameter(cm)\n",
+ "\n",
+ "#Calculation\n",
+ "I = I*10**-3 #current(A)\n",
+ "r = d/2 #radius(cm)\n",
+ "r = r*10**-2 #radius(m)\n",
+ "A = 2*math.pi*r**2 #area(m**2)\n",
+ "mew_m = I*A #magnetic moment(Am**2)\n",
+ "mew_m = mew_m*10**3\n",
+ "mew_m = math.ceil(mew_m*10**3)/10**3 #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"magnetic moment associated with the loop is\",mew_m,\"*10**-3 Am**2\"\n",
+ "print \"answer given in the book is wrong in the 3rd decimal\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "magnetic moment associated with the loop is 7.854 *10**-3 Am**2\n",
+ "answer given in the book is wrong in the 3rd decimal\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 7.6, Page number 7.19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r = 5.29*10**-11 #radius of orbit(m)\n",
+ "B = 2 #field applied(T)\n",
+ "e = 1.602*10**-19 #charge of electron(coulomb)\n",
+ "m = 9.108*10**-31 #mass of electron(kg)\n",
+ "\n",
+ "#Calculation\n",
+ "mew_ind = e**2*r**2*B/(4*m) #change in magnetic moment(Am^2)\n",
+ "\n",
+ "#Result\n",
+ "print \"change in magnetic moment is\",round(mew_ind/1e-29,3),\"*10^-29 Am**2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "change in magnetic moment is 3.943 *10^-29 Am**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 7.7, Page number 7.22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "chi_1 = 2.8*10**-4 #susceptibility\n",
+ "T1 = 350 #temperature(K)\n",
+ "T2 = 300 #temperature(K)\n",
+ "\n",
+ "#Calculation\n",
+ "#chi = C/T where C is curie constant\n",
+ "chi_2 = chi_1*T1/T2 #susceptibility at 300 K\n",
+ "chi_2 = chi_2*10**4\n",
+ "chi_2 = math.ceil(chi_2*10**3)/10**3 #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"susceptibility at 300 K is\",chi_2,\"*10**-4\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "susceptibility at 300 K is 3.267 *10**-4\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 7.8, Page number 7.28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "d = 8906 #density(kg/m**3)\n",
+ "n = 6.025*10**26 #avagadro number\n",
+ "AW = 58.7 #atomic weight\n",
+ "Bs = 0.65 #magnetic induction(Wb/m**2)\n",
+ "mewB = 9.27*10**-24 \n",
+ "\n",
+ "#Calculation\n",
+ "N = d*n/AW #number of atoms(per m**3)\n",
+ "mew0 = 4*math.pi*10**-7\n",
+ "mew_m = Bs/(N*mew0) #magnetic moment(Am**2)\n",
+ "mew_m = mew_m/mewB #magnetic moment(mewB)\n",
+ "mew_m = math.ceil(mew_m*10**3)/10**3 #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"the magnetic moment of Ni is\",mew_m,\"mewB\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the magnetic moment of Ni is 0.611 mewB\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 7.9, Page number 7.29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "H = 2 #magnetic field(Wb/m**2)\n",
+ "mew = 9.4*10**-24\n",
+ "k = 1.38*10**-23\n",
+ "\n",
+ "#Calculation\n",
+ "#np = C*n0*math.exp(mew*H/(k*T))\n",
+ "#na = C*n0*math.exp(-mew*H/(k*T))\n",
+ "#np/na = exp(mew*H/(k*T))/exp(-mew*H/(k*T)) = exp(2*mew*H/(k*T))\n",
+ "#given np/na = 2. therefore exp(2*mew*H/(k*T)) = 2\n",
+ "T = 2*mew*H/(k*math.log(2)) #temperature(K)\n",
+ "T = math.ceil(T*10**2)/10**2 #rounding off to 2 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"temperature is\",T,\"K\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "temperature is 3.94 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 7.10, Page number 7.30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "AW = 157.26 #atomic weight\n",
+ "d = 7.8*10**3 #density(kg/m**3)\n",
+ "A = 6.025*10**26 #avagadro number\n",
+ "mew0 = 4*math.pi*10**-7\n",
+ "N = d*A/AW #number of atoms 1 kg contains\n",
+ "g = N/10**3 #number of atoms 1 g contains\n",
+ "mew_B = 7.1 #bohr magneton\n",
+ "mew_m = 9.27*10**-24\n",
+ "mew_mg = g*mew_B*mew_m #magnetic moment per gram(Am**2)\n",
+ "mew_mg = math.ceil(mew_mg*10**3)/10**3 #rounding off to 3 decimals\n",
+ "print \"magnetic moment per gram is\",mew_mg,\"Am**2\"\n",
+ "Bs = N*mew0*mew_m #saturation magnetisation(Wb/m**2)\n",
+ "Bs = math.ceil(Bs*10**4)/10**4 #rounding off to 4 decimals\n",
+ "print \"saturation magnetisation is\",Bs,\"Wb/m**2\"\n",
+ "print \"answers given in the book are wrong\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "magnetic moment per gram is 1966.852 Am**2\n",
+ "saturation magnetisation is 0.3482 Wb/m**2\n",
+ "answers given in the book are wrong\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Applied_Physics_by_P_K_Palanisamy/Chapter8_1.ipynb b/Applied_Physics_by_P_K_Palanisamy/Chapter8_1.ipynb new file mode 100755 index 00000000..403a2566 --- /dev/null +++ b/Applied_Physics_by_P_K_Palanisamy/Chapter8_1.ipynb @@ -0,0 +1,931 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:56ac13dd16475ea277515219c6087df27ecfe535e7f6298ab44a9065695ca2d8"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ " 8: Semiconductors"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.1, Page number 8.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "ni = 2.37*10**19; #intrinsic carrier density(per m^3)\n",
+ "mew_e = 0.38; #electron mobility(m^2/Vs)\n",
+ "mew_h = 0.18; #hole mobility(m^2/Vs)\n",
+ "e = 1.6*10**-19;\n",
+ "\n",
+ "#Calculation\n",
+ "sigma_i = ni*e*(mew_e+mew_h); #conductivity(ohm-1 m-1)\n",
+ "rho = 1/sigma_i; #resistivity(ohm m)\n",
+ "rho = math.ceil(rho*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"resistivity is\",rho,\"ohm m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "resistivity is 0.471 ohm m\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.2, Page number 8.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable declaration\n",
+ "Eg = 1.12; #band gap(eV)\n",
+ "k = 1.38*10**-23;\n",
+ "T = 300; #temperature(K)\n",
+ "e = 1.6*10**-19;\n",
+ "m0 = 1; #for simplicity assume value of m0 to be unity\n",
+ "\n",
+ "#Calculation\n",
+ "mh = 0.28*m0;\n",
+ "me = 0.12*m0;\n",
+ "EF = (Eg/2)+(3*k*T*np.log(mh/me)/(4*e)); #position of Fermi level(eV)\n",
+ "EF = math.ceil(EF*10**4)/10**4; #rounding off to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"position of Fermi level is\",EF,\"eV from the top of valence band\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "position of Fermi level is 0.5765 eV from the top of valence band\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.3, Page number 8.12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "T = 300; #temperature(K)\n",
+ "e = 1.6*10**-19;\n",
+ "m = 9.109*10**-31; #mass of electron(kg)\n",
+ "k = 1.38*10**-23; #boltzmann's constant\n",
+ "h = 6.626*10**-34; #planck's constant\n",
+ "Eg = 0.7; #band gap(eV)\n",
+ "\n",
+ "#Calculation\n",
+ "Eg = Eg*e; #band gap(J)\n",
+ "A = (2*math.pi*m*k*T/h**2)**(3/2);\n",
+ "B = math.exp(-Eg/(2*k*T));\n",
+ "ni = 2*A*B; #concentration of intrinsic charge carriers per m^3\n",
+ "\n",
+ "#Result\n",
+ "print \"concentration of intrinsic charge carriers is\",round(ni/1e+19,3),\"*10^19 per m^3\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "concentration of intrinsic charge carriers is 3.348 *10^19 per m^3\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.4, Page number 8.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "ni = 2.4*10**19; #intrinsic carrier density(per m^3)\n",
+ "mew_e = 0.39; #electron mobility(m^2/Vs)\n",
+ "mew_h = 0.19; #hole mobility(m^2/Vs)\n",
+ "e = 1.6*10**-19;\n",
+ "\n",
+ "#Calculation\n",
+ "sigma_i = ni*e*(mew_e+mew_h); #conductivity(ohm-1 m-1)\n",
+ "rho = 1/sigma_i; #resistivity(ohm m)\n",
+ "rho = math.ceil(rho*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"resistivity is\",rho,\"ohm m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "resistivity is 0.449 ohm m\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.5, Page number 8.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "ni = 2.5*10**19; #intrinsic carrier density(per m^3)\n",
+ "mew_e = 0.39; #electron mobility(m^2/Vs)\n",
+ "mew_h = 0.19; #hole mobility(m^2/Vs)\n",
+ "e = 1.6*10**-19;\n",
+ "w = 1; #width(mm)\n",
+ "t = 1; #thickness(mm)\n",
+ "l = 1; #length(cm)\n",
+ "\n",
+ "#Calculation\n",
+ "sigma_i = ni*e*(mew_e+mew_h); #conductivity(ohm-1 m-1)\n",
+ "w = w*10**-3; #width(m)\n",
+ "t = t*10**-3; #thickness(m)\n",
+ "A = w*t; #area(m^2)\n",
+ "l = l*10**-2; #length(m)\n",
+ "R = l/(sigma_i*A); #resistivity(ohm m)\n",
+ "R = R/10**3;\n",
+ "R = math.ceil(R*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"resistance of intrinsic Ge rod is\",R,\"*10^3 ohm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "resistance of intrinsic Ge rod is 4.311 *10^3 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.6, Page number 8.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "m = 9.109*10**-31; #mass of electron(kg)\n",
+ "k = 1.38*10**-23; #boltzmann constant\n",
+ "h = 6.626*10**-34; #planck's constant\n",
+ "T = 300; #temperature(K)\n",
+ "kT = 0.026;\n",
+ "e = 1.6*10**-19;\n",
+ "Eg = 1.1; #energy gap(eV)\n",
+ "mew_e = 0.48; #electron mobility(m^2/Vs)\n",
+ "mew_h = 0.013; #hole mobility(m^2/Vs)\n",
+ "\n",
+ "#Calculation\n",
+ "C = 2*(2*math.pi*m*k/h**2)**(3/2);\n",
+ "ni = C*(T**(3/2))*math.exp(-Eg/(2*kT)); #intrinsic carrier density per m^3\n",
+ "sigma_i = ni*e*(mew_e+mew_h); #conductivity(ohm-1 m-1)\n",
+ "sigma_i = sigma_i*10**3;\n",
+ "sigma_i = math.ceil(sigma_i*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"conductivity is\",sigma_i,\"*10**-3 ohm-1 m-1\"\n",
+ "print \"answer given in the book differs due to rounding off errors\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "conductivity is 1.286 *10**-3 ohm-1 m-1\n",
+ "answer given in the book differs due to rounding off errors\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.7, Page number 8.15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "m = 9.109*10**-31; #mass of electron(kg)\n",
+ "k = 1.38*10**-23; #boltzmann constant\n",
+ "h = 6.626*10**-34; #planck's constant\n",
+ "T = 300; #temperature(K)\n",
+ "e = 1.6*10**-19;\n",
+ "Eg = 0.7; #energy gap(eV)\n",
+ "mew_e = 0.4; #electron mobility(m^2/Vs)\n",
+ "mew_h = 0.2; #hole mobility(m^2/Vs)\n",
+ "\n",
+ "#Calculation\n",
+ "ni = 2*(2*math.pi*m*k*T/h**2)**(3/2)*math.exp(-Eg*e/(2*k*T)); #intrinsic carrier density per m^3\n",
+ "sigma = ni*e*(mew_e+mew_h); #conductivity(ohm-1 m-1)\n",
+ "sigma = math.ceil(sigma*10**2)/10**2; #rounding off to 2 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"intrinsic carrier density is\",round(ni/1e+19,2),\"*10^19 per m^3\"\n",
+ "print \"conductivity is\",sigma,\"ohm-1 m-1\"\n",
+ "print \"answer given in the book is wrong\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "intrinsic carrier density is 3.35 *10^19 per m^3\n",
+ "conductivity is 3.22 ohm-1 m-1\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.8, Page number 8.16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable declaration\n",
+ "rho = 2.12; #resistivity(ohm m)\n",
+ "e = 1.6*10**-19;\n",
+ "m = 9.109*10**-31; #mass of electron(kg)\n",
+ "k = 1.38*10**-23; #boltzmann constant\n",
+ "h = 6.626*10**-34; #planck's constant\n",
+ "mew_e = 0.36; #electron mobility(m^2/Vs)\n",
+ "mew_h = 0.17; #hole mobility(m^2/Vs)\n",
+ "T = 300; #temperature(K)\n",
+ "\n",
+ "#Calculation\n",
+ "sigma = 1/rho; #conductivity(ohm-1 m-1)\n",
+ "ni = sigma/(e*(mew_e+mew_h)); #intrinsic carrier density per m^3\n",
+ "C = 2*(2*math.pi*m*k/h**2)**(3/2);\n",
+ "#let exp(Eg/(2*k*T)) be a\n",
+ "a = (C*T**(3/2))/ni;\n",
+ "#Eg/(2*k*T) = log(a) and Eg = 2*k*T*log(a)\n",
+ "Eg = 2*k*T*np.log(a)/e; #forbidden energy gap(eV)\n",
+ "Eg = math.ceil(Eg*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"forbidden energy gap is\",Eg,\"eV\"\n",
+ "print \"answer given in the book differs due to rounding off errors\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "forbidden energy gap is 0.793 eV\n",
+ "answer given in the book differs due to rounding off errors\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.9, Page number 8.17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable declaration\n",
+ "rho_2 = 4.5; #resistivity at 20C\n",
+ "rho_1 = 2; #resistivity at 32C\n",
+ "T1 = 20; #temperature(C)\n",
+ "T2 = 32; #temperature(C)\n",
+ "k = 8.616*10**-5;\n",
+ "\n",
+ "#Calculation\n",
+ "T1 = T1+273; #temperature(K)\n",
+ "T2 = T2+273; #temperature(K)\n",
+ "dy = np.log10(rho_2)-np.log10(rho_1);\n",
+ "dx = (1/T1)-(1/T2);\n",
+ "Eg = 2*k*dy/dx; #energy band gap(eV)\n",
+ "Eg = math.ceil(Eg*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"energy band gap is\",Eg,\"eV\"\n",
+ "print \"answer given in the book differs due to rounding off errors\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "energy band gap is 0.452 eV\n",
+ "answer given in the book differs due to rounding off errors\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.10, Page number 8.17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable declaration\n",
+ "Eg = 1; #band gap(eV)\n",
+ "e = 1.602*10**-19;\n",
+ "me = 1; #for simplicity assume me to be unity\n",
+ "E_Ef = 10/100; #fermi level shift(eV)\n",
+ "k = 1.38*10**-23; #boltzmann constant\n",
+ "\n",
+ "#Calculation\n",
+ "Eg = Eg*e; #band gap(J)\n",
+ "mh = 4*me; #effective mass of holes is 4 times of electrons\n",
+ "E_Ef = E_Ef*e; #fermi level shift(J)\n",
+ "#E_Ef = 3*k*T*np.log(mh/me)/4\n",
+ "T = 4*E_Ef/(3*k*np.log(mh/me)); #temperature(K)\n",
+ "\n",
+ "#Result\n",
+ "print \"temperature is\",int(T),\"K\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "temperature is 1116 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.11, Page number 8.18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Na = 5*10**23; #atoms of boron\n",
+ "Nd = 3*10**23; #arsenic atoms\n",
+ "ni = 2*10**16; #intrinsic charge carriers per m^3\n",
+ "\n",
+ "#Calculation\n",
+ "p = 2*(Na-Nd)/2; #hole concentration per m^3\n",
+ "n = ni**2/p; #electron concentration per m^3\n",
+ "n = n/10**9;\n",
+ "\n",
+ "#Result\n",
+ "print \"electron concentration is\",int(n),\"*10**9 per m^3\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "electron concentration is 2 *10**9 per m^3\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.12, Page number 8.19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "ni = 1.5*10**16; #intrinsic charge carriers per m^3\n",
+ "e = 1.6*10**-19;\n",
+ "mew_e = 0.13; #electron mobility(m^2/Vs)\n",
+ "mew_h = 0.05; #hole mobility(m^2/Vs)\n",
+ "AW = 28.1; #atomic weight of Si(kg)\n",
+ "d = 2.33*10**3; #density of Si(kg/m^3)\n",
+ "N = 6.02*10**26; #avagadro number\n",
+ "\n",
+ "#Calculation\n",
+ "sigma = ni*e*(mew_e+mew_h); #conductivity(ohm-1 m-1)\n",
+ "sigma = sigma*10**3;\n",
+ "Nd = d*N/AW; #impurity atoms per m^3\n",
+ "Nd = Nd/10**8; #extent of 10^8 Si atoms\n",
+ "p = ni**2/Nd; #hole concentration per m^3\n",
+ "sigma_ex = Nd*e*mew_e; #conductivity(ohm-1 m-1)\n",
+ "sigma_ex = math.ceil(sigma_ex*10**3)/10**3; #rounding off to 3 decimals\n",
+ "Na = Nd;\n",
+ "n = ni**2/Na; #electron concentration per m^3\n",
+ "sigma_EX = Na*e*mew_h; #conductivity(ohm-1 m-1)\n",
+ "sigma_EX = math.ceil(sigma_EX*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"conductivity is\",sigma,\"*10^-3 ohm-1 m-1\"\n",
+ "print \"conductivity if donor type impurity is added is\",sigma_ex,\"ohm-1 m-1\"\n",
+ "print \"conductivity if acceptor type impurity is added is\",sigma_EX,\"ohm-1 m-1\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "conductivity is 0.432 *10^-3 ohm-1 m-1\n",
+ "conductivity if donor type impurity is added is 10.383 ohm-1 m-1\n",
+ "conductivity if acceptor type impurity is added is 3.994 ohm-1 m-1\n"
+ ]
+ }
+ ],
+ "prompt_number": 47
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.13, Page number 8.21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable declaration\n",
+ "ni = 1.5*10**16; #intrinsic charge carriers per m^3\n",
+ "e = 1.6*10**-19;\n",
+ "mew_e = 0.135; #electron mobility(m^2/Vs)\n",
+ "mew_h = 0.048; #hole mobility(m^2/Vs)\n",
+ "Nd = 10**23; #phosphorus atoms per m^3\n",
+ "k = 1.38*10**-23; #boltzmann constant\n",
+ "T = 300; #temperature(K)\n",
+ "\n",
+ "#Calculation\n",
+ "sigma = ni*e*(mew_e+mew_h); #conductivity(ohm-1 m-1)\n",
+ "sigma = sigma*10**3;\n",
+ "p = (ni**2)/Nd; #hole concentration per m^3\n",
+ "p = p/10**9;\n",
+ "sigma_ex = Nd*e*mew_e; #conductivity(ohm-1 m-1)\n",
+ "#EF = (Eg/2)+(3*k*T*log(mew_e/mew_h)/4)\n",
+ "X = 3*k*T*np.log(mew_e/mew_h)/(4*e);\n",
+ "X = math.ceil(X*10**3)/10**3; #rounding off to 3 decimals\n",
+ "#EF = (Eg/2)+X\n",
+ "\n",
+ "#Result\n",
+ "print \"conductivity is\",sigma,\"*10^-3 ohm-1 m-1\"\n",
+ "print \"hole concentration is\",p,\"*10**9 per m^3\"\n",
+ "print \"answer for hole concentration given in the book is wrong\"\n",
+ "print \"EF = Eg/2 + \",X\n",
+ "print \"Fermi level will be positioned at \",X,\"eV above intrinsic level\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "conductivity is 0.4392 *10^-3 ohm-1 m-1\n",
+ "hole concentration is 2.25 *10**9 per m^3\n",
+ "answer for hole concentration given in the book is wrong\n",
+ "EF = Eg/2 + 0.021\n",
+ "Fermi level will be positioned at 0.021 eV above intrinsic level\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.14, Page number 8.36"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "mew_e = 0.19; #electron mobility(m^2/Vs)\n",
+ "k = 1.38*10**-23; #boltzmann constant\n",
+ "T = 300; #temperature(K)\n",
+ "e = 1.6*10**-19;\n",
+ "\n",
+ "#Calculation\n",
+ "Dn = mew_e*k*T/e; #diffusion coefficient(m^2/s)\n",
+ "Dn = Dn*10**4;\n",
+ "Dn = math.ceil(Dn*10**2)/10**2; #rounding off to 2 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"diffusion coefficient of electrons is\",Dn,\"*10^-4 m^2/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "diffusion coefficient of electrons is 49.17 *10^-4 m^2/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 59
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.15, Page number 8.46"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "RH = 3.66*10**-4; #Hall coefficient(m^3/coulomb)\n",
+ "I = 10**-2; #current(amp)\n",
+ "B = 0.5; #magnetic field(Wb/m^2)\n",
+ "t = 1; #thickness(mm)\n",
+ "\n",
+ "#Calculation\n",
+ "t = t*10**-3; #thickness(m)\n",
+ "VH = RH*I*B/t; #Hall voltage(V)\n",
+ "VH = VH*10**3; #Hall voltage(mV)\n",
+ "\n",
+ "#Result\n",
+ "print \"Hall voltage developed is\",VH,\"mV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Hall voltage developed is 1.83 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 60
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.16, Page number 8.47"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vy = 37; #voltage(micro-V)\n",
+ "t = 1; #thickness(mm)\n",
+ "Bz = 0.5; #flux density(Wb/m^2)\n",
+ "Ix = 20; #current(mA)\n",
+ "\n",
+ "#Calculation\n",
+ "Vy = Vy*10**-6; #voltage(V)\n",
+ "t = t*10**-3; #thickness(m)\n",
+ "Ix = Ix*10**-3; #current(A)\n",
+ "RH = Vy*t/(Ix*Bz); #Hall coefficient(C-1 m^3)\n",
+ "\n",
+ "#Result\n",
+ "print \"Hall coefficient of semiconductor is\",RH,\"C-1 m^3\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Hall coefficient of semiconductor is 3.7e-06 C-1 m^3\n"
+ ]
+ }
+ ],
+ "prompt_number": 62
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.17, Page number 8.48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "RH = -7.35*10**-5; #Hall coefficient(m^3/C)\n",
+ "e = 1.6*10**-19;\n",
+ "sigma = 200; #conductivity(ohm-1 m-1)\n",
+ "\n",
+ "#Calculation\n",
+ "n = -1/(RH*e); #density(m^3)\n",
+ "mew = sigma/(n*e); #mobility(m^2/Vs)\n",
+ "mew = mew*10**3;\n",
+ "\n",
+ "#Result\n",
+ "print \"density of charge carriers is\",round(n/1e+22,3),\"*10^22 m^3\"\n",
+ "print \"mobility of charge carriers is\",mew,\"*10^-3 m^2/Vs\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "density of charge carriers is 8.503 *10^22 m^3\n",
+ "mobility of charge carriers is 14.7 *10^-3 m^2/Vs\n"
+ ]
+ }
+ ],
+ "prompt_number": 66
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.18, Page number 8.48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "I = 50; #current(A)\n",
+ "B = 1.5; #magnetic field(T)\n",
+ "e = 1.6*10**-19;\n",
+ "n = 8.4*10**28; #free electron concentration(electron/m^3)\n",
+ "t = 0.5; #thickness(cm)\n",
+ "\n",
+ "#Calculation\n",
+ "t = t*10**-2; #thickness(m)\n",
+ "VH = I*B/(n*e*t); #hall voltage(V)\n",
+ "VH = VH*10**6; #hall voltage(micro-V)\n",
+ "VH = math.ceil(VH*10**4)/10**4; #rounding off to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"magnitude of Hall voltage is\",VH,\"micro-V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "magnitude of Hall voltage is 1.1161 micro-V\n"
+ ]
+ }
+ ],
+ "prompt_number": 69
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 8.19, Page number 8.49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "RH = 3.66*10**-4; #Hall coefficient(m^3/C)\n",
+ "e = 1.6*10**-19;\n",
+ "rho_n = 8.93*10**-3; #resistivity(ohm m)\n",
+ "\n",
+ "#Calculation\n",
+ "n = 1/(RH*e);\n",
+ "mew_e = RH/rho_n;\n",
+ "mew_e = math.ceil(mew_e*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"value of n is\",round(n/1e+22,3),\"*10^22 per m^3\"\n",
+ "print \"value of mew_e is\",mew_e,\"m^2/Vs\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of n is 1.708 *10^22 per m^3\n",
+ "value of mew_e is 0.041 m^2/Vs\n"
+ ]
+ }
+ ],
+ "prompt_number": 72
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Applied_Physics_by_P_K_Palanisamy/Chapter9_1.ipynb b/Applied_Physics_by_P_K_Palanisamy/Chapter9_1.ipynb new file mode 100755 index 00000000..390fe9c5 --- /dev/null +++ b/Applied_Physics_by_P_K_Palanisamy/Chapter9_1.ipynb @@ -0,0 +1,194 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:c4f4158f2a13ac09e07abe135472c68abbdd09915f4866e5eedc3ddf9b9f42f5"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "9: Superconductivity"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 9.1, Page number 9.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Tc = 3.7 #critical temperature(K)\n",
+ "Hc_0 = 0.0306 #critical field(T)\n",
+ "T = 2 #temperature(K)\n",
+ "\n",
+ "#Calculation\n",
+ "Hc_2 = Hc_0*(1-(T/Tc)**2) #critical field(T)\n",
+ "Hc_2 = math.ceil(Hc_2*10**5)/10**5 #rounding off to 5 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"critical field at 2K is\",Hc_2,\"T\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "critical field at 2K is 0.02166 T\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 9.2, Page number 9.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "T = 4.2 #temperature(K)\n",
+ "d = 1 #diameter(mm)\n",
+ "Tc = 7.18 #critical temperature(K)\n",
+ "H0 = 6.5*10**4 #critical field(A/m)\n",
+ "\n",
+ "#Calculation\n",
+ "d = d*10**-3 #diameter(m)\n",
+ "Hc = H0*(1-((T/Tc)**2)) #critical field at 2K(A/m)\n",
+ "ic = math.pi*d*round(Hc); #critical current(A)\n",
+ "ic = math.ceil(ic*10**2)/10**2; #rounding off to 2 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"critical current for lead is\",ic,\"A\"\n",
+ "print \"answer given in the book differs due to rounding off errors\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "critical current for lead is 134.34 A\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 9.3, Page number 9.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "lamda_T = 750 #penetration depth of mercury(Armstrong)\n",
+ "T = 3.5 #temperature(K)\n",
+ "Tc = 4.12 #critical temperarure(K)\n",
+ "\n",
+ "#Calculation\n",
+ "lamda_0 = lamda_T*((1-(T/Tc)**4))**(1/2) #penetration depth(Armstrong)\n",
+ "\n",
+ "#Result\n",
+ "print \"penetration depth at 0K is\",int(lamda_0),\"armstrong\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "penetration depth at 0K is 519 armstrong\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 9.4, Page number 9.13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "T1 = 3 #temperature(K)\n",
+ "T2 = 7.1 #temperature(K)\n",
+ "lamda_T1 = 396 #penetration depth(armstrong)\n",
+ "lamda_T2 = 1730 #penetration depth(armstrong)\n",
+ "\n",
+ "#Calculation\n",
+ "A = (((lamda_T2/lamda_T1)**2)*T2**4) - T1**4\n",
+ "B = ((lamda_T2/lamda_T1)**2)-1\n",
+ "Tc = (A/B)**(1/4) #critical temperature(K)\n",
+ "Tc = math.ceil(Tc*10**4)/10**4; #rounding off to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"critical temperature for lead is\",Tc,\"K\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "critical temperature for lead is 7.1932 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Applied_Physics_by_P_K_Palanisamy/screenshots/11.png b/Applied_Physics_by_P_K_Palanisamy/screenshots/11.png Binary files differnew file mode 100755 index 00000000..b6b640be --- /dev/null +++ b/Applied_Physics_by_P_K_Palanisamy/screenshots/11.png diff --git a/Applied_Physics_by_P_K_Palanisamy/screenshots/22.png b/Applied_Physics_by_P_K_Palanisamy/screenshots/22.png Binary files differnew file mode 100755 index 00000000..c7b40e60 --- /dev/null +++ b/Applied_Physics_by_P_K_Palanisamy/screenshots/22.png diff --git a/Applied_Physics_by_P_K_Palanisamy/screenshots/33.png b/Applied_Physics_by_P_K_Palanisamy/screenshots/33.png Binary files differnew file mode 100755 index 00000000..0dad4227 --- /dev/null +++ b/Applied_Physics_by_P_K_Palanisamy/screenshots/33.png diff --git a/Applied_Physics_by_P_K_Palanisamy/screenshots/Untitled1.png b/Applied_Physics_by_P_K_Palanisamy/screenshots/Untitled1.png Binary files differnew file mode 100755 index 00000000..4344b1fb --- /dev/null +++ b/Applied_Physics_by_P_K_Palanisamy/screenshots/Untitled1.png diff --git a/Applied_Physics_by_P_K_Palanisamy/screenshots/Untitled2.png b/Applied_Physics_by_P_K_Palanisamy/screenshots/Untitled2.png Binary files differnew file mode 100755 index 00000000..fb45c423 --- /dev/null +++ b/Applied_Physics_by_P_K_Palanisamy/screenshots/Untitled2.png diff --git a/Applied_Physics_by_P_K_Palanisamy/screenshots/Untitled3.png b/Applied_Physics_by_P_K_Palanisamy/screenshots/Untitled3.png Binary files differnew file mode 100755 index 00000000..e9c7ee3a --- /dev/null +++ b/Applied_Physics_by_P_K_Palanisamy/screenshots/Untitled3.png |