!* 1D homogenization model simulation of carburization accompanied by carbide precipitation
!* See A Engström, L Höglund, J Ågren, Metallurgical Transactions A 25A(1994)1127-1134.

!*YAPFI macro
!*-----------
SET_NUMBER_OF_THREADS
2!Number of threads /1/

MANDATORY_DATA
nicrc_demo!GES file / ANALYTICAL [<analytic init file>]
1123!(Initial) Temperature [K] /1000.0000/
!Pressure [Pa] /100000.00/
n!Element C substitutional /YES/
!Element CR substitutional /YES/
!Element NI substitutional /YES/
!Initially homogeneous composition /YES/
1e-4!Initial mole fraction of element C
0.27336444!Initial mole fraction of element CR
0.72653556!Initial mole fraction of element NI
!*Enter state of phases, 1:Entered, 2: Suspended
!State of phase (FCC_A1) /1/
!State of phase (FCC_A1#2) /1/
2!State of phase (FCC_A1#3) /1/
2!State of phase (GRAPHITE_A9) /1/
!State of phase (M3C2_D510) /1/
!State of phase (M7C3_D101) /1/
!Dimensionality /1/
100!Nr of grid points in dimension #1 /10/
3e-3!Domain width [m] in dimension #1 /1.0000000/
!Periodic boundary in dimension #1 /NO/
!*Grid type. 1:Linear, 2:Geometric, 3: Double geometric, 4: Read from file
2!Grid type in dimension #1 /1/
!*In dimension #1
1.01!Geometric factor /1.0000000/
!*Info: Initial time is always zero
3.6e6!Simulation time [s] /1.0000000/
!Maximum timestep [s] /360000.00/
!Minimum timestep [s] /0.10000000E-09/
!Initial timestep [s] /0.10000000E-09/
!Save interval /1/
3.6e4!Minimum elapsed time between saves [f(time)], [s] /1.0/





BOUNDARY_CONDITION
!Boundary condition at lower (=1) or upper (=2) boundary /1/
2!Boundary condition for heat (=1) or mass (=2) /1/
!*Boundary condition types:
!*0 - Closed (default)
!*1 - Mixed activity/closed
1!Boundary condition type /1/
!*For each element enter 0 for closed BC or 1 for activity BC
1!Closed (=0) or activity (=1) BC for element C /1/
0!Closed (=0) or activity (=1) BC for element CR /1/
0!Closed (=0) or activity (=1) BC for element NI /1/
!*For elements with activity BC, enter activity value.
0.18!Activity value for element C




HOMOGENIZATION_FUNCTION
!*Homogenization functions:
!*1. Rule-of-mixtures
!*2. Rule-of-mixtures with the phase volume fraction squared
!*3. Rule-of-mixtures with the phase volume fraction squared and prescribed matrix phase
!*4. Rule-of-mixtures with prescribed matrix phase
!*5. Arbitrary exponent labyrinth function. Prescribed matrix phase.
!*6. Function of volume fraction fraction of prescribed phase (labyrinth function)
!*7. Phase fraction weighted geometric mean of stable phases
5!Homogenization function /1/
!*Enter index of the prescribed matrix phase
!*1.FCC_A1
!*2.FCC_A1#2
!*3.M3C2_D510
!*4.M7C3_D101
1!Matrix phase number /1/
2!Labyrinth function exponent /1.0000000/

NUMERICAL_SETTINGS
!Degree of implicity /1.0000000/
!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/
!Enable linearized time-steps /NO/
!Assume a maximum width of interfaces /NO/


