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
|
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 1: Basic Ideas: Energy Bands in Solids"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 1, Page 8"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"\n",
"#Variable decalaration\n",
"pd = 100 #potential difference, V\n",
"m0=9.11*(10**-31);#m0=rest mass of the electron in kg\n",
"\n",
"#Calculations&Results\n",
"#solving final velocity of the electron\n",
"Ek=1.6*(10**-19)*pd;#Ek=final kinetic energy of electron in Joules\n",
"print \"Final kinetic energy = %.1e J,%.f eV\"%(Ek,Ek*6.242*10**18)\n",
"v=math.sqrt((2*Ek)/m0)#v=final velocity of the electron\n",
"print \"Final velocity = %.3e m/s\"%v"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Final kinetic energy = 1.6e-17 J,100 eV\n",
"Final velocity = 5.927e+06 m/s\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 2, Page 8"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"\n",
"#Variable declaration\n",
"m=7360*9.11*(10**-31);#m=mass of the ion in kg\n",
"q=2*1.6*(10**-19);#q=charge of the ion in Coulomb\n",
"V=2000;#V=potential difference in Volt\n",
"\n",
"#Calculations&Results\n",
"#solving velocity & kinetic energy of the ion\n",
"v=math.sqrt((2*q*V)/m)#v=velocity of the ion\n",
"print \"Velocity acquired by the ion = %.3e m/s\"%v\n",
"Ek=(1./2)*m*(v**2)#Ek=kinetic energy of the ion\n",
"print \"Kinetic energy of ion = %.1e J = %.f eV\"%(Ek,Ek*6.242*10**18)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Velocity acquired by the ion = 4.369e+05 m/s\n",
"Kinetic energy of ion = 6.4e-16 J = 3995 eV\n"
]
}
],
"prompt_number": 2
}
],
"metadata": {}
}
]
}
|