summaryrefslogtreecommitdiff
path: root/Engineering_Physics_by_Rajendran/Chapter13.ipynb
diff options
context:
space:
mode:
authorhardythe12015-07-03 12:23:43 +0530
committerhardythe12015-07-03 12:23:43 +0530
commit9d260e6fae7328d816a514130b691fbd0e9ef81d (patch)
tree9e6035702fca0f6f8c5d161de477985cacad7672 /Engineering_Physics_by_Rajendran/Chapter13.ipynb
parentafcd9e5397e3e1bde0392811d0482d76aac391dc (diff)
downloadPython-Textbook-Companions-9d260e6fae7328d816a514130b691fbd0e9ef81d.tar.gz
Python-Textbook-Companions-9d260e6fae7328d816a514130b691fbd0e9ef81d.tar.bz2
Python-Textbook-Companions-9d260e6fae7328d816a514130b691fbd0e9ef81d.zip
add/remove books
Diffstat (limited to 'Engineering_Physics_by_Rajendran/Chapter13.ipynb')
-rwxr-xr-xEngineering_Physics_by_Rajendran/Chapter13.ipynb210
1 files changed, 210 insertions, 0 deletions
diff --git a/Engineering_Physics_by_Rajendran/Chapter13.ipynb b/Engineering_Physics_by_Rajendran/Chapter13.ipynb
new file mode 100755
index 00000000..27d1caad
--- /dev/null
+++ b/Engineering_Physics_by_Rajendran/Chapter13.ipynb
@@ -0,0 +1,210 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:7f366d2ca1671042b1f87ae7b598f1c0353e6f5b6feadb85488043da7746af76"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "13: Crystal Structure"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 13.2, Page number 20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "rho=9.6*10**2; #density of Na(kg/m**3)\n",
+ "aw=23; #atomic weight\n",
+ "n=2; #number of atoms in a unit cell\n",
+ "N=6.022*10**26;\n",
+ "\n",
+ "#Calculation\n",
+ "a3=n*aw/(N*rho);\n",
+ "a=a3**(1/3); #lattice constant of Na(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"lattice constant of Na is\",round(a*10**10,1),\"angstrom\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "lattice constant of Na is 4.3 angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 13.3, Page number 20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "rho=4*10**3; #density of CsCl(kg/m**3)\n",
+ "aw1=132.9; #atomic weight of Cs\n",
+ "aw2=35.5; #atomic weight of Cl\n",
+ "a=4.12*10**-10; #lattice constant(m)\n",
+ "n=1; #number of atoms in a unit cell\n",
+ "\n",
+ "#Calculation\n",
+ "m=rho*(a**3); #mass of CsCl unit cell(kg)\n",
+ "N=n*(aw1+aw2)/m; #avagadro constant(per kg mole)\n",
+ "\n",
+ "#Result\n",
+ "print \"avagadro constant is\",round(N/10**26,4),\"*10**26 per kg mole\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "avagadro constant is 6.0199 *10**26 per kg mole\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 13.8, Page number 24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=4.12*10**-10; #lattice constant(m)\n",
+ "h1=1;\n",
+ "k1=1;\n",
+ "l1=1; #for (111) plane\n",
+ "h2=1;\n",
+ "k2=1;\n",
+ "l2=2; #for (112) plane\n",
+ "h3=1;\n",
+ "k3=2;\n",
+ "l3=3; #for (123) plane\n",
+ "\n",
+ "#Calculation\n",
+ "d111=a/math.sqrt(h1**2+k1**2+l1**2); #lattice spacing for plane (111)(m)\n",
+ "d112=a/math.sqrt(h2**2+k2**2+l2**2); #lattice spacing for plane (112)(m)\n",
+ "d123=a/math.sqrt(h3**2+k3**2+l3**2); #lattice spacing for plane (123)(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"lattice spacing for plane (111) is\",round(d111*10**10,4),\"*10**-10 m\"\n",
+ "print \"lattice spacing for plane (112) is\",round(d112*10**10,3),\"*10**-10 m\"\n",
+ "print \"lattice spacing for plane (123) is\",round(d123*10**10,4),\"*10**-10 m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "lattice spacing for plane (111) is 2.3787 *10**-10 m\n",
+ "lattice spacing for plane (112) is 1.682 *10**-10 m\n",
+ "lattice spacing for plane (123) is 1.1011 *10**-10 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 13.9, Page number 24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "a=1; #assume\n",
+ "h1=1;\n",
+ "k1=0;\n",
+ "l1=0; #for (100) plane\n",
+ "h2=1;\n",
+ "k2=1;\n",
+ "l2=0; #for (110) plane\n",
+ "h3=1;\n",
+ "k3=1;\n",
+ "l3=1; #for (111) plane\n",
+ "\n",
+ "#Calculation\n",
+ "d100=a/math.sqrt(h1**2+k1**2+l1**2); #lattice spacing for plane (100)\n",
+ "d110=a/math.sqrt(h2**2+k2**2+l2**2); #lattice spacing for plane (110)\n",
+ "d111=a/math.sqrt(h3**2+k3**2+l3**2); #lattice spacing for plane (111)\n",
+ "\n",
+ "#Result\n",
+ "print \"ratio of lattice spacing is d100:d110:d111=\",d100,\":\",round(d110,2),\":\",round(d111,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ratio of lattice spacing is d100:d110:d111= 1.0 : 0.71 : 0.58\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file