diff options
Diffstat (limited to '1646/CH3')
-rwxr-xr-x | 1646/CH3/EX3.1/Ch03Ex1.sce | 12 | ||||
-rwxr-xr-x | 1646/CH3/EX3.11/Ch03Ex11.sce | 13 | ||||
-rwxr-xr-x | 1646/CH3/EX3.12/Ch03Ex12.sce | 11 | ||||
-rwxr-xr-x | 1646/CH3/EX3.13/Ch03Ex14.sce | 11 | ||||
-rwxr-xr-x | 1646/CH3/EX3.15/Ch03Ex15.sce | 13 | ||||
-rwxr-xr-x | 1646/CH3/EX3.2/Ch03Ex2.sce | 18 | ||||
-rwxr-xr-x | 1646/CH3/EX3.3/Ch03Ex3.sce | 19 | ||||
-rwxr-xr-x | 1646/CH3/EX3.4/Ch03Ex4.sce | 13 | ||||
-rwxr-xr-x | 1646/CH3/EX3.5/Ch03Ex5.sce | 34 | ||||
-rwxr-xr-x | 1646/CH3/EX3.6/Ch03Ex6.sce | 15 | ||||
-rwxr-xr-x | 1646/CH3/EX3.7/Ch03Ex7.sce | 51 | ||||
-rwxr-xr-x | 1646/CH3/EX3.8/Ch03Ex8.sce | 12 |
12 files changed, 222 insertions, 0 deletions
diff --git a/1646/CH3/EX3.1/Ch03Ex1.sce b/1646/CH3/EX3.1/Ch03Ex1.sce new file mode 100755 index 000000000..901c670e2 --- /dev/null +++ b/1646/CH3/EX3.1/Ch03Ex1.sce @@ -0,0 +1,12 @@ +// Scilab Code Ex3.1: Page:132 (2011)
+clc;clear;
+m = 5.32e-26; // Mass of one oxygen molecule, kg
+k_B = 1.38e-23; // Boltzmann constant, J/K
+T = 200; // Temperature of the system, K
+v = 100; // Speed of the oxygen molecules, m/s
+dv = 1; // Increase in speed of the oxygen molecules, m/s
+P = 4*%pi*(m/(2*%pi*k_B*T))^(3/2)*exp(-m*v^2/(2*k_B*T))*v^2*dv;
+printf("\nThe probability that the speed of oxygen molecule is %4.2e", P) ;
+
+// Result
+// The probability that the speed of oxygen molecule is 6.13e-04
diff --git a/1646/CH3/EX3.11/Ch03Ex11.sce b/1646/CH3/EX3.11/Ch03Ex11.sce new file mode 100755 index 000000000..be0908238 --- /dev/null +++ b/1646/CH3/EX3.11/Ch03Ex11.sce @@ -0,0 +1,13 @@ +// Scilab Code Ex3.11: Page:138 (2011)
+clc;clear;
+r = 1.86e-10;....// Radius of Na, angstrom
+m = 9.1e-31;....// Mass of electron,in kg
+h = 6.62e-34;....// Planck's constant, J-s
+N = 2;....// Number of free electrons in a unit cell of Na
+a = 4*r/sqrt(3);....// Volume of Na, m
+V = a^3;....// Volume of the unit cell of Na, meter cube
+E = h^2/(2*m)*(3*N/(8*%pi*V))^(2/3);
+printf("\nThe fermi energy of the Na at absolute zero is = %4.2e J", E);
+
+// Result
+// The fermi energy of the Na at absolute zero = 5.02e-019 J
\ No newline at end of file diff --git a/1646/CH3/EX3.12/Ch03Ex12.sce b/1646/CH3/EX3.12/Ch03Ex12.sce new file mode 100755 index 000000000..857138778 --- /dev/null +++ b/1646/CH3/EX3.12/Ch03Ex12.sce @@ -0,0 +1,11 @@ +// Scilab Code Ex3.12:Page-139 (2011)
+clc;clear;
+m = 9.1e-31;....// mass of electron, kg
+h = 6.62e-34;....// Planck's constant, J-s
+V = 108/10.5*1e-06;....// Volume of 1 gm mole of silver, metre-cube
+N = 6.023e+023; // Avogadro's number
+E_F = h^2/(2*m)*(3*N/(8*%pi*V))^(2/3); // Fermi energy at absolute zero, J
+printf("\nThe fermi energy of the silver at absolute zero = %4.2e J",E_F);
+
+// Result
+// The fermi energy of the silver at absolute zero = 8.80e-019 J
diff --git a/1646/CH3/EX3.13/Ch03Ex14.sce b/1646/CH3/EX3.13/Ch03Ex14.sce new file mode 100755 index 000000000..be209b857 --- /dev/null +++ b/1646/CH3/EX3.13/Ch03Ex14.sce @@ -0,0 +1,11 @@ +// Scilab Code Ex3.14: Electron density in lithium at absolute zero: Page:140 (2011)
+clc;clear;
+e = 1.6e-019; // Energy equivalent of 1 eV, J/eV
+m = 9.1e-31;....// Mass of the elecron, kg
+h = 6.63e-34; // Planck's constant, Js
+EF = 4.72*e;....// Fermi energy of free electrons in Li, J
+rho = 8*%pi/3*(2*m*EF/h^2)^(3/2); // Electron density at absolute zero, electrons/metre-cube
+printf("\nThe electron density in lithium at absolute zero = %4.2e electrons/metre-cube", rho);
+
+// Result
+// The electron density in lithium at absolute zero = 4.63e+028 electrons/metre-cube
\ No newline at end of file diff --git a/1646/CH3/EX3.15/Ch03Ex15.sce b/1646/CH3/EX3.15/Ch03Ex15.sce new file mode 100755 index 000000000..1724a4270 --- /dev/null +++ b/1646/CH3/EX3.15/Ch03Ex15.sce @@ -0,0 +1,13 @@ +// Scilab Code Ex3.15: Page:140 (2011)
+clc;clear;
+e = 1.6e-019; // Energy equivalent of 1 eV, J/eV
+k_B = 1.38e-023; // Boltzmann constant, J/K
+f_E = 0.01;....// Probability that a state with energy 0.5 eV above the Fermi energy is occupied by an electron, eV
+delta_E = 0.5; // Energy difference (E-Ef)of fermi energy, eV
+// Since f_E = 1/(exp((E-Ef)/(k_B*T))+1), solvinf for T
+T = delta_E/(log((1-f_E)/f_E)*k_B/e); // Temperature at which the level above the fermi level is occupied by the electron, K
+
+printf("\nThe temperature at which the level above the fermi level is occupied by the electron = %4d K", ceil(T));
+
+// Result
+// The temperature at which the level above the fermi level is occupied by the electron = 1262 K
diff --git a/1646/CH3/EX3.2/Ch03Ex2.sce b/1646/CH3/EX3.2/Ch03Ex2.sce new file mode 100755 index 000000000..c74579af9 --- /dev/null +++ b/1646/CH3/EX3.2/Ch03Ex2.sce @@ -0,0 +1,18 @@ +// Scilab Code Ex3.2 : Page:132 (2011)
+clc;clear;
+A = 32; // Gram atomic mass of oxygen, g/mol
+N_A = 6.023e+026; // Avogadro's number, per kmol
+m = A/N_A;....//mass of the molecule, kg
+k_B = 1.38e-23;....// Boltzmann constant, J/K
+T = 273;....// Temperature of the gas, K
+v_av = 1.59*sqrt(k_B*T/m);....// Average speed of oxygen molecule, m/s
+printf("\nThe average speed of oxygen molecule is = %3d m/s", v_av);
+v_rms = 1.73*sqrt(k_B*T/m);....// The mean square speed of oxygen molecule, m/s
+printf("\nThe root mean square speed of oxygen gas molecule is = %3d m/s", ceil(v_rms))
+v_mp = 1.41*sqrt(k_B*T/m);....// The most probable speed of oxygen molecule, m/s
+printf("\nThe most probable speed of oxygen molecule is = %3d m/s", ceil(v_mp));
+
+// Result
+// The average speed of oxygen molecule is = 423 m/s
+// The root mean square speed of oxygen gas molecule is = 461 m/s
+// The most probable speed of oxygen molecule is = 376 m/s
diff --git a/1646/CH3/EX3.3/Ch03Ex3.sce b/1646/CH3/EX3.3/Ch03Ex3.sce new file mode 100755 index 000000000..96c7fa63f --- /dev/null +++ b/1646/CH3/EX3.3/Ch03Ex3.sce @@ -0,0 +1,19 @@ +// Scilab Code Ex3.3: Page:133 (2011)
+clc;clear;
+m_H = 2; // Gram molecular mass of hydrogen, g
+m_O = 32; // Gram molecular mass of oxygen, g
+k_B = 1.38e-23;....// Boltzmann constant, J/K
+v_avO = 1;....// For simplicity average speed of oxygen gas molecule is assumed to be unity, m/s
+v_avH = 2*v_avO;....// The average speed of hydrrogen gas molecule, m/s
+T_O = 300; // Temperature of oxygen gas, K
+// As v_avO/v_av_H = sqrt(T_O/T_H)*sqrt(m_H/m_O), solving for T_H
+T_H = (v_avH/v_avO*sqrt(m_H/m_O)*sqrt(T_O))^2; // Temperature at which the average speed of hydrogen gas molecules is the same as that of oxygen gas molecules, K
+printf("\nTemperature at which the average speed of hydrogen gas molecules is the same as that of oxygen gas molecules at 300 K = %2d", T_H);
+
+// Result
+// Temperature at which the average speed of hydrogen gas molecules is the same as that of oxygen gas molecules at 300 K = 75
+
+
+
+
+
diff --git a/1646/CH3/EX3.4/Ch03Ex4.sce b/1646/CH3/EX3.4/Ch03Ex4.sce new file mode 100755 index 000000000..9831481c3 --- /dev/null +++ b/1646/CH3/EX3.4/Ch03Ex4.sce @@ -0,0 +1,13 @@ +// Scilab Code Ex3.4: Page:133 (2011)
+clc;clear;
+v_mp = 1; // Most probable speed of gas molecules, m/s
+dv = 1.01*v_mp-0.99*v_mp; // Change in most probable speed, m/s
+v = v_mp; // Speed of the gas molecules, m/s
+Frac = 4/sqrt(%pi)*1/v_mp^3*exp(-v^2/v_mp^2)*v^2*dv;
+printf("\nThe fraction of oxygen gas molecules within one percent of most probable speed = %5.3f", Frac);
+
+// Result
+// The fraction of oxygen gas molecules within one percent of most probable speed = 0.017
+
+
+
diff --git a/1646/CH3/EX3.5/Ch03Ex5.sce b/1646/CH3/EX3.5/Ch03Ex5.sce new file mode 100755 index 000000000..44feac180 --- /dev/null +++ b/1646/CH3/EX3.5/Ch03Ex5.sce @@ -0,0 +1,34 @@ +// Scilab Code Ex3.5: Page:134 (2011)
+clc;clear;
+n = 5; // Number of distinguishable particles which are to be distributed among cells
+n1 = [5 4 3 3 2]; // Possible occupancy of particles in first cell
+n2 = [0 1 2 1 2]; // Possible occupancy of particles in second cell
+n3 = [0 0 0 1 1]; // Possible occupancy of particles in third cell
+BIG_W = 0;
+printf("\n_____________________________________");
+printf("\nn1 n2 n3 5/(n1!n2!n3!)");
+printf("\n_____________________________________");
+for i = 1:1:5
+W = factorial(n)/(factorial(n1(i))*factorial(n2(i))*factorial(n3(i)));
+if BIG_W < W then
+ BIG_W = W;
+ ms = [n1(i) n2(i) n3(i)];
+end
+printf("\n%d %d %d %d", n1(i), n2(i), n3(i), W);
+end
+printf("\n_____________________________________");
+printf("\nThe macrostates of most probable distribution with thermodynamic probability %d are:", BIG_W);
+printf("\n(%d, %d, %d), (%d, %d, %d) and (%d, %d, %d)", ms(1), ms(2), ms(3), ms(2), ms(3), ms(1),ms(3), ms(1), ms(2));
+
+// Result
+// _____________________________________
+// n1 n2 n3 5/(n1!n2!n3!)
+// _____________________________________
+//5 0 0 1
+// 4 1 0 5
+// 3 2 0 10
+// 3 1 1 20
+// 2 2 1 30
+// _____________________________________
+// The macrostates of most probable distribution with thermodynamic probability 30 are:
+// (2, 2, 1), (2, 1, 2) and (1, 2, 2)
diff --git a/1646/CH3/EX3.6/Ch03Ex6.sce b/1646/CH3/EX3.6/Ch03Ex6.sce new file mode 100755 index 000000000..7e00280bf --- /dev/null +++ b/1646/CH3/EX3.6/Ch03Ex6.sce @@ -0,0 +1,15 @@ +// Scilab Code Ex3.6: Page:135 (2011)
+clc;clear;
+g1 = 4; // Intrinsic probability of first cell
+g2 = 2; // Intrinsic probability of second cell
+k = 2; // Number of cells
+n = 8; // Number of distinguishable particles
+n1 = 8; // Number of cells in first compartment
+n2 = n - n1; // Number of cells in second compartment
+W = factorial(n)*1/factorial(n1)*1/factorial(n2)*(g1)^n1*(g2)^n2;
+printf("\nThe thermodynamic probability of the macrostate (8,0) = %5d", W);
+
+// Result
+// The thermodynamic probability of the macrostate (8,0) = 65536
+
+
diff --git a/1646/CH3/EX3.7/Ch03Ex7.sce b/1646/CH3/EX3.7/Ch03Ex7.sce new file mode 100755 index 000000000..5bbcf357b --- /dev/null +++ b/1646/CH3/EX3.7/Ch03Ex7.sce @@ -0,0 +1,51 @@ +// Scilab Code Ex3.7 : Page:135 (2011)
+clc;clear;
+function str = st(val)
+ str = emptystr();
+ if val == 3 then
+ str = 'aaa';
+ elseif val == 2 then
+ str = 'aa';
+ elseif val == 1 then
+ str = 'a';
+ elseif val == 0 then
+ str = '0';
+ end
+endfunction
+
+g = 3; // Number of cells in first compartment
+n = 3; // Number of bosons
+p = 3;
+r = 1; // Index for number of rows
+clc;
+printf("\nAll possible meaningful arrangements of three particles in three cells are:")
+printf("\n__________________________");
+printf("\nCell 1 Cell 2 Cell 3");
+printf("\n__________________________");
+for i = 0:1:g
+ for j = 0:1:n
+ for k = 0:1:p
+ if (i+j+k == 3) then
+ printf("\n%4s %4s %4s", st(i), st(j), st(k));
+ end
+ end
+ end
+end
+printf("\n__________________________");
+
+// Result
+// All possible meaningful arrangements of three particles in three cells are:
+// __________________________
+// Cell 1 Cell 2 Cell 3
+// __________________________
+// 0 0 aaa
+// 0 a aa
+// 0 aa a
+// 0 aaa 0
+// a 0 aa
+// a a a
+// a aa 0
+// aa 0 a
+// aa a 0
+// aaa 0 0
+// __________________________
diff --git a/1646/CH3/EX3.8/Ch03Ex8.sce b/1646/CH3/EX3.8/Ch03Ex8.sce new file mode 100755 index 000000000..4daae24b1 --- /dev/null +++ b/1646/CH3/EX3.8/Ch03Ex8.sce @@ -0,0 +1,12 @@ +// Scilab Code Ex3.8 : Page:136 (2011)
+clc;clear;
+g1 = 3; // Number of cells in first compartment
+g2 = 4; // Number of cells in second compartment
+k = 2; // Number of compartments
+n1 = 5; // Number of bosons
+n2 = 0; // Number of with no bosons
+W_50 = factorial(g1+n1-1)*factorial(g2+n2-1)/(factorial(n1)*factorial(g1-1)*factorial(n2)*factorial(g2-1));
+printf("\nThe probability for the macrostate (5,0) is = %2d", W_50);
+
+// Result
+// The probability for the macrostate (5,0) is = 21
|