This is an archive copy of the SinCris component of the IUCr web site dating from 2008. For current content please visit the RESOURCES section of https://www.iucr.org.

SinCris DEF4: Simulation of plane wave topographs of dislocations

home    software section

Y. Epelboin

Laboratoire de Minéralogie-Cristallographie

Universités P.M. Curie and D. Diderot,U.A. C.N.R.S. 009

Case 115, 75252 Paris Cedex 05, France

Tel: +33(1)4427 5211

Fax: +33(1)4427 3785

epelboin@lmcp.jussieu.fr


Contents

Summary

DEF4, version 3.0, is a simulation program devoted to the simulation of plane wave topographs of dislocations. When the incident wave along the entrance surface of the crystal can be considered as a spherical wave (Kato approximation [1]) i.e. in the case of section topographs, it must not be used. Consider DEFW instead.

DEF4 runs on any modern workstation. It needs less than 1 Mbyte of memory and a moderate time of computation. The result is an image written as non formatted Fortran file. To display it as an image it is usually necessary to convert these data into raw floating point numbers acceptable by most visualisation programs such as Triton or any visualization program written in C language. A program named convert is available for this purpose.

How to run DEF4?

All explanations are given for a Unix machine.

It is recommanded to run DEF4 in batch mode. In most cases the computation needs from a few minutes up to a few tens of minutes without any dialogue, thus it is unnecessary to use an interactive display. All data are edited in a file called topoX.tmp. The name of the file containing the computed image is given in the script file used to start the computation.

A basic script looks like:

      # use Korne shell
      #
      #!/bin/ksh
      #
      # 
      # If the image file exists, it must be deleted before starting
      # the computation, otherwise the program will stop.
      # 
      #
      rm -f image.img
      # 
      # Now we start the program. 
      # All lines before EOF are data for DEF4. It is limited to the 
      # name of the image file since all other data are given in a file
      # named topoX.tmp, which name cannot be changed
      #
      def4 <<EOF
      image.img
      EOF      

These lines must be written in a file named def4.bat, for instance. Make it executable, using the command: "chmod 700 def4.bat" and submit it as a batch. How to submit a batch depends on your system. Ask your supervisor to know how to do this. You may also run interactively this job by typing the name of the file: "def4.bat".

How to prepare the data?

What do you need?

In this part you will find a brief comment about the data described later in details.

Information about the materials

You need:

The elastic stiffnesses are 3 to up 21 independant values - their number depends on the crystallographic symetry of the crystal. You will have to write half the tensor, i.e. you must know which components are null. See for instance [4].

Diffraction data

All explanations refer to set of axes described below. You must know:

Note that the Kih are complex numbers and that you must calculate, for each reflection, both the real and imaginary parts. The ratio of the imaginary and real part depend on the choice of the origin in the unit cell. These data are often negative. The program computes the extinction distance and the width at half the maximum of the rocking curve (See the example below) The extinction distance and the width of the rocking curve are a good means to check the consistency of your data.

Geometry of the dislocation

You must know, from an experimental topograph:

Dimensions of the simulated image

The dimensions of the computed image are computed, as well as the number of pixels along a line or a column, from the knowledge of the width of the incident beam, the thickness of the crystal, the Bragg and the asymetry angle. The width of the image is the width of the beam in the film, for an incidence plane. It corresponds to a line in the image. The height of the image is the vertical dimension. More explanations are given in the section set of axes.

Other data are:

At first look it seems difficult to choose all these data. A simple means to check their consistency is the following: run first the program with the characters: "test" or "TEST" as first characters for the title. The program will write all the output as shown below but it will not run the integration. Thus you will be able to check your data, to verify if the size of the image is reasonnable (most image browsers will not accept more than 512x512pixels), the validity of the diffraction parameters (look at the extinction distance and at the width at half maximum of the rocking curve) and all other data.

The program also estimates the computation time which is related to the numbers of nodes in the integration. It gives a number which has to be calibrated for your computer. For instance, I found that 166.7 corresponds to 4mn19s when using an IBM RS6000/390 and to 8mn27s when using an IBM RS6000/560. A method to perform this calibration is to run first the program giving a large amount of time, to note this time value together with the time needed for the computation. It will be then easy to estimate the time for other computations since it is proportionnal to the time coefficient.

Set of axes used in the program

The program uses a set of axes called experimental axes or macroscopic axes. The macroscopic axes are oriented as follow:

- axis x lies along the entrance surface, oriented from right to left. It is the projection of the transmitted direction s0 along the surface.
- axis z is the normale to the entrance surface, towards the inside of the crystal.
- axis y is perpendicular to the plane of incidence, in the plane of the surface. The origin is in the first computed line of the image which means that all lines in the image correspond to negative y values.

