D_u, D_v = 0.01, 0.5 F, k = 0.035, 0.065 # FitzHugh-Nagumo parameters dt, dx = 0.1, 1.0 size = 100
u = np.random.rand(size, size) v = np.random.rand(size, size)
def laplacian(Z): return (np.roll(Z, 1, axis=0) + np.roll(Z, -1, axis=0) + np.roll(Z, 1, axis=1) + np.roll(Z, -1, axis=1) - 4*Z) / dx**2 pattern formation and dynamics in nonequilibrium systems pdf
for t in range(5000): u += dt * (D_u * laplacian(u) + u - u**3 - v + F) v += dt * (D_v * laplacian(v) + (u - v) * k)
plt.imshow(u, cmap='viridis') plt.title('Turing Pattern') plt.show() D_u, D_v = 0
This is not a popular science book. It is aimed at:
Prerequisites:
Pattern formation is not static. Nonequilibrium systems exhibit rich dynamical behaviors:
For oscillatory media (e.g., chemical oscillations or superconductors), the CGLE describes near-threshold dynamics: [ \frac\partial A\partial t = A + (1 + i\alpha)\nabla^2 A - (1 + i\beta)|A|^2 A ] Solutions include plane waves, spiral defects, and spatiotemporal chaos. This is not a popular science book
Patterns are rarely static. The "Dynamics" in the title refers to how these patterns evolve, compete, and destabilize.