summaryrefslogtreecommitdiff
path: root/Modern_Physics/Chapter16_2.ipynb
diff options
context:
space:
mode:
authorhardythe12015-04-07 15:58:05 +0530
committerhardythe12015-04-07 15:58:05 +0530
commit92cca121f959c6616e3da431c1e2d23c4fa5e886 (patch)
tree205e68d0ce598ac5caca7de839a2934d746cce86 /Modern_Physics/Chapter16_2.ipynb
parentb14c13fcc6bb6d01c468805d612acb353ec168ac (diff)
downloadPython-Textbook-Companions-92cca121f959c6616e3da431c1e2d23c4fa5e886.tar.gz
Python-Textbook-Companions-92cca121f959c6616e3da431c1e2d23c4fa5e886.tar.bz2
Python-Textbook-Companions-92cca121f959c6616e3da431c1e2d23c4fa5e886.zip
added books
Diffstat (limited to 'Modern_Physics/Chapter16_2.ipynb')
-rwxr-xr-xModern_Physics/Chapter16_2.ipynb83
1 files changed, 83 insertions, 0 deletions
diff --git a/Modern_Physics/Chapter16_2.ipynb b/Modern_Physics/Chapter16_2.ipynb
new file mode 100755
index 00000000..3d17f95b
--- /dev/null
+++ b/Modern_Physics/Chapter16_2.ipynb
@@ -0,0 +1,83 @@
+{
+ "metadata": {
+ "name": "MP-16"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "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\nfrom math import log\nN2=0.25;N1=0.75; #various given values\nL2=1.0;L1=0.0;\nE1_E2=-4.7*(10**-4); #Energy difference\n\n#calculation\na=(N2/N1); b=(((2*L2)+1)/((2*L1)+1));c=E1_E2; #various terms involved in the formula of ratio of population\nkT=(c/log(a/b)); #value of k*T\nk=0.0000856; #constant\nT=kT/k; #temperature of interstellar space\n\n#result\nprint \"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\nmc2=940.0*10**6; k=8.6*10**-5; #various constants and given values in suitable units\n\n#calculation\nT= mc2/k; #temperature of the photons\n\n#result\nprint \"The temperature of the photons must be in K %.1e\" %round(T,3);\n\n#part2\nt=((1.5*10**10)/T)**2; #age of universe when the photons have the above temperature\n\n#result\nprint\"The age of the universe for the temperature of the photon to be as obtained above in seconds is %.01e\" %t;",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "The temperature of the photons must be in K 1.1e+13\nThe age of the universe for the temperature of the photon to be as obtained above in seconds is 1.883318e-06\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example 16.3 Page 539"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#initation of variable\nfrom math import exp\nk=8.62*10**-5; #various values and constants\nT= 1.5*10**10;\ndelE=1.3*10**6;\n\n#calculation\na= delE/(k*T); #exponent in boltzmann factor\nb=exp(-a); #ratio of neutron to protons\nr=(1/(1+b))*100; #relative number of protons\n\n#result\nprint\"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": {}
+ }
+ ]
+} \ No newline at end of file