summaryrefslogtreecommitdiff
path: root/1535/CH10/EX10.1/Ch10Ex1.sci
diff options
context:
space:
mode:
Diffstat (limited to '1535/CH10/EX10.1/Ch10Ex1.sci')
-rwxr-xr-x1535/CH10/EX10.1/Ch10Ex1.sci13
1 files changed, 13 insertions, 0 deletions
diff --git a/1535/CH10/EX10.1/Ch10Ex1.sci b/1535/CH10/EX10.1/Ch10Ex1.sci
new file mode 100755
index 000000000..d45ba2bb9
--- /dev/null
+++ b/1535/CH10/EX10.1/Ch10Ex1.sci
@@ -0,0 +1,13 @@
+// Scilab Code Ex10.1: Page-222 (2010)
+k = 1.38e-023; // Boltzmann constant, J/K
+e = 1.6e-019; // Energy equivalent of 1 eV, J/eV
+g1 = 2; // The degeneracy of ground state
+g2 = 8; // The degeneracy of excited state
+delta_E = 10.2; // Energy of excited state above the ground state, eV
+T = 6000; // Temperature of the state, K
+D_ratio = g2/g1; // Ratio of degeneracy of states
+N_ratio = D_ratio*exp(-delta_E/(k*T/e)); // Ratio of occupancy of the excited to the ground state
+printf("\nThe ratio of occupancy of the excited to the ground state at %d K = %4.2e", T, N_ratio);
+
+// Result
+// The ratio of occupancy of the excited to the ground state at 6000 K = 1.10e-008 \ No newline at end of file