summaryrefslogtreecommitdiff
path: root/Modern_Physics_by_R_A_Serway/16-Cosmology.ipynb
diff options
context:
space:
mode:
authorprashantsinalkar2020-04-14 10:19:27 +0530
committerprashantsinalkar2020-04-14 10:23:54 +0530
commit476705d693c7122d34f9b049fa79b935405c9b49 (patch)
tree2b1df110e24ff0174830d7f825f43ff1c134d1af /Modern_Physics_by_R_A_Serway/16-Cosmology.ipynb
parentabb52650288b08a680335531742a7126ad0fb846 (diff)
downloadall-scilab-tbc-books-ipynb-476705d693c7122d34f9b049fa79b935405c9b49.tar.gz
all-scilab-tbc-books-ipynb-476705d693c7122d34f9b049fa79b935405c9b49.tar.bz2
all-scilab-tbc-books-ipynb-476705d693c7122d34f9b049fa79b935405c9b49.zip
Initial commit
Diffstat (limited to 'Modern_Physics_by_R_A_Serway/16-Cosmology.ipynb')
-rw-r--r--Modern_Physics_by_R_A_Serway/16-Cosmology.ipynb90
1 files changed, 90 insertions, 0 deletions
diff --git a/Modern_Physics_by_R_A_Serway/16-Cosmology.ipynb b/Modern_Physics_by_R_A_Serway/16-Cosmology.ipynb
new file mode 100644
index 0000000..8b5cd2f
--- /dev/null
+++ b/Modern_Physics_by_R_A_Serway/16-Cosmology.ipynb
@@ -0,0 +1,90 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 16: Cosmology"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.1: Hubbles_law.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Scilab code Ex16.1: Pg 15 (2005)\n",
+"clc; clear;\n",
+"c = 3e+05; // Velocity of light, km/s\n",
+"v = c/4; // Recessional velocity, km/s\n",
+"H_0 = 20e-06; // Hubble's constant, km/s/lightyear\n",
+"// From Hubble's law, v = H_o*R_max, solving for R_max\n",
+"R_max = v/H_0; // Maximum distance at which Hubble's law applies without relativistic correction, lightyears\n",
+"printf('\nThe maximum distance at which Hubbles law applies without relativistic correction = %1.0e ly', R_max);\n",
+"printf('\n');\n",
+"\n",
+"// Result\n",
+"// The maximum distance at which Hubbles law applies without relativistic correction = 4e+09 ly"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.2: Critical_density_of_universe.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Scilab code Ex16.2: Pg 22 (2005)\n",
+"clc; clear;\n",
+"H = 23e-03/(9.46e15); // Hubble's constant, km/s/ly\n",
+"G = 6.67e-11; // Gravitational constant, N-m^2/kg^2\n",
+"// Since H^2 = (8*%pi*G*p_c)/3, solving for p_c\n",
+"p_c = (3*H^2)/(8*%pi*G); // Critical mass density of universe, kg/m^3\n",
+"printf('\nCritical mass density of universe = %4.2e kg per metre cube', p_c);\n",
+"\n",
+"\n",
+"// Result\n",
+"// Critical mass density of universe = %1.06e-27 kg/m^3"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}