summaryrefslogtreecommitdiff
path: root/Material_Science/material_science_ch_5.ipynb
blob: 8213c1190f976a8095fbba04977f57525e4a523d (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
{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 5: Crystal Imperfections"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.1, page no-130"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Average distance between dislocations\n",
      "\n",
      "import math \n",
      "#variable Declarat\n",
      "a=3.615*10**-10            # interatomic distance of copper\n",
      "t_ang=0.75                 # angle of tilting\n",
      "h=1.0                      # Miller indices wrt X-axis\n",
      "k=1.0                      # Miller indices wrt Y-axis\n",
      "l=0.0                      # Miller indices wrt Z-axis\n",
      "\n",
      "#calculation\n",
      "d_110=a/math.sqrt(h**2+k**2+l**2)\n",
      "D=d_110/math.tan(t_ang*math.pi/(180*2))\n",
      "\n",
      "#Result\n",
      "print('The average distance between the dislocations is %.3f A\u00b0'%(D*10**6))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The average distance between the dislocations is 0.039 A\u00b0\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.2, page no-130"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Schottky defects per unit cell\n",
      "\n",
      "import math\n",
      "#variable declaration\n",
      "lp=4.0185*10**-10          # lattice parameter\n",
      "dens=4285.0                # Density of CsCl in kg/m^3\n",
      "avg=6.022*10**26           # Avogadro's number\n",
      "wt_cs=132.9                # Molecular weight of Cs\n",
      "wt_cl=35.5                 # Molecular weight of Cl\n",
      "\n",
      "#calculations\n",
      "N=(dens*avg*lp**3)/(wt_cs+wt_cl)\n",
      "sd=(1-N)*100.0/1.0\n",
      "\n",
      "#Result\n",
      "print('The number of Schottky defects per unit cell = %.3f%%'%sd)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The number of Schottky defects per unit cell = 0.565%\n"
       ]
      }
     ],
     "prompt_number": 1
    }
   ],
   "metadata": {}
  }
 ]
}