Grain growth described by multi-phase field model, implemented by cross-platform parallel (CPU/GPU) computing language of Taichi
- install Python (3.8+) and pip, then install Taichi, numpy, and matplotlib
pip install numpy
pip install taichi
pip install matplotlib
- git clone this repo
- go to the current directory of this repo, run the code in command line by:
python ./polycrystal_grain_growth.py
then two sub-windows will show up with grain morphology and grain boundary.
Multi-phase field model is utilized to describe the polycrystal. For polycrystal:
- different grains with different orientations is regarded as different phases.
- Grain boundary is regarded as mixture of two adjacent grains.
- Liquid state (where multiple grains nucleate from) is regarded as mixture of multiple grains (mixed orientations of multiple grains, implying the amorphous structure of liquid).
We set an initial fluctuation (perturbation) for liquid state, so that when it solidifies, it will nucleate multiple grains, and subsequent grain growth process will occur, such as:
- big grain eating small grains
- curve boundaries being straightened
- triple-junctions forming
These phenomena can be seen from the above animations generated by simulation from this repo.
We use
The grain boundary between grain p and grain q satisfies both
Obviously, the sum from
Free energy is expressed as the functional of phase field (order parameters field). System will evolve from higher energe state to lower energy state. The decline of free energy drives the system to evolve, generating the grain growth process.
It is expected that the grain boundary has higher energy compared to the grain's internal. Grain boundary's energy density is expressed as:
The additional energy penalty for multi-phase mixture (prevent mist-like phase-distribution obscuring the grain morphology) is:
Thus, total free energy (functional of order parameters) is expressed as:
where
Steinbach's generalization of Ginzburg-Landau equation for multi-phase field is utilized to driving the phase-evolution, expressed as:
where n is the total number of different phases,
Using rate
, where the 4th-order Runge-Kutta method (RK4) is utilized as time integration scheme.
- Space discretization and partial differential operators utilize finite difference method (FDM).
- Time integration scheme utilizes 4th-order Runge-Kutta method (RK4).
- Steinbach's generalization of Ginzburg-Landau equation for multi-phase field https://www.sciencedirect.com/science/article/abs/pii/S0167278999001293
- introduction of Taichi parallel computing language at github https://github.com/taichi-dev/taichi
- Taichi documentation https://docs.taichi-lang.org/docs
- physical explanation of grain growth https://en.wikipedia.org/wiki/Grain_growth