From 6279fa19ac6e2a4087df2e6fe985430ecc2c2d5d Mon Sep 17 00:00:00 2001 From: kinitrupti Date: Fri, 12 May 2017 18:53:46 +0530 Subject: Removed duplicates --- Modern_Physics_by_K_S_Krane/chapter4_1.ipynb | 320 +++++++++++++++++++++++++++ 1 file changed, 320 insertions(+) create mode 100755 Modern_Physics_by_K_S_Krane/chapter4_1.ipynb (limited to 'Modern_Physics_by_K_S_Krane/chapter4_1.ipynb') diff --git a/Modern_Physics_by_K_S_Krane/chapter4_1.ipynb b/Modern_Physics_by_K_S_Krane/chapter4_1.ipynb new file mode 100755 index 00000000..9b118dda --- /dev/null +++ b/Modern_Physics_by_K_S_Krane/chapter4_1.ipynb @@ -0,0 +1,320 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f3a8bba44ff010c0f1004529fad8de811f19168b5752929eb1e0272cfc5fc53c" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "4: Crystallography" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 4.2, Page number 70" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#import modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d=2180; #density of NaCl(kg/m^3)\n", + "M=23+35.5; #Molecular weight of NaCl(gm)\n", + "Na=6.02*10**26; #Avgraodo no(per kg mole)\n", + "n=4; #for f.c.c\n", + "\n", + "#calculation\n", + "a=(n*M/(Na*d))**(1/3); #lattice constant(m)\n", + "d=a/2; #distance(m)\n", + "d=d*10**10; #distance(angstrom)\n", + "d=math.ceil(d*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print \"distance between two adajcent atoms is\",d,\"angstrom\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "distance between two adajcent atoms is 2.815 angstrom\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 4.3, Page number 70" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#import modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d=2.163; #density(gm/cm^3)\n", + "M=58.45; #molecular weight(gm)\n", + "Na=6.02*10**23; #Avgraodo no.(molecules/gm mole)\n", + "\n", + "#calcualtion\n", + "n=Na/M; #no. of molecules(per gram)\n", + "n=n*d; #no. of molecules(per cm^3) \n", + "n=2*n; #no. of atom(per cm^3)\n", + "n=n**(1/3); #no. of atoms in a row 1cm long\n", + "d=1/n; #spacing between atoms(cm)\n", + "\n", + "#Result\n", + "print \"spacing between atoms is\",round(d/1e-8,2),\"angstrom\"\n", + "print \"answer in the book varies due to rounding off errors\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "spacing between atoms is 2.82 angstrom\n", + "answer in the book varies due to rounding off errors\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 4.4, Page number 74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#import modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "r=1.278; #radius(A.U)\n", + "n=4; #structure is f.c.c\n", + "M=63.54; #atomic weight(gm)\n", + "Na=6.02*10**23; #Avgraodo no.(per gm mole)\n", + "\n", + "#calculation \n", + "a=4*r/(math.sqrt(2)); #lattice constant(A.U)\n", + "V=a**3; #volume(cm^3)\n", + "rho=n*M/(Na*V); #density(gm/cm^3)\n", + "rho=rho*(10**8)**3 #density(gm/m^3)\n", + "\n", + "#Result\n", + "print \"Density is\",round(rho,2),\"g/m^3\"\n", + "print \"answer in the textbook varies due to rounding off errors\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Density is 8.94 g/m^3\n", + "answer in the textbook varies due to rounding off errors\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 4.10, Page number 85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#import modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Vaiable declaration\n", + "r=1.746; #atomic radius(AU)\n", + "\n", + "#calulation\n", + "a=4*r/math.sqrt(2); #lattice constant(AU)\n", + "#for (200)\n", + "h=2;k=0;l=0;\n", + "d=a/math.sqrt(h**2+k**2+l**2); #interplanar spacing(AU)\n", + "#for (220)\n", + "h=2;k=2;l=0; \n", + "d1=a/math.sqrt(h**2+k**2+l**2); #interplanar spacing(AU)\n", + "#for (111)\n", + "h=1;k=1;l=1;\n", + "d2=a/math.sqrt(h**2+k**2+l**2); #interplanar spacing(AU)\n", + "d=math.ceil(d*10**4)/10**4; #rounding off to 4 decimals\n", + "d1=math.ceil(d1*10**3)/10**3; #rounding off to 3 decimals\n", + "d2=math.ceil(d2*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print \"spacing for (200) is\",d,\"A.U\"\n", + "print \"answer in the book varies in 3rd decimal due to rounding off errors\"\n", + "print \"spacing for (220) is\",d1,\"A.U\"\n", + "print \"spacing for (111) is\",d2,\"A.U\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "spacing for (200) is 2.4693 A.U\n", + "answer in the book varies in 3rd decimal due to rounding off errors\n", + "spacing for (220) is 1.746 A.U\n", + "spacing for (111) is 2.852 A.U\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 4.11, Page number 86" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#import modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#calculation\n", + "#for (i)\n", + "l=1;m=0;n=0;\n", + "p=0;q=1;r=0;\n", + "d=math.acos(((l*p)+(m*q)+(n*r))/(math.sqrt(l**2+m**2+n**2)*math.sqrt(p**2+q**2+r**2))); #angle between 2 normals(radian)\n", + "theta=math.degrees(d); #angle between 2 normals(degrees) \n", + "\n", + "#for (ii)\n", + "l=1;m=2;n=1;\n", + "p=1;q=1;r=1;\n", + "d1=math.acos(((l*p)+(m*q)+(n*r))/(math.sqrt(l**2+m**2+n**2)*math.sqrt(p**2+q**2+r**2))); #angle between 2 normals(radian)\n", + "theta1=math.degrees(d1); #angle between 2 normals(degrees) \n", + "deg=int(theta1); #angle(degrees)\n", + "t=60*(theta1-deg);\n", + "m=int(t); #angle(minutes)\n", + " \n", + "#Result\n", + "print \"angle between the normal to pair of miller incdices (100) and (010) is\",theta,\"degrees\"\n", + "print \"angle between the normal to pair of miller incdices (121) and (111) is\",deg,\"degrees\",m,\"minutes\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "angle between the normal to pair of miller incdices (100) and (010) is 90.0 degrees\n", + "angle between the normal to pair of miller incdices (121) and (111) is 19 degrees 28 minutes\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example number 4.13, Page number 87" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#import modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#variable declaration\n", + "a=3.61*10**-7; #lattice constant(mm)\n", + "\n", + "#Calcualtion\n", + "#for plane (100)\n", + "SA=a*a; #surface area(mm^2)\n", + "tamc=2; #total atoms included\n", + "ans=tamc/SA; #number of atoms per mm^2\n", + "#for (ii) plane (110)\n", + "A=a*(math.sqrt(2)*a); #area of the plane(mm^2)\n", + "tamc=2; #total atoms included according to sketch\n", + "ans1=tamc/A; #number of atoms per mm^2\n", + "#for (iii) plane (111)\n", + "A=0.866*a*a; #area of the plane(mm^2)\n", + "tamc=2; #total atoms included according to sketch\n", + "ans2=tamc/A; #number of atoms per mm^2\n", + "\n", + "#Result\n", + "print \"atoms per mm^2 for (100) is\",round(ans/1e+13,3),\"*10**13 atoms/mm^2\"\n", + "print \"atoms per mm^2 for (110) is\",round(ans1/1e+13,3),\"*10**13 atoms/mm^2\"\n", + "print \"atoms per mm^2 for (111) is\",round(ans2/1e+13,3),\"*10**13 atoms/mm^2\"\n", + "print \"answer for plane (111) given in the book is wrong\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "atoms per mm^2 for (100) is 1.535 *10**13 atoms/mm^2\n", + "atoms per mm^2 for (110) is 1.085 *10**13 atoms/mm^2\n", + "atoms per mm^2 for (111) is 1.772 *10**13 atoms/mm^2\n", + "answer for plane (111) given in the book is wrong\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file -- cgit