Open Matlab File in the Editor MTEX

Grain Boundary Tutorial

A quick guide to grain boundary analysis

On this page ...
Grain boundaries generation
Properties of grain boundaries

Grain boundaries generation

To work with grain boundaries we need some ebsd data and have to detect grains within the data set.

% load some example data
mtexdata twins

% detect grains
[grains,ebsd.grainId,ebsd.mis2mean] = calcGrains(ebsd('indexed'))

% smooth them
grains = grains.smooth

% visualize the grains
plot(grains,grains.meanOrientation)
 
grains = grain2d  
 
 Phase  Grains  Pixels    Mineral  Symmetry  Crystal reference frame
     1     121   22833  Magnesium     6/mmm       X||a*, Y||b, Z||c*
 
 boundary segments: 3825
 triple points: 114
 
 Properties: GOS, meanRotation
 
 
ebsd = EBSD  
 
 Phase  Orientations     Mineral       Color  Symmetry  Crystal reference frame
     0     46 (0.2%)  notIndexed                                               
     1  22833 (100%)   Magnesium  light blue     6/mmm       X||a*, Y||b, Z||c*
 
 Properties: bands, bc, bs, error, mad, x, y, grainId, mis2mean
 Scan unit : um
 
 
ebsd = EBSD  
 
 Phase  Orientations     Mineral       Color  Symmetry  Crystal reference frame
     0     46 (0.2%)  notIndexed                                               
     1  22833 (100%)   Magnesium  light blue     6/mmm       X||a*, Y||b, Z||c*
 
 Properties: bands, bc, bs, error, mad, x, y, grainId, mis2mean
 Scan unit : um
 
 
grains = grain2d  
 
 Phase  Grains  Pixels    Mineral  Symmetry  Crystal reference frame
     1     121   22833  Magnesium     6/mmm       X||a*, Y||b, Z||c*
 
 boundary segments: 3825
 triple points: 114
 
 Properties: GOS, meanRotation
 
  I'm going to colorize the orientation data with the 
  standard MTEX colorkey. To view the colorkey do:
 
  oM = ipfColorKey(ori_variable_name)
  plot(oM)

Now we can extract from the grains its boundary and save it to a seperate variable

gB = grains.boundary
 
gB = grainBoundary  
 
 Segments   mineral 1  mineral 2
      606  notIndexed  Magnesium
     3219   Magnesium  Magnesium

The output tells us that we have 3219 Magnesium to Magnesium boundary segments and 606 boundary segements where the grains are cutted by the scanning boundary. To restrict the grain boundaries to a specific phase transistion you shall do

gB_MgMg = gB('Magnesium','Magnesium')
 
gB_MgMg = grainBoundary  
 
 Segments  mineral 1  mineral 2
     3219  Magnesium  Magnesium

Properties of grain boundaries

A variable of type grain boundary contains the following properties

These can be used to colorize the grain boundaries. By the following command we plot the grain boundaries colorized by the misorientation angle

plot(gB_MgMg,gB_MgMg.misorientation.angle./degree,'linewidth',2)
mtexColorbar
hold on
plot(gB('notIndexed'),'lineColor','blue','linewith',5)
hold off
grains.innerBoundary
 
ans = grainBoundary  
 
 Segments  mineral 1  mineral 2
        4  Magnesium  Magnesium