summaryrefslogtreecommitdiff
path: root/sample_notebooks/kartiksankhla/Chapter2.ipynb
blob: 21f2d4c4e462eaf29896d5f830fed17c0db55e85 (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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
{
 "metadata": {
  "name": "",
  "signature": "sha256:e984fee9b841dd6e9b7eedf1533b0a0d297cd9f484c047f051ce48a09b156826"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter2-Nuclear Engineering"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex1-pg54"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "## Example 2.1\n",
      "import math\n",
      "#determine atoms in deuterium\n",
      "## Given data\n",
      "atom_h = 6.6*10**24;                      ## Number of atoms in Hydrogen\n",
      "## Using the data given in Table II.2, Appendix II for isotropic abundance of deuterium\n",
      "isoab_H2 = 0.015;                        ## Isotropic abundance of deuterium\n",
      "## Calculation\n",
      "totatom_d=(isoab_H2*atom_h)/100.;\n",
      "## Result\n",
      "print\"%s %.2e %s \"%('\\n Number of deuterium atoms = ',totatom_d,'');\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        " Number of deuterium atoms =  9.90e+20  \n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex2-pg54"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "## Example 2.2\n",
      "import math\n",
      "#determine atomic weight of oxygen\n",
      "## Given data \n",
      "## Using the data given in the example 2.2\n",
      "atwt_O16 = 15.99492;                      ## Atomic weight of O-16 isotope\n",
      "isoab_O16 = 99.759;                       ## Abundance of O-16 isotope\n",
      "atwt_O17 = 16.99913;                      ## Atomic weight of O-17 isotope\n",
      "isoab_O17 = 0.037;                        ## Abundance of O-17 isotope\n",
      "atwt_O18 = 17.99916;                      ## Atomic weight of O-18 isotope\n",
      "isoab_O18 = 0.204;                        ## Abundance of O-18 isotope\n",
      "## Calculation\n",
      "atwt_O=(isoab_O16*atwt_O16 + isoab_O17*atwt_O17 + isoab_O18*atwt_O18)/100.;\n",
      "## Result\n",
      "print\"%s %.2f %s \"%('\\n Atomic Weight of Oxygen = ',atwt_O,'');\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        " Atomic Weight of Oxygen =  16.00  \n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex3-pg55"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "## Example 2.3\n",
      "import math\n",
      "#determine rest mass energy of electron\n",
      "## Given data\n",
      "me = 9.1095*10**(-28);                     ## Mass of electron in grams\n",
      "c = 2.9979*10**10;                         ## Speed of light in vacuum in cm/sec\n",
      "## Calculation\n",
      "rest_mass = me*c**2;\n",
      "## Result\n",
      "print\"%s %.2e %s \"%('\\n Rest mass energy of electron = ',rest_mass,' ergs\\n');\n",
      "print('Expressing the result in joules')\n",
      "## 1 Joule = 10^(-7)ergs\n",
      "rest_mass_j = rest_mass*10**(-7);\n",
      "print\"%s %.2e %s \"%('\\n Rest mass energy of electron = ',rest_mass_j,' joules\\n');\n",
      "print('Expressing the result in MeV')\n",
      "## 1 MeV = 1.6022*10^(-13)joules\n",
      "rest_mass_mev = rest_mass_j/(1.6022*10**(-13));\n",
      "print\"%s %.2f %s \"%('\\n Rest mass energy of electron = ',rest_mass_mev,' MeV\\n');\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        " Rest mass energy of electron =  8.19e-07  ergs\n",
        " \n",
        "Expressing the result in joules\n",
        "\n",
        " Rest mass energy of electron =  8.19e-14  joules\n",
        " \n",
        "Expressing the result in MeV\n",
        "\n",
        " Rest mass energy of electron =  0.51  MeV\n",
        " \n"
       ]
      }
     ],
     "prompt_number": 4
    }
   ],
   "metadata": {}
  }
 ]
}