# Course:MTRL578

## Phase Field Model

### Recrystallization

 Initial Structure Grains Impingement End of Recrystallization

The executable and source code for Windows is here and for Linux is here. Compile it with g++.

The input file for program should be in the same directory as executable. It contains all settings required to run the code.

-------------- Inpput file for Recrystallization Simulations ------------

Saving directory:
C:\directory\that\I\want\the\results\to\be\saved\

size in x direction (grid points):
200

System size in y direction (grid points):
200

Delta x:
1

Threshold value for choosing active nodes:
0.00000000001

Delta t:
0.1

Total number of time steps to finish calculation:
30000

Sequence of time steps which the results is written on hard disk:
500

Model parameter "L":
1

Model parameter "m":
1

Model parameter "kappa":
1

Total number of nuclei in the domain:
40

Stored energy of matrix grain:
0.1

12



#### Visualisation

Use Fullres_tn.txt for creating a grayscale snapshot of the structure. Grain boundaries are dark and grains are white. Use Inds_tn.txt to create a colour map representing index of each grain. This code makes a structure where matrix is red:


%% Recrytallization structure
clear
figure
start=0;
step=500;
ending=10000
ni=0;
for tn=[start:step:ending]
ni=ni+1;
delt=0.15;
savedir='/home/cenna/Results/2000/';
phi=importdata([savedir '/Fullres_' num2str(tn) '.txt']);
inds=importdata([savedir '/Inds_' num2str(tn) '.txt']);
im(:,:,1)=phi;
im(:,:,2)=phi.*[inds~=1];
im(:,:,3)=phi.*[inds~=1];
imshow(im);
caxis([0 1]);
axis off
box off
title(['Time= ' num2str(tn)]) set(gca,'DataAspectratio',[1 1 1])
pause(01);
print([savedir '/' num2str(ni) '.png'],'-dpng','-r200',gcf)
end



## Interface and Particles Interaction

See result of simulation in Zener_pinning Zener Pining article at Wikipedia.

Code for energy calculation is here. Program for interaction of an interface with ensemble of particles is here.

#### Model Parameters

Model parameters ${\displaystyle m,\;\kappa }$ and ${\displaystyle L}$ are related to physical characteristics of the interface. Interface energy is: mobility=3/2*L*sqrt(2*kappa/m);intenergy=1/3*sqrt(2*m*kappa);

${\displaystyle \sigma _{gb}={\frac {1}{3}}{\sqrt {2m\kappa }}}$

and interface mobility is:

${\displaystyle M_{gb}={\frac {3}{2}}L{\sqrt {\frac {2\kappa }{m}}}}$

One can check accuracy of calculations by testing the interface mobility and energy with corresponding values obtained from simulation.