(1)

(2)

(3)

# Materials

The KKS system (Kim et al. (1999)) uses multiple MOOSE materials to provide values for free energy functions, the switching function , and the double well function . Providing these as materials allows the functions to be bundled in a single place, while being used by multiple kernels. Furthermore the automatic differentiation feature used in the parsed function materials prreplovides the necessary derivatives at no cost to the developer. The derivatives are stored in material properties and follow a naming scheme that is defined in KKSBaseMaterial.C.

# Cahn-Hilliard Kernels

## KKSSplitCHCRes

KKSSplitCHCRes is the split version. In this kernel, we calculate the chemical potential from . The non-linear variable for this Kernel is the concentration . To calculate and , we use the CoupledTimeDerivative and SplitCHWRes kernels, respectively, as described here.

## Residual

In the residual routine we need to calculate the term . We exploit the KKS identity and arbitrarily use the a-phase instead.

(4)

### Jacobian

#### On-Diagonal

Since there is no explicit dependence on the non-linear variable in the residual equation, the diagonal components are zero.

#### Off-diagonal

We are looking for the derivative of , where . We need to apply the chain rule and will again only keep terms with the derivative.

(5)

For

(6)

## KKSCHBulk

KKSCHBulk is the non-split version, which is not fully implemented**. The non-linear variable for this Kernel is the concentration .

### Residual

In the residual routine we need to calculate the term . We exploit the KKS identity and arbitrarily use the a-phase instead. The gradient can be calculated through the chain rule (note that is potentially a function of many variables).

(7)

With being the vector of all arguments to this simplifies to

(8)

using as a shorthand for the term (and represented in the code as the array _second_derivatives[i]). We do have access to the gradients of through MOOSE (stored in _grad\_args[i]).

### Jacobian

The calculation of the Jacobian involves the derivative of the Residual term w.r.t. the individual coefficients of all parameters of . Here can stand for any variable .

(9)

In the code is given by jvar for the off diagonal case, and (not or !) in the on diagonal case.

#### Off-diagonal

Let's focus on off diagonal first. Here is zero, if jvar is not equal . Allowing us to remove the sum over and replace it with the single non-zero summand

(10)

In the first term in the square brackets the derivative is only non-zero if is jvar. We can therefore pull this term out of the sum.

(11)

With the rules for derivatives we get

(12)

where is _j in the code.

#### On-diagonal

For the on diagonal terms we look at the derivative w.r.t. the components of the non-linear variable of this kernel. Note, that is only indirectly a function of . We assume the dependence is given through . The chain rule will thus yield terms of this form

(13)

which is given as equation (23) in KKS. Following the off-diagonal derivation we get

v \frac{d2F_a}{dc_a2}\frac{dc_a}{dc} \nabla \phi_j + \sum_i \nabla a_i \frac {dR_i}{dc_a} \frac{dc_a}{dc} \phi_j \end{equation}

#### On-diagonal second approach

Let's get back to the original residual with . Then

(14)

# Allen-Cahn Kernels

For the bulk Allen-Cahn residual we need to calculate the term

(15)

The _chain rule term_ results from the fact that and are dependent on (see eqs. (25) and (26) in KKS). Setting we get

(16)

Substituting this in we get

(17)

This simplifies to

(18)

We split this residual into two kernels to allow for multiple phase concentrations in a multi component system:

## KKSACBulkF

KKSACBulkF is the part without a direct composition dependence.

(19)

### Jacobian

#### On-diagonal

We are looking for the derivative of , where . We need to apply the chain rule and will again only keep terms with the derivative.

(20)

(The implicit dependence of and on through and does not contribute to the Jacobian, so .

#### Off-Diagonal

The off-diagonal components are calculated for any other variables that and depend on. For example, for :

(21)

in the KKS formulation, so this term would not need to be included if was the only variable depended on. However, the code calculates derivatives with respect to all variables that and depend on in a general way so that the Jacobian entries for other dependencies are correctly computed using the same piece of code. For example, both and could depend on temperature , in which case

(22)

which is computed using the same code. The off-diagonal Jacobian contribution is also multiplied by the Allen-Cahn mobility at each point for consistency with the other terms in the Allen-Cahn equation.

## KKSACBulkC

KKSACBulkC is the part with a direct composition dependence. An instance of this kernel is needed for each compnent of the problem.

(23)

### Jacobian

#### On-diagonal

We are looking for the derivative of , where . We need to apply the chain rule and will again only keep terms with the derivative.

(24)

#### Off-diagonal

Since and appear in the residual, their effect must be calculated separately from any other variable dependence. For , we are looking for the derivative of , where . We need to apply the chain rule and will again only keep terms with the derivative.

(25)

Similarly for , (26)

For any variable other than or , for example temperature :

(27)

The off-diagonal Jacobian contributions are again multiplied by the Allen-Cahn mobility at each point for consistency with the other terms in the Allen-Cahn equation.

# Constraint Kernels

## KKSPhaseChemicalPotential

KKSPhaseChemicalPotential enforces the point wise equality of the phase chemical potentials

(28)

The non-linear variable of this Kernel is .

(29)

### Jacobian

For the Jacobian we need to calculate

(30)

(31)

#### Off-Diagonal

With the union of the argument vectors of and (represented in the code by _coupled_moose_vars[]) we get

(32)

Again the is non-zero only if , which is the case if is the argument selected through jvar.

(33)

Note that in the code jvar is not an index into _coupled_moose_vars[] but has to be resolved through the _jvar_map.

## KKSPhaseConcentration

KKSPhaseConcentration enforces the split of the concentration into the phase concentrations, weighted by the switching function. The non-linear variable of this Kernel is .

(34)

(35)

### Jacobian

#### On-Diagonal

Since the non-linear variable is ,

(36)

#### Off-Diagonal

For

(37)

For

(38)

For

(39)

1. Seong Gyoon Kim, Won Tae Kim, and Toshio Suzuki. Phase-field model for binary alloys. Physical Review E, 60(6):7186–7197, December 1999. URL: http://link.aps.org/doi/10.1103/PhysRevE.60.7186, doi:10.1103/PhysRevE.60.7186.[BibTeX]