The Cahn-Hilliard equation describes phase separation, e.g. of elements in an alloy. It is given by:
where c is the concentration with -1 and +1 representing two different species, D is the diffusion constant, and γ is an additional parameter. The differential equations are discretized using finite differences and solved on a 30x30 grid with periodic boundary conditions starting from a random initial condition of -1 or +1 at each node. The equations are solved from time 0 to time 4, and the distances between compartments in the discretization are defined as 1.
J. W. Cahn and J. E. Hilliard, "Free energy of a nonuniform system. I. Interfacial free energy," J. Chem. Phys. 28
Snapshot 1: example of domains formed.
Snapshot 2: example of a random initial condition.
Snapshot 3: at high diffusion constants and gamma parameter value, large and homogenous domains will form.