diff options
author | Trupti Kini | 2017-01-25 23:30:36 +0600 |
---|---|---|
committer | Trupti Kini | 2017-01-25 23:30:36 +0600 |
commit | ece5ac1869f368bf60b7af8f6fb1f1426aa82841 (patch) | |
tree | 474b598b088686b059cad12f097d1e50d0eedff9 /Solid_State_Physics_by_Dr._M._Arumugam/Chapter2_MymLk0N.ipynb | |
parent | 8538d26ae7c18ff1d639431eff3b6e5971519982 (diff) | |
download | Python-Textbook-Companions-ece5ac1869f368bf60b7af8f6fb1f1426aa82841.tar.gz Python-Textbook-Companions-ece5ac1869f368bf60b7af8f6fb1f1426aa82841.tar.bz2 Python-Textbook-Companions-ece5ac1869f368bf60b7af8f6fb1f1426aa82841.zip |
Added(A)/Deleted(D) following books
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter10_EAg6827.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter10_FWFi3lU.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter10_Goix5H9.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter10_VriTfiQ.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter10_Yq1Psz2.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter10_l9H0tzb.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter10_pYSKzNA.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter10_zs7Ebyd.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter11_27AWa1S.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter11_47129pd.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter11_CGVC5S7.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter11_aM6HbOJ.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter11_elTomjM.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter11_hIH40hA.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter11_hfcwfMy.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter11_rDaXznv.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter12_4CIoGBj.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter12_8Ha6SRC.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter12_BV4qq7W.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter12_DcqNS3a.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter12_GaxQomY.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter12_TWDQmEU.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter12_gYL8x2U.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter12_pwlIEac.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter1_9Ph1wQl.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter1_H4ZXqG6.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter1_R7vvA9U.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter1_RJFpm9n.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter1_hdpf5pv.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter1_s7mmHTE.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter1_svi606z.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter1_yZrBrGW.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter2_1u2hkaL.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter2_4iVYyIH.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter2_96qogp8.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter2_97bKbrn.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter2_KU6DQxX.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter2_WQAFWBB.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter2_kXmkQiI.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter2_rMDgBlb.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter3_0Gpo8ij.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter3_1HFLVW3.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter3_Kef4wQi.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter3_MWqVgIK.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter3_QiNYdnt.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter3_ZOEnqWz.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter3_t8ZxgMJ.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter3_yX7jRTL.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter4_12jIRAa.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter4_7TlydJM.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter4_9F6nz40.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter4_Iv6UqxF.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter4_QznuUog.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter4_Tlme4Nt.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter4_kKbunDz.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter4_kj2kQSj.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter5_ELZ4gfb.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter5_HmzPXBx.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter5_NsyjFuf.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter5_dQcqRqy.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter5_fpjVXLa.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter5_qEtyNEB.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter5_wOjIeEX.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter5_zpdMjKp.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter6_4sTMSct.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter6_OaXeXza.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter6_OzarWlo.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter6_ZcykI2A.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter6_Ztedvce.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter6_hp8AaKa.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter6_j1y0oTK.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter6_srj5dHs.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter7_7s2tMTN.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter7_9XJ7DgO.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter7_Kxvh43O.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter7_St5Khwo.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter7_XgCkEpd.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter7_YxJXxam.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter7_cYbOBPv.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter7_wdE8t89.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter8_3OxJHIx.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter8_Bj4FcI7.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter8_GBeiA21.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter8_QSOQgt9.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter8_lwCA1i3.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter8_m8vzt2q.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter8_pYLCIKK.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/Chapter8_yBBd5FI.ipynb
A BSc_First_Year_Physics_by_P._BalaBhaskar,_N._Srinivasa_Rao,_B._Sanjeeva_Rao/screenshots/11.png
A Solid_State_Physics_by_Dr._M._Arumugam/Chapter10_uTyvarI.ipynb
A Solid_State_Physics_by_Dr._M._Arumugam/Chapter11_j1rU3Z4.ipynb
A Solid_State_Physics_by_Dr._M._Arumugam/Chapter12_MsiPuok.ipynb
A Solid_State_Physics_by_Dr._M._Arumugam/Chapter13_Nvp3wKs.ipynb
A Solid_State_Physics_by_Dr._M._Arumugam/Chapter14_EldnQKR.ipynb
A Solid_State_Physics_by_Dr._M._Arumugam/Chapter1_wnjphci.ipynb
A Solid_State_Physics_by_Dr._M._Arumugam/Chapter2_MymLk0N.ipynb
A Solid_State_Physics_by_Dr._M._Arumugam/Chapter3_rTdfw6Q.ipynb
A Solid_State_Physics_by_Dr._M._Arumugam/Chapter4_OPOooLb.ipynb
A Solid_State_Physics_by_Dr._M._Arumugam/Chapter5_YkzzeVY.ipynb
A Solid_State_Physics_by_Dr._M._Arumugam/Chapter6_wKefPQQ.ipynb
A Solid_State_Physics_by_Dr._M._Arumugam/Chapter8_B0hDPyA.ipynb
A Solid_State_Physics_by_Dr._M._Arumugam/screenshots/22_X7ip5yw.png
A Solid_State_Physics_by_Dr._M._Arumugam/screenshots/33_mVM81ix.png
A Solid_State_Physics_by_Dr._M._Arumugam/screenshots/44_gepd6Lu.png
A sample_notebooks/nitinkumar/Chapter2.ipynb
Diffstat (limited to 'Solid_State_Physics_by_Dr._M._Arumugam/Chapter2_MymLk0N.ipynb')
-rw-r--r-- | Solid_State_Physics_by_Dr._M._Arumugam/Chapter2_MymLk0N.ipynb | 319 |
1 files changed, 319 insertions, 0 deletions
diff --git a/Solid_State_Physics_by_Dr._M._Arumugam/Chapter2_MymLk0N.ipynb b/Solid_State_Physics_by_Dr._M._Arumugam/Chapter2_MymLk0N.ipynb new file mode 100644 index 00000000..51d55e0b --- /dev/null +++ b/Solid_State_Physics_by_Dr._M._Arumugam/Chapter2_MymLk0N.ipynb @@ -0,0 +1,319 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 2: Crystallography and Crystal Structures" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 2, Page number 2.21" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "spacing between (100) plane is 5.64 angstrom\n", + "spacing between (110) plane is 3.99 angstrom\n", + "answer for spacing between (110) plane given in the book is wrong\n", + "spacing between (111) plane is 3.26 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=5.64; #lattice constant(angstrom)\n", + "h1=1;\n", + "k1=0;\n", + "l1=0;\n", + "h2=1;\n", + "k2=1;\n", + "l2=0;\n", + "h3=1;\n", + "k3=1;\n", + "l3=1;\n", + "\n", + "#Calculation\n", + "d100=a/math.sqrt(h1**2+k1**2+l1**2); #spacing between (100) plane\n", + "d110=a/math.sqrt(h2**2+k2**2+l2**2); #spacing between (110) plane\n", + "d111=a/math.sqrt(h3**2+k3**2+l3**2); #spacing between (111) plane\n", + "\n", + "#Result\n", + "print \"spacing between (100) plane is\",d100,\"angstrom\"\n", + "print \"spacing between (110) plane is\",round(d110,2),\"angstrom\"\n", + "print \"answer for spacing between (110) plane given in the book is wrong\"\n", + "print \"spacing between (111) plane is\",round(d111,2),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 3, Page number 2.22" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of atoms in (100) is 1.535 *10**13 atoms/mm**2\n", + "number of atoms in (110) is 1.085 *10**13 atoms/mm**2\n", + "number of atoms in (111) is 1.772 *10**13 atoms/mm**2\n", + "answers given in the book vary due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=3.61*10**-7; #lattice constant(mm)\n", + "\n", + "#Calculation\n", + "A100=a**2; #surface area(mm**2)\n", + "n=1+(4*(1/4));\n", + "N1=n/A100; #number of atoms in (100)(per mm**2)\n", + "A110=math.sqrt(2)*a**2; #surface area(mm**2)\n", + "N2=n/A110; #number of atoms in (110)(per mm**2)\n", + "A111=math.sqrt(3)*a**2/2; #surface area(mm**2)\n", + "N3=n/A111; #number of atoms in (110)(per mm**2)\n", + "\n", + "#Result\n", + "print \"number of atoms in (100) is\",round(N1/10**13,3),\"*10**13 atoms/mm**2\"\n", + "print \"number of atoms in (110) is\",round(N2/10**13,3),\"*10**13 atoms/mm**2\"\n", + "print \"number of atoms in (111) is\",round(N3/10**13,3),\"*10**13 atoms/mm**2\"\n", + "print \"answers given in the book vary due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 4, Page number 2.23" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength of x rays is 1.552 angstrom\n", + "answer varies due to rounding off errors\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; \n", + "A=107.87; #atomic weight\n", + "rho=10500; #density(kg/m**3)\n", + "N=6.02*10**26; #number of molecules\n", + "theta=19+(12/60); #angle(degrees)\n", + "h=1;\n", + "k=1;\n", + "l=1;\n", + "h0=6.625*10**-34; #planck constant\n", + "c=3*10**8; #velocity of light(m/s)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "\n", + "#Calculation\n", + "theta=theta*math.pi/180; #angle(radian)\n", + "a=(n*A/(N*rho))**(1/3);\n", + "d=a*10**10/math.sqrt(h**2+k**2+l**2); \n", + "lamda=2*d*math.sin(theta); #wavelength of x rays(angstrom)\n", + "E=h0*c/(lamda*10**-10*e); #energy of x rays(eV)\n", + "\n", + "#Result\n", + "print \"wavelength of x rays is\",round(lamda,3),\"angstrom\"\n", + "print \"answer varies due to rounding off errors\"\n", + "print \"energy of x rays is\",int(E/10**3),\"*10**3 eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 5, Page number 2.23" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "density is 2332 kg/m**3\n", + "answer varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n=8; #number of atoms\n", + "r=2.351*10**-10; #bond length(angstrom)\n", + "A=28.09; #Atomic wt. of NaCl\n", + "N=6.02*10**26 #Avagadro number\n", + "\n", + "#Calculation\n", + "a=4*r/math.sqrt(3); \n", + "rho=n*A/(N*a**3); #density(kg/m**3)\n", + "\n", + "#Result\n", + "print \"density is\",int(rho),\"kg/m**3\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 6, Page number 2.24" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "radius of largest sphere is 0.1547 r\n", + "maximum radius of sphere is 0.414 r\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from sympy import Symbol\n", + "\n", + "#Variable declaration\n", + "r=Symbol('r')\n", + "\n", + "#Calculation\n", + "a1=4*r/math.sqrt(3);\n", + "R1=(a1/2)-r; #radius of largest sphere\n", + "a2=4*r/math.sqrt(2);\n", + "R2=(a2/2)-r; #maximum radius of sphere\n", + "\n", + "#Result\n", + "print \"radius of largest sphere is\",round(R1/r,4),\"r\"\n", + "print \"maximum radius of sphere is\",round(R2/r,3),\"r\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 7, Page number 2.25" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percent volume change is 0.5 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "r1=1.258*10**-10; #radius(m)\n", + "r2=1.292*10**-10; #radius(m)\n", + "\n", + "#Calculation\n", + "a_bcc=4*r1/math.sqrt(3);\n", + "v=a_bcc**3;\n", + "V1=v/2;\n", + "a_fcc=2*math.sqrt(2)*r2;\n", + "V2=a_fcc**3/4;\n", + "V=(V1-V2)*100/V1; #percent volume change is\",V,\"%\"\n", + "\n", + "#Result\n", + "print \"percent volume change is\",round(V,1),\"%\"" + ] + } + ], + "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 +} |