# 2.6. Kuramoto-Sivashinsky - Using PDE class¶

This example implements a scalar PDE using the PDE. We here consider the Kuramoto–Sivashinsky equation, which for instance describes the dynamics of flame fronts:

$\partial_t u = -\frac12 |\nabla u|^2 - \nabla^2 u - \nabla^4 u$ Out:

  0%|          | 0/10.0 [00:00<?, ?it/s]
Initializing:   0%|          | 0/10.0 [00:00<?, ?it/s]
0%|          | 0/10.0 [00:12<?, ?it/s]
0%|          | 0.01/10.0 [00:25<6:57:16, 2506.13s/it]
0%|          | 0.02/10.0 [00:27<3:51:09, 1389.72s/it]
0%|          | 0.03/10.0 [00:27<2:33:57, 926.49s/it]
1%|1         | 0.1/10.0 [00:27<45:51, 277.95s/it]
46%|####5     | 4.56/10.0 [00:27<00:33,  6.10s/it]
46%|####5     | 4.56/10.0 [00:27<00:33,  6.10s/it]
100%|##########| 10.0/10.0 [00:27<00:00,  2.78s/it]
100%|##########| 10.0/10.0 [00:27<00:00,  2.78s/it]


from pde import PDE, ScalarField, UnitGrid

grid = UnitGrid([32, 32])  # generate grid
state = ScalarField.random_uniform(grid)  # generate initial condition

eq = PDE({"u": "-gradient_squared(u) / 2 - laplace(u + laplace(u))"})  # define the pde
result = eq.solve(state, t_range=10, dt=0.01)
result.plot()


Total running time of the script: ( 0 minutes 27.995 seconds)

Gallery generated by Sphinx-Gallery