Microstructure Generation Code Documentation
Microstructure Generation Code Documentation
INTRODUCTION
This tool has been developed to examine the influence of particle aspect ratio, area fraction, and
orientation on representative length scales in two-phase microstructures. This tool also includes
the ability to generate particles with various distributions of particle sizes and orientations.
Please cite reference #2 (Tschopp, Wilks, Spowart, “Multi-Scale Characterization of Orthotropic
Microstructures,” MSMSE 16 (2008) 065009) if you use this program in your research. Our previous
MATLAB submission, where these synthetic microstructures were used, explains the application
of these microstructures…
This MATLAB GUI script was developed as a computationally-efficient tool for researchers to
design synthetic two-phase microstructures with elliptical particles in a voxelated image. This
tool can be used to generate synthetic two-phase microstructures with little knowledge of the
MATLAB programming required to obtain the results. For further information on the techniques
or if you have comments, please contact Mark Tschopp at [email protected].
REQUIREMENTS
Software. This program was written using MATLAB R2007b with the Image Processing
Toolbox. This was tested on MATLAB R2008a and MATLAB 2009a – works fine!
1. Open the program. The GUI screen should look like below. If it does not, the Image
Processing toolkit may not be installed on your computer. The volume fraction is not in
percentage, i.e., 0.05 = 5% particles, etc. The a0 and b0 define the major and minor axis
of the ellipse. The image size is the dimensions of the binary image, i.e., 2048 = 2048 x
2048 image.
2. A window will open up with a binary image of the ellipse/circle shown. Use this window
to check the resolution of the particle. A dialog box (below) will also open up and ask
whether the particle size is ok. Select yes, no, or cancel. If no is selected, it will return to
step #1.
3. The program will compute the number of particles that will fit within the image given the particle
size. A dialog box (below) will ask whether this number of particles is ok. If not, it will return to
step #1.
4. Size distribution. A dialog box (below) will then ask if you want to use a lognormal size
distribution for the particles. Select yes or no.
a. If yes, a dialog box (below left) will ask for the lognormal distribution parameters
(mean, sigma). The increments parameter denotes the number of bins for the
lognormal distribution (below right). The program will then randomly generate a
list of particle sizes that best approximates the analytical form of the lognormal
distribution and will plot a representation of this.
5. Particle Orientation Distribution. A dialog box (below left) will then ask how the particles
should be oriented (for ellipses): Aligned, Random, Normal Distribution. Aligned is for
the fully aligned case (select an orientation angle), random is for perfectly random
oriented particles, and the normal distribution allows the user to input the mean and sigma
parameters for a normal distribution about an orientation angle (below right).
6. Filename. A dialog box (below) will prompt you for whether the completed binary image
should be saved or not and what the image filename should be.
7. Subroutine Execution. The program will then generate the microstructure given these
inputs. I have optimized the subroutines as much as possible and I have placed tens of
thousands of ellipses in a random orientation in a 4096 x 4096 image in a matter of hours
on a slow laptop. Once the program is done, it will display the microstructure (below):
left - full microstructural image, right – closeup image of upper left corner. If the user has
opted for image saving, the program will save the binary images at this point.
REFERENCES
For further information on the techniques used in this GUI script, see our publications. For
journal publications that use this software for microstructural analysis, please cite our associated
articles.