Multi Phase Field Model with Anisotropic Interface Energy
Multi Phase Field Model with Anisotropic Interface Energy
Seunghwa Ryu, Yanming Wang and Wei Cai
This tutorial describes the theory and numerical implementation of a 3D multi phase phase field model with anisotropic interface energy. The model has been implemented in both matlab and in MD++. We describe the algorithm of these codes and how to use them in detail. A brief introduction of the phase field model can be found in Chapter 11 of
Computer Simulations of Dislocations, V. V. Bulatov and W. Cai, Oxford University Press (2006).
Download files
The matlab program can be downloaded from this link: Pf3d multi aniso.m. For the test case you need only one matlab file. You can download it into a directory of your choice, using the following command
wget http://micro.stanford.edu/mediawiki/images/f/fd/Pf3d_multi_aniso.m.txt -O Pf3d_multi_aniso.m
and run it within Matlab.
Theory
Similar to the case of multi phase field model with isotropic interface energy, the fundamental degrees of freedom and the corresponding free energy functional are in the same style. If we consider a system containing vapor, liquid and solid three phases, the only difference is that the gradient term in the free energy density functions of liquid-solid pair and solid-vapor pair now depends on the local orientation of the gradient of solid phase.
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle F[\phi_1(\mathbf{x}),...,\phi_N(\mathbf{x})] = \int \sum_{k\neq{i}}{f_{ik}(\phi_i(\mathbf{x}), \nabla\phi_i(\mathbf{x}),\phi_k(\mathbf{x}), \nabla\phi_k(\mathbf{x})) d^3 \mathbf{x}} }
Replacing Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \varepsilon_{LS}}
with , Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \varepsilon_{SV}}
with Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \frac{1}{2}(\epsilon_{SV}(\mathbf{n_S}))^2 }
and keeping Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \varepsilon_{VL}}
a constant,
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle f_{SV}(\phi_S, \nabla\phi_S,\phi_V, \nabla\phi_V) = \frac{1}{2}(\epsilon_{SV}(\mathbf{n_S}))^2 (\phi_V\nabla\phi_S-\phi_S\nabla\phi_V)^2 + U_{SV}\phi_S^2\phi_V^2 }
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle f_{LS}(\phi_L, \nabla\phi_L,\phi_S, \nabla\phi_S) = \frac{1}{2}(\epsilon_{LS}(\mathbf{n_S}))^2 (\phi_S\nabla\phi_L-\phi_L\nabla\phi_S)^2 + U_{LS}\phi_L^2\phi_S^2 }
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle f_{VL}(\phi_V, \nabla\phi_V,\phi_L, \nabla\phi_L) = \epsilon_{VL}(\phi_L\nabla\phi_V-\phi_V\nabla\phi_L)^2 + U_{VL}\phi_V^2\phi_L^2 }
For simplicity, choosing solid-vpaor pair as an example, the variational derivative is,
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \frac{\delta F_{SV}}{\delta \phi_S} = 2 U_{SV} \phi_S \phi_V (\phi_S - \phi_V) -\nabla\cdot[ \epsilon_{SV}(\mathbf{n_S})|\phi_V\nabla \phi_S - \phi_S\nabla \phi_V |] }
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle -\sum_{i=1,2,3} \frac{\partial}{\partial x_i}\left[ |\phi_V\nabla \phi_S - \phi_S\nabla \phi_V |^2 \epsilon_{SV}(\mathbf{n_S}) \frac{\partial \epsilon_{SV}(\mathbf{n_S})}{\partial \phi^S_{,i}} \right] }
where Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle x_1\equiv x}
, Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle x_2\equiv y}
, Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle x_3\equiv z}
, and Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \phi^S_{,i}\equiv \partial \phi_S/\partial x_i}
.
The methods to obtain the explicit expression of Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \epsilon_{SV}(\mathbf{n_S})} and Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \frac{\partial \epsilon_{SV}(\mathbf{n_S})}{\partial \phi^S_{,i}}} were already discussed in the previous wiki page.
Algorithm
Similar to the previous wiki page,in matlab, We present liquid Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \phi_1} , solid Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \phi_2} , and vapor Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \phi_3} , three phase fields by a Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle 1\times3} cell. Each element phi{i}(m,n,p) of the cell is a three-dimensional array, of size Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle N_x\times N_y\times N_z} . i goes from 1 to 3, m goes from 1 to Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle N_x} , n goes from 1 to Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle N_y} , and p goes from Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle N_z} . For simplicity, a uniform grid size Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle h} is used in all three directions., by default, periodic boundary conditions (PBC) are applied in all three directions.
For each phase Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \phi_i} , the first derivatives, Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \nabla_x \phi_i} , Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \nabla_y \phi_i} , Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \nabla_z \phi_i} , the second derivative, Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \nabla^2 \phi_i} and Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle (\nabla \phi_i)^2} , are computed the following manner.
dphidx{i} = (phi{i}(pxind,:,:)-phi{i}(nxind,:,:))/(2*h);
dphidy{i} = (phi{i}(:,pyind,:)-phi{i}(:,nyind,:))/(2*h);
dphidz{i} = (phi{i}(:,:,pzind)-phi{i}(:,:,nzind))/(2*h);
d2phi{i} = (phi{i}(pxind,:,:)+phi{i}(nxind,:,:) ...
+phi{i}(:,pyind,:)+phi{i}(:,nyind,:) ...
+phi{i}(:,:,pzind)+phi{i}(:,:,nzind)-6*phi{i})/(h^2);
dphi_SQR{i} = (dphidx{i}.*dphidx{i}) + (dphidy{i}.*dphidy{i}) + (dphidz{i}.*dphidz{i});