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 /2411/CH6 | |
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 '2411/CH6')
-rwxr-xr-x | 2411/CH6/EX6.1/Ex6_1.sce | 17 | ||||
-rwxr-xr-x | 2411/CH6/EX6.10/Ex6_10.sce | 9 | ||||
-rwxr-xr-x | 2411/CH6/EX6.11/Ex6_11.sce | 16 | ||||
-rwxr-xr-x | 2411/CH6/EX6.12/Ex6_12.sce | 11 | ||||
-rwxr-xr-x | 2411/CH6/EX6.13/Ex6_13.sce | 14 | ||||
-rwxr-xr-x | 2411/CH6/EX6.6/Ex6_6.sce | 22 | ||||
-rwxr-xr-x | 2411/CH6/EX6.8/Ex6_8.sce | 19 | ||||
-rwxr-xr-x | 2411/CH6/EX6.9/Ex6_9.sce | 9 |
8 files changed, 117 insertions, 0 deletions
diff --git a/2411/CH6/EX6.1/Ex6_1.sce b/2411/CH6/EX6.1/Ex6_1.sce new file mode 100755 index 000000000..9c1dc0b2e --- /dev/null +++ b/2411/CH6/EX6.1/Ex6_1.sce @@ -0,0 +1,17 @@ +// Scilab Code Ex6.1: Page-345 (2008)
+clc; clear;
+n = 14; // Total number of particles
+C = 2; // Total number of compartments
+N_micro = C^n; // Total number of microstates
+n1 = [10 7 14]; // Set of number of particles in first compartment
+n2 = [4 7 0]; // Set of number of particles in second compartment
+for i = 1:1:3
+ W = factorial(n1(i) + n2(i))/(factorial(n1(i))*factorial(n2(i)));
+ P = W/N_micro;
+ printf("\nThe probability of microstate (%d, %d) = %8.6f", n1(i), n2(i), P);
+end
+
+// Result
+// The probability of microstate (10, 4) = 0.061096
+// The probability of microstate (7, 7) = 0.209473
+// The probability of microstate (14, 0) = 0.000061
\ No newline at end of file diff --git a/2411/CH6/EX6.10/Ex6_10.sce b/2411/CH6/EX6.10/Ex6_10.sce new file mode 100755 index 000000000..461bfee13 --- /dev/null +++ b/2411/CH6/EX6.10/Ex6_10.sce @@ -0,0 +1,9 @@ +// Scilab Code Ex6.10: Page-350 (2008)
+clc; clear;
+g1 = 8, g2 = 10; // Total number of cells in the first and the second compartments respectively
+n1 = 3, n2 = 4; // Given number of cells in the first and the second compartments respectively for given macrostate
+W_34 = factorial(g1)/(factorial(n1)*factorial(g1 - n1))*factorial(g2)/(factorial(n2)*factorial(g2 - n2)); // Total number of microstates in the macrostate (3, 4)
+printf("\nThe total number of microstates in the macrostate (%d, %d) = %d", n1, n2, W_34);
+
+// Result
+// The total number of microstates in the macrostate (3, 4) = 11760
\ No newline at end of file diff --git a/2411/CH6/EX6.11/Ex6_11.sce b/2411/CH6/EX6.11/Ex6_11.sce new file mode 100755 index 000000000..ad552cce3 --- /dev/null +++ b/2411/CH6/EX6.11/Ex6_11.sce @@ -0,0 +1,16 @@ +// Scilab Code Ex6.11: Page-351 (2008)
+clc; clear;
+h = 6.6e-034; // Planck's constant, Js
+m = 9.1e-031; // Mass of an electron, kg
+e = 1.6e-019; // Energy equivalent of 1 eV, J
+rho = 10.5; // Density of silver, g/cc
+A = 108; // Atomic weight of Ag, g/mole
+N_A = 6.023e+023; // Avogadro's number
+E_F0 = h^2/(8*m)*(3*N_A*rho*1e+006/(%pi*A))^(2/3); // Fermi energy of silver at 0 K, J
+U = 3/5*(N_A*rho*1e+006/A)*E_F0; // Internal energy of the electron gas per unit volume at 0 K, J/metre-cube
+printf("\nThe Fermi energy of silver at 0 K = %3.1f eV", E_F0/e);
+printf("\nThe internal energy of the electron gas per unit volume at 0 K = %4.2e J/cubic-metre", U);
+
+// Result
+// The Fermi energy of silver at 0 K = 5.5 eV
+// The internal energy of the electron gas per unit volume at 0 K = 3.07e+010 J/cubic-metre
\ No newline at end of file diff --git a/2411/CH6/EX6.12/Ex6_12.sce b/2411/CH6/EX6.12/Ex6_12.sce new file mode 100755 index 000000000..fd15014d4 --- /dev/null +++ b/2411/CH6/EX6.12/Ex6_12.sce @@ -0,0 +1,11 @@ +// Scilab Code Ex6.12: Page-351 (2008)
+clc; clear;
+h = 6.6e-034; // Planck's constant, Js
+m = 9.1e-031; // Mass of an electron, kg
+e = 1.6e-019; // Energy equivalent of 1 eV, J
+E_F0 = 5.48; // Fermi energy of silver at 0 K, eV
+N_bar = (8*m/h^2)^(3/2)*%pi/3*(E_F0*e)^(3/2); // Number density of conduction electrons in silver at 0 K, per cc
+printf("\nThe number density of conduction electrons in silver at 0 K = %3.1e per cc", N_bar*1e-006);
+
+// Result
+// The number density of conduction electrons in silver at 0 K = 5.9e+022 per cc
\ No newline at end of file diff --git a/2411/CH6/EX6.13/Ex6_13.sce b/2411/CH6/EX6.13/Ex6_13.sce new file mode 100755 index 000000000..ece2ebdac --- /dev/null +++ b/2411/CH6/EX6.13/Ex6_13.sce @@ -0,0 +1,14 @@ +// Scilab Code Ex6.13: Page-351 (2008)
+clc; clear;
+h = 6.6e-034; // Planck's constant, Js
+m = 9.1e-031; // Mass of an electron, kg
+e = 1.6e-019; // Energy equivalent of 1 eV, J
+E_F0_Be = 14.44 // Fermi energy of Be at 0 K, eV
+N_bar_Be = 24.2e+022; // Number density of conduction electrons in Be at 0 K, per cc
+N_bar_Cs = 0.91e+022; // Number density of conduction electrons in Cs at 0 K, per cc
+E_F0_Cs = E_F0_Be*(N_bar_Cs/N_bar_Be)^(2/3); // Fermi energy of conduction electrons in cesium, eV
+printf("\nThe Fermi energy of conduction electrons in cesium = %5.3f eV", E_F0_Cs);
+
+// Result
+// The Fermi energy of conduction electrons in cesium = 1.621 eV
+// The answer is given wrongly in the textbook
\ No newline at end of file diff --git a/2411/CH6/EX6.6/Ex6_6.sce b/2411/CH6/EX6.6/Ex6_6.sce new file mode 100755 index 000000000..d88fa35d0 --- /dev/null +++ b/2411/CH6/EX6.6/Ex6_6.sce @@ -0,0 +1,22 @@ +// Scilab Code Ex6.6: Page-348 (2008)
+clc; clear;
+MAX = 10;
+// Look for all the possible set of values for n1, n2 and n3
+printf("\nThe most probable distribution is for ");
+for i = 0:1:5
+ for j = 0:1:5
+ for k = 0:1:5
+ // Check for the condition and avoid repetition of set of values
+ if ((i + j + k) == 5) & ((j+2*k) == 3) then
+ W = factorial(i + j + k)/(factorial(i)*factorial(j)*factorial(k));
+ if W > MAX then
+ printf("\nn1 = %d, n2 = %d and n3 = %d", i, j, k);
+ end
+ end
+ end
+ end
+end
+
+// Result
+// The most probable distribution is for
+// n1 = 3, n2 = 1 and n3 = 1
\ No newline at end of file diff --git a/2411/CH6/EX6.8/Ex6_8.sce b/2411/CH6/EX6.8/Ex6_8.sce new file mode 100755 index 000000000..f3ca5bf65 --- /dev/null +++ b/2411/CH6/EX6.8/Ex6_8.sce @@ -0,0 +1,19 @@ +// Scilab Code Ex6.8: Page-349 (2008)
+clc; clear;
+k = 1.38e-016; // Boltzmann constant, erg/K
+T = 100; // Given temperature, K
+E1 = 0; // Energy of the first state, erg
+E2 = 1.38e-014; // Energy of the second state, erg
+E3 = 2.76e-014; // Energy of the third state, erg
+g1 = 2, g2 = 5, g3 = 4; // Different ways of occuring for E1, E2 and E3 states
+P1 = g1*exp(-E1/(k*T)); // Probability of occurence of state E1
+P2 = g2*exp(-E2/(k*T)); // Probability of occurence of state E2
+P3 = g3*exp(-E3/(k*T)); // Probability of occurence of state E3
+PE_3 = P3/(P1+P2+P3); // Probability for the system to be in any one microstates of E3
+P0 = P1/(P1+P2+P3); // Probability for the system to be in ground state
+printf("\nThe probability for the system to be in any one microstates of E3 = %6.4f", PE_3);
+printf("\nThe probability for the system to be in ground state = %5.3f", P0);
+
+// Result
+// The probability for the system to be in any one microstates of E3 = 0.1236
+// The probability for the system to be in ground state = 0.457
\ No newline at end of file diff --git a/2411/CH6/EX6.9/Ex6_9.sce b/2411/CH6/EX6.9/Ex6_9.sce new file mode 100755 index 000000000..224a188ce --- /dev/null +++ b/2411/CH6/EX6.9/Ex6_9.sce @@ -0,0 +1,9 @@ +// Scilab Code Ex6.9: Page-350 (2008)
+clc; clear;
+g1 = 6, g2 = 8; // Total number of cells in the first and the second compartments respectively
+n1 = 2, n2 = 3; // Given number of cells in the first and the second compartments respectively for given macrostate
+W_23 = factorial(g1)/(factorial(n1)*factorial(g1 - n1))*factorial(g2)/(factorial(n2)*factorial(g2 - n2)); // Total number of microstates in the macrostate (2, 3)
+printf("\nThe total number of microstates in the macrostate (%d, %d) = %d", n1, n2, W_23);
+
+// Result
+// The total number of microstates in the macrostate (2, 3) = 840
\ No newline at end of file |