computer programs Journal of
Applied Crystallography ISSN 0021-8898
Received 3 April 2013 Accepted 23 May 2013
GBgeom: a computer program for visualizing texture parameters and simulating grain boundary structures in cubic crystals Thangaraj Karthikeyan* and Saibaba Saroja Microscopy and Thermo-physical Property Division, Physical Metallurgy Group, Indira Gandhi Centre for Atomic Research, Kalpakkam, Tamil Nadu 603102, India. Correspondence e-mail:
[email protected]
# 2013 International Union of Crystallography Printed in Singapore – all rights reserved
GBgeom is a computer graphics program developed for unraveling the relations between different texture parameters and for simulating the basic unrelaxed atomic structures at grain boundary planes in body- and face-centered cubic crystalline materials. It could be a useful tool to materials researchers for interpreting texture data and for deciphering the possible ordered structures at grain boundaries. The software has been developed using the Visual C++ language, and OpenGL routines have been used for rendering various outputs and implementing an intuitive user interface.
1. Introduction The body- or face-centered cubic (b.c.c./f.c.c.) structure is a common type of crystal lattice exhibited by many engineering alloys (based on iron, aluminium, copper, nickel etc.). The preferred crystallographic orientation of grains or the ‘texture’ of such polycrystalline materials is assessed and controlled through optimized process treatments to improve functional properties for various stringent applications (Kocks et al., 1998). The macrotexture is conventionally characterized by X-ray diffraction (texture goniometer technique), and recently the scanning electron microscopy (SEM)-based electron backscatter diffraction (EBSD) technique has been recognized as a versatile tool for characterizing the microtexture and to assess grain boundary structures (Schwartz et al., 2009). Crystal orientation data are usually denoted by Euler angles, but a number of schemes are adopted in the representation of texture data (such as pole figures by different projection methods, inverse pole figures, Euler space, Rodrigues space and pictorial depiction of the unit cell with respect to the sample axis) and each offers some specific advantage towards contextual interpretation of the texture data. The relative misorientation between the adjoining crystals is generally described in terms of a rotation angle–axis pair for classifying the different types of grain boundaries, such as low/high-angle and CSL (coincidence site lattice) boundaries. In conventional EBSD analysis, the trace line formed at the intersection of the grain boundary plane and the specimen surface is amenable for grain boundary study. By using serial sectioning methods based on the focused ion beam SEM technique (or by controlled mechanical polishing), it also becomes possible to determine the oblique inclination angle of the grain boundary plane. The need for grain boundary evaluation based on five macroscopic parameters (three independent variables for denoting relative misorientation between crystals and two parameters for defining the grain boundary plane) has been emphasized (Randle, 2010; Schwartz et al., 2009). A general need exists among researchers for understanding the multidimensional entities of texture and grain boundaries through computer simulations, and this could be realized through the newly developed GBgeom program. The equations interrelating the different texture parameters as well as the principles of grain boundary analysis from EBSD data are well covered in the literature (Bunge, 1982; Morawiec, 2004; Engler & J. Appl. Cryst. (2013). 46, 1221–1224
Randle, 2010). As the description of crystal orientation and grain boundary nature essentially involves more than two parameters, a two-dimensional representation of their intersection is never complete. Under such circumstances, a graphical/animation program can greatly aid in visualizing them, and the GBgeom program has been developed broadly to implement this objective. To our knowledge, no such software is presently available in the literature. Though EBSD data analysis software is versatile in extracting out the concepts, a single-window representation of different texture attributes to illustrate their interrelationships is absent, and the present informative program seeks to be a useful link in this regard. The program GBgeom is primarily intended to simulate and display the rudimentary unrelaxed atomic positions at the grain boundary based on EBSD microtexture data for f.c.c. and b.c.c. materials. However, for completeness, the various attributes of texture representation of cubic crystals as well as illustration of expected EBSD Kikuchi pattern geometry have also been included within the scope of the program.
2. Modules and methods of calculations A concise description of the different orientation parameters, cubic crystal symmetry, pole projection methods, grain boundary parameters, Wigner–Seitz cells and the mathematical functions that have been used in GBgeom is given in this section. More details about these methods and texture depiction schemes are available in textbooks (Bunge, 1982; Engler & Randle, 2010; Morawiec, 2004). Crystal orientation is generally parameterized through the three Euler angles (’1, , ’2); the specific orientation of the crystal is realized by effecting stepwise sequential rotations of the reference cubic unit cell (aligned initially with the sample axis) about the [001], [100] and [001] axes by the ’1, and ’2 angles, respectively. Alternatively, the same crystal orientation can also be attained by a single-step rotation of the reference unit cell by an angle ! about the rotation axis r. 2.1. Quaternions
Rotation calculations can be robustly handled by quaternion algebra, which has been utilized in the program. Quaternions use a number system analogous to complex numbers, where i, j and k are doi:10.1107/S0021889813014283
1221
computer programs imaginary numbers that can connote the three-dimensional basis vectors of ^i, ^j and k^ in representation of rotations. A rotation by an angle (anticlockwise sense) about the unit rotation axis n^ can be denoted by a unit quaternion q: qð; n^ Þ ¼ qð; n1^i þ n2 ^j þ n3 k^ Þ ¼ cosð=2Þ þ sinð=2Þðn1 i þ n2 j þ n3 kÞ:
ð2Þ
Quaternion multiplication is noncommutative. If ð; ^t Þ denotes rotation with respect to the current (crystal) axes, then the net resultant rotation is given by q0 ð0 ; n^ 0 Þ ¼ qð; n^ Þ qa ð; ^tÞ:
xp ¼ x; yp ¼ y;
ð1Þ
+q and q are equivalent in the description of rotations, and the q with a positive first term is considered so that 0 . If the rotation ð; n^ Þ is followed by an additional rotation ð; ^t Þ, with the vector ^t defined with respect to the original reference axis, then the net resultant rotation ð0 ; n^ 0 Þ can be found using quaternion multiplication as q0 ð0 ; n^ 0 Þ ¼ qa ð; ^t Þ qð; n^ Þ:
z) are the resolved components of a vector or a pole point (with z 0), then this vector or point can be projected onto the XY plane by planar, stereographic or equal-area projection methods. The respective coordinates of (xp, yp)/(xs, ys)/(xe, ye) are given by
ð3Þ
xe ¼
x ; ð1 þ zÞ1=2
x y ; ys ¼ ; 1þz 1þz y ye ¼ : ð1 þ zÞ1=2 xs ¼
ð7Þ
2.4. Grain boundary parameters
The macroscopic description of a grain boundary is based on the relative misorientation between the adjoining crystals and the inclination of the grain boundary plane (Sutton & Balluffi, 1995), and is schematically depicted in Fig. 1. In EBSD characterization, these are measured in terms of the sample axis. If neighboring grains G1 and G2 have Euler angle orientations given by ð’11 ; 1 ; ’12 Þ and ð’21 ; 2 ; ’22 Þ, respectively, the associated quaternions denoted by qð!1 ; r^1 Þ and qð!2 ; r^2 Þ can be found using equation (4). Then, the relative misorientation can be found using the quaternion equation
The function relating the parameters of single-step rotation and the Euler angles (obtained by considering the concatenation of threestep rotations) is ’ þ ’2 qð!; r^Þ ¼ cos cos 1 2 2 h ’ ’ i ’1 ’2 2 þ sin cos i þ sin 1 j 2 2 2 ’ þ ’2 þ cos sin 1 k: ð4Þ 2 2
The crystal symmetry is again considered to find the relative minimum misorientation angle (12) between the grains and the ^ 12. The grain boundary plane requires corresponding rotation axis R two independent parameters, and these can be conveniently defined in terms of the polar angle (the angle between the grain boundary plane normal and the sample surface normal) and azimuthal angle (the angle made by the grain boundary trace with respect to the Y axis). The grain boundary normal vector is then given by
The above quaternion denotes the basic orientation descriptor linking the crystal orientation with the reference axes of the sample.
g^ ¼ sin sin ^i þ sin cos ^j þ cos k^ :
qð!12 ; r^12 Þ ¼ qð!1 ; ^r1 Þ qð!2 ; r^2 Þ:
ð8Þ
ð9Þ
Equation (6) can then be used to back-calculate the crystallographic description of grain boundary poles for the two grains.
2.2. Cubic crystal symmetry
Cubic crystals exhibit a high order of symmetry. The quaternions associated with the rotational symmetries are given below: 8 m ¼ 1; 2; 3; < qð2m=4; ½100=½010=½001Þ; qS q2m=3; ½111=½111=½111=½111 ; m ¼ 1; 2; : q 2m=2; ½011=½011=½101=½101=½110=½110 ; m ¼ 1: ð5Þ The symmetry quaternion qS is combined with qð!; r^Þ using equation (3) to find the 24 equivalent descriptions of orientation, and the quaternion with the minimum rotation angle [denoted by ^ Þ] can then be found to identify the misorientation angle ()– qð; R ^ ) set. rotation axis (R 2.3. Pole projections
The relation between an initial vector p and the transformed vector p0 obtained by the ð!; r^Þ rotation operation is p0x i þ p0y j þ p0z k ¼ qð!; r^Þ px i þ py j þ pz k qð!; ^rÞ; ð6Þ where ðpx ; py ; pz Þ and ðp0x ; p0y ; p0z Þ are the resolved components of vectors p and p0 , respectively. This relation is useful for calculating the orientation of crystal direction [uvw] or the crystal plane (hkl) pole normal with respect to the sample axes X, Y, Z, or conversely for determining the orientation of the sample axis (say X, Y, Z) vector in terms of the crystal axis. A three-dimensional vector is depicted in two-dimensional pole figures by suitable projection methods. If (x, y,
1222
Thangaraj and Saibaba
GBgeom
Figure 1 Schematic representation of the macroscopic parameters of a grain boundary. The intersection of the sample surface plane with the two neighboring grains G1 and G2 results in polygons, with the common edge denoting the grain boundary trace in a typical microstructure. The trace makes an azimuthal angle of with the +Y axis of the sample, while denotes the polar angle between the grain boundary plane and the sample surface.
J. Appl. Cryst. (2013). 46, 1221–1224
computer programs 2.5. CSL boundary misorientations
2.7. EBSD geometrical pattern
A CSL boundary denotes a special relative orientation of neighboring crystals wherein a finite fraction (1/) of extended lattice sites coincide and is generally used for understanding the ordered structure of grain boundaries in cubic materials. CSLs with low- ( 29) boundaries exhibit a twinning plane(s) (marked by a 180 misorientation about the twin plane), as has been listed by H. Mykura (Balluffi, 1979). A grain boundary constructed by a twinning process (a twin plane with a larger interplanar spacing selected appropriately for b.c.c./f.c.c.) can then represent the illustrative case of a coherent CSL boundary. The Euler angles of the two grains and grain boundary inclination are accordingly chosen for simulating the ordered CSL grain boundary structure.
The dynamical theory of electron diffraction is necessary to explain the observed intensity distribution in an EBSD Kikuchi diffraction pattern, while the observed network of bands/lines can be simulated by mapping out Bragg’s law for the relevant reflecting lattice planes (Schwartz et al., 2009). The geometry of a Kikuchi pattern can be interpreted as a gnomonic projection of the crystal lattice onto the flat phosphor screen, with band center lines being the trace of the diffracting plane. The spherical Kikuchi map about the specimen point is constructed by drawing great circles corresponding to different diffracting planes. Typical experimental conditions (specimen geometry, detector screen position) are assumed and the line of intersection of the (hkl) plane with the detector screen is calculated and drawn. Up to six prominent diffracting planes (for f.c.c./b.c.c. iron) are considered in the simulation.
2.6. Grain boundary structure
The nature of the deviation from a periodic arrangement of atoms at a grain boundary can be analyzed by assuming a common lattice point (located at the origin) between the two crystals, and then determining the intersection of the grain boundary plane with the unrelaxed atoms located near the interface. A Wigner–Seitz (W–S) cell (or the first Brillouin zone) represents the Voronoi division of space about each lattice point in the crystal; it is a truncated octahedron in the b.c.c. case, while it is a regular rhombic dodecahedron for an f.c.c. system (Kittel, 1995). The atoms represented by W–S cells and the polygons obtained by intersection with the grain boundary plane can be a simple guide for visualizing the atomic arrangement at the grain boundary, and to decipher the nature of defects or the possible ordered patterns. To implement the above concept, the periodic lattice positions of the two grains are calculated and those lying close to the grain boundary plane are first identified by some criterion. The points of intersection of the grain boundary plane with the pertinent W–S cell edges are then calculated (by solving geometrical equations), and the set of those connected points constitutes the associated polygon. The superposed pattern of polygonal cells obtained from the adjoining crystals can then be used as an aid for recognizing grain boundary structure.
3. Description of the program This program can run directly on computers using the Windows XP and Windows 7 operating systems (32 bit or 64 bit). The source code has been written in C++ and compiled using Microsoft Visual Studio. OpenGL commands have been extensively used for rendering various outputs. The output window has 1262 880 pixels, and the monitor should ideally have resolution settings better than this. OpenGL (registered trademark of Silicon Graphics Inc., Fremont, CA, USA) provides the software interface to graphics hardware for drawing complex three-dimensional representations from simple primitives (based on points and lines) (Woo et al., 1999). It incorporates several versatile syntax functions that can be used to generate window screens, define a three-dimensional box space of interest, and construct geometrical objects and display them in chosen colors/ schemes. Function calls in OpenGL facilitate translation and rotation of simulated objects, display of text, and control of the program through input from a keyboard device. The utility of the program is depicted through a few case examples below. Fig. 2 shows a snapshot from the program output that illustrates the ordered structure in a symmetrical tilt grain boundary with a deviation of 8 from ideal 3 in an f.c.c. system. A good matching line of atoms separated by regions of disarray could be observed, and a
Figure 2 Screenshot of the program illustrating the simulated grain boundary structure for a symmetrical grain boundary with a small deviation (8 ) from the ideal 3 boundary in an f.c.c. system.
J. Appl. Cryst. (2013). 46, 1221–1224
Figure 3 Screenshot of the program depicting the different representations of texture parameters of a b.c.c. unit cell.
Thangaraj and Saibaba
GBgeom
1223
computer programs possible distribution of dislocation to accommodate the misfit could be discerned. The edge character of the grain boundary dislocation with an interval of 13 atomic spacings could also be recognized from the figure. The program output of Fig. 3 depicts the different representations of texture attributes for an arbitrary instance of orientation in a b.c.c. crystal. Representation of multiple texture features in a single window helps the user to recognize intuitively the interrelations between them. For example, two step-wise sequences of Euler rotations of the unit cell have been depicted and juxtaposed against the sample reference backdrop. The equivalence of Euler rotations in the order of ’1, and ’2 with respect to the crystal axis and the Euler rotations executed in the reverse order of ’2, and ’1 with respect to the sample axis could be readily identified. The software is free for academic purposes and is available (along with its manual) as supplementary material1 or from the authors on request. We acknowledge the support and encouragement offered by Dr M. Vijayalakshmi, Associate Director, Physical Metallurgy Group, and
Dr T. Jayakumar, Director, Metallurgy and Materials Group, for this work.
References Balluffi, R. W. (1979). Editors. Grain-Boundary Structure and Kinetics, pp. 445– 456. Milwaukee: American Society for Metals. Bunge, H.-J. (1982). Texture Analysis in Materials Science – Mathematical Methods. London: Buttersworths. Engler, O. & Randle, V. (2010). Introduction to Texture Analysis. Boca Raton: CRC Press. Kittel, C. (1995). Introduction to Solid State Physics. Singapore: John Wiley and Sons. Kocks, U. F., Tome, C. N. & Wenk, H.-R. (1998). Texture and Anisotropy. Cambridge University Press. Morawiec, A. (2004). Orientations and Rotations. Berlin: Springer Verlag. Randle, V. (2010). Mater. Sci. Technol. 26, 253–261. Schwartz, A. J., Kumar, M., Adams, B. L. & Field, D. P. (2009). Editors. Electron Backscatter Diffraction in Materials Science. New York: Springer Sciences. Sutton, A. P. & Balluffi, R. W. (1995). Interfaces in Crystalline Materials. New York: Oxford University Press. Woo, M., Neider, J., Davis, T. & Shreiner, D. (1999). OpenGL Programming Guide. Reading: Addison-Wessley.
1 The software and documentation are available from the IUCr electronic archives (Reference: RW5041). Services for accessing this material are described at the back of the journal.
1224
Thangaraj and Saibaba
GBgeom
J. Appl. Cryst. (2013). 46, 1221–1224