Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

13. Spinodal decomposition and coarsening in two dimensions

School of Engineering, Nazarbayev University

When an Alnico permanent-magnet alloy, Fe–Cr duplex stainless steel, or Cu\mathrm{Cu}–Ni\mathrm{Ni}–Sn\mathrm{Sn} spinodal bronze is quenched inside its miscibility gap, thermal composition fluctuations amplify into either a bicontinuous, percolating labyrinth (c0=0.50c_0 = 0.50) or isolated nanoscale droplets (c0=0.35c_0 = 0.35). Once phase separation saturates at the equilibrium compositions cαc_\alpha and cβc_\beta, the microstructure does not freeze: driven by interfacial capillary energy, small precipitates dissolve and feed larger domains via Ostwald ripening / Lifshitz–Slyozov–Wagner (LSW) coarsening. In this lecture we simulate 2-D microstructure evolution with phase_field.cahn_hilliard_2d_spectral, show exact k=0k = 0 solute conservation and Ginzburg–Landau Lyapunov decay, contrast critical vs. off-critical morphologies, and measure domain coarsening via the 2-D structure factor phase_field.characteristic_domain_size_2d.

Learning objectives

  1. Integrate 2-D periodic spinodal decomposition using the semi-implicit Fourier spectral scheme c^n+1=(c^n−ΔtMk2f′(cn)^)/(1+ΔtMκk4)\hat{c}^{n+1} = (\hat{c}^n - \Delta t M k^2 \widehat{f'(c^n)}) / (1 + \Delta t M\kappa k^4) in phase_field.cahn_hilliard_2d_spectral.

  2. Verify exact machine-precision solute conservation ∣cˉ(t)−cˉ(0)∣<10−13|\bar{c}(t) - \bar{c}(0)| < 10^{-13} (protected by k2=0k^2 = 0 at the zero-wavenumber Fourier mode) and monotonic Lyapunov decay of phase_field.ginzburg_landau_free_energy_2d.

  3. Explain why critical quenches (c0=0.50c_0 = 0.50) form interconnected bicontinuous networks whereas off-critical quenches (c0=0.35c_0 = 0.35) pinch off into minority-phase droplets satisfying the lever rule.

  4. Quantify coarsening kinetics by extracting the characteristic domain wavelength Ld(t)=2π/⟨k⟩tL_d(t) = 2\pi / \langle k \rangle_t from the 2-D scattering structure factor S(k,t)=∣δc^(k,t)∣2S(\mathbf{k}, t) = |\hat{\delta c}(\mathbf{k}, t)|^2 via phase_field.characteristic_domain_size_2d.

Time: about 60 min

1. Principles and governing equations

On a doubly periodic 2-D domain [0,Lx)×[0,Ly)[0, L_x) \times [0, L_y) discretized on an Nx×NyN_x \times N_y grid, the 2-D Cahn–Hilliard equation evolves c(x,y,t)c(x, y, t) down the H−1H^{-1} conserved gradient flow of the 2-D Ginzburg–Landau functional (phase_field.ginzburg_landau_free_energy_2d):

F[c]=∫0Ly ⁣ ⁣∫0Lx[f(c)+κ2{(∂c∂x)2+(∂c∂y)2}]dx dy,∂c∂t=∇⋅(M∇μ)(1.1)\mathcal{F}[c] = \int_0^{L_y}\!\!\int_0^{L_x} \left[ f(c) + \frac{\kappa}{2}\left\{\left(\frac{\partial c}{\partial x}\right)^2 + \left(\frac{\partial c}{\partial y}\right)^2\right\} \right] dx\,dy, \qquad \frac{\partial c}{\partial t} = \nabla \cdot (M \nabla \mu) \tag{1.1}

1.1 Exact Mass Conservation & Monotonic Lyapunov Free-Energy Dissipation

  1. Exact k=0k = 0 Mass Conservation: In 2-D Fourier space with wavevector k=(kx,ky)\mathbf{k} = (k_x, k_y) and k2=kx2+ky2k^2 = k_x^2 + k_y^2, the semi-implicit spectral update (phase_field.cahn_hilliard_2d_spectral) reads:

    c^kn+1=c^kn−Δt Mk2f′(cn)^k1+Δt Mκk4(1.2)\hat{c}_{\mathbf{k}}^{n+1} = \frac{\hat{c}_{\mathbf{k}}^n - \Delta t\,M k^2 \widehat{f'(c^n)}_{\mathbf{k}}}{1 + \Delta t\,M\kappa k^4} \tag{1.2}

    At k=(0,0)\mathbf{k} = (0, 0), k2=0k^2 = 0 annihilates the chemical-potential update identically, so c^0n+1=c^0n\hat{c}_{\mathbf{0}}^{n+1} = \hat{c}_{\mathbf{0}}^n and the spatial mean cˉ(t)=1NxNyc^0(t)\bar{c}(t) = \frac{1}{N_x N_y}\hat{c}_{\mathbf{0}}(t) is invariant to machine round-off.

  2. Lyapunov Free-Energy Decay: Differentiating F[c(t)]\mathcal{F}[c(t)] along periodic solutions of ∂tc=∇⋅(M∇μ)\partial_t c = \nabla\cdot(M\nabla\mu) and integrating by parts gives:

    dFdt=∬δFδc∂c∂t dx dy=∬μ ∇⋅(M∇μ) dx dy=−∬M ∣∇μ∣2 dx dy≤0(1.3)\frac{d\mathcal{F}}{dt} = \iint \frac{\delta \mathcal{F}}{\delta c}\frac{\partial c}{\partial t}\,dx\,dy = \iint \mu\,\nabla\cdot(M\nabla\mu)\,dx\,dy = -\iint M\,|\nabla\mu|^2\,dx\,dy \leq 0 \tag{1.3}

Demonstration 1: 2-D Spectral Spinodal Decomposition — Mass Conservation & Lyapunov Free-Energy Decay
=====================================================================================================
  Time t |    Mean <c(t)> | Free Energy F[c] | Domain Size L_d
----------------------------------------------------------------
     0.0 | 0.500000000000 |         288.6296 |           2.659
     7.5 | 0.500000000000 |         232.7102 |           7.096
    15.0 | 0.500000000000 |         191.6310 |           8.197
    22.5 | 0.500000000000 |         171.5184 |           9.042
    30.0 | 0.500000000000 |         157.0049 |           9.780
    37.5 | 0.500000000000 |         147.3801 |          10.372
    45.0 | 0.500000000000 |         140.3642 |          10.861
    52.5 | 0.500000000000 |         135.0552 |          11.264
    60.0 | 0.500000000000 |         130.4349 |          11.619

Max conservation drift |<c(t)> - <c(0)>| = 1.110e-16 (< 1e-13)
Max free-energy change between snapshots = -4.6203 (strictly non-increasing)

What Demonstration 1 shows. Over 240 spectral time steps (t=0→60t = 0 \to 60), the mean composition cˉ(t)=0.500000000000\bar{c}(t) = 0.500000000000 drifts by only 1.1×10−161.1\times 10^{-16} (rounding error), while the Ginzburg–Landau free energy F[c]\mathcal{F}[c] falls monotonically from 288.6 (the bulk energy of the uniform solution, 482×f(0.5)=482×0.125=288.048^2 \times f(0.5) = 48^2 \times 0.125 = 288.0, plus the gradient energy of the initial noise) to 130.4 as solute partitions into c≈0c \approx 0 and c≈1c \approx 1 domains and coarsens LdL_d from 7.10 to 11.62.


2. Morphology Selection: Interconnected Labyrinth (c0=0.50c_0 = 0.50) vs. Droplets (c0=0.35c_0 = 0.35)

Why do symmetric critical quenches (c0=0.50c_0 = 0.50) form bicontinuous, percolating channels, whereas off-critical quenches (c0=0.35c_0 = 0.35, still well inside the spinodal (0.211,0.789)(0.211, 0.789)) pinch off into circular precipitates? By the equilibrium lever rule between cα=0c_\alpha = 0 and cβ=1c_\beta = 1, the equilibrium area fraction of the β\beta-rich phase (c>0.5c > 0.5) equals fβ≈c0f_\beta \approx c_0. In 2-D continuum percolation, an isotropic phase at fβ=0.50f_\beta = 0.50 sits right at the symmetric bicontinuous threshold, whereas at fβ=0.35<0.50f_\beta = 0.35 < 0.50 capillary surface tension minimizes interfacial perimeter by rounding the minority phase into isolated disks.


Demonstration 2: Critical Bicontinuous Network (c0 = 0.50) vs Off-Critical Droplets (c0 = 0.35)
===============================================================================================
Critical quench   (c0=0.50): minority/beta area fraction (c > 0.5) = 0.5013, L_d(60) = 11.62
Off-critical      (c0=0.35): minority/beta area fraction (c > 0.5) = 0.3138, L_d(60) = 10.39
Off-critical mass drift |<c(t)> - 0.35| = 5.551e-17
<Figure size 1155x473 with 4 Axes>

Figure 13.1. Composition field at t=60t = 60. (a) c0=0.50c_0 = 0.50: two interpenetrating domains. (b) c0=0.35c_0 = 0.35: droplets of the minority phase.

What Demonstration 2 shows. The off-critical β\beta area fraction, frac_beta_off =0.314= 0.314, is below the lever-rule value 0.35 for flat interfaces. One reason is the Gibbs–Thomson effect: a droplet of radius RR raises the chemical potential by Δμ∼σ/R\Delta\mu \sim \sigma / R, so the matrix around it holds more solute than cα=0c_\alpha = 0. Meanwhile, smaller droplets have higher σ/R\sigma/R chemical potential than larger droplets, driving diffusive solute transport from small droplets to large droplets (Ostwald ripening).


3. Structure-Factor Coarsening & Scattering Length Scale Ld(t)L_d(t)

In small-angle X-ray or neutron scattering (SAXS / SANS), experimentalists monitor spinodal decomposition via the static structure factor S(k,t)=∣F2D{c(r,t)−cˉ}∣2S(\mathbf{k}, t) = \left|\mathcal{F}_{2\mathrm{D}}\{c(\mathbf{r}, t) - \bar{c}\}\right|^2. phase_field.characteristic_domain_size_2d computes the first-moment mean wavenumber ⟨k⟩(t)\langle k \rangle(t) and converts it into the characteristic real-space domain wavelength Ld(t)L_d(t):

⟨k⟩(t)=∑k≠0∣k∣ S(k,t)∑k≠0S(k,t),Ld(t)=2π⟨k⟩(t)(3.1)\langle k \rangle(t) = \frac{\sum_{\mathbf{k} \neq \mathbf{0}} |\mathbf{k}|\,S(\mathbf{k}, t)}{\sum_{\mathbf{k} \neq \mathbf{0}} S(\mathbf{k}, t)}, \qquad L_d(t) = \frac{2\pi}{\langle k \rangle(t)} \tag{3.1}

We run a longer coarsening trajectory (t=0→120t = 0 \to 120 on our 48x48 grid) and decompose the total Ginzburg–Landau energy F[c]=Fbulk[c]+Fgrad[c]\mathcal{F}[c] = \mathcal{F}_{\mathrm{bulk}}[c] + \mathcal{F}_{\mathrm{grad}}[c] to watch spinodal amplification transition into capillary-driven coarsening.


Demonstration 3: Two-Stage Spinodal Evolution — Bulk Separation Followed by Interfacial Coarsening
==================================================================================================
Early spinodal wavelength L_d(t=12) = 7.78 vs Linear lambda_max = 6.28
Late coarsened wavelength L_d(t=120)= 14.92 (grew by 1.92x)
<Figure size 1210x440 with 2 Axes>

Figure 13.2. (a) Total, bulk and gradient free energy against time. (b) Domain size LdL_d against time; the dotted line is the wavelength of fastest growth in the linear theory.

What Demonstration 3 shows. The split of the energy into bulk and gradient parts shows two regimes.

  1. Spinodal Amplification (t∈[0,12]t \in [0, 12]): Bulk free energy Fbulk\mathcal{F}_{\mathrm{bulk}} falls rapidly as cc rolls off the c0=0.5c_0 = 0.5 hilltop into the 0 and 1 wells, while gradient energy Fgrad\mathcal{F}_{\mathrm{grad}} rises from ≈0\approx 0 as interfaces form; at t=12t = 12 the domain size is Ld=7.78L_d = 7.78, already above the linear value λmax⁡=6.28\lambda_{\max} = 6.28.

  2. Capillary Coarsening (t>12t > 12): Once bulk phase separation is complete, both Fbulk\mathcal{F}_{\mathrm{bulk}} and Fgrad\mathcal{F}_{\mathrm{grad}} equal half of the total interfacial energy (≈12σPint\approx \frac{1}{2}\sigma P_{\mathrm{int}} by equipartition) and decay in lockstep as interfaces merge and Ld(t)L_d(t) grows steadily.


4. Sensitivity to the parameters

How does solute mobility MM (controlled exponentially by aging temperature TT via Arrhenius diffusion) affect the microstructure? We sweep M∈{0.25,0.50,1.00,2.00}M \in \{0.25, 0.50, 1.00, 2.00\} at fixed annealing time tend=40.0t_{\mathrm{end}} = 40.0, and also verify kinetic time-rescaling collapse: does (M=0.5,t=60)(M = 0.5, t = 60) produce the same microstructure as (M=2.0,t=15)(M = 2.0, t = 15) when M⋅ΔtM \cdot \Delta t is matched?


Demonstration 4: Mobility Sensitivity M & Exact dimensionless (M * t) Scaling Collapse
======================================================================================
Mobility M | Fixed t_end | Scaled M*t |  Free Energy F | Domain Size L_d
------------------------------------------------------------------------
      0.25 |        40.0 |       10.0 |       212.8428 |           7.454
      0.50 |        40.0 |       20.0 |       175.1738 |           8.868
      1.00 |        40.0 |       40.0 |       144.3765 |          10.580
      2.00 |        40.0 |       80.0 |       114.2146 |          12.947

Exact M*t=30 collapse max |c(M=0.5, t=60) - c(M=2.0, t=15)| = 0.000e+00

Inside the algorithm

What Demonstration 4 shows. Constant mobility MM enters ∂tc=M∇2[f′(c)−κ∇2c]\partial_t c = M \nabla^2[f'(c) - \kappa\nabla^2 c] purely as a clock-rate multiplier τ=Mt\tau = M t: higher aging mobility accelerates coarsening (LdL_d increases monotonically with MM at fixed tt), and matching MΔtM \Delta t collapses (M=0.5,t=60)(M=0.5, t=60) onto (M=2.0,t=15)(M=2.0, t=15) to 10-15.

Below we inspect phase_field.characteristic_domain_size_2d and phase_field.cahn_hilliard_2d_spectral, and verify our NumPy 2-D structure-factor calculation against the library implementation.

Check against the library


Inside the Algorithm: phase_field.characteristic_domain_size_2d
===============================================================
def characteristic_domain_size_2d(field: np.ndarray, Lx: float, Ly: float) -> float:
    """Compute characteristic domain wavelength L_d = 2*pi / <k> from the first moment of structure factor S(k)."""
    u = np.asarray(field, dtype=float)
    nx, ny = u.shape
    dx, dy = float(Lx) / nx, float(Ly) / ny
    kx = 2.0 * np.pi * np.fft.fftfreq(nx, d=dx)
    ky = 2.0 * np.pi * np.fft.fftfreq(ny, d=dy)
    kx_2d, ky_2d = np.meshgrid(kx, ky, indexing="ij")
    k_mag = np.sqrt(kx_2d**2 + ky_2d**2)
    s_k = np.abs(np.fft.fft2(u - np.mean(u))) ** 2
    s_k[0, 0] = 0.0
    denom = float(np.sum(s_k))
    if denom <= 1e-30:
        return 0.0
    k_mean = float(np.sum(k_mag * s_k) / denom)
    return float(2.0 * np.pi / k_mean) if k_mean > 0.0 else 0.0

L_d by hand = 11.6194984323 | L_d library = 11.6194984323 | diff = 0.000e+00

Exercises

Worked solutions are in 13_solutions.ipynb. The cell below the list is a short self-check to start from.

  1. Verify a result. On a 48×4848\times 48 box (Lx=Ly=48.0L_x = L_y = 48.0), evaluate characteristic_domain_size_2d on c(x,y)=0.5+0.1cos⁡(2πmx/Lx)cos⁡(2πmy/Ly)c(x,y) = 0.5 + 0.1\cos(2\pi m x/L_x)\cos(2\pi m y/L_y) for m∈{2,3,6}m \in \{2, 3, 6\} to verify Ld=Lx/(2 m)L_d = L_x / (\sqrt{2}\,m) to 10-13, and verify ginzburg_landau_free_energy_2d on a uniform field c≡0.30c \equiv 0.30 equals LxLyWc02(1−c0)2L_x L_y W c_0^2(1 - c_0)^2.

  2. Find how it fails. Verify that cahn_hilliard_2d_spectral raises ValueError on a 1-D input array, and demonstrate on a 32×3232\times 32 field (W=8.0,κ=0.05,M=1.0W = 8.0, \kappa = 0.05, M = 1.0) that an overly aggressive step Δt=1.0\Delta t = 1.0 violates Lyapunov monotonicity (ΔF>0\Delta\mathcal{F} > 0), whereas Δt=0.005\Delta t = 0.005 maintains ΔF≤0\Delta\mathcal{F} \leq 0 everywhere.

  3. Implement it yourself. Implement circularly_averaged_structure_factor(field, Lx, Ly, n_bins=14) to compute radially averaged SAXS intensity (kcenters,Srad)(k_{\mathrm{centers}}, S_{\mathrm{rad}}), and verify on a 48×4848\times 48 spinodal simulation (t=10t = 10 vs t=90t = 90) that the scattering ring peak shifts to smaller kk as domains coarsen.


Self-check for the exercises
============================
Checkerboard m=3: L_d computed = 11.31370850 vs exact L/(sqrt(2)*m) = 11.31370850
All checks passed.