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 /635/CH8 | |
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 '635/CH8')
-rwxr-xr-x | 635/CH8/EX8.1/Ch08Ex1.sci | 10 | ||||
-rwxr-xr-x | 635/CH8/EX8.10/Ch08Ex10.sci | 22 | ||||
-rwxr-xr-x | 635/CH8/EX8.11/Ch08Ex11.sci | 19 | ||||
-rwxr-xr-x | 635/CH8/EX8.12/Ch08Ex12.sci | 14 | ||||
-rwxr-xr-x | 635/CH8/EX8.13/Ch08Ex13.sci | 31 | ||||
-rwxr-xr-x | 635/CH8/EX8.14/Ch08Ex14.sci | 14 | ||||
-rwxr-xr-x | 635/CH8/EX8.15/Ch08Ex15.sci | 15 | ||||
-rwxr-xr-x | 635/CH8/EX8.16/Ch08Ex16.sci | 19 | ||||
-rwxr-xr-x | 635/CH8/EX8.17/Ch08Ex17.sci | 20 | ||||
-rwxr-xr-x | 635/CH8/EX8.2/Ch08Ex2.sci | 19 | ||||
-rwxr-xr-x | 635/CH8/EX8.3/Ch08Ex3.sci | 19 | ||||
-rwxr-xr-x | 635/CH8/EX8.4/Ch08Ex4.sci | 13 | ||||
-rwxr-xr-x | 635/CH8/EX8.5/Ch08Ex5.sci | 13 | ||||
-rwxr-xr-x | 635/CH8/EX8.6/Ch08Ex6.sci | 16 | ||||
-rwxr-xr-x | 635/CH8/EX8.7/Ch08Ex7.sci | 17 | ||||
-rwxr-xr-x | 635/CH8/EX8.8/Ch08Ex8.sci | 11 | ||||
-rwxr-xr-x | 635/CH8/EX8.9/Ch08Ex9.sci | 18 |
17 files changed, 290 insertions, 0 deletions
diff --git a/635/CH8/EX8.1/Ch08Ex1.sci b/635/CH8/EX8.1/Ch08Ex1.sci new file mode 100755 index 000000000..0094a2333 --- /dev/null +++ b/635/CH8/EX8.1/Ch08Ex1.sci @@ -0,0 +1,10 @@ +// Scilab Code Ex08.1 Determination of shortest wavelength and frequency of X-rays from accelerating potential Page-250 (2010) +V = 50e+03; // Accelerating potential, volt +c = 3e+08; // Speed of light in free space +Lambda_min = 1.24e-06/V; // Minimum wavelength, metre +F_max = c/Lambda_min; // Maximum frequency, Hz +printf("\nThe shortest wavelength present in X-rays = %4.2f angstrom", Lambda_min/1D-10); +printf("\nThe maximum frequency present in X-rays = %3.1e Hz", F_max); +// Result +// The shortest wavelength present in X-rays = 0.25 angstrom +// The maximum frequency present in X-rays = 1.2e+19 Hz diff --git a/635/CH8/EX8.10/Ch08Ex10.sci b/635/CH8/EX8.10/Ch08Ex10.sci new file mode 100755 index 000000000..7b70868d6 --- /dev/null +++ b/635/CH8/EX8.10/Ch08Ex10.sci @@ -0,0 +1,22 @@ +// Scilab code Ex8.10: Determining angle of reflection by using wavelength of X-ray Page 261 (2010)
+lambda = 0.440e-010; // Wavelength of X-rays, m
+d = 2.814e-010; // Interplanar spacing of rocksalt crystal, m
+// 2*d*sin(theta) = n*lambda **Bragg's law, n is the order of diffraction
+// Solving for theta, we have
+// theta = asin(n*lambda/(2*d))
+// Declare a function for converting angle into degrees and minutes
+function [d,m] = degree_minute(n)
+ d = int(n);
+ m = (n-int(n))*60;
+endfunction
+for n = 1:1:5 // For diffraction order from 1 to 5
+ theta = asind(n*lambda/(2*d)); // Bragg's angle
+ [deg, mint] = degree_minute(theta); // Call conversion function
+ printf("\nTheta%d = %2d degree(s), %2d minute(s)", n, deg, mint);
+end
+// Result
+// Theta1 = 4 degree(s), 29 minute(s)
+// Theta2 = 8 degree(s), 59 minute(s)
+// Theta3 = 13 degree(s), 33 minute(s)
+// Theta4 = 18 degree(s), 13 minute(s)
+// Theta5 = 23 degree(s), 0 minute(s)
\ No newline at end of file diff --git a/635/CH8/EX8.11/Ch08Ex11.sci b/635/CH8/EX8.11/Ch08Ex11.sci new file mode 100755 index 000000000..bba9877e6 --- /dev/null +++ b/635/CH8/EX8.11/Ch08Ex11.sci @@ -0,0 +1,19 @@ +// Scilab code Ex8.11: Determining the wavelength of diffracted X-rays Page 262 (2010)
+d = 2.814e-010; // Interplanar spacing of rocksalt crystal, m
+theta = 9; // Bragg's angle, degree
+// 2*d*sin(theta) = n*lambda **Bragg's law, n is the order of diffraction
+// Solving for lambda, we have
+// lambda = 2*d*sin(theta)/n;
+printf("\nThe first four wavelengths of diffracted beam are:");
+for n = 1:1:5 // For diffraction order from 1 to 5
+ lambda = 2*d*sind(theta)/n; // Wavelength of X-rays, m
+ if lambda >= 0.2e-010 & lambda <= 1.0e-010 then
+ printf("\nLambda%d = %6.4e angstrom", n, lambda/1D-10);
+ end
+end
+// Result
+// The first four wavelengths of diffracted beam are:
+// Lambda1 = 8.8041e-001 angstrom
+// Lambda2 = 4.4021e-001 angstrom
+// Lambda3 = 2.9347e-001 angstrom
+// Lambda4 = 2.2010e-001 angstrom
\ No newline at end of file diff --git a/635/CH8/EX8.12/Ch08Ex12.sci b/635/CH8/EX8.12/Ch08Ex12.sci new file mode 100755 index 000000000..783ae3008 --- /dev/null +++ b/635/CH8/EX8.12/Ch08Ex12.sci @@ -0,0 +1,14 @@ +// Scilab code Ex8.12: Reciprocal lattice parameters from 2-D direct lattice parameters Page 277 (2010)
+a = 3e-010; // First lattice parameter of direct lattice
+b = 5e-010; // Second lattice parameter of direct lattice
+theta = 60; // Angle between two lattice vectors of the direct lattice
+// if a_prime and b_prime are the lattice vectors for the reciprocal lattice, then
+// a_prime*a = 2*%pi and a_prime*b = 0
+// Similarly, b_prime*b = 2*%pi and b_prime*a = 0
+// Solving for a_prime and b_prime, we have
+a_prime = 2*%pi/(a*cosd(90-theta)); // Lattice vector for reciprocal lattice, per metre
+b_prime = 2*%pi/(b*cosd(90-theta)); // Lattice vector for reciprocal lattice, per metre
+printf("\nThe reciprocal lattice vectors are:\n a_prime = %5.2f per angstrom and b_prime = %5.2f per angstrom", a_prime*1e-010, b_prime*1e-010);
+// Result
+// The reciprocal lattice vectors are:
+// a_prime = 2.42 per angstrom and b_prime = 1.45 per angstrom
\ No newline at end of file diff --git a/635/CH8/EX8.13/Ch08Ex13.sci b/635/CH8/EX8.13/Ch08Ex13.sci new file mode 100755 index 000000000..c79943c5f --- /dev/null +++ b/635/CH8/EX8.13/Ch08Ex13.sci @@ -0,0 +1,31 @@ +// Scilab code Ex8.13: Bragg angle and the indices of diffraction of Powder Lines Page 285 (2010)
+n = 1; // Cosider first order diffraction
+a = 6e-010; // First lattice parameter of direct lattice, m
+lambda = 1.54e-010; // Wavelength used in diffraction of X-rays by Powder Method, m
+// Declare a function for converting angle into degrees and minutes
+function [d,m] = degree_minute(n)
+ d = int(n);
+ m = (n-int(n))*60;
+endfunction
+// Calculate the hkl and hence interpalnar spacing 'd' for three lowest powder lines
+printf("\nThe Bragg angles and the indices of diffraction for the three lowest powder lines are:");
+for h = 0:1:2
+ for k = 0:1:2
+ for l = 0:1:1
+ if (modulo(h,2) == 1 & modulo(k,2) == 1 & modulo (l,2) == 1) | (modulo(h,2) == 0 & modulo(k,2) == 0 & modulo (l,2) == 0) then
+ if (h <> 0) then
+ N = h^2+k^2+l^2;
+ d = a/sqrt(N); // Interplanar spacing, metre
+ theta = asind(n*lambda/(2*d));
+ [deg, mint] = degree_minute(theta); // Call conversion function
+ printf("\nd[%d%d%d] = %4.2e and theta[%d%d%d] = %d deg %d min", h, k, l, d, h, k, l, deg, mint);
+ end
+ end
+ end
+ end
+end
+// Result
+// The Bragg angles and the indices of diffraction for the three lowest powder lines are:
+// d[111] = 3.46e-010 and theta[111] = 12 deg 50 min
+// d[200] = 3.00e-010 and theta[200] = 14 deg 52 min
+// d[220] = 2.12e-010 and theta[220] = 21 deg 17 min
\ No newline at end of file diff --git a/635/CH8/EX8.14/Ch08Ex14.sci b/635/CH8/EX8.14/Ch08Ex14.sci new file mode 100755 index 000000000..72ec59da5 --- /dev/null +++ b/635/CH8/EX8.14/Ch08Ex14.sci @@ -0,0 +1,14 @@ +// Scilab code Ex8.14: Minimum distance from the centre of the Laue pattern of an fcc crystal Page 289 (2010)
+n = 1; // Consider the first order diffraction
+a = 4.5e-010; // Lattice parameter for fcc lattice, m
+V = 50e+03; // Potential difference across the X-ray tube, volt
+D = 5; // Crystal to film distance, cm
+h = 1, k = 1, l = 1; // Incides for the planes of maximum spacing
+lambda_min = 1.24e-06/V; // The cut-off wavelength of X-rays, m
+d_111 = a/sqrt(h^1+k^2+l^2);
+theta_111 = asind(n*lambda_min/(2*d_111));
+// As tan(2*theta_111) = x/D, solving for x
+x = D*tand(2*theta_111); // // Minimum distance from the centre of Laue pattern
+printf("\nThe minimum distance from the centre of the Laue pattern at which reflections can occur from the planes of maximum spacing = %4.2f cm", x);
+// Result
+// The minimum distance from the centre of the Laue pattern at which reflections can occur from the planes of maximum spacing = 0.48 cm
\ No newline at end of file diff --git a/635/CH8/EX8.15/Ch08Ex15.sci b/635/CH8/EX8.15/Ch08Ex15.sci new file mode 100755 index 000000000..401f062a7 --- /dev/null +++ b/635/CH8/EX8.15/Ch08Ex15.sci @@ -0,0 +1,15 @@ +// Scilab code Ex8.15: Calculating unit cell height along the axis of a rotation photograph Page 291 (2010)
+n = 1; // Consider the first order diffraction of X-rays
+S = [0.29,0.59,0.91,1.25,1.65,2.12]; // An array of heights of first six layers above(below) the zero layer, cm
+R = 3; // Radius of the camera, cm
+lambda = 1.54e-08; // Wavelength of the X-rays, cm
+// For an a-axis rotation photograph, the unit cell parameter is given by
+// a = n*lambda/S(n)*(R^2 + S(n)^2)^(1/2)
+// Calculate 'a' for six different values of n from 1 to 6
+for n = 1:1:6
+ a = (n*lambda/S(n))*(R^2 + S(n)^2)^(1/2);
+end
+printf("\nThe unit cell height of the crystal = %2.0f angstrom", a/1D-8);
+
+// Result
+// The unit cell height of the crystal = 16 angstrom
\ No newline at end of file diff --git a/635/CH8/EX8.16/Ch08Ex16.sci b/635/CH8/EX8.16/Ch08Ex16.sci new file mode 100755 index 000000000..892e3a6d0 --- /dev/null +++ b/635/CH8/EX8.16/Ch08Ex16.sci @@ -0,0 +1,19 @@ +// Scilab code Ex8.16: Diffraction of thermal neutrons from planes of Ni crystal Page 294 (2010)
+k = 1.38e-023; // Boltzmann constant, J/mol/K
+h = 6.626e-034; // Planck's constant, Js
+theta = 28.5; // Bragg's angle, degree
+a = 3.52e-010; // Lattice parameter of fcc structure of nickel, m
+m_n = 1.67e-027; // Rest mass of neutron, kg
+// For fcc lattice, the interplanar spacing is given by
+d = a/sqrt(3); // Interplanar spacing of Ni, m
+// Bragg's equation for first order diffraction (n = 1) is
+lambda = 2*d*sind(theta); // Bragg's law, m
+// From kinetic interpretaion of temperature, we have
+// (1/2)*m*v^2 = (3/2)*k*T -- (a)
+// Further from de-Broglie relation
+// lambda = h/(m*v) -- (b)
+// From (a) and (b), solving for T, we have
+T = h^2/(3*m_n*k*lambda^2); // Effective temperature of the neutrons, K
+printf("\nThe effective temperature of neutrons = %d K", T);
+// Result
+// The effective temperature of neutrons = 168 K
\ No newline at end of file diff --git a/635/CH8/EX8.17/Ch08Ex17.sci b/635/CH8/EX8.17/Ch08Ex17.sci new file mode 100755 index 000000000..775f9adfd --- /dev/null +++ b/635/CH8/EX8.17/Ch08Ex17.sci @@ -0,0 +1,20 @@ +// Scilab code Ex8.17: Diffraction of electrons from fcc crystal planes Page 295 (2010)
+// Declare a function for converting angle into degrees and minutes
+function [d,m] = degree_minute(n)
+ d = int(n);
+ m = (n-int(n))*60;
+endfunction
+h = 6.626e-034; // Planck's constant, Js
+m = 9.1e-031; // Rest mass of electron, kg
+e = 1.602e-019; // charge on an electron, coulomb
+a = 3.5e-010; // Lattice parameter of fcc crystal, m
+V = 80; // Accelerating potential for electrons, volt
+lambda = h/sqrt(2*m*e*V); // de-Broglie wavelength of electrons, m
+d_111 = a/sqrt(3); // Interplanar spacing for (111) planes of fcc crystal, m
+// Bragg's equation for first order diffraction (n = 1) is
+// lambda = 2*d_111*sind(theta_111); // Bragg's law, m
+theta_111 = asind(lambda/(2*d_111)); // Bragg's angle, degree
+[deg, mint] = degree_minute(theta_111); // Call conversion function
+printf("\nThe Bragg angle for electron diffraction = %d deg %d min", deg, mint);
+// Result
+// The Bragg angle for electron diffraction = 19 deg 50 min
diff --git a/635/CH8/EX8.2/Ch08Ex2.sci b/635/CH8/EX8.2/Ch08Ex2.sci new file mode 100755 index 000000000..2fb5acbad --- /dev/null +++ b/635/CH8/EX8.2/Ch08Ex2.sci @@ -0,0 +1,19 @@ +// Scilab Code Ex8.2 Calculation of impinging electrons on the target and characteristics of X-rays Page-253 (2010) +I = 2.5e-03; // Current through X-ray tube, ampere +V = 6e+03; // Potential across the X-ray tube, volt +e = 1.6e-19; // Charge on an electron, coulomb +m = 9.1e-031; // mass of an electron, kg +t = 1; // Transit time, second +Q = I*t; // Total charge flowing per second through the x-ray tube, coulomb +n = Q/e; // Number of electrons striking the target per second +// We have eV = 1/2*m*v^2 (stopping potential = maximum Kinetic energy) +// Solving for v +v = sqrt(2*e*V/m); // speed of electrons striking the target, m/s +Lambda_min = 1.24e-06/V; // Minimum wavelength of X-rays produced, metre +printf("\nThe number of electrons striking the target = %4.2e",n); +printf("\nThe velocity of electrons striking the target = %4.2e m/s",v); +printf("\nThe shortest wavelength present in X-rays = %4.2e m", Lambda_min); +// Result +// The number of electrons striking the target = 1.56e+016 +// The velocity of electrons striking the target = 4.59e+007 m/s +// The shortest wavelength present in X-rays = 2.07e-010 m
\ No newline at end of file diff --git a/635/CH8/EX8.3/Ch08Ex3.sci b/635/CH8/EX8.3/Ch08Ex3.sci new file mode 100755 index 000000000..4a42cf639 --- /dev/null +++ b/635/CH8/EX8.3/Ch08Ex3.sci @@ -0,0 +1,19 @@ +// Scilab Code Ex8.3 Calculation of wavelength of characteristic X-rays Page-253 (2010) +h = 6.626e-034; // Planck's constant, Js +c = 3e+08; // Speed of light in free space, m/s +e = 1.602e-019; // Charge on an electron, coulomb +E_K = -78; // Energy of K shell for platinum, keV +E_L = -12; // Energy of L shell for platinum, keV +E_M = -3 ; // Energy of M shell for platinum, keV +E_K_alpha = E_L - E_K; // Energy of K_alpha line, keV +E_K_beta = E_M - E_K; // Energy of K_beta line, keV +// We have E = h*f, where f = c/Lambda this implies E = h*c/lambda +// Solving for Lambda +// Lambda = h*c/E +lambda_K_alpha = h*c/(E_K_alpha*e*1e+03); // Wavelength of K_alpha line, metre +lambda_K_beta = h*c/(E_K_beta*e*1e+03); // Wavelength of K_beta line, metre +printf("\nThe wavelength of K_alpha line = %4.2f angstrom", lambda_K_alpha/1D-10); +printf("\nThe wavelength of K_beta line = %4.2f angstrom", lambda_K_beta/1D-10); +// Result +// The wavelength of K_alpha line = 0.19 angstrom +// The wavelength of K_beta line = 0.17 angstrom diff --git a/635/CH8/EX8.4/Ch08Ex4.sci b/635/CH8/EX8.4/Ch08Ex4.sci new file mode 100755 index 000000000..6de56cf9d --- /dev/null +++ b/635/CH8/EX8.4/Ch08Ex4.sci @@ -0,0 +1,13 @@ +// Scilab Code Ex8.4 Calculation of atomic number of an unknown element Page-255 (2010) +lambda_Pt = 1.321e-010; // Wavelength of L_alpha line of Pt, m +Z_Pt = 78; // Atomic number of platinum +b = 7.4; // Constant +lambda_x = 4.174e-010; // Wavelength of unknown element, m +// We have f = [a*(Z-b)]^2 (Moseley's law) +// As f_Pt = c/lambda_Pt = [a*(Z_Pt-b)]^2 +// Similarly f_x = c/lambda_x = [a*(Z_x-b)]^2 +// Dividing f_Pt by f_x and solving for x +Z_x = b + sqrt(lambda_Pt/lambda_x)*(Z_Pt-b); // Atomic number of unknown element +printf("\nThe atomic number of unknown element = %4.1f", Z_x); +// Result +// The atomic number of unknown element = 47.1
\ No newline at end of file diff --git a/635/CH8/EX8.5/Ch08Ex5.sci b/635/CH8/EX8.5/Ch08Ex5.sci new file mode 100755 index 000000000..3f907925a --- /dev/null +++ b/635/CH8/EX8.5/Ch08Ex5.sci @@ -0,0 +1,13 @@ +// Scilab Code Ex8.5 Calculation of wavelength of copper using Moseley's law Page-256 (2010) +c = 3.0e+08; // Speed of light, m/s +lambda_W = 210e-010; // Wavelength of K_alpha line of W, m +Z_W = 74; // Atomic number of tungsten +Z_Cu = 29; // Atomic number of copper +b = 1; // Constant for K-series +// f_W = c/lambda_W = (a*73)^2, The frequency K_alpha line for tungsten, Hz +// f_Cu = c/lambda_Cu = (a*28)^2, The frequency K_alpha line for copper, Hz +// Dividing f_W by f_Cu and solving for lambda_Cu +lambda_Cu = ((Z_W-b)/(Z_Cu-b))^2*lambda_W; // Wavelength of K_alpha line of Cu, m +printf("\nThe wavelength of K_alpha line of copper = %4.0f angstrom", lambda_Cu/1D-10); +// Result +// The wavelength of K_alpha line of copper = 1427 angstrom
\ No newline at end of file diff --git a/635/CH8/EX8.6/Ch08Ex6.sci b/635/CH8/EX8.6/Ch08Ex6.sci new file mode 100755 index 000000000..8f1e6f5b9 --- /dev/null +++ b/635/CH8/EX8.6/Ch08Ex6.sci @@ -0,0 +1,16 @@ +// Scilab Code Ex8.6 Calculation of atomic number from wavelength using Moseley's law Page-256 (2010) +c = 3.0e+08; // Speed of light, m/s +h = 6.626e-034; // Planck's constant, Js +epsilon_0 = 8.85e-012; // Absolute electrical permittivity of free space, coulomb square per newton per metre square +m = 9.1e-031; // Mass of an electron, kg +e = 1.6e-019; // Charge on an electron, C +lambda = 0.7185e-010; // Wavelength of K_alpha line of unknown element +b = 1; // Mosley's constant for K-series +n_1 = 1; n_2 = 2; // Lower and upper energy levels +// We know that f = c/lambda = m*e^4*(Z-b)^2/(8*epsilon_0^2*h^3)*(1/n_2^2-1/n_1^2) +// This implies that lambda = (8*epsilon_0^2*c*h^3/(m*e^4*(Z-b)^2*(1/n_2^2-1/n_1^2)) +// Solving for Z +Z = sqrt(8*epsilon_0^2*c*h^3/(m*e^4*lambda*(1/n_1^2-1/n_2^2)))+b; // Atomic number unknown element +printf("\nThe atomic number unknown element = %2d", Z); +// Result +// The atomic number unknown element = 42
\ No newline at end of file diff --git a/635/CH8/EX8.7/Ch08Ex7.sci b/635/CH8/EX8.7/Ch08Ex7.sci new file mode 100755 index 000000000..5f87c26da --- /dev/null +++ b/635/CH8/EX8.7/Ch08Ex7.sci @@ -0,0 +1,17 @@ +// Scilab Code Ex8.7 Calculation of wavelengths of tin and barium using Moseley's law Page-257 (2010) +Z_Fe = 26; // Atomic number of iron +Z_Pt = 78; // Atomic number of platinum +Z_Sn = 50; // Atomic number of tin +Z_Ba = 56; // Atomic number of barium +b = 1; // Mosley's constant for K-series +lambda_Fe = 1.93e-010; // Wavelength of K_alpha line of Fe +lambda_Pt = 0.19e-010; // Wavelength of K_alpha line of Pt +// From Moseley's Law, +// f = a*(Z-1)^2. This implies lambda = C*1/(Z-1)^2 +// so that lambda_Fe = C*1/(Z_Fe-1)^2 and lambda_Sn = C*1/(Z_Sn-1)^2 +// Dividing lambda_Sn by lambda_Fe and solving for lambda_Sn +lambda_Sn = (Z_Fe-1)^2/(Z_Sn-1)^2*lambda_Fe; // Wavelength of K_alpha line for tin, m +lambda_Ba = (Z_Pt-1)^2/(Z_Ba-1)^2*lambda_Pt; // Wavelength of K_alpha line for barium, m +printf("\nThe wavelengths of tin and barium = %3.1f angstrom and %4.2f angstrom respectively", lambda_Sn/1D-10, lambda_Ba/1D-10); +// Result +// The wavelengths of tin and barium = 0.5 angstrom and 0.37 angstrom respectively
\ No newline at end of file diff --git a/635/CH8/EX8.8/Ch08Ex8.sci b/635/CH8/EX8.8/Ch08Ex8.sci new file mode 100755 index 000000000..ca053cb87 --- /dev/null +++ b/635/CH8/EX8.8/Ch08Ex8.sci @@ -0,0 +1,11 @@ +// Scilab Code Ex8.8 Percentage transmitted energy of X-rays: Page 259 (2010)
+mu = 139; // Attenuation co-efficient of aluminium, per metre
+x = 0.005; // Thickness of aluminium sheet, m
+// If X% is the intensity of the X-ray transmitted through the aluminium sheet then
+// X% = I/I_0
+// or X/100 = exp(-absorb_coeff*x)
+// Solving for X
+X = 100*exp(-mu*x); // Transmitted percentage of X-rays
+printf("\nThe intensity of the X-ray transmitted through the aluminium sheet = %g percent", round(X));
+// Result
+// The intensity of the X-ray transmitted through the aluminium sheet = 50 percent
\ No newline at end of file diff --git a/635/CH8/EX8.9/Ch08Ex9.sci b/635/CH8/EX8.9/Ch08Ex9.sci new file mode 100755 index 000000000..f48083c8f --- /dev/null +++ b/635/CH8/EX8.9/Ch08Ex9.sci @@ -0,0 +1,18 @@ +// Scilab code Ex8.9 : Determination of thickness of lead piece by using two equal intensity X-ray wavelengths : Page 259 (2010)
+lambda_1 = 0.064e-010; // First wavelength of X-ray, metre
+lambda_2 = 0.098e-010; // Second wavelength of X-ray, metre
+I1_ratio_I2 = 3; // Ratio of attenuated beam intensity
+mu_m1 = 0.164; // Mass absorption coefficient for first wavelength, metre square per kg
+mu_m2 = 0.35; // Mass absorption coefficient for second wavelength, metre square per kg
+d = 0.164; // Density of the lead, kg per metre cube
+mu1 = mu_m1*d; // absorption co-efficient of the lead for first wavelength, per metre
+mu2 = mu_m2*d; // absorption co-efficient of the lead for second wavelength, per metre
+x = poly(0,"x"); // Declare 'x' as the thickness variable
+// Now I = exp(-ac*x) thus
+// I1_ratio_I2 = exp(-ac_1*x)/exp(-ac_2*x)
+// or 3 = exp(2109.24)*x this implies
+// 2104.24*x = log(3) and assume
+p = 2104.24*x-log(3);
+printf("\nThe thickness of lead piece = %4.2e m", roots(p));
+// Result
+// The thickness of lead piece = 5.22e-004 m
\ No newline at end of file |