Min Sung Joo
Graduate Institute of Ferrous Technology (GIFT)
Pohang University of Science and Technology
Pohang, Kyoungbuk, Republic of Korea
Added to MAP: April 2012.
Consider a polycrystalline material containing a random distribution of 10,000 grains, each with a cubic lattice. This program permits the calculation of the fraction of grains which have a specific orientation relative to an external frame of reference.
Language: | C |
Product form: | Source code for UNIX/Linux machines. |
Complete program.
The computer program to investigate the number of grains having specific orientation. The result is the hypothetical fraction of the grains. This program is only for crystals with a cubic lattice.
Only ‘random_orientation.c’ file exists.
random_orientation.c
After executing the program, the user needs to input four numbers.
pi1 | pi1 value for the specific orientation. |
cpi | cpi value for the specific orientation. |
pi2 | pi2 value for the specific orientation. |
tolerance angle | tolerance angle for the specific orientation. |
The following definition in the source code can be changed if user needs to control the number of grains in the simulation.
#define NUM_CRYSTAL | the number of randomly generated grains. |
(Optional)
When executing the program, if user inputs any character followed the program then the user can get the ‘random.out’ file which has counts for each disorientations in the range of 0°~360° from randomly generated grains. Therefore, the user can check the randomness of the grains and make a graph so called the Mackenzie plot. For example,
The user can see the results from the screen.
Total number of grains | Simply prints out the total number of grains in the simulation. |
Total number of grains within misorientation | Print the number of grains having specific orientation within used tolerance angle. |
Fraction | The fraction of grains having specific orientation. |
(Optional)
random.out | The output file which contains the counts for each disorientations in the range of 0°~360° from randomly generated grains. |
Executable
$ executable WELCOME! Please input the Euler angles to investigate. pi1: 0 The input value was: 0.000000 cpi: 0 The input value was: 0.000000 pi2: 15 The input value was: 15.000000 Please input the tolerance angle for the Euler angles. Tolerance angle: 11.25 The input value was: 11.250000 Total number of grains : 10000 Total number of grains within misorientation : 269 Fraction : 0.026900
$ executable disorientation WELCOME! Please input the Euler angles to investigate. pi1: 0 The input value was: 0.000000 cpi: 0 The input value was: 0.000000 pi2: 15 The input value was: 15.000000 Please input the tolerance angle for the Euler angles. Tolerance angle: 11.25 The input value was: 11.250000 Total number of grains : 10000 Total number of grains within misorientation : 269 Fraction : 0.026900 random.out file was generated.
Mackenzie plot, Disorientaiton, Misorientation
MAP originated from a joint project of the National Physical Laboratory and the University of Cambridge.