X-ray Powder Diffraction Simulation with a Microcomputer - Journal of

An alternative is the microcomputer X-ray powder diffraction simulation ... Organic Chemistry and the Internet: A Web-Based Approach to Homework and T...
1 downloads 0 Views 76KB Size
Information • Textbooks • Media • Resources

edited by

computer series, 190

James P. Birk Arizona State University Tempe, AZ 85287

X-ray Powder Diffraction Simulation with a Microcomputer1 Bernard L. Masson Ecole d’Ingénierie, Département de Génie Mécanique, Université du Québec à Trois-Rivières, CP 500, Trois-Rivières, PQ, G9A 5H7, Canada

X-ray powder diffraction is a very important technique in chemistry and metallurgy. Metallurgists use it to identify the phases found in an alloy. It is indeed the only method allowing this identification, because it is the phase structure and not its chemical composition that diffracts. However, an experimental method demands expensive equipment not always available owing to lack of laboratory funds. Besides, it is necessary for the student to acquire notions of crystallography in order to understand the theory of the method. An alternative is the microcomputer X-ray powder diffraction simulation described here.

ing the four highest intensities of a great number of chemicals (the PDF cards) (4), but they have no pedagogic value and are useful only for a researcher who wishes to identify the phases of a system. Theoretical Background The theoretical background can be found in Cullity’s book (5). The intensity of diffraction I for a given diffraction angle θ is: I =

2

F

p

The Simulation We have developed a program in QuickBasic for Macintosh microcomputers (68K) that can compute the line intensities of the diffracting planes and plot the spectrum of a chemical once the crystal system, the unit cell parameters, the coordinates of the atoms in the unit cell, and the atomic scattering factors of the atoms are known. This, therefore, is a simulation generated from theoretical data and not from experimental data as done by Qian Pu (1). Spraget (2) used theoretical data with a spreadsheet (Lotus) rather than with a language. The advantage of using a spreadsheet is, he believed, the possibility it offers the user to easily modify the program. However, this is just as easy with BASIC, since it can be run in interpretive mode and the source code can be easily modified. Yvon et al. (3) have developed a FORTRAN program called Lazy Pulverix, which allows the computing of line intensities of any powder substance; but it is intended for researchers and has a poor graphic FORTRAN interface. The advantage of simulation over experiment is the possibility for students to acquire basic theoretical notions related to crystal systems, unit cells, Bragg’s law, the computing of diffraction intensities, etc. because the intermediate computed results are tabulated. Figure 1 shows a partial table. Another major advantage of the simulation is the shorter time to plot a diagram (less than 5 min for the most intricate diffractograms vs. 1 hr minimum for an experimental setup). One can find data banks of experimental results giv-

2

1 + cos sin

2

θ

θ

e

(1)

