diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /623/CH27/EX5.5.2/U5_C5_2.sce | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '623/CH27/EX5.5.2/U5_C5_2.sce')
-rwxr-xr-x | 623/CH27/EX5.5.2/U5_C5_2.sce | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/623/CH27/EX5.5.2/U5_C5_2.sce b/623/CH27/EX5.5.2/U5_C5_2.sce new file mode 100755 index 000000000..5e712bd26 --- /dev/null +++ b/623/CH27/EX5.5.2/U5_C5_2.sce @@ -0,0 +1,21 @@ +//function for calculating the energy level
+function[energy]=F(j)
+ energy=a*j*(j+1);
+endfunction
+
+//variable initialization
+m=1.6738*10^-27; //mass of hydrogen atom (kg)
+r=0.74*10^-10; //intermolecular distance of hydrogen molecule (meter)
+h=1.054*10^-34; //Planck's constant (joule second)
+e=1.6*10^-19; //Charge of electron (coulombs)
+
+//calculation of rotational energy levels
+mu=m/2; //reduced mass of hydrogen atom (kg)
+I=mu*r^2; //moment of inertia of molecule (kg meter^2)
+a=h^2/(2*I*e); //constant (eV)
+E0=F(0); //energy of level 0 (eV)
+E1=F(1); //energy of level 1 (eV)
+E2=F(2); //energy of level 2 (eV)
+E3=F(3); //energy of level 3 (eV)
+
+printf("\nE0 = %.0f\nE1 = %.2e eV\nE2 = %.2e eV\nE3 = %.2e eV",E0,E1,E2,E3);
|