summaryrefslogtreecommitdiff
path: root/Engineering_Physics_Malik/Chapter_13.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Engineering_Physics_Malik/Chapter_13.ipynb')
-rw-r--r--Engineering_Physics_Malik/Chapter_13.ipynb995
1 files changed, 995 insertions, 0 deletions
diff --git a/Engineering_Physics_Malik/Chapter_13.ipynb b/Engineering_Physics_Malik/Chapter_13.ipynb
new file mode 100644
index 00000000..db97b36d
--- /dev/null
+++ b/Engineering_Physics_Malik/Chapter_13.ipynb
@@ -0,0 +1,995 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 13: Crystal Structure\n"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.1, Page 13.24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Given \n",
+ "x = 2 # intercepts cut by the plane along vector a of crystallographic axes\n",
+ "y = 3 # intercepts cut by the plane along vector b of crystallographic axes\n",
+ "z = 1 # intercepts cut by the plane along vector c of crystallographic axes\n",
+ "\n",
+ "#Calculations\n",
+ "x_ = 6 / x\n",
+ "y_ = 6 / y\n",
+ "z_ = 6 / z\n",
+ "\n",
+ "#Result\n",
+ "print \"Miller indices of the plane are (%d %d %d)\"%(x_,y_,z_)\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Miller indices of the plane are (3 2 6)\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.2, Page 13.24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# Given \n",
+ "x = 1 # intercepts cut by the plane along vector a of crystallographic axes\n",
+ "y = 2 # intercepts cut by the plane along vector b of crystallographic axes\n",
+ "z = -3. / 2 # intercepts cut by the plane along vector c of crystallographic axes\n",
+ "\n",
+ "#Calculations\n",
+ "x_ = 6 / x\n",
+ "y_ = 6 / y\n",
+ "z_ = 6 / z\n",
+ "\n",
+ "print \"Miller indices of the plane are (%d %d %d)\"%(x_,y_,z_)\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Miller indices of the plane are (6 3 -4)\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.3, Page 13.25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Given \n",
+ "x1 = 3. # intercepts cut by the plane along vector a of crystallographic axes in first case\n",
+ "y1 = 3. # intercepts cut by the plane along vector b of crystallographic axes in first case \n",
+ "z1 = 2. # intercepts cut by the plane along vector c of crystallographic axes in first case\n",
+ "x2 = 1. # intercepts cut by the plane along vector a of crystallographic axes in second case\n",
+ "y2 = 2. # intercepts cut by the plane along vector b of crystallographic axes in second case\n",
+ "k2 = 0. # raciprocal of intercepts cut by the plane along vector c of crystallographic axes in second case\n",
+ "x3 = 1. # intercepts cut by the plane along vector a of crystallographic axes in third case\n",
+ "y3 = 1./2 # intercepts cut by the plane along vector b of crystallographic axes in third case\n",
+ "z3 = 1. # intercepts cut by the plane along vector c of crystallographic axes in third case\n",
+ "\n",
+ "#Calculations\n",
+ "x_1 = 6. / x1\n",
+ "y_1 = 6. / y1\n",
+ "z_1 = 6. / z1\n",
+ "x_2 = 2. / x2\n",
+ "y_2 = 2. / y2\n",
+ "z_2 = 2*k2\n",
+ "x_3 = 2 * x3\n",
+ "y_3 = 2 * y3\n",
+ "z_3 = 2 * z3\n",
+ "\n",
+ "#Result\n",
+ "print \"Miller indices of the plane (i) In first case are (%d %d %d)\\n(ii) In second case are (%d %d %d)\\n(iii)In the third case are (%d %d %d).\"%(x_1,y_1,z_1,x_2,y_2,z_2,x_3,y_3,z_3)\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Miller indices of the plane (i) In first case are (2 2 3)\n",
+ "(ii) In second case are (2 1 0)\n",
+ "(iii)In the third case are (2 1 2).\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.4, Page 13.25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt\n",
+ "\n",
+ "# Given \n",
+ "x1 = 1 # coordinate on x axis for first plane\n",
+ "y1 = 0 # coordinate on y axis for first plane\n",
+ "z1 = 0 # coordinate on z axis for first plane\n",
+ "x2 = 1 # coordinate on x axis for second plane\n",
+ "y2 = 1 # coordinate on y axis for second plane\n",
+ "z2 = 1 # coordinate on z axis for second plane\n",
+ "\n",
+ "#Calculations\n",
+ "d1 = 1 / sqrt(x1**2 + y1**2 + z1**2)\n",
+ "d2 = 1 / sqrt(x2**2 + y2**2 + z2**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"Spacing between the plane in first case is a / %d\\nSpacing between the plane in second case is a / %f\"%(d1,d2)\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Spacing between the plane in first case is a / 1\n",
+ "Spacing between the plane in second case is a / 0.577350\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.5, Page 13.26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt\n",
+ "\n",
+ "# Given that\n",
+ "x = 1. # intercepts cut by the plane along vector a of crystallographic axes\n",
+ "y = 2. # intercepts cut by the plane along vector b of crystallographic axes\n",
+ "k = 0. # raciprocal of intercepts cut by the plane along vector c of crystallographic axes\n",
+ "a = 5. # length of vector a of crystallographic axes in angstrom\n",
+ "b = 5. # length of vector b of crystallographic axes in angstrom \n",
+ "c = 5. # length of vector c of crystallographic axes in angstrom\n",
+ "\n",
+ "#Calculations\n",
+ "x_ = 2. / x\n",
+ "y_ = 2. / y\n",
+ "z_ = 2 * k\n",
+ "d = a / sqrt(x_**2 + y_**2 + z_**2)\n",
+ "D=d**2\n",
+ "\n",
+ "#Result\n",
+ "print \"Miller indices of the plane are (%d %d %d)\\nInter planar distance is sqrt(%d) angstrom\"%(x_,y_,z_,D)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Miller indices of the plane are (2 1 0)\n",
+ "Inter planar distance is sqrt(0) angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.6, Page 13.26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Given \n",
+ "x = 2 # intercepts cut by the plane along vector a of crystallographic axes\n",
+ "y = 2. / 3 # intercepts cut by the plane along vector b of crystallographic axes\n",
+ "k = 0 # raciprocal of intercepts cut by the plane along vector c of crystallographic axes\n",
+ "\n",
+ "#Calculations\n",
+ "x_ = 2. / x\n",
+ "y_ = 2. / y\n",
+ "z_ = 2 * k\n",
+ "\n",
+ "#Result\n",
+ "print \"Miller indices of the plane are (%d %d %d)\"%(x_,y_,z_)\n",
+ "\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Miller indices of the plane are (1 3 0)\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.7, Page 13.27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import *\n",
+ "\n",
+ "# Given \n",
+ "x1 = 2 # coordinate on x axis \n",
+ "y1 = 3 # coordinate on y axis \n",
+ "z1 = 1 # coordinate on z axis \n",
+ "r = 0.175 # atomic radius of fcc structure in nm\n",
+ "\n",
+ "#Calculations\n",
+ "a = (4 * r) / sqrt(2)\n",
+ "d = a / sqrt(x1**2 + y1**2 + z1**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"Inter planar spacing is %.3f nm\"%d\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Inter planar spacing is 0.132 nm\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.8, Page 13.27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Given \n",
+ "x1 = 1 # coordinate on x axis in first case\n",
+ "y1 = 2 # coordinate on y axis in first case \n",
+ "z1 = 3 # coordinate on z axis in first case\n",
+ "x2 = 1\n",
+ "y2 = 1\n",
+ "z2 = 0\n",
+ "# coordinate of first plane in second case\n",
+ "x3 = 1\n",
+ "y3= 1\n",
+ "z3 = 1\n",
+ "# coordinate of second plane in second case\n",
+ "\n",
+ "#Calculations\n",
+ "x_=6/x1\n",
+ "y_=6/y1\n",
+ "z_=6/z1\n",
+ "d1 = 1 / sqrt(x2^2 + y2^2 + z2^2)\n",
+ "d2= 1/ sqrt(x3^2 + y3^2 + z3^2)\n",
+ "d = d1/d2\n",
+ "\n",
+ "#Results\n",
+ "print \"The ratio of intercepts of three axes by the point are %d : %d : %d\\nThe ratio of spacing between two planes is %.3f\"%(x_,y_,z_,d)\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The ratio of intercepts of three axes by the point are 6 : 3 : 2\n",
+ "The ratio of spacing between two planes is 1.225\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.9, Page 13.28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import *\n",
+ "\n",
+ "# Given \n",
+ "a = 5 # the lattice constant of the structure in angstrom\n",
+ "\n",
+ "#Calculations\n",
+ "d = (sqrt(3) / 4) * a\n",
+ "\n",
+ "#Result\n",
+ "print \"Distance between two atoms is %.2f A\"%d\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Distance between two atoms is 2.17 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.10, Page 13.28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import *\n",
+ "\n",
+ "# Given that\n",
+ "a = 3.56 # the length of cube edge in angstrom\n",
+ "\n",
+ "#Calculations\n",
+ "d = a / sqrt(2)\n",
+ "\n",
+ "#Result\n",
+ "print \"Permitive translation vector is %.2f A\"%d\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Permitive translation vector is 2.52 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.11, Page 13.28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Given \n",
+ "w = 207.2 # atomic weight of Pb\n",
+ "d = 11.36e3 # density of Pb in kg/m^3\n",
+ "a = 3.2e-10 # length of cube edge in meter\n",
+ "N = 6.023e26 # Avogadro's no. in per kg mole\n",
+ "\n",
+ "#Calculations\n",
+ "n = (a**3 * d * N) / w\n",
+ "\n",
+ "#Result\n",
+ "print \"Number of atom per unit cell is %d\"%n\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Number of atom per unit cell is 1\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.12, Page 13.28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " \n",
+ "# Given \n",
+ "M = 60.2 # molecular weight\n",
+ "d = 6250 # density in kg/m^3\n",
+ "N = 6.023e+26 # Avogadro's no. in per kg mole\n",
+ "n = 4. # for fcc lattice\n",
+ "\n",
+ "#Calculations\n",
+ "a = (((4 * M) / (N * d))**(1. / 3)) * 1e10\n",
+ "\n",
+ "#Result\n",
+ "print \"Lattice constant is %.f A\"%a\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Lattice constant is 4 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.13, Page 1329"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import *\n",
+ "\n",
+ "# Given \n",
+ "x1 = 1 # coordinate on x axis of plane\n",
+ "y1 = 0 # coordinate on y axis of plane\n",
+ "z1 = 0 # coordinate on z axis of plane\n",
+ "d = 2.82 # the space between successive plane in angstrom\n",
+ "theta = 8.8 # glancing angle in degree\n",
+ "\n",
+ "#Calculations\n",
+ "n = 1\n",
+ "lamda = 2 * d * sin(theta*pi/180) / n\n",
+ "\n",
+ "#Result\n",
+ "print \"Wavelength of x-ray is %.3f A\"%lamda\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength of x-ray is 0.863 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.14, Page 13.29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import *\n",
+ "\n",
+ "# Given \n",
+ "d = 2.51 # the space between adjacent plane in angstrom\n",
+ "theta = 9 # glancing angle in degree\n",
+ "\n",
+ "#Calculations\n",
+ "n = 1 # for n=1\n",
+ "lamda = 2 * d * sin(theta*pi/180) / n\n",
+ "n = 2 # for n=2\n",
+ "theta = degrees(asin(lamda / d))\n",
+ "\n",
+ "#Result\n",
+ "print \"Wavelength of x-ray is %.4f A\\nGlancing angle for second order diffraction is %.1f degree\"%(lamda,theta)\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength of x-ray is 0.7853 A\n",
+ "Glancing angle for second order diffraction is 18.2 degree\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.15, Page 13.29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import *\n",
+ "\n",
+ "# Given \n",
+ "lamda = 1.5 # wavelength of x-ray in angstrom\n",
+ "theta = 60 # glancing angle in degree\n",
+ "\n",
+ "#Calculations\n",
+ "n = 1 # for first order\n",
+ "d = ( n * lamda) / (2 * sin(theta*pi/180))\n",
+ "\n",
+ "#Result\n",
+ "print \"Lattice constant of NaCl is %.2f A\"%d\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Lattice constant of NaCl is 0.87 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.16, Page "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import *\n",
+ "\n",
+ "# Given \n",
+ "lamda = 1.4 # wavelength of x-ray in angstrom\n",
+ "x1 = 1 # coordinate on x axis of plane\n",
+ "y1 = 1 # coordinate on y axis of plane\n",
+ "z1 = 1 # coordinate on z axis of plane\n",
+ "a = 5. # lattice parameter of of crystal in angstrom\n",
+ "\n",
+ "#Calculations\n",
+ "n = 1 # for first order\n",
+ "d = a / sqrt(x1**2 + y1**2 + z1**2)\n",
+ "theta = degrees(asin((n * lamda) / (2 * d)))\n",
+ "\n",
+ "#Result\n",
+ "print \"Angle of incidence of x-ray on the plane is %.f degree\"%theta\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Angle of incidence of x-ray on the plane is 14 degree\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.17, Page 13.30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import *\n",
+ "\n",
+ "# Given \n",
+ "lamda = 0.710 # wavelength of x-ray in angstrom\n",
+ "x1 = 1 # coordinate on x axis of plane\n",
+ "y1 = 0 # coordinate on y axis of plane\n",
+ "z1 = 0 # coordinate on z axis of plane\n",
+ "a = 2.814 # lattice parameter of of crystal in angstrom\n",
+ "\n",
+ "#Calculations\n",
+ "n = 2 # for second order\n",
+ "d = a / sqrt(x1**2 + y1**2 + z1**2)\n",
+ "theta = degrees(asin((n * lamda) / (2 * d)))\n",
+ "\n",
+ "#Result\n",
+ "print \"Glancing angle is %.1f degree\"%theta\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Glancing angle is 14.6 degree\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.18, Page 13.30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import *\n",
+ "\n",
+ "# Given \n",
+ "n = 1 # order of brag reflection \n",
+ "d = 3.84e-10 # the space between successive plane in m\n",
+ "theta = 30. # glancing angle in degree\n",
+ "\n",
+ "#Calculations\n",
+ "lamda = 2 * d * sin(theta*pi/180) / n\n",
+ "v = 6.62e-34 / (1.67e-27 * lamda)\n",
+ "\n",
+ "#Result\n",
+ "print \"Wavelength of neutron beam is %.2f A\\nSpeed of neutron beam is %.2e meter/sec\"%(lamda * 10**10,v)\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength of neutron beam is 3.84 A\n",
+ "Speed of neutron beam is 1.03e+03 meter/sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.19, Page 13.31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import *\n",
+ "\n",
+ "# Given \n",
+ "v = 120 # voltage at which electron is accelerated in v\n",
+ "n = 1 # order of Bragg reflection \n",
+ "x1 = 1 # coordinate on x axis of plane\n",
+ "y1 = 1 # coordinate on y axis of plane\n",
+ "z1 = 1 # coordinate on z axis of plane\n",
+ "theta = 22 # angle at which maximum reflection is obtain in degree\n",
+ "n = 1 # order of reflection\n",
+ "\n",
+ "#Calculations\n",
+ "lamda = 6.62e-34 / sqrt(2 * 9.1e-31 * 1.6e-19 * v)\n",
+ "d = (n * lamda) / (2 * sin(theta*pi/180))\n",
+ "a = d * sqrt(3) \n",
+ "\n",
+ "#Result\n",
+ "print \"Lattice parameter is %.3f A\"%(a * 10**10) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Lattice parameter is 2.589 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.20, Page 13.31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import *\n",
+ "\n",
+ "# Given \n",
+ "lamda = 1.24e-10 # wavelength of X-ray in A\n",
+ "x1 = 1 # coordinate on x axis of first plane\n",
+ "y1 = 0 # coordinate on y axis of first plane\n",
+ "z1 = 0 # coordinate on z axis of first plane\n",
+ "x2 = 1 # coordinate on x axis of second plane\n",
+ "y2 = 1 # coordinate on y axis of second plane\n",
+ "z2 = 0 # coordinate on z axis of second plane\n",
+ "x3 = 1 # coordinate on x axis of third plane\n",
+ "y3 = 1 # coordinate on y axis of third plane\n",
+ "z3 = 1 # coordinate on z axis of third plane\n",
+ "M = 74.5 # molecular weight of KCl\n",
+ "d = 1980 # density of KCl in kg/m^3\n",
+ "N = 6.023e+26 # Avogadro's No per Kg mole\n",
+ "\n",
+ "#Calculations\n",
+ "a = (4*M / (N*d))**(1./3)\n",
+ "D1 = a/sqrt(x1**2 + y1**2 + z1**2)\n",
+ "D2 = a/sqrt(x2**2 + y2**2 + z2**2)\n",
+ "D3 = a/sqrt(x3**2 + y3**2 + z3**2)\n",
+ "\n",
+ "#Result\n",
+ "print \"Inter planner distances are - \\n(1) in first case %.1f A \\n(2) in second case %.2f A \\n(3) in third case %.2f A\"%(D1*10**10,D2*10**10,D3*10**10)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Inter planner distances are - \n",
+ "(1) in first case 6.3 A \n",
+ "(2) in second case 4.45 A \n",
+ "(3) in third case 3.64 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.21, Page 13.32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import *\n",
+ "\n",
+ "# Given \n",
+ "d = 0.15e-9 # distance between K(+) and Cl(-) in m\n",
+ "\n",
+ "#Calculations\n",
+ "v = -1.6e-19 / (4 * pi * 8.85e-12 * d)\n",
+ "\n",
+ "#Result\n",
+ "print \"Potential energy of molecule is %.1f eV\"%v\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Potential energy of molecule is -9.6 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.22, Page 13.32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import *\n",
+ "\n",
+ "# Given \n",
+ "d = 0.32e-9 # equilibrium separation in m\n",
+ "alpha = 1.748 \n",
+ "n = 9\n",
+ "e = 4 # ionization energy in eV\n",
+ "a = -2.16 # electron affinity in eV\n",
+ "\n",
+ "#Calculations\n",
+ "E = -((alpha * 1.6e-19) / (4 * pi * 8.85e-12 * d)) * (1 - (1. / n))\n",
+ "\n",
+ "#Result\n",
+ "print \"Cohesive energy of Nacl is %f eV\"%E\n",
+ "#Incorrect answer in the textbook "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Cohesive energy of Nacl is -6.985633 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.23, Page 13.33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import *\n",
+ "\n",
+ "# Given \n",
+ "E = 2.02 # average energy required to produce a Schottky defect at room temperature in eV\n",
+ "k = 1.38e-23 # Boltzmann constant in J/k\n",
+ "T = 300 # room temperature in K\n",
+ "\n",
+ "#Calculations\n",
+ "r = exp(-(E * 1.6e-19) / (2 * k * T))\n",
+ "\n",
+ "#Result\n",
+ "print \"Ratio of number of Schottky defects to total number of cation-anion pairs is %.2e\"%r\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ratio of number of Schottky defects to total number of cation-anion pairs is 1.12e-17\n"
+ ]
+ }
+ ],
+ "prompt_number": 44
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file