1. Getting started¶
How to get? How to compile?¶
- Check your Linux installation for a working installation of cmake and make
- Pull the project from the git repository https://github.com/mkuehbach/SCORE
- Check your compiler. Both the Intel compiler (v14.0 tested) and the GNU compiler (v4.8.3 tested) can be utilized.
- Make sure there is a folder with a src, a build folder, and the CMakeLists.txt file.
- Make sure that the source code files are in src while a SCORE.*.uds parameter file is in build.
- Open a console and type cd build
- Only once when setting up a new computer cmake -DCMAKE_BUILD_TYPE=Release .. (up to O2 optimization tested)
- Compile the program with make
- Find happily the binary in the build folder
Learn about the physical background to the model¶
Band contrast SEM/EBSD image of an electropolished AA8079 sample after 70% cold-rolling and isothermal annealing at 300 deg C for 6 minutes. .. The rolling direction is parallel to the scale bar. Blue denotes grains in cube orientation, high-angle grain boundaries drawn in black.
Recrystallization and recovery term a variety of deformation microstructure restoration processes during which the stored elastic energy in the deformed microstructure drives the elimination of excess dislocations and the migration of grain boundaries. Specifically the static recrystallization refers to a form of recrystallization which occurs after the deformation was applied. For microstructure evolution during the annealing of cold-rolled sheet material this static recrystallization is of significant technical interest. The physical mechanisms and the strength of the driving forces distinguishes it from static recovery and other forms of grain growth.
Scope of the model:
The SCORE model is designed for the simulation of the growth of new nuclei under the effect of anisotropic grain boundary mobility and heterogeneous deformation microstructures, i.e. for simulating static recrystallization. Furthermore, SCORE encompasses approximate models for the nucleation stage. As with every model the nature of the processes is depicted in simplified manner by making the following assumptions:
- A microstructure volume comprises cubic voxel as the smallest discretization unit.
- The deformation microstructure can be idealized in contiguous regions with homogeneous properties (orientation, dislocation density).
- Therein nuclei appear which are strain- and excess dislocation free.
- Grain boundary migration follows classical rate theory according to Turnbull’s model.
- Grain boundary migration is simplified as a flat boundary sweeping the deformation structure.
- The intrinsic grain boundary mobility is only dependent on the crystallographic disorientation of the adjoining grains.
- The deformation microstructure remains static in terms of orientation and boundaries content.
- However the (statistically stored) dislocation density is allowed to evolve. This is referred to as recovery modeling, for which approximate physical models exist.
- Recrystallizing nuclei do not rotate or change their orientation during growth.
- A potential growth inhibitating effect of second-phase particles is modeled in accordance with the Zener-Smith theory.
Relevance of the model:
These conditions apply well to many cases of cold-rolled aluminium, nickel, copper alloys and steels, but require that the driving force stemming for dislocations is at least an order of magnitude larger than that of curvature. Under these conditions the SCORE model can predict the course of microstructure transformation in particular kinetics, indicate potential changes in the macrotexture, resolv spatially the impingement of individual nuclei and hence allows to extract very accurately the grain size distribution. The benefit of the model compared to similar approaches is that it enables the simultaneous initialization and execution of multiple computational domains over which the results can be averaged or analyzed in all details collectively. This renders the simulations statistical significant and sufficiently discretized to minimize bias and to quantify uncertainty that persist to unknown extend in other recrystallization models.
- Further reading:
- Cotterill, P., Mould, P. R.Recrystallization and Grain Growth in MetalsSurrey University Press, London, 1976Humphreys, F. J., Hatherly, M.Recrystallization and Related Annealing PhenomenaPergamon Press, 2003ISBN: 978-0-08-044164-1Gottstein, G.Physical Foundations of Materials ScienceSpringer, Berlin, 2010Gottstein, G., Shvindlerman, L. S.Grain Boundary Migration in Metals: Thermodynamics, Kinetics, ApplicationsCRC Press, Boca Raton, 2010ISBN 9781420054354Hallberg, H.Approaches to Modeling of RecrystallizationMetals, 2011, 1, 16-48
2. Parameterization¶
Parameterizing and setting up advanced recrystallization models can appear cumbersome at first glance owing to the variety of settings and input parameter. In order to resolve many of the questions, please find in the following a detailed description of all input parameter to the SCORE model. The structure of the .uds file identifies where data should be read as strings ( s ), integers ( i ) or double precision floating point numbers ( f ). In general, the parameter values are categorized loosely into these groups.
In any case each parameter key and value needs enclosure in two double quotes,i.e. “Key” and “Value”. In .uds files
Basic parameterization¶
|| ParameterList || *(ss) || Parameter, Value
Output flags¶
Integrator and performance¶
|| IntegratorAccuracy || *(ss) || Parameter, Value
Material properties¶
|| MaterialProperties || *(ss) || Parameter, Value
Grain boundary migration¶
Recovery modelling¶
|| RecoveryParameter || *(ss) || Parameter, Value
Mind that the following properties have not yet been fully validated!
- following:
- Nes, E.Recovery RevisitedActa Metallurgica et Materialia, 1995, 43, 2189-2207
Particle drag modelling¶
|| ZenerDragParameter || *(ss) || Parameter, Value
Texture components¶
|| IdealComponents || *(sffff) || Name, IdealcomponentBunge1, IdealcomponentBunge2, IdealcomponentBunge3, IntegrationRange
Here typical modal orientations that are often identified with Euler space symmetry positions or orientations which show strong maxima in experimental ODFs aka Standardlagen are listed. Each orientation in the simulation is categorized to the closest of all these idealcomponents. Is an orientation not included in the integration range specified of any component, it is considered random/phon.
Microstructure snapshots¶
|| RenderMicrostructure || *(sf) || Local recrystallized fraction, local value
Add one line for each automaton-local recrystallized fraction at which microstructure snapshots (either 2D or 3D) should be taken. The format is “X” 0.1, i.e. to render at ten percent recrystallized.
|| RenderOnlyTheseRegions || *(i) || CAID indices start from 0 to n minus one
List all CA IDs [0, CAEnsembleSize-1] that should be included in the plotting. This option allows to reduce drastical the amount of snapshots taken and helps reducing file system congestion.
Annealing profile T(t)¶
|| ProcessingSchedule || *(ff) || time, temperature linearized heating profiles
For numerical performance it is admissible to coarsen the linearization of measured heating profiles rather than to import thousands of points.
Deformed grains pool¶
|| DeformedGrainsPool || *(ffffff) || Bunge e1, Bunge e2, Bunge e3, rho0, dsubav0, disoriav0
By default the deformed grain pool provides a list of grains all of which can but not necessarily are required of all properties different. Random sampling from this list and placing on sequentially on a 3D grid generates spatially uncorrelated MODF. Mind that a departure from the well-known MacKenzie misorientation distribution is per se not a sign of spatial correlation in the case of a non-random ODF, as the MacKenzie distribution is inferred from a random texture!
- for the interested reader:
- Mason, J. K., Schuh, C. A.The generalized Mackenzie distribution: Disorientation angle distributions for arbitrary texturesActa Materialia, 57, 2007, 4186-4197
Recrystallized grains pool¶
|| RXGrainsPool || *(ffff) || Bunge e1, Bunge e2, Bunge e3, tincub
By default this is the current way of devising in a flexible manner many different recrystallization nuclei.
Further settings¶
|| HeuristicRXFrontListDefragmentation || *(sf) || Recrystallized fraction, local value
This option allows to defragment the cell container by copying explicitly pieces of information from cells far apart from the start of the container to the gap formed by cells which have become decommissioned, i.e. INACTIVE. This allows in the subsequent time steps to reduce the total number of cells that have to be checked, and hence increases performance and cache-locality. Experience has provided sensitive defaults.
|| EvoDraggingParticles || *(ff) || time, fr
Can be utilized to prescribe the Zener drag by a priori Zener drag simulations. Please mind that strictly speaking when Zener drag affects significantly microstructure transformation it occurs often concurrently to RX which is when such concept cannot be applied.
|| SingleGrainVolOverTime || *(sf) || Recrystallized fraction, local value
Controls at which automaton-local recrystallized fraction the size of the grains should be measured and stored in main memory such that it can later serve to interpolate the grain size during postprocessing.
3. Simulations¶
A simulation is issued by the following command line call:
mpiexec -n <proc> <scorempi> <Input.uds> <SimulationID>
- <scorempi> denotes the name of the binary file. In its current version two input arguments are necessary:
- <Input.uds>this is the settings file of uds extension, relative path references are utilized by the program<SimulationID>this is a positive integer with which all simulation result can be uniquely labeledMind that executing multiple simulations with the same ID in the same directory overwrites unpredictively previously obtained results without prompting!
4. Model output¶
Kinetics, macrotexture and grain size distribution are the key state parameters of interest.
All output from a simulation is written in the output folder using relative addressing. The example/jmak folder provides a simple recrystallization case study of 1000 nuclei growing into a deformed monocrystal. The output contains several files, all of which have a prefix SCORE.<SimulationID> to make distinguishing results simple. Most output is plain ASCII formatted in such a way that it can be directly imported in post-processing, and spreadsheet tools.
Recrystallization kinetics¶
The Rediscretized.Kinetics.csv file contains a table with the typical time, recrystallized fraction as well as the Avrami plot logarithmic linearization. The kinetics of each automaton can be obtained by switching on the OutputRXFrontStats with the first column giving the individual consumption of each domain and the further columns provide details about the microstructural path an the memory utilization of the interface cell lists.
Macrotexture evolution¶
The Rediscretized.Macrotexture.csv file contains a table with the evolution of the macrotexture components as they were defined as IdealOrientations. Counts are listed in cells summarized and rediscretized over all domains with the total amount of cells in the ensemble to the right.
Grain size distribution¶
The Rediscretized.FinalGrainSize.csv file contains a table with the final size of all grains aggregated over all domains. The header line provides basic descriptive statistics of the whole ensemble. Beneath, a table contains a sorted list of all grains with their size, the domain they grew, in their orientation class as an index of the n-th IdealOrientation, the normalized cumulative grain size distribution to inspect tail departures, and the incubation time after which they were instantiated in the simulation. Noteworthy, this file contains only nuclei that participated in the transformation.
2D sections¶
A section of the microstructure at various recrystallized volume fractions can be printed. For this logpoints have to be defined in the input file block named RenderMicrostructure. Exemplarily, if one desires to output the microstructure at 25% and 76.8% recrystallized volume fraction, two lines should be placed in this block.
Lode Vandevenne’s open source lodePNG (https://github.com/lvandeve/lodepng/) tool is utilized to render indexed RGB png files that are stored in the output directory. The coordinate origin is the lower left corner. The coordinate system identifies x as the first coordinate, y as the second and z as the third. This is to of relevance for all implicit addressing in the source code. By default the whole domain is sectioned at the z coordinate equal to 0.5.
3D data¶
It is also possible to render three-dimensionally the structure. Mind, though, that this equals a file size of 4 byte per cell, i.e. a simulation with only 1000 x 1000 x 1000 already requires 4 GB of disk space. However, it is possible to restrict which simulation domains are rendered by indenting explicitly in the input file the respective automaton IDs under RenderMicrostructure.
These files are stored as binary raw files in the working directory. At the moment there is no header associated with the file so remembering their size is important.
For both 2D and 3D data two coloring modes are currently implemented. The first is coloring according to the grain ID. The second is to colorize according to inverse polefigure orientation mapping in the stereographic standard triangle of under fcc crystal symmetry and triclinic sample symmetry.
Single grain growth charts¶
The SingleGrainData sheet compiles the detailed evolution, nucleation sites, orientation, state of the deformed grains, automaton-resolved to allow insights into the evolution of particular grains, their incubation time, and much more. Furthermore, but currently commented out is an option to export these data by plain MPI I/O for post-processing purposes.
Performance¶
First the ProfilingLog csv file present a summary of all automata that were executed. Along with MPI_Wtime-ings in front and past barriers, in conjunction with a detailed information about how many nuclei in which orientation into which deformation structure, this file is the first address for a statistical interpretation of the data.
In particular for developers the RXFrontsStats csv file provides detailed information about the course of microstructure evolution as well as microstructural path parameter, discrete interfacial area the status of the recrystallization front memory management containers, etc.
The developmental hybrid (MPI/OpenMP) parallelized extension of the model adds a further output file OMPThreadProfiling which details how much time the OpenMP threads spent in each section of the code and synchronization.
5. Visualize¶
How to import SCORE .bin files into Paraview?¶
By default, little endian is assumed. Then .raw files generated by SCORE can be imported readily into Paraview as shown in the following screenshots:
- Paraview is an open source visualization and analysis software (http://www.paraview.org/).
- Load the corresponding raw-file with the Paraview binary RAW importer
- Interpret as little endian, unsigned int, extend 1, a cubic domain of size N x N x N cells is imported by [[0,N-1], [0,N-1], [0,N-1]
- Data origin is lower front left.
- When the structure is rendered as GrainID a simple thresholding of grains of possible.
- This applies as well for importing grain boundaries data.
- Inverse polefigure coloring encodes each cell as a combination of three 1B unsigned char (R,G,B).
Click to enlarge on the images! The example refers to a 200 x 200 x 200 structure.
References¶
- This model:
- Kühbach, M., Gottstein, G., Barrales-Mora, L.A.A Statistical Ensemble Cellular Automaton Microstructure Model for Primary Recrystallizationsubmitted to “Acta Materialia” on Dec, 27, 2015
- Funding:
- The authors gratefully acknowledge the support from the DFG in the frame of the Reinhart Koselleck project (GO 335/44-1).Furthermore, we acknowledge the support from the FZJuelich and RWTH Aachen University within the project JARAHPC projects.
Version history¶
- v1.0 first version,
- with deformed grain boundary detection and nucleation model, Poisson-Voronoi structure, Poissonian nucleationsite-saturated and time-dependent nucleation, MPI-parallelized, summary statistics and basic voxel structures
MPI/OpenMP extension¶
In addition the code has been modified for thread-parallelism with OpenMP, and the source code is made available in the SCORE_MPIOMP_20151224.zip file that resides in the hybrid folder. The user is motivated to extract the archive in a separate folder and to build the program as it was described already for the MPI-only version.
This hybrid SCORE model works as the MPI-parallelized version, and enabled a reduction of the execution time by a factor of 9, at most, as it was benchmarked on a Bullx X5675 Xeon two socket cluster blade system with exclusive usage of the 12 physical cores (OMP_NUM_THREADS=12) and explicitly bound the threads to the cores (KMP_AFFINITY). It is possible already with this model to handle Poissonian nucleation in cuboidal deformed grain structures.
However, not all internal functions have already been thread-parallelized, such as the grain boundary identification and grain boundary nucleation, and hence these functionalities are claimed as disfunctional at the moment.
Further details for developers.¶
In contrast to the pure MPI version in which each automaton domain expands completely in one implicit array (the mycellgrid), the hybrid version subdivides statically this grid in the y and the z direction. Each such automaton region is now handled by the caregionMemHdl class which allocates storage and bookkeeps two interface lists. According to this list, cells are either categorized as located completely in the simulation domain or close to its boundary, which is a one cell thick layer.
The cells that are close to this boundary require synchronization with other regions to avoid data races and to maintain a consistent view of the infection states. For this halo regions are defined, into which the threads first infect in parallel, then synchronize syncHalo and again read out in parallel the changes that occurred in the halo regions and require synchronization in the corresponding memory regions. This minimizes thread synchronization.
At the moment the cell list defragmentation functionality is disabled.
Licence¶
The project is licenced under the GNU v2.0
Questions, contributions¶
Just let me know or contact markus.kuehbach@rwth-aachen.de