Skip to content

Python code to model spinodal decomposition using the Cahn-Hilliard equation.

Notifications You must be signed in to change notification settings

samuelhoover/spinodal-decomposition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

Usage

Run python spin-decomp.py to generate animations for the time evolution of the Cahn-Hilliard equation using the forward Euler method.

Set the model parameters in the CahnHilliard call in the main() function.

$D = 100$, $\gamma = 0.5$, and 50/50 mixture ($p = 0$).

$D = 100$, $\gamma = 0.5$, and 70/30 mixture ($p = 0.4$) with Ostwald ripening evident.

Dependencies

NumPy v1.24.3
SciPy v1.7.3
Matplotlib v3.7.1
Pillow v9.4.0
tqdm v4.65.0

About

Python code to model spinodal decomposition using the Cahn-Hilliard equation.

Topics

Resources

Stars

Watchers

Forks

Languages