summaryrefslogtreecommitdiff
path: root/Modern_Physics/Chapter16.ipynb
blob: 7a4a153bb23eb3a32964b9c1db1f3fc8151058d3 (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
{
 "metadata": {
  "name": "Chapter16",
  "signature": "sha256:8da1ca227cbd2fcd5141a76f92c8c3cee05db901d462b1e82e4eb0345baf65a5"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 16:Cosmology: Origin and Fate of Universe"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 16.1 Page 529"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#initiation of variable\n",
      "from math import log\n",
      "N2=0.25;N1=0.75;                                #various given values\n",
      "L2=1.0;L1=0.0;\n",
      "E1_E2=-4.7*(10**-4);                             #Energy difference\n",
      "\n",
      "#calculation\n",
      "a=(N2/N1); b=(((2*L2)+1)/((2*L1)+1));c=E1_E2; #various terms involved in the formula of ratio of population\n",
      "kT=(c/log(a/b));                              #value of k*T\n",
      "k=0.0000856;                                 #constant\n",
      "T=kT/k;                 #temperature of interstellar space\n",
      "\n",
      "#result\n",
      "print \"The temperature of interstellar space was found out to be in K\",round(T,3);"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The temperature of interstellar space was found out to be in K 2.499\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 16.2 Page 536"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#initiation of variable\n",
      "mc2=940.0*10**6; k=8.6*10**-5; #various constants and given values in suitable units\n",
      "\n",
      "#calculation\n",
      "T= mc2/k;       #temperature of the photons\n",
      "\n",
      "#result\n",
      "print \"The temperature of the photons must be in K %.1e\" %round(T,3);\n",
      "\n",
      "#part2\n",
      "t=((1.5*10**10)/T)**2;       #age of universe when the photons have the above temperature\n",
      "\n",
      "#result\n",
      "print\"The age of the universe for the temperature of the photon to be as obtained above in seconds is %.0e\" %t;"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The temperature of the photons must be in K 1.1e+13\n",
        "The age of the universe for the temperature of the photon to be as obtained above in seconds is 2e-06\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 16.3 Page 539"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#initiation of variable\n",
      "from math import exp\n",
      "k=8.62*10**-5; #various values and constants\n",
      "T= 1.5*10**10;\n",
      "delE=1.3*10**6;\n",
      "\n",
      "#calculation\n",
      "a= delE/(k*T);  #exponent in boltzmann factor\n",
      "b=exp(-a);        #ratio of neutron to protons\n",
      "r=(1/(1+b))*100;     #relative number of protons\n",
      "\n",
      "#result\n",
      "print\"The percentage of protons is\",round(r),\" neutrons is \",round(100-r);"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The percentage of protons is 73.0  neutrons is  27.0\n"
       ]
      }
     ],
     "prompt_number": 6
    }
   ],
   "metadata": {}
  }
 ]
}