Note that the origin is on the left side of the incident beam along the surface.

The dislocation orientation may be given either in this set of axes or in the crystallographic axes.

As explained before it is assumed that the film is perpendicular to the difracted beam. Steps are choosen to represent the image in the film, not along the exit surface of the crystal.

The diffraction equations [3] are a set of partial derivative hyperbolic equations which are integrated using a finite elements method [2]. The integration network, in a plane of incidence, is determined as follow.

In a plane of incidence, the crystal is divided into slabs of equal thickness ELEM. A set of characteristics parallel to the diffracted and reflected directions is drawn. It may be shown [2] that the amplitude at point A may be computed from the knowledge of the amplitudes at points B and C. Lengthy tests have shown that ELEM should always be smaller than 2 microns, thus the computation step BC, along the exit surface, (which is written in the output in the section "network of integration") is always much smaller than the desired resolution in the image. This is why one samples one over KPERFO computed points along the exit surface for the image file.

Data file

This is an example of data file. The numbers on the left, starting at 01, do not belong to the file. They are written to clarify the explanations.

Input data

01    Example for DEF4 IMP=1
02    5.43 5.43 5.43 lengths of the unit vector of the crystal cell
03    90 90 90       angles for the unit cell (cubic in this example)
04    1 -1 -1        normale to the entrance surface
05    -2 -2 0        diffraction vector
06    -0.3 1 2.11 1  orientation of the dislocation. 1 means macroaxes.
07     0.5 0.5 0.    Burgers vector
08    16.6 7.96 7.96 0 0 0
      16.6 7.96 0 0 0
      16.6 0 0 0
      6.4 0 0
      6.4 0
      6.4            Elastic constants cij (cubic in this example)
09    0.70926        wave length
10    10.667         Bragg angle (positive value)
11    -10.667        Asymetry angle (- theta for symetric reflection)
12    -1.993e-06 -1.57e-08 KIhm  dielectric components -h values
13    -1.993e-06 -1.57e-08 KIhp  idem h values (real and imaginary parts)
14    100            Height of the image
15    -1.E-06        KI0r  dielectric components (real part 000 reflection)
16    -32.17 0. 200. A point along the dislocation in the choosen set of axes.
17    0.00142        absorbtion per micron
18    4 3            reduction factor for output and interpollation between lines
19    200            Thickness of crystal
20    1.0            Thickness of integration slab
21    0. 50.         delta theta (radians) and width of slit (microns)

Explanations

Each section refers to the line number in the preceeding part. All input are to be written in free format.

  1. title: up to 80 characters. It is registered in the first record of the simulated image. If "test" or "TEST" appears as first characters, the initialisation part only is performed. This is useful to check the data and to evaluate the computing time.
  2. unit cell parameters in Angströms.
  3. Angles of the unit cell, in degrees.
  4. Indices of the normale to the entrance surface, oriented towards the inside of the crystal.
  5. Indices of the diffraction vector oriented from the origin towards the diffraction node.
  6. Orientation of the dislocation. Followed by 0 means that the data are given in the crystallographic axes, by 1 means that they are given in the experimental axes x,y,z as explained.
  7. Indices of the Bürgers vector of the dislocation.
  8. The 21 values of half the 6x6 matrix representing the elastic constants cij. The unit has no interest.
  9. Wave length in Angströms.
  10. Bragg angle in degrees. This is a positive value.
  11. Asymetry angle in degree. This is the angle between the transmitted direction s0 and the normale to the entrance surface, as shown in the drawing there. It is negative when s0 lies to the left of the normale. Thus in a symetric reflection this angle is the opposite of the Bragg angle.
  12. Dielectric constants for -h reflection. Real and imaginary parts are given in SI.
  13. Same for the +h reflection. Program Fhkl may be used to compute these data.
  14. Height of the image along the y direction in microns.
  15. Real part of the dielectric constant for 000.
  16. Coordinates of a point located along the dislocation line in the choosen set of axes. Data are in microns.
  17. Absorbtion per micron. Also computed with Fhkl.
  18. Reduction factor as explained before and interpolation factor. This allows to save time by computing all lines in the image (value is 1), each second line (2) or third line (3). The missing lines are interpollated. This trick is mostly visible in horizontal fringes only.
  19. thickness of crystal in microns
  20. thickness of the elementary slab ELEM in the integration as shown here. It is recommended to use a value lower than 2 microns. Warning: using a value too large leads to false results. The only means to check the convergence of the calculation is to change this value and to compute again a profile. Usually 2 to 1 microns are safe values.
  21. Departure from exact Bragg angle in radians and width of the beam along the entrance surface (in microns). Values lower than 50 microns are not allowed since the incident beam cannot be considered any more as a plane wave.

