Try   HackMD

Code snippets to Edwards–Wilkinson (EW) Model

The Edwards–Wilkinson (EW) model is a fundamental mathematical framework in statistical physics for describing the evolution of surface growth. It models how a surface roughens over time, governed by a linear stochastic partial differential equation. The main equation incorporates both random fluctuations (white noise) and a smoothing term represented by the Laplacian, balancing randomness and relaxation effects. Primarily used to study kinetic roughening phenomena, the EW model is pivotal in understanding universality classes of surface growth and interfaces. It serves as a benchmark for comparing real-world surface growth processes, contributing to research in materials science, thin-film deposition, and various natural growth systems.

Code snippetsMATLABKPZ ModelEW ModelMH ModelPythonJuliaRC++

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
MATLAB snippet

The Edwards–Wilkinson (EW) model is a simpler form of the KPZ equation used to describe surface growth. The main difference is that the nonlinear term (

(h(x,t))2 ) is absent. The EW equation can be written as:
h(x,t)t=ν2h(x,t)+η(x,t),

where:

  • (
    ν
    ) is the surface tension coefficient,
  • (
    η(x,t)
    ) represents Gaussian white noise.

MATLAB Implementation Outline

Below is a basic MATLAB implementation to simulate the EW model:

  1. Discretize the spatial domain using a grid.
  2. Discretize time using a time step (
    dt
    ).
  3. Use finite difference methods for the Laplacian.
  4. Include a noise term using a random number generator.

Here's how to implement the EW model in MATLAB:

% Parameters
N = 100;        % Number of spatial points
dt = 0.01;      % Time step
dx = 1.0;       % Spatial step
nu = 1.0;       % Diffusion coefficient
noiseStrength = 0.1; % Noise strength
T = 1000;       % Number of time steps

% Initialize the height profile
h = zeros(1, N);

% Time evolution loop
for t = 1:T
    % Compute the Laplacian using finite differences (periodic boundary)
    laplacian = (circshift(h, -1) - 2 * h + circshift(h, 1)) / (dx^2);
    
    % Add noise (scaled by sqrt(dt) for stability)
    noise = noiseStrength * sqrt(dt) * randn(1, N);
    
    % Update the height function
    h = h + dt * (nu * laplacian) + noise;
    
    % Plot the surface at regular intervals
    if mod(t, 100) == 0
        plot(h);
        title(['Surface profile at time step: ', num2str(t)]);
        xlabel('Spatial position');
        ylabel('Height');
        drawnow;
    end
end

Explanation:

  • circshift is used to simulate periodic boundary conditions, where the neighbors of the first and last elements wrap around.
  • randn generates Gaussian random noise for each spatial point.
  • The noise is scaled by (
    dt
    ) to ensure the noise term behaves correctly over discrete time steps.

Visualization:

  • The code plots the surface profile at regular intervals (t % 100 == 0) to visualize how the surface evolves over time.
  • Adjust the plotting interval and parameters (e.g., N, dt, noiseStrength) as needed for different simulations or finer control.

This MATLAB script serves as a starting point for simulating the Edwards–Wilkinson model for surface growth. You can enhance it by adding more advanced visualization, saving data, or modifying boundary conditions.

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
Python snippet

The Edwards–Wilkinson (EW) model is another SPDE used to describe surface growth. It's a simpler case compared to the KPZ equation, as it lacks the nonlinear term. The EW model equation is:

h(x,t)t=ν2h(x,t)+η(x,t),
where:

  • (
    h(x,t)
    ) is the height function over space and time,
  • (
    ν
    ) is the surface tension (diffusion coefficient),
  • (
    η(x,t)
    ) represents Gaussian white noise.

Python Implementation Approach

We'll use finite differences for spatial derivatives and a simple Euler method for time integration. Here's a Python script that simulates the EW model on a 1D grid:

import numpy as np
import matplotlib.pyplot as plt

# Parameters
N = 100  # Number of spatial points
dx = 1.0  # Space step
dt = 0.01  # Time step
nu = 1.0  # Diffusion coefficient
noise_strength = 0.1  # Noise strength
num_steps = 1000  # Number of time steps

# Initialize height function
h = np.zeros(N)

# Function to compute the Laplacian using finite differences
def laplacian(h):
    lap = np.zeros_like(h)
    for i in range(1, N - 1):
        lap[i] = (h[i - 1] - 2 * h[i] + h[i + 1]) / (dx * dx)
    # Periodic boundary conditions
    lap[0] = (h[-1] - 2 * h[0] + h[1]) / (dx * dx)
    lap[-1] = (h[-2] - 2 * h[-1] + h[0]) / (dx * dx)
    return lap

# Time evolution loop
for step in range(num_steps):
    noise = noise_strength * np.random.normal(0, 1, N) * np.sqrt(dt)
    h += dt * nu * laplacian(h) + noise
    
    # Plotting every 100 steps
    if step % 100 == 0:
        plt.plot(h, label=f'Step {step}')
        plt.xlabel('Position')
        plt.ylabel('Height')

# Show plot
plt.legend()
plt.title('Surface Evolution with the Edwards–Wilkinson Model')
plt.show()

Explanation:

  • Laplacian function computes the second derivative using central differences.
  • Noise term is Gaussian with a standard deviation scaled by (\sqrt{\text{dt}}) to match the stochastic component.
  • Periodic boundary conditions ensure continuity at the edges.

Customization:

  • Adjust parameters like N, dt, nu, or noise_strength for different behavior.
  • For visualization, you can add animations or use libraries like matplotlib.animation to create dynamic plots showing surface evolution over time.

This simple simulation helps in understanding how stochastic surface growth evolves according to the EW model, illustrating smoothing and roughening effects due to diffusion and random noise.