summaryrefslogtreecommitdiff
path: root/Engineering_Physics/Chapter6_1.ipynb
diff options
context:
space:
mode:
authorJovina Dsouza2014-07-25 00:00:07 +0530
committerJovina Dsouza2014-07-25 00:00:07 +0530
commitfd5a671b82455b88fd313d8d0bee2793ab27739a (patch)
treee35148d9f2c5d1ee88f62f903b2ca46292b6f568 /Engineering_Physics/Chapter6_1.ipynb
parentc8733e4b6b4bffcddf7eb45ff1c72ccc837aa3af (diff)
downloadPython-Textbook-Companions-fd5a671b82455b88fd313d8d0bee2793ab27739a.tar.gz
Python-Textbook-Companions-fd5a671b82455b88fd313d8d0bee2793ab27739a.tar.bz2
Python-Textbook-Companions-fd5a671b82455b88fd313d8d0bee2793ab27739a.zip
adding book
Diffstat (limited to 'Engineering_Physics/Chapter6_1.ipynb')
-rwxr-xr-xEngineering_Physics/Chapter6_1.ipynb492
1 files changed, 96 insertions, 396 deletions
diff --git a/Engineering_Physics/Chapter6_1.ipynb b/Engineering_Physics/Chapter6_1.ipynb
index 63de6fa0..768ed817 100755
--- a/Engineering_Physics/Chapter6_1.ipynb
+++ b/Engineering_Physics/Chapter6_1.ipynb
@@ -1,7 +1,6 @@
{
"metadata": {
- "name": "",
- "signature": "sha256:761cc333c24ab0bff41cc769407ab239595ed8749ad7bd7c5ee14e4e733b1604"
+ "name": "Chapter6"
},
"nbformat": 3,
"nbformat_minor": 0,
@@ -12,50 +11,25 @@
"cell_type": "heading",
"level": 1,
"metadata": {},
- "source": [
- "6: Crystallography"
- ]
+ "source": "6: Conducting Materials"
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": [
- "Example number 6.1, Page number 134"
- ]
+ "source": "Example number 6.1, Page number 170"
},
{
"cell_type": "code",
"collapsed": false,
- "input": [
- " \n",
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "M = 23+35.5; #Molecular weight of NaCl(kg/k-mole)\n",
- "d = 2.18*10**3; #Density of rock salt(kg/m**3)\n",
- "n = 4; #Number of atoms per unit cell for an fcc lattice of NaCl crystal\n",
- "N = 6.02*10**26; #Avogadro's No., atoms/k-mol\n",
- "\n",
- "#Calculation\n",
- "a = (n*M/(d*N))**(1/3); #Lattice constant of unit cell of NaCl(m)\n",
- "a = a*10**9; ##Lattice constant of unit cell of NaCl(nm)\n",
- "a = math.ceil(a*10**3)/10**3; #rounding off the value of a to 3 decimals\n",
- "\n",
- "#Result\n",
- "print \"Lattice parameter for the NaCl crystal is\",a, \"nm\""
- ],
+ "input": "#importing modules\nimport math\n\n#Variable declaration\nm = 9.1*10**-31; #mass of electron\nvf = 1*10**6; #Fermi velocity(m/s)\ne = 1.6*10**-19; #conversion factor from J to eV\n\n#Calculation\nEF = m*(vf**2)/(2*e); #Fermi energy(eV)\nEF=math.ceil(EF*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint \"Fermi energy is\",EF,\"eV\"",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": [
- "Lattice parameter for the NaCl crystal is 0.563 nm\n"
- ]
+ "text": "Fermi energy is 2.85 eV\n"
}
],
"prompt_number": 1
@@ -64,39 +38,19 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": [
- "Example number 6.2, Page number 134"
- ]
+ "source": "Example number 6.2, Page number 170"
},
{
"cell_type": "code",
"collapsed": false,
- "input": [
- " \n",
- "#importing modules\n",
- "import math\n",
- "\n",
- "#Variable declaration\n",
- "m = 3;\n",
- "n = 2; \n",
- "p = 1; #Coefficients of intercepts along three axes\n",
- "\n",
- "#Calculation\n",
- "#reciprocals of the intercepts are 1/m, 1/n, 1/p i.e 1/3, 1/2, 1\n",
- "#multiplying by LCM the reciprocals become 2, 3, 6\n",
- "\n",
- "#Result\n",
- "print \"The required miller indices are : (2, 3, 6)\"\n"
- ],
+ "input": "#importing modules\nimport math\n\n#Variable declaration\nEF0 = 7.04; #Fermi energy at 0K(eV)\nT = 300; #temperature(K)\nk = 1.38*10**-23; #boltzmann constant\ne = 1.6*10**-19; #conversion factor from J to eV\n\n#Calculation\nEF = EF0*(1-(((math.pi**2)/12)*(k*T/(EF0*e))**2)); #Fermi energy(eV)\nEF=math.ceil(EF*10**5)/10**5; #rounding off to 5 decimals\n\n#Result\nprint \"Fermi energy is\",EF,\"eV\"",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": [
- "The required miller indices are : (2, 3, 6)\n"
- ]
+ "text": "Fermi energy is 7.03993 eV\n"
}
],
"prompt_number": 2
@@ -105,38 +59,19 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": [
- "Example number 6.3, Page number 135"
- ]
+ "source": "Example number 6.3, Page number 171"
},
{
"cell_type": "code",
"collapsed": false,
- "input": [
- " \n",
- "import math\n",
- "\n",
- "#Variable declaration\n",
- "m = 2; #Coefficient of intercept along x-axis\n",
- "#n = infinite Coefficient of intercept along y-axis\n",
- "p = 3/2; #Coefficient of intercept along z-axis\n",
- "\n",
- "#Calculation\n",
- "#reciprocals of the intercepts are 1/m, 1/n, 1/p i.e 1/2, 0, 2/3\n",
- "#multiplying by LCM the reciprocals become 3, 0, 4\n",
- "\n",
- "#Result\n",
- "print \"The required miller indices are : (3, 0, 4)\"\n"
- ],
+ "input": "#importing modules\nimport math\n\n#Variable declaration\nd = 2.7*10**3; #density of Al(kg/m**3)\nMat = 27; #atomic weight of Al\ntow = 10**-14; #relaxation time(sec)\nNa = 6.022*10**23; #avagadro constant\na = 3*10**3; #number of free electrons per atom\ne = 1.6*10**-19; #charge of electron\nme = 9.1*10**-31; #mass of electron\n\n#Calculation\nn = d*Na*a/Mat; #concentration of atoms(per m**3)\nsigma = n*e**2*tow/me; #conductivity(ohm m)\nsigma = sigma*10**-7;\nsigma=math.ceil(sigma*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint \"conductivity of Al is\",sigma,\"*10**7 ohm m\"",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": [
- "The required miller indices are : (3, 0, 4)\n"
- ]
+ "text": "conductivity of Al is 5.0824 *10**7 ohm m\n"
}
],
"prompt_number": 3
@@ -145,59 +80,19 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": [
- "Example number 6.4, Sketching not possible"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Example number 6.5, Page number 136"
- ]
+ "source": "Example number 6.4, Page number 171"
},
{
"cell_type": "code",
"collapsed": false,
- "input": [
- " \n",
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "#For (110) planes\n",
- "h1 = 1;\n",
- "k1 = 1;\n",
- "l1 = 0; #Miller Indices for planes in a cubic crystal\n",
- "a1 = 0.43; #Interatomic spacing(nm)\n",
- "#For (212) planes\n",
- "h2 = 2; \n",
- "k2 = 1;\n",
- "l2 = 2; #Miller Indices for planes in a cubic crystal\n",
- "a2 = 0.43; #Interatomic spacing(nm)\n",
- "\n",
- "#Calculation\n",
- "d1 = a1/(h1**2+k1**2+l1**2)**(1/2); #The interplanar spacing for cubic crystals(nm)\n",
- "d1 = math.ceil(d1*10**4)/10**4; #rounding off the value of d1 to 4 decimals\n",
- "d2 = a2/(h2**2+k2**2+l2**2)**(1/2); #The interplanar spacing for cubic crystals(nm)\n",
- "d2 = math.ceil(d2*10**4)/10**4; #rounding off the value of d2 to 4 decimals\n",
- "\n",
- "#Result\n",
- "print \"The interplanar spacing between consecutive (110) planes is\",d1, \"nm\";\n",
- "print \"The interplanar spacing between consecutive (212) planes is\",d2, \"nm\""
- ],
+ "input": "#importing modules\nimport math\n\n#Variable declaration\nsigma = 5.87*10**7; #electrical conductivity(per ohm m)\nK = 390; #thermal conductivity(W/mK)\nT = 20; #temperature(C)\n\n#Calculation\nT = T+273; #temperature(K)\nL = K/(sigma*T); #Lorentz number(W ohm/K**2)\n\n#Result\nprint \"Lorentz number is\",L,\"W ohm/K**2\"",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": [
- "The interplanar spacing between consecutive (110) planes is 0.3041 nm\n",
- "The interplanar spacing between consecutive (212) planes is 0.1434 nm\n"
- ]
+ "text": "Lorentz number is 2.26756051189e-08 W ohm/K**2\n"
}
],
"prompt_number": 4
@@ -206,42 +101,19 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": [
- "Example number 6.6, Page number 136"
- ]
+ "source": "Example number 6.5, Page number 172"
},
{
"cell_type": "code",
"collapsed": false,
- "input": [
- " \n",
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "h = 2;\n",
- "k = 3;\n",
- "l = 1; #Miller Indices for planes in a cubic crystal\n",
- "r = 0.175; #Atomic radius of fcc lattice(nm)\n",
- "\n",
- "#Calculation\n",
- "a = 2*math.sqrt(2)*r; #Interatomic spacing of fcc lattice(nm)\n",
- "d = a/(h**2+k**2+l**2)**(1/2); #The interplanar spacing for cubic crystals(nm)\n",
- "d = math.ceil(d*10**4)/10**4; #rounding off the value of d to 4 decimals\n",
- "\n",
- "#Result\n",
- "print \"The interplanar spacing between consecutive (231) planes is\",d, \"nm\"\n"
- ],
+ "input": "#importing modules\nimport math\n\n#Variable declaration\nd = 8900; #density of Cu(kg/m**3)\nMat = 63.5; #atomic weight of Cu\ntow = 10**-14; #relaxation time(sec)\nNa = 6.022*10**23; #avagadro constant\na = 1*10**3; #number of free electrons per atom\ne = 1.6*10**-19; #charge of electron\nme = 9.1*10**-31; #mass of electron\n\n#Calculation\nn = d*Na*a/Mat; #concentration of atoms(per m**3)\nsigma = n*e**2*tow/me; #electrical conductivity(ohm m)\nsigma = sigma*10**-7;\nsigma=math.ceil(sigma*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint \"electrical conductivity is\",sigma,\"*10**7 ohm m\"",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": [
- "The interplanar spacing between consecutive (231) planes is 0.1323 nm\n"
- ]
+ "text": "electrical conductivity is 2.3745 *10**7 ohm m\n"
}
],
"prompt_number": 5
@@ -250,47 +122,19 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": [
- "Example number 6.7, Page number 136"
- ]
+ "source": "Example number 6.6, Page number 172"
},
{
"cell_type": "code",
"collapsed": false,
- "input": [
- " \n",
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "lamda = 1.44; #Wavelength of X-rays(A)\n",
- "d = 2.8; #Interplanar spacing of rocksalt crystal(A)\n",
- "n1 = 1; #For 1st Order diffraction\n",
- "n2 = 2; #For 2nd Order diffraction\n",
- "\n",
- "#Calculation\n",
- "theta1 = math.asin(n1*lamda/(2*d)); #Angle of diffraction(radians)\n",
- "theeta1 = theta1*57.2957795; #Angle of diffraction(degrees)\n",
- "theeta1 = math.ceil(theeta1*10**2)/10**2; #rounding off the value of theeta1 to 2 decimals\n",
- "theta2 = math.asin(n2*lamda/(2*d)); #Angle of diffraction(radians)\n",
- "theeta2 = theta2*57.2957795; #Angle of diffraction(degrees)\n",
- "theeta2 = math.ceil(theeta2*10**2)/10**2; #rounding off the value of theeta2 to 2 decimals\n",
- "\n",
- "#Result\n",
- "print \"The angle of diffraction for first order maxima is\",theeta1, \"degrees\"\n",
- "print \"The angle of diffraction for second order maxima is\",theeta2, \"degrees\"\n"
- ],
+ "input": "#importing modules\nimport math\n\n#Variable declaration\nrho = 1.54*10**-8; #resistivity(ohm m)\nEF = 5.5; #fermi energy(eV)\nme = 9.1*10**-31; #mass of electron\nepsilon = 100;\ne = 1.6*10**-19; #charge of electron\nn = 5.8*10**28; #concentration of electrons(per m**3)\n\n#Calculation\ntow = me/(rho*n*e**2); #relaxation time(sec)\nmew = e*tow/me; #mobility of electrons(m**2/Vs)\nmew = mew*10**3;\nvd = e*tow*epsilon/me; #drift velocity(m/s)\nvd=math.ceil(vd*10)/10; #rounding off to 1 decimal\nEF = EF*e; #fermi energy((J)\nvF = math.sqrt(2*EF/me); #fermi velocity(m/s)\nvf = vF*10**-6;\nvf=math.ceil(vf*10**3)/10**3; #rounding off to 3 decimals\nlamda_m = vF*tow; #mean free path(m)\n\n#Result\nprint \"relaxation time of electrons is\",tow,\"sec\"\nprint \"mobility of electrons is\",mew,\"*10**-3 m**2/Vs\"\nprint \"drift velocity of electrons is\",vd,\"m/s\"\nprint \"drift velocity given in the book is wrong\"\nprint \"fermi velocity of electrons is\",vf,\"*10**6 m/s\"\nprint \"mean free path is\",lamda_m,\"m\"",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": [
- "The angle of diffraction for first order maxima is 14.91 degrees\n",
- "The angle of diffraction for second order maxima is 30.95 degrees\n"
- ]
+ "text": "relaxation time of electrons is 3.97972178683e-14 sec\nmobility of electrons is 6.9973130318 *10**-3 m**2/Vs\ndrift velocity of electrons is 0.7 m/s\ndrift velocity given in the book is wrong\nfermi velocity of electrons is 1.391 *10**6 m/s\nmean free path is 5.53462691011e-08 m\n"
}
],
"prompt_number": 6
@@ -299,42 +143,19 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": [
- "Example number 6.8, Page number 136"
- ]
+ "source": "Example number 6.7, Page number 174"
},
{
"cell_type": "code",
"collapsed": false,
- "input": [
- " \n",
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "a = 1; #For convenience, assume interatomic spacing to be unity(m)\n",
- "\n",
- "#Calculation\n",
- "N = 8*(1/8) + 6*(1/2); #total number of spheres in a unit cell\n",
- "r = a/(2*math.sqrt(2)); #The atomic radius(m)\n",
- "V_atom = N*(4/3)*math.pi*r**3; #Volume of atoms(m**3)\n",
- "V_uc = a**3; #Volume of unit cell(m**3)\n",
- "PV = (V_atom/V_uc)*100; #percentage of actual volume\n",
- "PV = math.ceil(PV*10)/10; #rounding off the value of PV to 1 decimal\n",
- "\n",
- "#Result\n",
- "print \"The percentage of actual volume occupied by the spheres in fcc structure is\",PV, \"percent\""
- ],
+ "input": "#importing modules\nimport math\n\n#Variable declaration\nrho = 1.72*10**-8; #electrical resistivity(ohm m)\nL = 2.26*10**-8; #Lorentz number(ohm W/K**2)\nT = 27; #temperature(C)\n\n#Calculation\nT = T+273; #temperature(K)\nK = L*T/rho; #thermal conductivity(W/mK)\n\n#Result\nprint \"thermal conductivity is\",int(K),\"W/mK\"",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": [
- "The percentage of actual volume occupied by the spheres in fcc structure is 74.1 percent\n"
- ]
+ "text": "thermal conductivity is 394 W/mK\n"
}
],
"prompt_number": 7
@@ -343,56 +164,40 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": [
- "Example number 6.9, Page number 137"
- ]
+ "source": "Example number 6.8, Page number 174"
},
{
"cell_type": "code",
"collapsed": false,
- "input": [
- " \n",
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "#For (221) planes\n",
- "h = 2; \n",
- "k = 2; \n",
- "l = 1; #Miller Indices for planes in a cubic crystal\n",
- "a = 2.68; #Interatomic spacing(A)\n",
- "n1 = 1; #First Order of diffraction \n",
- "n2 = 2; #Second order of diffraction\n",
- "theta1 = 8.5; #Glancing angle at which Bragg's reflection occurs(degrees)\n",
- "\n",
- "#Calculation\n",
- "theta1 = theta1*0.0174532925; #Glancing angle at which Bragg's reflection occurs(radians)\n",
- "a = a*10**-10; #Interatomic spacing(m)\n",
- "d = a/(h**2+k**2+l**2)**(1/2); #The interplanar spacing for cubic crystal(m)\n",
- "lamda = 2*d*math.sin(theta1)/n1; #Bragg's Law for wavelength of X-rays(m)\n",
- "lamda_A = lamda*10**10; #Bragg's Law for wavelength of X-rays(A)\n",
- "lamda_A = math.ceil(lamda_A*10**4)/10**4; #rounding off the value of lamda_A to 4 decimals\n",
- "theta2 = math.asin(n2*lamda/(2*d)); #Angle at which second order Bragg reflection occurs(radians)\n",
- "theta2 = theta2*57.2957795; #Angle at which second order Bragg reflection occurs(degrees)\n",
- "theta2 = math.ceil(theta2*10)/10; #rounding off the value of theta2 to 1 decimal\n",
- "\n",
- "#Result\n",
- "print \"The interplanar spacing between consecutive (221) planes is\",d, \"m\"\n",
- "print \"The wavelength of X-rays is\",lamda_A, \"angstrom\"\n",
- "print \"The angle at which second order Bragg reflection occurs is\",theta2, \"degrees\""
+ "input": "#importing modules\nimport math\n\n#Variable declaration\nsigma = 5.87*10**7; #electrical conductivity(per ohm m)\nK = 390; #thermal conductivity(W/mK)\nT = 20; #temperature(C)\n\n#Calculation\nT = T+273; #temperature(K)\nL = K/(sigma*T); #Lorentz number(W ohm/K**2)\n\n#Result\nprint \"Lorentz number is\",L,\"W ohm/K**2\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Lorentz number is 2.26756051189e-08 W ohm/K**2\n"
+ }
],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example number 6.9, Page number 174"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#importing modules\nimport math\n\n#Variable declaration\nE_EF = 0.01; #energy(eV)\ne = 1.6*10**-19; #conversion factor from eV to J\nT = 200; #temperature(K)\nk = 1.38*10**-23; #boltzmann constant(J/K)\n\n#Calculation\nE_EF = E_EF*e; #energy(J)\nA = E_EF/(k*T);\nFofE = 1/(1+(math.exp(A))); #value of F(E)\nFofE=math.ceil(FofE*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint \"value of F(E) is\",FofE",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": [
- "The interplanar spacing between consecutive (221) planes is 8.93333333333e-11 m\n",
- "The wavelength of X-rays is 0.2641 angstrom\n",
- "The angle at which second order Bragg reflection occurs is 17.2 degrees\n"
- ]
+ "text": "value of F(E) is 0.36\n"
}
],
"prompt_number": 9
@@ -401,45 +206,19 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": [
- "Example number 6.10, Page number 137"
- ]
+ "source": "Example number 6.10, Page number 175"
},
{
"cell_type": "code",
"collapsed": false,
- "input": [
- " \n",
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "h = 1; \n",
- "k = 1;\n",
- "l = 0; #Miller Indices for planes in a cubic crystal\n",
- "n = 1; #First Order of diffraction \n",
- "theta = 25; #Glancing angle at which Bragg's reflection occurs(degrees)\n",
- "lamda = 0.7; #Wavelength of X-rays(A)\n",
- "\n",
- "#Calculation\n",
- "theta = theta*0.0174532925; #Glancing angle at which Bragg's reflection occurs(radians)\n",
- "d = n*lamda/(2*math.sin(theta)); #Interplanar spacing of cubic crystal(A)\n",
- "a = d*(h**2+k**2+l**2)**(1/2); #The lattice parameter for cubic crystal(A)\n",
- "a = math.ceil(a*10**3)/10**3; #rounding off the value of a to 3 decimals\n",
- "\n",
- "#Result\n",
- "print \"The lattice parameter for cubic crystal is\",a, \"angstrom\""
- ],
+ "input": "#importing modules\nimport math\n\n#Variable declaration\nlamda = 4*10**-8; #mean free path(m)\nn = 8.4*10**28; #density(per m**3)\nvthbar = 1.6*10**6; #average thermal velocity(m/s)\ne = 1.6*10**-19; #charge of electron(c)\nm = 9.11*10**-31; #mass of electron\n\n#Calculation\nsigma = n*e**2*lamda/(m*vthbar); #electrical conductivity(ohm-1 m-1)\nsigma = sigma*10**-7;\nsigma=math.ceil(sigma*100)/100; #rounding off to 2 decimals\n\n#Result\nprint \"electrical conductivity is\",sigma,\"*10**7 ohm-1 m-1\"",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": [
- "The lattice parameter for cubic crystal is 1.172 angstrom\n"
- ]
+ "text": "electrical conductivity is 5.91 *10**7 ohm-1 m-1\n"
}
],
"prompt_number": 10
@@ -448,46 +227,19 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": [
- "Example number 6.11, Page number 138"
- ]
+ "source": "Example number 6.11, Page number 176"
},
{
"cell_type": "code",
"collapsed": false,
- "input": [
- " \n",
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "d = 0.31; #Interplanar spacing(nm)\n",
- "n = 1; #First Order of diffraction \n",
- "theta = 9.25; #Glancing angle at which Bragg's reflection occurs(degrees)\n",
- "theta_max = 90; #Maximum possible angle at which reflection can occur(degrees)\n",
- "theta_max = theta_max*0.0174532925; #Maximum possible angle at which reflection can occur(radians)\n",
- "\n",
- "#Calculation\n",
- "theta = theta*0.0174532925; #Glancing angle at which Bragg's reflection occurs(radians)\n",
- "lamda = 2*d*math.sin(theta)/n; #Wavelength of X-rays(nm) (Bragg's Law)\n",
- "lamda = math.ceil(lamda*10**5)/10**5; #rounding off the value of lamda to 5 decimals\n",
- "n = 2*d*math.sin(theta_max)/lamda; #Maximum possible order of diffraction\n",
- "\n",
- "#Result\n",
- "print \"The wavelength of X-rays is\",lamda, \"nm\"\n",
- "print \"The Maximum possible order of diffraction is\",round(n)"
- ],
+ "input": "#importing modules\nimport math\n\n#Variable declaration\ntow = 10**-14; #relaxation time(sec)\nT = 300; #temperature(K)\nn = 6*10**28; #electron concentration(per m**3)\ne = 1.6*10**-19; #charge of electron(c)\nme = 9.1*10**-31; #mass of electron\nk = 1.38*10**-23; #boltzmann constant(J/K)\n\n#Calculation\nsigma = n*e**2*tow/me; #electrical conductivity(ohm-1 m-1)\nsigmaa = sigma*10**-7;\nsigmaa=math.ceil(sigmaa*100)/100; #rounding off to 2 decimals\nK = 3*n*(k**2)*tow*T/(2*me); #thermal conductivity(W/mK)\nK=math.ceil(K*10)/10; #rounding off to 1 decimal\nL = K/(sigma*T); #Lorentz number(W ohm/K**2)\n\n#Result\nprint \"electrical conductivity is\",sigmaa,\"*10**7 ohm-1 m-1\"\nprint \"thermal conductivity is\",K,\"W/mK\"\nprint \"Lorentz number is\",L,\"W ohm/K**2\"\nprint \"answer for thermal conductivity and Lorentz number given in the book are wrong\"",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": [
- "The wavelength of X-rays is 0.09967 nm\n",
- "The Maximum possible order of diffraction is 6.0\n"
- ]
+ "text": "electrical conductivity is 1.69 *10**7 ohm-1 m-1\nthermal conductivity is 56.6 W/mK\nLorentz number is 1.11775173611e-08 W ohm/K**2\nanswer for thermal conductivity and Lorentz number given in the book are wrong\n"
}
],
"prompt_number": 11
@@ -496,51 +248,19 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": [
- "Example number 6.12, Page number 138"
- ]
+ "source": "Example number 6.12, Page number 177"
},
{
"cell_type": "code",
"collapsed": false,
- "input": [
- " \n",
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "#For (110) planes\n",
- "h1 = 1;\n",
- "k1 = 1;\n",
- "l1 = 0; #Miller indices for (110) planes\n",
- "d_110 = 0.195; #Interplanar spacing between (110) planes(nm)\n",
- "#For (210) planes\n",
- "h2 = 2;\n",
- "k2 = 1; \n",
- "l2 = 0; #Miller indices for (110) planes\n",
- "n = 2; #Second Order of diffraction \n",
- "lamda = 0.071; #Wavelength of X-rays(nm)\n",
- "\n",
- "#Calculation\n",
- "a = d_110*(h1**2 + k1**2 + l1**2)**(1/2); #Lattice parameter for bcc crystal(nm)\n",
- "d_210 = a/(h2**2 + k2**2 + l2**2)**(1/2); #Interplanar spacing between (210) planes(nm)\n",
- "theta = math.asin(n*lamda/(2*d_210)); #Bragg reflection angle for the second order diffraction(radians)\n",
- "theeta = theta*57.2957795; #Bragg reflection angle for the second order diffraction(degrees)\n",
- "theeta = math.ceil(theeta*10**3)/10**3; #rounding off the value of theeta to 3 decimals\n",
- "\n",
- "#Result\n",
- "print \"Bragg reflection angle for the second order diffraction is\",theeta, \"degrees\""
- ],
+ "input": "#importing modules\nimport math\n\n#Variable declaration\nn = 5.8*10**28; #electron concentration(per m**3)\ne = 1.6*10**-19; #charge of electron(c)\nm = 9.1*10**-31; #mass of electron\nrho = 1.54*10**-8; #resistivity of metal(ohm m)\n\n#Calculation\ntow = m/(n*rho*e**2); #relaxation time(sec)\n\n#Result\nprint \"relaxation time is\",tow,\"sec\"\nprint \"answer given in the book is wrong\"",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": [
- "Bragg reflection angle for the second order diffraction is 35.149 degrees\n"
- ]
+ "text": "relaxation time is 3.97972178683e-14 sec\nanswer given in the book is wrong\n"
}
],
"prompt_number": 12
@@ -549,44 +269,19 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": [
- "Example number 6.13, Page number 138"
- ]
+ "source": "Example number 6.13, Page number 177"
},
{
"cell_type": "code",
"collapsed": false,
- "input": [
- " \n",
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "d = 2182; #Density of rock salt(kg/m**3)\n",
- "n = 4; #Number of atoms per unit cell for an fcc lattice of NaCl crystal\n",
- "N = 6.02*10**26; #Avogadro's number(atoms/k-mol)\n",
- "\n",
- "#Calculation\n",
- "M = 23+35.5; #Molecular weight of NaCl(kg/k-mole)\n",
- "#V = a^3 = M*n/(N*d)\n",
- "a = (n*M/(d*N))**(1/3); #Lattice constant of unit cell of NaCl(m)\n",
- "D = a/2; #distance between nearest neighbours(m)\n",
- "D = D*10**9; #distance between nearest neighbours(nm)\n",
- "D = math.ceil(D*10**4)/10**4; #rounding off the value of D to 4 decimals\n",
- "\n",
- "#Result\n",
- "print \"The distance between nearest neighbours of NaCl structure is\",D, \"nm\""
- ],
+ "input": "#importing modules\nimport math\n\n#Variable declaration\nrho = 1.54*10**-8; #resistivity(ohm m)\nE = 1; #electric field(V/cm)\nme = 9.1*10**-31; #mass of electron\ne = 1.6*10**-19; #charge of electron\nn = 5.8*10**28; #concentration of electrons(per m**3)\n\n#Calculation\nE = E*10**2; #electric field(V/m)\ntow = me/(rho*n*e**2); #relaxation time(sec)\nvd = e*E*tow/me; #drift velocity(m/s)\nvd=math.ceil(vd*10)/10; #rounding off to 1 decimal\nmew = vd/E; #mobility of electrons(m**2/Vs)\nmew = mew*10**2;\n\n#Result\nprint \"relaxation time of electrons is\",tow,\"sec\"\nprint \"drift velocity of electrons is\",vd,\"m/s\"\nprint \"mobility of electrons is\",mew,\"*10**-2 m**2/Vs\"",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": [
- "The distance between nearest neighbours of NaCl structure is 0.2814 nm\n"
- ]
+ "text": "relaxation time of electrons is 3.97972178683e-14 sec\ndrift velocity of electrons is 0.7 m/s\nmobility of electrons is 0.7 *10**-2 m**2/Vs\n"
}
],
"prompt_number": 13
@@ -595,59 +290,64 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": [
- "Example number 6.14, Page number 139"
- ]
+ "source": "Example number 6.14, Page number 178"
},
{
"cell_type": "code",
"collapsed": false,
- "input": [
- " \n",
- "#importing modules\n",
- "import math\n",
- "from __future__ import division\n",
- "\n",
- "#Variable declaration\n",
- "r1 = 1.258; #Atomic radius of bcc structure of iron(A)\n",
- "N1 = 2; #Number of atoms per unit cell in bcc structure\n",
- "#For fcc structure\n",
- "r2 = 1.292; #Atomic radius of fcc structure of iron(A)\n",
- "N2 = 4; #Number of atoms per unit cell in fcc structure\n",
- "\n",
- "#Calculation\n",
- "a1 = 4*r1/math.sqrt(3); #Lattice parameter of bcc structure of iron(A)\n",
- "V1 = a1**3; #Volume of bcc unit cell(A)\n",
- "V_atom_bcc = V1/N1; #Volume occupied by one atom(A)\n",
- "a2 = 2*math.sqrt(2)*r2; #Lattice parameter of fcc structure of iron(A)\n",
- "V2 = a2**3; #Volume of fcc unit cell(A)\n",
- "V_atom_fcc = V2/N2; #Volume occupied by one atom(A)\n",
- "delta_V = (V_atom_bcc-V_atom_fcc)/V_atom_bcc*100; #Percentage change in volume due to structural change of iron\n",
- "delta_V = math.ceil(delta_V*10**3)/10**3; #rounding off the value of delta_V to 3 decimals\n",
- "\n",
- "#Result\n",
- "print \"The percentage change in volume of iron is\",delta_V, \"percent\""
+ "input": "#importing modules\nimport math\n\n#Variable declaration\nT = 300; #temperature(K)\nl = 2; #length of wire(m)\nR = 0.02; #resistance(ohm)\nI = 15; #current(amp)\nmew = 4.3*10**-3; #mobility(m**2/Vs)\n\n#Calculation\nV = I*R; #voltage drop(V)\nE = V/l; #electric field(V/m)\nvd = mew*E; #drift velocity(m/s)\nvd = vd*10**3;\nvd=math.ceil(vd*100)/100; #rounding off to 2 decimals\n\n#Result\nprint \"drift velocity of electrons is\",vd,\"*10**-3 m/s\"",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "drift velocity of electrons is 0.65 *10**-3 m/s\n"
+ }
],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example number 6.15, Page number 179"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#importing modules\nimport math\n\n#Variable declaration\nvf = 0.86*10**6; #fermi velocity(m/s)\nm = 9.1*10**-31; #mass of electron(kg)\ne = 1.6*10**-19; #charge of electron(C)\nk = 1.38*10**-23; #boltzmann constant\n\n#Calculation\nEF = m*vf**2/(2*e); #fermi energy(eV)\nEF=math.ceil(EF*100)/100; #rounding off to 2 decimals\nTF = EF*e/k; #fermi temperature(K)\n\n#Result\nprint \"Fermi energy is\",EF,\"eV\"\nprint \"Fermi temperature is\",int(TF),\"K\"\nprint \"answer for fermi temperature given in the book is wrong due to rounding off the value of EF\"",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": [
- "The percentage change in volume of iron is 0.494 percent\n"
- ]
+ "text": "Fermi energy is 2.11 eV\nFermi temperature is 24463 K\nanswer for fermi temperature given in the book is wrong due to rounding off the value of EF\n"
}
],
"prompt_number": 15
},
{
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example number 6.16, Page number 179"
+ },
+ {
"cell_type": "code",
"collapsed": false,
- "input": [],
+ "input": "#importing modules\nimport math\n\n#Variable declaration\nTF = 2460; #fermi temperature(K)\nm = 9.11*10**-31; #mass of electron(kg)\nk = 1.38*10**-23; #boltzmann constant\n\n#Calculation\nvF = math.sqrt(2*k*TF/m); #fermi velocity(m/s)\nvF = vF*10**-5;\nvF=math.ceil(vF*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint \"Fermi velocity is\",vF,\"*10**5 m/s\"",
"language": "python",
"metadata": {},
- "outputs": []
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "Fermi velocity is 2.731 *10**5 m/s\n"
+ }
+ ],
+ "prompt_number": 16
}
],
"metadata": {}