{2M

F is the structure factor, depending on the Miller indices of the diffracting plane (hkl) and on the coordinates (un, vn, wn) of the n atoms in the unit cell: F

2

2

n

=

Σ

f n cos

1

2 π hu

+ kv

n

n

+ lw

(2)

where fn are the atomic scattering factors of the n atoms of the chemical. They are approximated (6) for different atoms or ions by the analytical function f

sin θ λ

4

=

Σ

i = 1

a i exp

– b

i

sin λ

2 2

θ

+ c

The coefficients ai, bi, and c have been written in a separate file (asf.fich) for most of the elements and are called up by the program through the elements’ symbols. The multiplicity factor p (1) is written in the program for the

Figure 1. Partial output list of rough results.

918

n

Journal of Chemical Education • Vol. 73 No. 10 October 1996

Information • Textbooks • Media • Resources

Figure 2. Input of the atomic coordinates.

seven crystal systems; e{2M is the temperature correction factor that can be applied to the elements of the cubic system. M

=

1.15

∞ 10 AΘ

4

T

Θ T

φ

2

Θ 4T

+

sin

2

λ

2

θ

Figure 3. Table for the input of parameters simulation.

(3)

where Θ is Debye temperature. Knowing the wavelength λ corresponding to the selected anode (Kα, mean or custom value), the unit cell parameters, and its crystal system (all given by the user), the interplanar spacing d can be computed; and with Bragg’s law, the diffraction angle θ for any diffracting plane (hkl) can be found. For example, for the cubic system, we have: 1 d

2

=

h

2

+ k

2

a

2

+ l

2

(4)

And according to Bragg’s law: sin

θ =

λ 2d

(5)

The intensity I for any diffraction angle θ is then computed with eq 1. For the simulation, the following information has to be given for the compound studied: its chemical formula, its crystal system, the unit cell parameters (cell dimensions and angles), and the coordinates of the atoms in the unit cell. An auxiliary program called “Entrecoord” allows one to input these coordinates, which are automatically stored in a specific file to be read by the main program. Figure 2 shows an example of these coordinates stored in a specific file. The unit cell parameters and the atomic coordinates for a given compound can be found in the International Tables for X-ray Crystallography (6), Pearson’s book on lattice spacings (7), and Pearson’s Handbook of Crystallographic Data for Intermetallic Phases (8). Figures 3 and 4 show the input of the simulation parameters. Subsequently, the computer can do the calculations, exploring all the planes with Miller indices from (777) max. to (001). The corresponding intensity is computed with eq 1. The planes with a zero or very weak intensity are then eliminated and the results are given in an output list (Fig. 1 shows a partial rough output list for TiO2) showing for any diffracting plane (hkl): the angle 2θ, the atomic scattering factor f of each atom or ion, the multiplicity factor p, the polarization and Lorentz factor FPL, the squared structure factor |F|2, the intensity I, and the interplanar spacing d. The theoretical density ρ of the chemical is also computed (eq 6) from the atomic (or molecular) mass and the number of atoms (or moles) in the unit cell:

Figure 4. Table for the input of parameters unit cell.

Figure 5. Output sorted list of simulated results for TiO2.

ρ =

nA NV

(6)

with n the number of atoms (or moles) number per unit cell, A the atomic (or molecular) mass, N the Avogadro number, and V the unit cell volume. Then the data are sorted by increasing order of angles, the equivalent planes (same angle and same intensity) are eliminated, and the intensities of the planes of the same

Vol. 73 No. 10 October 1996 • Journal of Chemical Education

919

Information • Textbooks • Media • Resources

Figure 6. Table for the input of the graphic display parameters.

angle are added. Relative intensities are then computed vs. the highest intensity. Figure 5 shows an example of an output sorted list. It is then possible to have a graphic plotting of Irel vs. 2θ, from left to right or from right to left (as obtained experimentally), selecting the two boundaries for the angles and also expanding the ordinate scale by a factor of 2 or 4 in order to show the weakest lines more clearly. Figure 6 shows the input table for the graphic parameters. The display can also be made as lines or as peaks in order to be more realistic. A Gaussian profile is chosen in this latter case. Figures 7 and 8 show the spectra obtained for NaCl and TiO2, respectively. They are plotted as peaks with an ordinate that has been magnified two times. Miller indices of the diffracting planes are shown on the diffractogram facing each line or peak. For plotting as peaks, the broadening of the peaks with 2θ is simulated and can be increased arbitrarily to take account of some influencing factors such as crystal size, nonuniform strains (produced by quenching or by cold working), and mosaic structure. The increasing of thermal vibration with 2θ is also simulated by plotting as peaks.

Figure 7. Simulated spectrum of NaCl.

Figure 8. Simulated spectrum of TiO2 rutile type.

Comparing Theoretical and Experimental Results The simulated results have been compared with experimental results (PDF cards). Excellent agreement is obtained. Concerning the intensity values, some differences can sometimes be observed because not all the influential factors (such as the intensity of the incident Xrays, surface roughness, and textures) can be taken into account in the simulation. Metallurgical Examples It is possible with this technique to identify two phases with the same chemistry as austenite and martensite in a quenched steel, the mechanical properties of which are of course quite different. This is very useful for the metallurgist and the engineer. Solid solutions such as austenite, martensite, or ferrite can be simulated for different weight percentages of carbon. Also, complete solid solutions like Cu/Ni can be simulated. It is also possible to display the diagram of a two-phase mixture, if one knows the volume percentage of each phase. Figure 9 shows the spectrum of a mixture of 20 vol % austenite and 80 vol % of martensite in a 0.8 wt % carbon quenched steel. We can see that the (111) 920

Figure 9. Simulated spectrum of a 20/80 austenite/martensite mixture in a quenched 0.8 wt % carbon steel.

austenite lines are too close to the (101) martensite ones, and therefore it will be impossible to choose these lines (with this anode) in order to appreciate (qualitatively) the relative amount of each phase.

Journal of Chemical Education • Vol. 73 No. 10 October 1996

Information • Textbooks • Media • Resources

The effect of the nature of the anode (i.e., its wavelength) can also be shown easily, which is very useful in making an anode selection. Furthermore, if the selected anode is not recommended because of the absorption edge, a warning is given asking for a new selection—as for example when using a copper anode with ferrous metals. Conclusions

directions; and to print a list of results or the spectra on different sizes of paper. Note 1. This software was presented at the Colloquium Applications Pédagogiques de l’Ordinateur, Univ. Laval, Québec, April 1993, and also at the Congrès de l’ACFAS- Montréal, June 1992.

Literature Cited

Students and even researchers thus have a powerful tool allowing them to master the background of crystallography, X-rays, and qualitative analysis, compare the simulated results with the experimental ones, and observe the influence of the anode type on the spectrum. Also, it allows them to obtain the spectra (and a list of the diffracting planes and interplanar spacing vs. 2θ) of different chemical elements and compounds up to four atom types, or the spectra of two-phase mixtures; to save the spectra and results list on disk and recall them; to amplify the intensity scale and draw the spectra between any chosen boundaries, as lines or as peaks and in any

1. 2. 3. 4. 5. 6. 7. 8.

Pu, Q. J. Chem. Educ. 1992, 69, 815–817. Spraget, H. W. G. Comput. Educ. 1989, 13, 101–108. Yvon, K.; Jeitschko, W.; Parthé, E. J. Appl. Cryst. 1977, 10, 73–74. Joint Committee on Powder Diffraction Standards. Powder Diffraction File, set 1–5 (Rev.), 1974. Cullity, B. D. Elements of X-ray Diffraction; Addison–Wesley: Reading, MA, 1978. International Tables for X-ray Crystallography; Kynoch Press for the International Union of Crystallography: Birmingham, England, 1952; vol. 1. Pearson, W. B. A Handbook of Lattice Spacings and Structure of Metals and Alloys; Pergamon: New York, 1967. Villars, P; Calvert, L. D. Pearson’s Handbook of Crystallographic Data for Intermetallic Phases; ASM: Metals Park, OH, 1989; Vols. 1–3.

Vol. 73 No. 10 October 1996 • Journal of Chemical Education

921