diff options
author | Trupti Kini | 2016-10-22 23:30:44 +0600 |
---|---|---|
committer | Trupti Kini | 2016-10-22 23:30:44 +0600 |
commit | d494f83613280ddbbf9b46b567059e3a4c8231f3 (patch) | |
tree | 17158cf9bddd572a590bc8ffc2274af1e4635d8c /Solid_State_Physics_by_Dr._M._Arumugam/Chapter3.ipynb | |
parent | 186a5e7c95be1b021c667e346f2a013406ab7f8d (diff) | |
download | Python-Textbook-Companions-d494f83613280ddbbf9b46b567059e3a4c8231f3.tar.gz Python-Textbook-Companions-d494f83613280ddbbf9b46b567059e3a4c8231f3.tar.bz2 Python-Textbook-Companions-d494f83613280ddbbf9b46b567059e3a4c8231f3.zip |
Added(A)/Deleted(D) following books
A Solid_State_Physics_by_Dr._M._Arumugam/Chapter1.ipynb
A Solid_State_Physics_by_Dr._M._Arumugam/Chapter10.ipynb
A Solid_State_Physics_by_Dr._M._Arumugam/Chapter11.ipynb
A Solid_State_Physics_by_Dr._M._Arumugam/Chapter12.ipynb
A Solid_State_Physics_by_Dr._M._Arumugam/Chapter13.ipynb
A Solid_State_Physics_by_Dr._M._Arumugam/Chapter14.ipynb
A Solid_State_Physics_by_Dr._M._Arumugam/Chapter2.ipynb
A Solid_State_Physics_by_Dr._M._Arumugam/Chapter3.ipynb
A Solid_State_Physics_by_Dr._M._Arumugam/Chapter4.ipynb
A Solid_State_Physics_by_Dr._M._Arumugam/Chapter5.ipynb
A Solid_State_Physics_by_Dr._M._Arumugam/Chapter6.ipynb
A Solid_State_Physics_by_Dr._M._Arumugam/Chapter8.ipynb
A Solid_State_Physics_by_Dr._M._Arumugam/screenshots/22.png
A Solid_State_Physics_by_Dr._M._Arumugam/screenshots/33.png
A Solid_State_Physics_by_Dr._M._Arumugam/screenshots/44.png
A basic_electrical_engineering_by_nagsarkar_and_sukhija/Chapter2_g1CooCv.ipynb
A basic_electrical_engineering_by_nagsarkar_and_sukhija/Chapter4_y6WvPya.ipynb
A basic_electrical_engineering_by_nagsarkar_and_sukhija/Chapter5_8YQCBnu.ipynb
A basic_electrical_engineering_by_nagsarkar_and_sukhija/chapter11_KNhAPle.ipynb
A basic_electrical_engineering_by_nagsarkar_and_sukhija/chapter1_UaQSIvn.ipynb
A basic_electrical_engineering_by_nagsarkar_and_sukhija/chapter3_2.ipynb
A basic_electrical_engineering_by_nagsarkar_and_sukhija/chapter6_xg51MMS.ipynb
A basic_electrical_engineering_by_nagsarkar_and_sukhija/chapter7_sTn1O6Y.ipynb
A basic_electrical_engineering_by_nagsarkar_and_sukhija/chapter8_wAsDeY9.ipynb
A basic_electrical_engineering_by_nagsarkar_and_sukhija/chapter9_NbF92Qt.ipynb
A basic_electrical_engineering_by_nagsarkar_and_sukhija/screenshots/chap1_Ux1JjUJ.png
A basic_electrical_engineering_by_nagsarkar_and_sukhija/screenshots/chapter2_jrlMSB1.png
A basic_electrical_engineering_by_nagsarkar_and_sukhija/screenshots/chapter6_HJhQnZO.png
Diffstat (limited to 'Solid_State_Physics_by_Dr._M._Arumugam/Chapter3.ipynb')
-rw-r--r-- | Solid_State_Physics_by_Dr._M._Arumugam/Chapter3.ipynb | 303 |
1 files changed, 303 insertions, 0 deletions
diff --git a/Solid_State_Physics_by_Dr._M._Arumugam/Chapter3.ipynb b/Solid_State_Physics_by_Dr._M._Arumugam/Chapter3.ipynb new file mode 100644 index 00000000..a9d0fcd4 --- /dev/null +++ b/Solid_State_Physics_by_Dr._M._Arumugam/Chapter3.ipynb @@ -0,0 +1,303 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 3: X-Ray Diffraction" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 1, Page number 3.9" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "maximum order of diffraction is 1.53\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d=1.181; #lattice spacing(angstrom)\n", + "theta=90*math.pi/180; #glancing angle(radian)\n", + "lamda=1.540; #wavelength of X-rays(angstrom)\n", + "\n", + "#Calculation\n", + "n=2*d*math.sin(theta)/lamda; #maximum order of diffraction \n", + "\n", + "#Result\n", + "print \"maximum order of diffraction is\",round(n,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 2, Page number 3.9" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "cube edge of unit cell is 3.514 angstrom\n", + "answer given in the book varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n=1; #order\n", + "theta=9.5*math.pi/180; #glancing angle(radian)\n", + "lamda=0.58; #wavelength(angstrom)\n", + "h=2;\n", + "k=0;\n", + "l=0;\n", + "\n", + "#Calculation\n", + "d=n*lamda/(2*math.sin(theta)); #lattice parameter(angstrom)\n", + "a=d*math.sqrt(h**2+k**2+l**2); #cube edge of unit cell(angstrom)\n", + "\n", + "#Result\n", + "print \"cube edge of unit cell is\",round(a,3),\"angstrom\"\n", + "print \"answer given in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 3, Page number 3.10" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "glancing angle for 3rd order is 26 degrees 35 minutes\n", + "answer for minutes given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "theta=(8+(35/60))*math.pi/180; #glancing angle(radian)\n", + "lamda=0.842; #wavelength of X-rays(angstrom)\n", + "n1=1; #order\n", + "n3=3; #order \n", + "\n", + "#Calculation\n", + "theta3=math.asin(n3*lamda*math.sin(theta)/(n1*lamda))*180/math.pi; #glancing angle for 3rd order(degrees)\n", + "theta3d=int(theta3); #glancing angle for 3rd order(degrees) \n", + "theta3m=(theta3-theta3d)*60; #glancing angle for 3rd order(minutes)\n", + "\n", + "#Result\n", + "print \"glancing angle for 3rd order is\",theta3d,\"degrees\",int(theta3m),\"minutes\"\n", + "print \"answer for minutes given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 4, Page number 3.10" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "interplanar spacing is 2.22 angstrom\n", + "value of h**2+k**2+l**2 is 2\n", + "miller indices are (110) or (011) or (101)\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "theta=20.3*math.pi/180; #glancing angle(radian)\n", + "lamda=1.54; #wavelength of X-rays(angstrom)\n", + "n=1; #order\n", + "a=3.16; #lattice parameter(angstrom)\n", + "\n", + "#Calculation\n", + "d=n*lamda/(2*math.sin(theta)); #interplanar spacing(angstrom)\n", + "x=(a/d)**2; #assume x=(h**2+k**2+l**2)\n", + "\n", + "#Result\n", + "print \"interplanar spacing is\",round(d,2),\"angstrom\"\n", + "print \"value of h**2+k**2+l**2 is\",int(x)\n", + "print \"miller indices are (110) or (011) or (101)\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 5, Page number 3.11" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength is 1.553 angstrom\n", + "energy of X-rays is 8 *10**3 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n=4; #order\n", + "A=107.87; #atomic weight(kg)\n", + "theta=(19+(12/60))*math.pi/180; #glancing angle(radian)\n", + "h=1;\n", + "k=1;\n", + "l=1;\n", + "N=6.02*10**26; #avagadro number\n", + "rho=10500; #density(kg/m**3)\n", + "H=6.625*10**-34; #plancks constant(Js)\n", + "c=3*10**8; #velocity of light(m/s)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "\n", + "#Calculation\n", + "a=round(((n*A/(N*rho))**(1/3))*10**10,2); #lattice parameter(angstrom)\n", + "d=a/math.sqrt((h**2)+(k**2)+(l**2)); #lattice parameter(angstrom)\n", + "lamda=2*d*math.sin(theta); #wavelength(angstrom)\n", + "E=H*c/(lamda*10**-10*e); #energy of X-rays(eV)\n", + "\n", + "#Result\n", + "print \"wavelength is\",round(lamda,3),\"angstrom\"\n", + "print \"energy of X-rays is\",int(round(E/10**3)),\"*10**3 eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 6, Page number 3.12" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "specimen distance is 7.559 cm\n", + "answer given in the book varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "h=1;\n", + "k=1;\n", + "l=1;\n", + "a=4.57; #lattice parameter(angstrom)\n", + "lamda=1.52; #wavelength(angstrom)\n", + "r=5; #radius(cm)\n", + "\n", + "#Calculation\n", + "d=a/math.sqrt(h**2+k**2+l**2); #lattice parameter(angstrom)\n", + "theta=math.asin(lamda/(2*d)); #glancing angle(degrees)\n", + "X=r/math.tan(2*theta); #specimen distance(cm)\n", + "\n", + "#Result\n", + "print \"specimen distance is\",round(X,3),\"cm\"\n", + "print \"answer given in the book varies due to rounding off errors\"" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} |