summaryrefslogtreecommitdiff
path: root/2795/CH16
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /2795/CH16
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '2795/CH16')
-rwxr-xr-x2795/CH16/EX16.1/Ex16_01.sce8
-rwxr-xr-x2795/CH16/EX16.2/Ex16_02.sce15
-rwxr-xr-x2795/CH16/EX16.3/Ex16_03.sce15
-rwxr-xr-x2795/CH16/EX16.4/Ex16_04.sce16
-rwxr-xr-x2795/CH16/EX16.5/Ex16_05.sce14
-rwxr-xr-x2795/CH16/EX16.6/Ex16_06.jpgbin0 -> 37416 bytes
-rwxr-xr-x2795/CH16/EX16.6/Ex16_06.sce16
-rwxr-xr-x2795/CH16/EX16.7/Ex16_07.sce11
-rwxr-xr-x2795/CH16/EX16.8/Ex16_08.sce10
-rwxr-xr-x2795/CH16/EX16.9/Ex16_09.sce8
10 files changed, 113 insertions, 0 deletions
diff --git a/2795/CH16/EX16.1/Ex16_01.sce b/2795/CH16/EX16.1/Ex16_01.sce
new file mode 100755
index 000000000..e9fa32166
--- /dev/null
+++ b/2795/CH16/EX16.1/Ex16_01.sce
@@ -0,0 +1,8 @@
+// Scilab Code Ex16.1: Page-581(2014)
+clc; clear;
+H0 = 22; // Value of Hubble constant, km/s per million ly
+parsec = 3.26; // The value of 1 parsec, light years
+printf("\nThe value of Hubble constant = %d km/s per Mpc", ceil(H0*parsec));
+
+// Result
+// The value of Hubble constant = 72 km/s per Mpc \ No newline at end of file
diff --git a/2795/CH16/EX16.2/Ex16_02.sce b/2795/CH16/EX16.2/Ex16_02.sce
new file mode 100755
index 000000000..992fa720c
--- /dev/null
+++ b/2795/CH16/EX16.2/Ex16_02.sce
@@ -0,0 +1,15 @@
+// Scilab Code Ex16.2: Page-583(2014)
+clc; clear;
+M = 1; // Let the current mass of the universe be unity
+m_u = 1; // Mass equivalent of 1 amu, u
+N_n = 2; // Number of neutrons in helium
+N_p = 2; // Number of protons in helium
+M_p = 0.75*M*m_u; // Total mass of protons
+M_He = 0.25*M*m_u; // Total mass of helium
+N_fp = M_p/M_He*(N_n + N_p); // Total number of free protons for every He-4
+N_P = N_fp + N_p; // Total number of protons per He-4
+ratio = N_P/N_n; // Current ratio of protons to the neutrons in the universe
+printf("\nThe current ratio of protons to the neutrons in the universe = %d", ratio);
+
+// Result
+// The current ratio of protons to the neutrons in the universe = 7 \ No newline at end of file
diff --git a/2795/CH16/EX16.3/Ex16_03.sce b/2795/CH16/EX16.3/Ex16_03.sce
new file mode 100755
index 000000000..ce509efab
--- /dev/null
+++ b/2795/CH16/EX16.3/Ex16_03.sce
@@ -0,0 +1,15 @@
+// Scilab Code Ex16.3: Page-587(2014)
+clc; clear;
+m_n = 939.566; // Rest mass of the neutron, MeV/c^2
+m_p = 938.272; // Rest mass of the proton, MeV/c^2
+e = 1.6e-019; // Energy equivalent of 1 eV, J
+c = 1; // For simplicity assume speed of light of light to be unity
+T = 1e+010; // Temperature of the universe, K
+delta_m = m_n - m_p; // Mass difference between a proton and a neutron, MeV/c^2
+k = 1.38e-023; // Boltzmann constant, J/k
+// As from Maxwell-Boltzmann distribution from thermodynamics, N = exp(-m*c^2/(k*T)), so
+ratio = exp(delta_m*c^2*1e+006*e/(k*T)); // Ratio of protons to neutrons in the universe at 10 billion kelvin
+printf("\nThe ratio of protons to neutrons in the universe at 10 billion kelvin = %3.1f", ratio);
+
+// Result
+// The ratio of protons to neutrons in the universe at 10 billion kelvin = 4.5 \ No newline at end of file
diff --git a/2795/CH16/EX16.4/Ex16_04.sce b/2795/CH16/EX16.4/Ex16_04.sce
new file mode 100755
index 000000000..64ec97a01
--- /dev/null
+++ b/2795/CH16/EX16.4/Ex16_04.sce
@@ -0,0 +1,16 @@
+// Scilab Code Ex16.4: Page-589(2014)
+clc; clear;
+M = 1.99e+030; // Mass of the sun, kg
+G = 6.67e-011; // Universal gravitational constant, N-Sq.m/kg^2
+k = 1.38e-023; // Boltzmann constant, J/K
+R = 6.96e+008; // Radius of the sun, m
+m = 1.67e-027; // Rest mass of the proton, kg
+PE = 3/5*(G*M^2/R); // Self potential energy of the sun, J
+// As KE = 1/3*(M/m_p)*m_p*v^2, solving for v
+v = sqrt(2*PE/M); // Velocity of a proton inside the sun, m/s
+// From kinetic theory of gases, v = sqrt(3*k*T/m), solving for T
+T = m*v^2/(3*k); // The mean temperature of the sun, K
+printf("\nThe mean temperature of the sun = %1.0e K", T);
+
+// Result
+// The mean temperature of the sun = 9e+006 K \ No newline at end of file
diff --git a/2795/CH16/EX16.5/Ex16_05.sce b/2795/CH16/EX16.5/Ex16_05.sce
new file mode 100755
index 000000000..820e917fa
--- /dev/null
+++ b/2795/CH16/EX16.5/Ex16_05.sce
@@ -0,0 +1,14 @@
+// Scilab Code Ex16.5: Page-590(2014)
+clc; clear;
+M_sun = 1.99e+030; // Mass of the sun, kg
+m_n = 1.675e-027; // Rest mass of the neutron, kg
+h = 6.62e-034; // Planck's constant, Js
+h_bar = h/(2*%pi); // Planck's constant, Js
+G = 6.67e-011; // Universal gravitational constant, N-Sq.m/kg^2
+N = 2*M_sun/m_n; // Number of neutrons in the neutron star
+V = (6.5*h_bar^2/(N^(1/3)*m_n^3*G))^3; // Volume of the neutron star, metre cube
+R = (3/(4*%pi)*V)^(1/3); // The radius of neutron star, m
+printf("\nThe radius of the neutron star of 2 solar masses = %d km", ceil(R/1e+003));
+
+// Result
+// The radius of the neutron star of 2 solar masses = 11 km \ No newline at end of file
diff --git a/2795/CH16/EX16.6/Ex16_06.jpg b/2795/CH16/EX16.6/Ex16_06.jpg
new file mode 100755
index 000000000..ca48364ee
--- /dev/null
+++ b/2795/CH16/EX16.6/Ex16_06.jpg
Binary files differ
diff --git a/2795/CH16/EX16.6/Ex16_06.sce b/2795/CH16/EX16.6/Ex16_06.sce
new file mode 100755
index 000000000..9c8e437c1
--- /dev/null
+++ b/2795/CH16/EX16.6/Ex16_06.sce
@@ -0,0 +1,16 @@
+// Scilab Code Ex16.6: Page-598(2014)
+clc; clear;
+c = 1; // Assume speed of light to be unity
+clf();
+v = [0:0.01:0.92]';
+bita = v/c; // Recession velocity ratio
+for i = 1:1:93
+ red_shift(i) = sqrt((1+bita(i))/(1-bita(i)))-1;
+end
+plot(bita, red_shift);
+title('The relation between Redshift and recession velocity', 'fontsize', 4, 'color','red', 'position', [0.02, 4.1]);
+xlabel('Recession velocity (beta = v/c)', 'fontsize', 3, 'color', 'green');
+ylabel('Redshift', 'fontsize', 3, 'color', 'green');
+
+// Result
+// The plot between Redshift vs recession velocity is as shown in the Fig. \ No newline at end of file
diff --git a/2795/CH16/EX16.7/Ex16_07.sce b/2795/CH16/EX16.7/Ex16_07.sce
new file mode 100755
index 000000000..0332a4f0b
--- /dev/null
+++ b/2795/CH16/EX16.7/Ex16_07.sce
@@ -0,0 +1,11 @@
+// Scilab Code Ex16.7: Page-598(2014)
+clc; clear;
+c = 1; // For simplicity assume speed of light to be unity, m/s
+d = 1.6e+005; // Distance of the supernova 1987A from the earth, ly
+m = 16; // Mass of heavier neutrino, eV/c^2;
+E = 20e+006; // Energy of the neutrino, eV
+delta_t = d/(2*c)*(m/E)^2; // Difference between the travel times of the lighter and the massive neutrinos, y
+printf("\nThe difference between the travel times of the lighter and the massive neutrinos = %3.1f s", delta_t*(365.25*24*60*60));
+
+// Result
+// The difference between the travel times of the lighter and the massive neutrinos = 1.6 s \ No newline at end of file
diff --git a/2795/CH16/EX16.8/Ex16_08.sce b/2795/CH16/EX16.8/Ex16_08.sce
new file mode 100755
index 000000000..ae1b11700
--- /dev/null
+++ b/2795/CH16/EX16.8/Ex16_08.sce
@@ -0,0 +1,10 @@
+// Scilab Code Ex16.8: Page-602(2014)
+clc; clear;
+c = 3.00e+008; // Speed of light, m/s
+H = 22; // Hubble constant, km/s per million ly
+G = 6.67e-011; // Universal gravitational constant, N-Sq.m/kg^2
+rho_c = 3/(8*%pi)*H^2/G*1e+003/(c*365.25*24*60*60*1e+006)^2; // The critical density of the universe, g/cc
+printf("\nThe critical density of the universe = %3.1e g/cc", rho_c);
+
+// Result
+//The critical density of the universe = 9.7e-030 g/cc \ No newline at end of file
diff --git a/2795/CH16/EX16.9/Ex16_09.sce b/2795/CH16/EX16.9/Ex16_09.sce
new file mode 100755
index 000000000..c9209ff5c
--- /dev/null
+++ b/2795/CH16/EX16.9/Ex16_09.sce
@@ -0,0 +1,8 @@
+// Scilab Code Ex16.9: Page-604(2014)
+clc; clear;
+H0 = 71; // Hubble cinstant, km/s per Mpc
+tau = 1/H0*1e+006*3.26*9.46e+012/3.16e+007; // The upper limit of the age of the universe, y
+printf("\nThe upper limit of the age of the universe = %4.2e y", tau);
+
+// Result
+// The upper limit of the age of the universe = 1.37e+010 y \ No newline at end of file