Format requirements for reading initial microstructures from file

technical aspects of .dri file generation (e.g. debug mode ) etc...
Post Reply
Bernd
Posts: 1038
Joined: Mon Jun 23, 2008 9:29 pm

Format requirements for reading initial microstructures from file

Post by Bernd » Wed Jul 20, 2016 5:54 pm

Dear all,

MICRESS can read 2D-initial microstructures from not compressed ASCII-files. Those should not contain any header but instead be organized in y lines of x integer numbers which are separated by one or more blanks. Although such a file can be directly created or manipulated in normal text editors (including MICpad), the safe way is to first create a .pgm ASCII which can be transformed to this format using the Perl script PGM_to_MICRESS. You can get the latter from us in case you need it.

MICRESS can read files which consist of the grain numbers and which thus show the spatial distribution of these grains (corresponding to the structure of the .korn output converted to ASCII). The grain properties can be either specified directly in the .dri file or be read from a list.
But when reading initial microstructures from metallographic images, grain numbers are not known a priori but reconstructed from the distribution of the phases and the grain boundaries ("phase to grains" transformation). Then, the microstructure input file should contain different specifiers which are specific integer values:

1.) The smallest value (typically 0) indicates grain boundaries. Grain boundaries separate grains of the same phase and must be closed (no diagonal connections). Regions of the same phase which are separated by grain boundaries are interpreted as different grains.

2.) All higher integer values indicate individual phases which need not to be separated by grain boundaries. When the microstructure input file is processed, search for grains starts with the smallest integer value and ends with the highest value (typically 255 ('white') for background phase) so that grains of the same phase get consecutive numbers. Grains consisting of only few pixels may be lost during the conversion process.

Initial microstructures following the above format rules in principal can be obtained by any method or software. I personally use the free gimp software. Each precipitate phase is represented by an extra image layer. In the simplest case, such a layer can be obtained from a micrograph image by use of the threshold filter leading to a black and white image. The phase is recolored to a specific rgb color, the background is converted to transparent. An extra layer is used for displaying the background phase and its grain boundaries. In most cases it is necessary to redraw them by hand (using the original micrograph as background) to be sure to get closed black lines on a white background.
Now, all layers are superimposed (all phase layers on top of the grain boundary layer) and mixed down. The resulting image can be saved as .pgm (ASCII) and converted with PGM_to_MICRESS.

Bernd

Post Reply