diff options
Diffstat (limited to '2411/CH7')
-rwxr-xr-x | 2411/CH7/EX7.1/Ex7_1.sce | 23 | ||||
-rwxr-xr-x | 2411/CH7/EX7.10/Ex7_10.sce | 9 | ||||
-rwxr-xr-x | 2411/CH7/EX7.11/Ex7_11.sce | 16 | ||||
-rwxr-xr-x | 2411/CH7/EX7.12/Ex7_12.sce | 25 | ||||
-rwxr-xr-x | 2411/CH7/EX7.13/Ex7_13.sce | 12 | ||||
-rwxr-xr-x | 2411/CH7/EX7.14/Ex7_14.sce | 15 | ||||
-rwxr-xr-x | 2411/CH7/EX7.15/Ex7_15.sce | 16 | ||||
-rwxr-xr-x | 2411/CH7/EX7.16/Ex7_16.sce | 17 | ||||
-rwxr-xr-x | 2411/CH7/EX7.17/Ex7_17.sce | 14 | ||||
-rwxr-xr-x | 2411/CH7/EX7.18/Ex7_18.sce | 12 | ||||
-rwxr-xr-x | 2411/CH7/EX7.19/Ex7_19.sce | 19 | ||||
-rwxr-xr-x | 2411/CH7/EX7.3/Ex7_3.sce | 13 | ||||
-rwxr-xr-x | 2411/CH7/EX7.4/Ex7_4.sce | 24 | ||||
-rwxr-xr-x | 2411/CH7/EX7.5/Ex7_5.sce | 14 | ||||
-rwxr-xr-x | 2411/CH7/EX7.6/Ex7_6.sce | 26 | ||||
-rwxr-xr-x | 2411/CH7/EX7.9/Ex7_9.sce | 20 |
16 files changed, 275 insertions, 0 deletions
diff --git a/2411/CH7/EX7.1/Ex7_1.sce b/2411/CH7/EX7.1/Ex7_1.sce new file mode 100755 index 000000000..fc030887e --- /dev/null +++ b/2411/CH7/EX7.1/Ex7_1.sce @@ -0,0 +1,23 @@ +// Scilab Code Ex7.1: Page-376 (2008)
+clc; clear;
+a = poly(0, 'a'); // Lattice parameter for a cubic unit cell, m
+// For simple cubic cell
+n = 1; // Number of atoms per simple cubic unit cell
+r = a/2; // Atomic radius for a simple cubic cell, m
+f = pol2str(int(numer(n*4/3*%pi*r^3/a^3)*100)); // Atomic packing fraction for a simple cubic cell
+printf("\nFor simple cubic cell, f = %s percent", f);
+// For face centered cubic cell
+n = 2; // Number of atoms per face centered cubic unit cell
+r = sqrt(3)/4*a; // Atomic radius for a face centered cubic cell, m
+f = pol2str(int(numer(n*4/3*%pi*r^3/a^3)*100)); // Atomic packing fraction for a face centered cubic cell
+printf("\nFor face centered cubic cell, f = %s percent", f);
+// For body centered cubic cell
+n = 4; // Number of atoms per body centered cubic unit cell
+r = a/(2*sqrt(2)); // Atomic radius for a body centered cubic cell, m
+f = pol2str(int(numer(n*4/3*%pi*r^3/a^3)*100)); // Atomic packing fraction for a body centered cubic cell
+printf("\nFor body centered cubic cell, f = %s percent", f);
+
+// Result
+// For simple cubic cell, f = 52 percent
+// For face centered cubic cell, f = 68 percent
+// For body centered cubic cell, f = 74 percent
\ No newline at end of file diff --git a/2411/CH7/EX7.10/Ex7_10.sce b/2411/CH7/EX7.10/Ex7_10.sce new file mode 100755 index 000000000..28050e480 --- /dev/null +++ b/2411/CH7/EX7.10/Ex7_10.sce @@ -0,0 +1,9 @@ +// Scilab Code Ex7.10: Page-380 (2008)
+clc; clear;
+h = 3; k = 2; l = 1; // Miller Indices for planes in a cubic crystal
+a = 4.21D-10; // Interatomic spacing, m
+d = a/(h^2+k^2+l^2)^(1/2); // The interplanar spacing for cubic crystals, m
+printf("\nThe interplanar spacing between consecutive (321) planes = %3.1e m", d);
+
+// Result
+// The interplanar spacing between consecutive (321) planes = 1.1e-010 m
\ No newline at end of file diff --git a/2411/CH7/EX7.11/Ex7_11.sce b/2411/CH7/EX7.11/Ex7_11.sce new file mode 100755 index 000000000..a99c6d7bf --- /dev/null +++ b/2411/CH7/EX7.11/Ex7_11.sce @@ -0,0 +1,16 @@ +// Scilab Code Ex7.11: Page-380 (2008)
+clc; clear;
+e = 1.6e-019; // The energy equivalent of 1 eV, J
+c = 3e+008; // Speed of light in vacuum, m/s
+V = [30 44 50 200]; // Operating voltages of X ray, kV
+lambda_min = [0.414 0.284 0.248 0.062]; // Minimum wavelengths of emitted continuous X rays, angstrom
+for i = 1:1:4
+ h = e*V(i)*1e+003*lambda_min(i)*1e-010/c; // Planck's constant, Js
+ printf("\nFor V = %d kV and lambda_min = %5.3f angstrom, h = %4.2e Js", V(i), lambda_min(i), h);
+end
+
+// Result
+// For V = 30 kV and lambda_min = 0.414 angstrom, h = 6.62e-034 Js
+// For V = 44 kV and lambda_min = 0.284 angstrom, h = 6.66e-034 Js
+// For V = 50 kV and lambda_min = 0.248 angstrom, h = 6.61e-034 Js
+// For V = 200 kV and lambda_min = 0.062 angstrom, h = 6.61e-034 Js
\ No newline at end of file diff --git a/2411/CH7/EX7.12/Ex7_12.sce b/2411/CH7/EX7.12/Ex7_12.sce new file mode 100755 index 000000000..0aa6b862e --- /dev/null +++ b/2411/CH7/EX7.12/Ex7_12.sce @@ -0,0 +1,25 @@ +// Scilab Code Ex7.12: Page-381 (2008)
+clc; clear;
+e = 1.6e-019; // The energy equivalent of 1 eV, J
+m = 9.11e-031; // Rest mass of an electron, kg
+h = 6.62e-034; // Planck's constant, Js
+c = 3e+008; // Speed of light in vacuum, m/s
+V = [20 100]; // Operating voltages of X ray, kV
+for i = 1:1:2
+ v = sqrt(2*e*V(i)*1e+003/m); // Maximum striking speed of the electron, m/s
+ lambda_min = c*h/(e*V(i)*1e+003*1e-010); // Minimum wavelength of emitted continuous X rays, angstrom
+ printf("\nFor V = %d kV:", V(i));
+ printf("\nThe maximum striking speed of the electron = %5.2e m/s", v);
+ printf("\nThe minimum wavelength of emitted continuous X rays = %5.3f angstrom\n", lambda_min);
+end
+
+// Result
+// For V = 20 kV:
+// The maximum striking speed of the electron = 8.38e+007 m/s
+// The minimum wavelength of emitted continuous X rays = 0.621 angstrom
+//
+// For V = 100 kV:
+// The maximum striking speed of the electron = 1.87e+008 m/s
+// The minimum wavelength of emitted continuous X rays = 0.124 angstrom
+// There are small variation in the answers as approximations are used in the text
+
\ No newline at end of file diff --git a/2411/CH7/EX7.13/Ex7_13.sce b/2411/CH7/EX7.13/Ex7_13.sce new file mode 100755 index 000000000..4d3da4edc --- /dev/null +++ b/2411/CH7/EX7.13/Ex7_13.sce @@ -0,0 +1,12 @@ +// Scilab Code Ex7.13: Page-381 (2008)
+clc; clear;
+n = 1; // Order of diffraction
+lambda = 1.75e-010; // Wavelength of X rays, m
+h = 1, k = 1, l = 1; // Miller indices for the set of planes
+theta = 30; // Bragg's angle, degree
+// As from Bragg's law, 2*d*sind(theta) = n*lambda and d = a/sqrt(h^2+k^2+l^2). solving for a we have
+a = sqrt(h^2+k^2+l^2)*n*lambda/(2*sind(theta)*1e-010); // Interatomic spacing of the crystal, angstrom
+printf("\nThe interatomic spacing of the crystal = %5.3f angstrom", a);
+
+// Result
+// The interatomic spacing of the crystal = 3.031 angstrom
\ No newline at end of file diff --git a/2411/CH7/EX7.14/Ex7_14.sce b/2411/CH7/EX7.14/Ex7_14.sce new file mode 100755 index 000000000..1898617cd --- /dev/null +++ b/2411/CH7/EX7.14/Ex7_14.sce @@ -0,0 +1,15 @@ +// Scilab Code Ex7.14: Page-382 (2008)
+clc; clear;
+e = 1.6e-019; // The energy equivalent of 1 eV, J
+c = 3e+008; // Speed of light in vacuum, m/s
+n = 1; // Order of diffraction
+d = 2.82e-010; // Interplanar spacing, m
+V = 9.1e+003; // Operating voltage of X rays
+theta = 14; // Bragg's angle, degree
+lambda = 2*d*sind(theta)/n; // Wavelength of X rays, m
+nu = c/lambda; // Frequency of X rays, Hz
+h = e*V/nu; // Planck's constant, Js
+printf("\nThe value of Planck constant, h = %4.2e Js", h);
+
+// Result
+// The value of Planck constant, h = 6.62e-034 Js
\ No newline at end of file diff --git a/2411/CH7/EX7.15/Ex7_15.sce b/2411/CH7/EX7.15/Ex7_15.sce new file mode 100755 index 000000000..6f071b6df --- /dev/null +++ b/2411/CH7/EX7.15/Ex7_15.sce @@ -0,0 +1,16 @@ +// Scilab Code Ex7.15: Page-382 (2008)
+clc; clear;
+e = 1.6e-019; // The energy equivalent of 1 eV, J
+c = 3e+008; // Speed of light in vacuum, m/s
+lambda = 0.5e-010; // Wavelength of X rays, m
+theta = 5; // Bragg's angle, degree
+n = 1; // Order of diffraction
+d = n*lambda/(2*sind(theta)*1e-010); // Interplanar spacing, angstrom
+n = 2; // Ordr of diffraction
+theta1 = asind(n*lambda/(2*d*1e-010)); // Angle at which the second maximum occur, degree
+printf("\nThe spacing between adjacent planes of the crystal = %4.2f angstrom", d);
+printf("\nThe angle at which the second maximum occur = %5.2f degree", theta1);
+
+// Result
+// The spacing between adjacent planes of the crystal = 2.87 angstrom
+// The angle at which the second maximum occur = 10.04 degree
\ No newline at end of file diff --git a/2411/CH7/EX7.16/Ex7_16.sce b/2411/CH7/EX7.16/Ex7_16.sce new file mode 100755 index 000000000..882fb61fa --- /dev/null +++ b/2411/CH7/EX7.16/Ex7_16.sce @@ -0,0 +1,17 @@ +// Scilab Code Ex7.16: Page-383 (2008)
+clc; clear;
+M = 58.5 // Gram atomic mass of NaCl, kg/mole
+N = 6.023e+026; // Avogadro's number per kmol
+rho = 2.17e+003; // Density of NaCl, kg/metre-cube
+m = M/N; // Mass of each NaCl molecule, g
+V = m/rho; // Volume of each NaCl molecule, metre-cube
+d = (V/2)^(1/3)/1e-010; // Atomic apacing in the NaCl crystal, angstrom
+theta = 26; // Bragg's angle, degree
+n = 2; // Order of diffraction
+lambda = 2*d*sind(theta)/n; // Wavelength of X rays, m
+printf("\nThe grating spacing of rock salt = %4.2f angstrom", d);
+printf("\nThe wavelength of X rays = %4.2f angstrom", lambda);
+
+// Result
+// The grating spacing of rock salt = 2.82 angstrom
+// The wavelength of X rays = 1.24 angstrom
\ No newline at end of file diff --git a/2411/CH7/EX7.17/Ex7_17.sce b/2411/CH7/EX7.17/Ex7_17.sce new file mode 100755 index 000000000..51524c283 --- /dev/null +++ b/2411/CH7/EX7.17/Ex7_17.sce @@ -0,0 +1,14 @@ +// Scilab Code Ex7.17: Page-383 (2008)
+clc; clear;
+d = 3.02945e-010; // Atomic apacing in the calcite crystal, m
+lambda_alpha = 0.563e-010; // Wavelength of the K-alpha line of Ag, m
+n = 1; // Order of diffraction
+theta = asind(n*lambda_alpha/(2*d)); // Angle of reflection for the first order, degree
+theta_max = 90; // Angle of reflection for the highest order, degree
+n = 2*d*sind(theta_max)/lambda_alpha; // The highest order for which the line may be observed
+printf("\nThe angle of reflection for the first order = %4.2f degree", theta);
+printf("\nThe highest order for which the line may be observed = %d", n);
+
+// Result
+// The angle of reflection for the first order = 5.33 degree
+// The highest order for which the line may be observed = 10
\ No newline at end of file diff --git a/2411/CH7/EX7.18/Ex7_18.sce b/2411/CH7/EX7.18/Ex7_18.sce new file mode 100755 index 000000000..464c0ae4a --- /dev/null +++ b/2411/CH7/EX7.18/Ex7_18.sce @@ -0,0 +1,12 @@ +// Scilab Code Ex7.18: Page-384 (2008)
+clc; clear;
+lambda = 1.8e-010; // Wavelength of the X rays, m
+n = 1; // Order of diffraction
+theta = 60; // Angle of diffraction for the first order, degree
+d = n*lambda/(2*sind(theta)); // Interplanar spacing, m
+// Since for a simple cubic lattice, d_111 = d = a/sqrt(3), solving for a
+a = sqrt(3)*d; // The interatomic spacing for the given crystal planes, m
+printf("\nThe interatomic spacing for the given crystal planes, a = %3.1f angstrom", a/1e-010);
+
+// Result
+// The interatomic spacing for the given crystal planes, a = 1.8 angstrom
\ No newline at end of file diff --git a/2411/CH7/EX7.19/Ex7_19.sce b/2411/CH7/EX7.19/Ex7_19.sce new file mode 100755 index 000000000..2dcebaec0 --- /dev/null +++ b/2411/CH7/EX7.19/Ex7_19.sce @@ -0,0 +1,19 @@ +// Scilab Code Ex7.19: Page-384 (2008)
+clc; clear;
+function [d, m] = deg2degmin(theta)
+ d = int(theta);
+ m = (theta-d)*60;
+endfunction
+h = 6.626e-034; // Planck's constant, Js
+e = 1.6e-019; // The energy equivalent of 1 eV, J
+c = 3e+008; // Speed of light in vacuum, m/s
+V = 50e+003; // Operating voltage of X ray, V
+lambda_min = h*c/(e*V); // Minimum wavelength of emitted continuous X rays, angstrom
+n = 1; // Order of diffraction
+d = 3.02945e-010; // Interplanar spacing, m
+theta = asind(n*lambda_min/(2*d)); // The smallest angle between the crystal plane and the X ray beam, degree
+[deg , m] = deg2degmin(theta);
+printf("\nThe smallest angle between the crystal plane and the X ray beam = %d degree %d min", deg, m);
+
+// Result
+// The smallest angle between the crystal plane and the X ray beam = 2 degree 21 min
\ No newline at end of file diff --git a/2411/CH7/EX7.3/Ex7_3.sce b/2411/CH7/EX7.3/Ex7_3.sce new file mode 100755 index 000000000..0f0f679cc --- /dev/null +++ b/2411/CH7/EX7.3/Ex7_3.sce @@ -0,0 +1,13 @@ +// Scilab Code Ex7.3: Page-377 (2008)
+clc; clear;
+M = 58.46; // Gram atomic mass of NaCl, g/mole
+N = 6.023e+023; // Avogadro's number
+rho = 2.17; // Density of NaCl, g/cc
+m = M/N; // Mass of each NaCl molecule, g
+n = rho/m; // Number of NaCl molecules per unit volume, molecules/cc
+N = 2*n; // Number of atoms per unit volume, atoms/cc
+a = (1/N)^(1/3); // Distance between two adjacent atoms in the NaCl, cm
+printf("\nThe distance between two adjacent atoms in the NaCl = %4.2f angstrom", a/1e-008);
+
+// Result
+// The distance between two adjacent atoms in the NaCl = 2.82 angstrom
\ No newline at end of file diff --git a/2411/CH7/EX7.4/Ex7_4.sce b/2411/CH7/EX7.4/Ex7_4.sce new file mode 100755 index 000000000..b7c8a446e --- /dev/null +++ b/2411/CH7/EX7.4/Ex7_4.sce @@ -0,0 +1,24 @@ +// Scilab Code Ex7.4: Page-377 (2008)
+clc; clear;
+function p = find_cell_type(x)
+ if x == 1 then
+ p = 'simple cubic';
+ end
+ if x == 2 then
+ p = 'body centered';
+ end
+ if x == 4 then
+ p = 'face centered';
+ end
+endfunction
+M = 130; // Gram atomic weight of Cs, g/mole
+N = 6.023e+023; // Avogadro's number
+rho = 2; // Density of Cs, g/cc
+a = 6e-008; // Distance between two adjacent atoms in the Cs, cm
+m = M/N; // Mass of each Cs atom, g
+x = rho*a^3*N/M; // Number of Cs atoms in cubic unit cell
+c_type = find_cell_type(int(x)); // Call function to determine the type of cell
+printf("\nThe cubic unit cell of Cs is %s.", c_type);
+
+// Result
+// The cubic unit cell of Cs is body centered.
\ No newline at end of file diff --git a/2411/CH7/EX7.5/Ex7_5.sce b/2411/CH7/EX7.5/Ex7_5.sce new file mode 100755 index 000000000..e53db0815 --- /dev/null +++ b/2411/CH7/EX7.5/Ex7_5.sce @@ -0,0 +1,14 @@ +// Scilab Code Ex7.5: Page-378 (2008)
+clc; clear;
+m = 2; n = 3; p = 6; // Coefficients of intercepts along three axes
+m_inv = 1/m; // Reciprocate the first coefficient
+n_inv = 1/n; // Reciprocate the second coefficient
+p_inv = 1/p; // Reciprocate the third coefficient
+mul_fact = double(lcm(int32([m,n,p]))); // Find l.c.m. of m,n and p
+m1 = m_inv*mul_fact; // Clear the first fraction
+m2 = n_inv*mul_fact; // Clear the second fraction
+m3 = p_inv*mul_fact; // Clear the third fraction
+printf("\nThe required miller indices are : (%d %d %d) ", m1,m2,m3);
+
+// Result
+// The required miller indices are : (3 2 1)
\ No newline at end of file diff --git a/2411/CH7/EX7.6/Ex7_6.sce b/2411/CH7/EX7.6/Ex7_6.sce new file mode 100755 index 000000000..899229b02 --- /dev/null +++ b/2411/CH7/EX7.6/Ex7_6.sce @@ -0,0 +1,26 @@ +// Scilab Code Ex7.6: Page-378 (2008)
+clc; clear;
+// For first set (3, 2, 2)
+m = 3; n = 2; p = 2; // Coefficients of intercepts along three axes
+m_inv = 1/m; // Reciprocate the first coefficient
+n_inv = 1/n; // Reciprocate the second coefficient
+p_inv = 1/p; // Reciprocate the third coefficient
+mul_fact = double(lcm(int32([m,n,p]))); // Find l.c.m. of m,n and p
+m1 = m_inv*mul_fact; // Clear the first fraction
+m2 = n_inv*mul_fact; // Clear the second fraction
+m3 = p_inv*mul_fact; // Clear the third fraction
+printf("\nThe plane (%d %d %d) has intercepts %da, %db and %dc on the three axes.", m, n, p, m1, m2, m3);
+// For second set (1 1 1)
+m = 1; n = 1; p = 1; // Coefficients of intercepts along three axes
+m_inv = 1/m; // Reciprocate the first coefficient
+n_inv = 1/n; // Reciprocate the second coefficient
+p_inv = 1/p; // Reciprocate the third coefficient
+mul_fact = double(lcm(int32([m,n,p]))); // Find l.c.m. of m,n and p
+m1 = m_inv*mul_fact; // Clear the first fraction
+m2 = n_inv*mul_fact; // Clear the second fraction
+m3 = p_inv*mul_fact; // Clear the third fraction
+printf("\nThe plane (%d %d %d) has intercepts a, b and c on the three axes.", m, n, p);
+
+// Result
+// The plane (3 2 2) has intercepts 2a, 3b and 3c on the three axes.
+// The plane (1 1 1) has intercepts a, b and c on the three axes.
\ No newline at end of file diff --git a/2411/CH7/EX7.9/Ex7_9.sce b/2411/CH7/EX7.9/Ex7_9.sce new file mode 100755 index 000000000..de10d8f3d --- /dev/null +++ b/2411/CH7/EX7.9/Ex7_9.sce @@ -0,0 +1,20 @@ +// Scilab Code Ex7.9: Page-379 (2008)
+clc; clear;
+h = 2; k = 3; l = 1; // Miller indices of the set of planes
+p = 1/h; // Reciprocate h
+q = 1/k; // Reciprocate k
+r = 1/l; // Reciprocate l
+lx = 1.2; // Intercept cut by plane along x-axis, angstrom
+a = 1.2, b = 1.8, c = 2; // Primitives of the crystal, angstrom
+mul_fact = double(lcm(int32([h, k, l]))); // Find l.c.m. of h, k and l
+pa = mul_fact*p*a;
+qb = mul_fact*q*b;
+rc = mul_fact*r*c;
+ly = lx*qb/pa; // Length of intercept along y-axis
+lz = lx*rc/pa; // Length of intercept along z-axis
+printf("\nThe length of intercept along y-axis = %3.1f angstrom", ly);
+printf("\nThe length of intercept along z-axis = %3.1f angstrom", lz);
+
+// Result
+// The length of intercept along y-axis = 1.2 angstrom
+// The length of intercept along z-axis = 4.0 angstrom
\ No newline at end of file |