!* 2D simulation of dendrite growth in the Fe-C system


!*YAPFI macro
!*-----------

SET_NUMBER_OF_THREADS
8!Number of threads /1/


MANDATORY_DATA
c_fe_bcc_fcc_liq_demo!GES file / ANALYTICAL [<analytic init file>]
1770!(Initial) Temperature [K] /1000.0000/
!Pressure [Pa] /100000.00/
n!Element C substitutional /YES/
!Element FE substitutional /YES/
!Initially homogeneous composition /YES/
0.006!Initial mole fraction of element C
0.994!Initial mole fraction of element FE
!*Enter state of phases, 1:Entered, 2: Suspended
!State of phase (LIQUID) /1/
!State of phase (BCC_A2) /1/
2!State of phase (FCC_A1) /1/
2!Dimensionality /1/
32!Nr of grid points in dimension #1 /10/
32!Nr of grid points in dimension #2 /10/
0.016384!Domain width [m] in dimension #1 /1.0000000/
0.016384!Domain width [m] in dimension #2 /1.0000000/
!Periodic boundary in dimension #1 /NO/
!Periodic boundary in dimension #2 /NO/
!*Grid type. 1:Linear, 2:Geometric, 3: Double geometric, 4: Read from file
!Grid type in dimension #1 /1/
!Grid type in dimension #2 /1/
!*Info: Initial time is always zero
60!Simulation time [s] /1.0000000/
!Maximum timestep [s] /6.0000000/
!Minimum timestep [s] /0.10000000E-09/
!Initial timestep [s] /0.10000000E-09/
!Save interval /1/
10!Minimum elapsed time between saves [f(time)], [s] /1.0/

ANISOTROPIC_SURFACE_ENERGY
y!Allow anisotropic surface energy /NO/
1e-10!abs(\Delta\phi)_min (A negative value disables the use of this parameter) /0.10000000E-13/

PHASE_FIELD_DATA
!Use phase-field variables /YES/
!Total nr of phase-field variables /2/
!File containing initial phase-field variable values
!*Associate phases with phase-field variables
!*Phase indices:
!*1:LIQUID
!*2:BCC_A2
2!Index of associated phase of phase-field variable # 1
1!Index of associated phase of phase-field variable # 2
!*Enter g_1
!*Shorthand notations:
!*gs11=\sum_iG_{mi}(\phi_i^3(10-15\phi_i+6\phi_i^2))
!*gs12=\sum_iG_{mi}\phi_i
!*variable GXX correspond to Gm of phase
gs11!Gm expression for g_1
!*Enter g_2
!*Shorthand notations:
!*gs21=8\sum_i\phi_i^2(1-\phi_i)^2
!*gs22=0.626\sum_i(\frac{\tanh(2)^2-1}{\tanh(2)^2}\log[1-\tanh(2)^2(2\phi_i-1)^2]-(2\phi_i-1)^2)
15*gs21!Gm expression for g_2
!*Enter epsilon_ij expressions
-1.875e-9*(1.0+0.02*cos(4*(acos(dp01dz1/((dp01dz1*(1.0+eps))^2+(dp01dz2*(1.0+eps))^2+eps)^0.5)*(dp01dz2/(eps+dp01dz2^2)^0.5)+3.141592653589793*(1.0-(dp01dz2/(eps+dp01dz2^2)^0.5))-0.0)))^2!E0102
(10*5e-9*1e-4)/(R*T*100e-9**2)!Enter phase-field mobility expression

INITIAL_SINGLE_PHASE
y!Set whole domain to consist of a single phase /NO/
2!Enter corresponding phase-field variable index

INITIAL_PRECIPITATE
1!Enter corresponding phase-field variable index
!*Options:
!*1.Spherical precipitate
!*2.Segment/triangle/tetrahedron precipitate at origin
!*3.Arbitrary segment/triangular/tetrahedron precipitate
2!Precipitate option
0.5e-4!x-axis cut-off
0.5e-4!y-axis cut-off
!*Enter precipitate composition (mole fraction)
0.001!Element C
0.999!Element FE
10!Relative grid fineness around precipitate (only relevant with adaptive meshing) /0/

FIX_INITIAL_STATE
!*INFO: Enable this command after entering phase-field data
y!Fix the initial state /NO/
0.001!Mole fraction of C in phase-field variable #1
0.999!Mole fraction of FE in phase-field variable #1
0.006!Mole fraction of C in phase-field variable #2
0.994!Mole fraction of FE in phase-field variable #2
!Round initial phase-field variable values to zero/one /YES/

NUMERICAL_SETTINGS
!Degree of implicity /1.0000000/
0.1!Relative error tolerance /0.50000000E-01/
!Absolute error tolerance /0.10000000E-07/
!Jacobian perturbation parameter /0.10000000E-02/
!Clean Jacobian /NO/
!Minimum mole fraction /0.10000000E-14/
!Minimum mobility /0.10000000E-39/
!Maximum temperature /6000.0000/
!Maximum timestep change factor /2.0000000/
!Enforce a maximum \Delta T per time-step /NO/
!Temporally piece-wise locally constant coefficients /YES/
y!Enable linearized time-steps /NO/
y!Assume a maximum width of interfaces /NO/
16e-6!Enter width of interface as real value (>0.0) or nr of grid points (3,5,7,..)
!Set non-active phase-field variables away from interfaces to zero /YES/


ADAPTIVE_MESHING
y!Use adaptive meshing /NO/
!Initial allocation factor (>=1) /1.0000000/
n!Adapt mesh based on composition gradients /YES/
!Adapt mesh based on phase-field variable gradients /YES/
0.01!Max phase-field variable Delta /0.10000000/
0.001!Min phase-field variable Delta /0.10000000E-01/
n!Adapt mesh based on temperature gradients /YES/
1!Domain size integer aspect ratio, 1st spatial dimension
1!Domain size integer aspect ratio, 2nd spatial dimension
1!Input integer (1) or real valued (2) parameters /1/
5!Initial depth (>0)
3!Minimum depth (>0)
12!Maximum depth (>0)
!Base interval to adapt mesh on cumulative change /NO/

FLUCTUATING_PHI
!*A user supplied function is multiplied with a random number -1<x<1
!*and added to all dg/dphi derivatives every time-step
y!Enable adding fluctuations to dg/dphi /NO/
p01*p02*40.0!Fluctuation function

RANDOM_NUMBER_SETTINGS
y!Use a single seed for the pseudorandom number generator /NO/
-1!Enter integer seed (1 digit) (<0 for internal vector) /1/

SOLVER
!*Solvers:
!*1.Jacobian solver
!*2.Implicit solver
2!Choose solver /1/

