Growing Microstructures using Phase-Field Crystal Stefan Bringuier 1 1 University of Arizona, Department of Materials Science and Engineering December 16, 2013 1 Overview The phase-field (PF) and phase-field-crystal (PFC) methods are relatively new approaches to modelling materials based on the variational principles of minimizing the free energy of a given system. More specifically, PFC is concerned with minimizing the free-energy functional by considering density fields that have periodic spatial variation 1. Thus for crystalline solids this inherently captures the periodic description. Furthermore such model naturally incorporates elastic/plastic deformations and captures varying grain boundary orientations. Computational investigation of microstructure evolution using PF to date has been well studied 2 4. The PF method makes use of field variables such as impurity concentration and temperature to evolve the system microstructure. This has been extensively used to study dendritic growth in metals and alloys as well as spinodal decomposition. The dynamics of the system are driven by the dissipative minimization of a phenomenological determined free-energy functional. One of the limitations concerning phase field modelling is that the formulation requires uniform fields that are in equilibrium. As a result of this properties such as elasticity, anisotropy, and grain orientations are not inherent in the physical description. Although this has been addressed via different methods, PF has yet been unable to handle diffusive phase transformations and anisotropic surface energy to name a few 1,5. More recently the PFC method has shown promise in addressing the short-comings of PF. The primary difference between PFC and PF is that the order parameter is refashioned as a temporally coarse but spatially described by an atomic probability density (APD) 5. This is done by choosing stefanb@email.arizona.edu 1
a free-energy functional which is minimized by an APD that is spatially periodic for crystalline solids and constant for liquids. It so happens that such description incorporates the necessary physics to describe things like surface tension, elasticity, anisotropy, dislocations etc. Additionally diffusive behaviour can be studied as a consequence of the time scale. In Fig. 1 an example from Provatas and Elder 6 is showing the ADP field of a partially solidified simulation. Many aspects such as orientation, liquid/solid interface, and dislocations are highlighted. Figure 1: PFC simulation showing ADP field and the various micro structure properties captured. 6 2 Proposed Research The importance of structural information such as grain boundary (GB) interfaces is crucial to understand the properties of a given material. For this reason computational methods such as molecular dynamics (MD) and first principle calculations are utilized to subject these interfaces to varies conditions. However, due to constraints from time and spatial scales it is computational difficult to grow crystals/polycrystals and furthermore interfaces using MD or first principle calculations. In some cases the use of mathematical geometric constructions make ease in building GB, an example of such approach are the coincident-site lattice model and Voronoi tessellation method. Although very useful, such methods are limiting and do not necessarily provide agreement with experimental microstructures. In addition even after considerable annealing and equilibration cycles the resulting interfaces might still reside in local minima. Thus determining the most suitable initial configuration requires some prior knowledge from 2
experimental or other computational methods. Phase-field-crystal may provide some value insight since it is possible to grow microstructures and interfaces.these structures can then be subjected to external fields or non-equilibrium events to extract properties 7. For example in Fig. 2 the dislocation glide velocity and crack propagation behaviours have been study. Figure 2: Examples of dislocation glide during shear and crack growth using the PFC method 7, 1 However there are situations where atomic length and time scales are needed and therefore MD might be better suited. An example of this is the effect of grain boundaries on ion bombardment. The benefit here is that PFC method has generated a blurred atomic picture but to some degree can be used to represent the atomic positions. The resulting microstructures from PFC can be used by MD simulations, this is a rare example where information across scales occurs in reverse. An example of a 3D generated polycrystalline BCC sample using PFC is shown in 3. Figure 3: 3D nucleation and growth of a BCC material where the purple indicates atomic coordinates with correct coordination and yellow otherwise. 8 3
The benefit to using PFC rather than other techniques such as Voronoi construction or coincident-stie lattice model is the correctness of the geometry generated by PFC. This is because the variational backbone accounts for minimizing free energy associated with interfaces. As a result mechanism associated with dislocation movement and interaction in polycrystalline materials can be observed. As a side note, the construction of phase diagrams is readily available since the free energy descriptions are used. 2.1 Background The first step is to determine the a free-energy functional which is minimized by a periodic function. If we consider the following equation: F = d r (ψ G2 ψ + u4 ) ψ4 (1) Here G is an operator by which when larger than zero has a single well and smaller than zero two wells. This is similar to other functionals such as Model A and Model B 6. The key point is that when ψ is a periodic function G can be chosen such that it is negative and when ψ is uniform it is positive. This type of problem was tackled by Swift and Hohenberg to study Rayleigh-Bénard convection of a fluid between a hot and cold plate. It was shown, now known as the Swift-Hohenberg model, that the free-energy functional for periodic systems is: F = [ ψ d r 2 ( ɛ + ( go 2 + 2) ) ] 2 ψ + ψ4 4 This equation sets much of the need framework for the formulation for PFC. I will not provide the full derivation on how to go from the Swift- Hohenberg model to PFC since it is still under investigation by the author. However I refer the reader to the book by 6. 2.2 First Steps As part of demonstrating capability to carry out the proposed work we have authored a python code based on GNU license libraries which simulates evolution of a non-convserved field (e.g. magnetization) using the Cahn- Allen or Model A. This code is based on the steps outlined in the textbook Phase-Field Methods in Materials Science and Engineering by Provatas and Elder 6. Here the phase-field variable is assumed to be a non-conserved quantity and the free energy functional is given by: (2) f(φ) = a(t ) + a 2 2 φ2 + a 4 4 φ4 + O(φ 6 ) (3) The dynamics of this system is of Langevin type and is given by: 4
( φ t = M W o 2 φ f(φ, T ) ) φ Here M is related to the time scale change from disordered to order phase. Inserting Eq. 3 into Eq. 4 gives the following which describes the dynamics of a non-conserved field in the absence of an external field: (4) φ t = M ( W o 2 φ a 2 φ a 4 φ ) (5) Figure 4: Order to disordered phase transition at different timesteps using Chan-Allen/Model A approach. The source code and parameters used are provided in the appendix. In Fig. 4 microstructure evolution is shown at varies timesteps. We see that the system decomposes into two separate and distinguishable phases. This is an example spinodal decomposition. 3 Design of Simulation Although PFC has shown great promise to date it has been used on fairly simple systems. To better understand its capabilities the author suggest a possible investigation into understanding how to represent materials which are classified as chemically complex and mechanically brittle. The intial work would be to come up with a free-energy functional using a selected prototype system and extend then extend it to other materials. Once determined the relative dynamics can be worked out and PFC simulations can be regularly carried out. 5
References [1] K. R. Elder and M. Grant, Modeling elastic and plastic deformations in non-equilibrium processing using phase field crystals, arxiv:cond-mat/0306681, Jun. 2003. [Online]. Available: http://arxiv.org/abs/cond-mat/0306681 [2] J. Warren and W. Boettinger, Prediction of dendritic growth and microsegregation patterns in a binary alloy using the phase-field method, Acta Metallurgica et Materialia, vol. 43, no. 2, pp. 689 703, Feb. 1995. [Online]. Available: http://www.sciencedirect.com/science/article/pii/095671519400285p [3] S.-L. Wang and R. F. Sekerka, Computation of the dendritic operating state at large supercoolings by the phase field model, Physical Review E, vol. 53, no. 4, pp. 3760 3776, Apr. 1996. [Online]. Available: http://link.aps.org/doi/10.1103/physreve.53.3760 [4] N. Provatas, P. J. A. Dantzig, B. Athreya, P. Chan, P. Stefanovic, N. Goldenfeld, and K. R. Elder, Using the phase-field crystal method in the multi-scale modeling of microstructure evolution, JOM, vol. 59, no. 7, pp. 83 90, Jul. 2007. [Online]. Available: http://link.springer.com/article/10.1007/s11837-007-0095-3 [5] K. R. Elder, N. Provatas, J. Berry, P. Stefanovic, and M. Grant, Phasefield crystal modeling and classical density functional theory of freezing, Physical Review B, vol. 75, no. 6, p. 064107, Feb. 2007. [Online]. Available: http://link.aps.org/doi/10.1103/physrevb.75.064107 [6] N. Provatas and K. Elder, Phase-Field Methods in Materials Science and Engineering. John Wiley & Sons, Sep. 2010. [7] P. Stefanovic, M. Haataja, and N. Provatas, Phase-field crystals with elastic interactions, Physical Review Letters, vol. 96, no. 22, p. 225504, Jun. 2006. [Online]. Available: http://link.aps.org/doi/10.1103/physrevlett.96.225504 [8] W. J. Boettinger, J. A. Warren, C. Beckermann, and A. Karma, Phase-field simulation of solidification1, Annual Review of Materials Research, vol. 32, no. 1, pp. 163 194, 2002. [Online]. Available: http://www.annualreviews.org/doi/abs/10.1146/annurev.matsci.32.101901.155803 4 Appendix 4.1 Model A Code 6
#! / usr / bin / python # ModelA Based on t he code in Phase F i e l d Methods in M a t e r i a l s Science # by N. Provatas and K. Elder. In order to have comparable performance to # o f numpexpr i s implemented. Also note t h a t numpy. r o l l ( ) which makes a c # Author Stefan Bringuier # 11/15/2013 # TODO Try p a r a l l i z a t i o n v i a MPI4py and PyCUDA import numpy a s np import numexpr a s nex import s c i p y as sp import mpi4py a s mpi import m a t p l o t l i b. pyplot as p l t import time class V a r i a b l e s ( ) : Class to d e f i n e v a r i a b l e s and arrays a s s o c i a t e d with Model A. def i n i t ( s e l f, kwargs ) : #D e f a u l t run v a l u e s s e l f. dx = 0. 8 s e l f. dy = 0. 8 s e l f. dt = 0. 1 s e l f. a 2 = 1.0 s e l f. a 4 = 1. 0 s e l f.w2 = 0.25 s e l f. tmax = 100000 s e l f. Nx = 256 s e l f. Ny = 256 s e l f.m = 1. 0 s e l f. cn = s e l f. dx2 in = 1. 0 / ( ( s e l f. dx 2 + s e l f. dy 2)/2) s e l f. a v e p s i = 0. 0 #Check f o r f i l e to read from #t r y : 7
# s e l f. ReadFile ( kwargs [ FileName ] ) #e x c e p t : # p r i n t No f i l e to read. Using D e f a u l t v a l u e s! s e l f. A l l o c a t e ( ) def ReadFile ( F i l e ) : #f i l e = open ( s t r ( FileName ), ro ) print read f i l e def A l l o c a t e ( s e l f ) : s e l f. PSI = np. z e r o s ( ( s e l f. Nx, s e l f. Ny), dtype=f l o a t ) s e l f. Grad2 = np. z e r o s ( ( s e l f. Nx, s e l f. Ny), dtype=f l o a t ) s e l f.rhs = np. z e r o s ( ( s e l f. Nx, s e l f. Ny), dtype=f l o a t ) s e l f. Grad2Mu = np. z e r o s ( ( s e l f. Nx, s e l f. Ny), dtype=f l o a t ) def D e a l l o c a t e ( s e l f ) : s e l f. PSI. d e l e t e ( ) s e l f. Grad2. d e l e t e ( ) s e l f.rhs. d e l e t e ( ) s e l f. Grad2Mu. d e l e t e ( ) class U t i l i t y : Set o f f u n c t i o n s t h a t do not need to be i n s t a n t i a t e d @staticmethod def Print2DFile ( f i e l d, time ) : np. s a v e t x t ( f i e l d 2 D +time+. out, f i e l d, fmt= %23.16 f ) @staticmethod def RandNumArry( nx, ny ) : a = np. random. random sample ( ( nx, ny ) ) return a @staticmethod def GaussArry ( nx, ny ) : mu = 0. 0 sigm = 0. 5 a =np. random. normal (mu, sigm, ( nx, ny ) ) return a @staticmethod def NABALA2(A, dx2 in, num proc = 1 ) : 8
nex. set num threads ( num proc ) fwd = np. r o l l (A, 1, 1 ) up = np. r o l l (A, 1, 0 ) fwdup = np. r o l l ( fwd, 1, 0 ) bck = np. r o l l (A, 1,1) dwn = np. r o l l (A, 1,0) bckdwn = np. r o l l ( bck, 1,0) fwddwn = np. r o l l ( fwd, 1,0) bckup = np. r o l l ( bck, 1, 0 ) # See d e s c r i p t i o n in book f o r l a p l a c i a n d e r i v a t i o n GR2 = nex. e v a l u a t e ( ( fwd + bck + up + dwn) / 2. 0 + \ ( fwdup + bckup + fwddwn + bckdwn ) / 4. 0 ( 3. 0 A dx2 in ) ) return GR2 @staticmethod def RightHS (V, num proc =1): W2 = V.W2 Grad2 = V. Grad2 a 2 = V. a 2 PSI = V. PSI a 4 = V. a 4 RHS = nex. e v a l u a t e ( W2 Grad2 a 2 PSI a 4 ( PSI 3) ) return RHS i f name == m a i n : v = V a r i a b l e s ( FileName = T e s t F i l e ) v. tmax = 50000 # Use u t i l i t y to g e n erate random phi f i e l d or # read in f i l e. 9
v. PSI = U t i l i t y. GaussArry ( v. Nx, v. Ny) #v. PSI = np. l o a d t x t ( input. c f g ). reshape ( v. Nx, v. Ny) threads = nex. d e t e c t n u m b e r o f c o r e s ( ) # Evolve s t r u c t u r e s t a r t = time. time ( ) for t in range ( v. tmax ) : v. Grad2 = U t i l i t y.nabala2( v. PSI, v. dx2 in, num proc=threads ) v.rhs = U t i l i t y. RightHS ( v, num proc=threads ) v. PSI += ( v. dt v.m v.rhs) i f t %5000 == 0 : t t = t /5000 p l t. imshow ( v. PSI ) p l t. c o l o r b a r ( ) p l t. s a v e f i g ( image +s t r ( t t )+. jpg ) p l t. c l f ( ) print Time :, time. time ( ) s t a r t 10