summaryrefslogtreecommitdiff
path: root/Applied_Physics/Chapter3.ipynb
blob: 763a53c2a12a64af4d270de9698d1b7f589f9ac0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
{
 "metadata": {
  "name": "",
  "signature": "sha256:1ec2372be7a9974010a31557c9658c85707025e7a87f82e6ef26be63dbcfb0e7"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 3:Planes in Crystals"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.11 , Page no:61"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#given\n",
      "h=3;\n",
      "k=2;\n",
      "l=1; #miller indices\n",
      "a=4.2E-8; #in cm (lattice constant)\n",
      "\n",
      "#calculate\n",
      "d=a/math.sqrt(h**2+k**2+l**2); #calculation for interplanar spacing\n",
      "d=d*1E8; #changing unit from cm to Angstrom\n",
      "\n",
      "#result\n",
      "print\"The interplanar spacing is d=\",round(d,2),\"cm\";\n",
      "print\"\\t\\t\\t   d=\",round(d,2),\"Angstrom\";"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The interplanar spacing is d= 1.12 cm\n",
        "\t\t\t   d= 1.12 Angstrom\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.12 , Page no:61"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#given\n",
      "h=1;k=1;l=1; #miller indices\n",
      "a=2.5;b=2.5;c=1.8; #in Angstrom (lattice constants for tetragonal lattice )\n",
      "\n",
      "#calculate\n",
      "d=1/math.sqrt((h/a)**2+(k/b)**2+(l/c)**2); #calculation for interplanar spacing\n",
      "\n",
      "#result\n",
      "print\"The lattice spacing is d=\",round(d,2),\"Angstrom\";"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The lattice spacing is d= 1.26 Angstrom\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.15 , Page no:63"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#given\n",
      "h=1;k=0;l=0; #miller indices\n",
      "a=2.5; #in Angstrom (lattice constant)\n",
      "\n",
      "#calculate\n",
      "a=a*1E-10; #hence a is in Angstrom\n",
      "d=a/math.sqrt(h**2+k**2+l**2); #calculation for interplanar spacing\n",
      "p=d/a**3;\n",
      "\n",
      "#result\n",
      "print\"The density is p=\",round(p),\"lattice points/m^2\";"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The density is p= 1.6e+19 lattice points/m^2\n"
       ]
      }
     ],
     "prompt_number": 3
    }
   ],
   "metadata": {}
  }
 ]
}