Ouput

Example

The following example is the contents of to the file def4.log, automatically created when running DEF4, and corresponds to the data shown before.

         Programm  DEF4 (Rev.3.0) Plane wave topograph
         ---------------------------------------------
             Example for DEF4  IMP=1

Diffraction data
----------------
wave length       .709260 Angstroms
Theta              10.667 Deg.
Psi zero          -10.667 Deg.
Mu                .001420 per micron
Khi  H minus R  -1.9930 10(-6), Khi  H minus I   -.0157 10(-6)
Khi  H plus  R  -1.9930 10(-6), Khi  H plus  I   -.0157 10(-6)
Khi  H 0     R  -1.0000 10(-6), Khi  H 0     I   -.0160 10(-6)

Delta theta (radians):   .00000E+00
Slit width (microns) :     50.000

rocking curve half width   2.260 seconds
extinction distance       34.972 microns

defect data
-----------

Parameters of the crystal
A =           5.430 angstroms
B =           5.430 angstroms
C =           5.430 angstroms
angles       90.000         90.000         90.000
Burgers vector                           .500           .500           .000
Dislocation (macro axes)                -.300          1.000          2.110
Normale to the surface                  1.000         -1.000         -1.000
Diffraction vector                     -2.000         -2.000           .000
Position of the core (microns)        -32.170           .000        200.000

Elastic stiffnesses
     16.600
      7.960    16.600
      7.960     7.960    16.600
       .000      .000      .000     6.400
       .000      .000      .000      .000     6.400
       .000      .000      .000      .000      .000     6.400


network of integration
----------------------

slab thickness (microns):        1.000
computation step (microns):       .377
number of nodes per line:          333

Characteristics of the image
----------------------------

Thickness of simulated crystal          200.00 microns
width of simulated image                125.44 microns
height of image                         103.66 microns
vertical calculated step                  4.44 microns
horizontal representation step            1.48 microns
vertical representation step              1.48 microns

number of calculated planes       24
number of lines in image          70

Time estimation
---------------

time coefficient:   .39960E+01

number of points per plane        84

Explanations

Please note the indication of a version number. It is important to note it in case of error before reporting the problem. The results are presented in different sections as follow:

Computed image

The name of the file containing the image is not in the data file topoX.tmp. It is part of the script used to run the program or may be input from the keyboard. See the section How to run DEF4.

The image file is written without format:

  1. The first record contains the title of the simulation with a maximum of 80 characters.
  2. The second record contains the number of pixels along a line and a column written as two integers.
  3. The next records are the values of the pixels written line after line as floating point numbers.

This file contains some additional informations added by the Fortran subroutines for non formatted write. Thus it cannot be read directly by a visualisation routine written in C language. The program CONVERT is a utility to translate these data in asuitable form.

Utility program convert

convert is a utility program to convert the various image formats used in simulation programs. It is self explanatory.

CONVERT allows to:

  1. option 1 converts an image written with format DEFxx to raw floating point numbers. The Fortran header is removed as well as the title and the image size. The resulting file may be read by C programs such as xtrn. The result consists of floating point numbers corresponding to the successive lines of the image.
  2. options 2 and 3 are used forimages created by TRANSxx, simulation programs for white beam synchrotron topographs.
  3. option 4 is used for programs written before 1979.

Bibliography

Installation

DEF4 and CONVERT sources are available in the directory pub/topo, when logging as anonymous at ftp.lmcp.jussieu.fr directory pub/sincris-top/software/dynamical_theory.

Read first 00readme which contains some additional explanations.

To install the program:

  1. Uncompress the file using the command: uncompress def4.tar.Z
  2. Untar using the command tar -xvf def4.tar or tar -xovf def4.tar for certain systems.
  3. Check the contents of the directory def4 and read the README.
  4. Edit the makefile to choose the right options for your compiler. Examples are given (line starting with #) for some machines. Ask your supervisor in case of trouble.
  5. Compile the program.
  6. Rename the file topoX.test to topoX.tmp
  7. Run def4 as shown in the first part.
  8. Check that the file named def4.log is identical to the output in the present document.

Please send your comments and your suggestions to Yves Epelboin, Yves.Epelboin@lmcp.jussieu.fr .


Last update28/06/98 Y.E.


This service is made available through a grant from CNRS and Ministére de l'Education Nationale