2 Examples

These are example scripts using the py-pde package, which illustrates some of the most important features of the package.

Plotting a vector field

Plotting a vector field

Solving Laplace’s equation in 2d

Solving Laplace's equation in 2d

Plotting a scalar field in cylindrical coordinates

Plotting a scalar field in cylindrical coordinates

Solving Poisson’s equation in 1d

Solving Poisson's equation in 1d

Simple diffusion equation

Simple diffusion equation

Kuramoto-Sivashinsky - Using PDE class

Kuramoto-Sivashinsky - Using PDE class

Spherically symmetric PDE

Spherically symmetric PDE

Diffusion on a Cartesian grid

Diffusion on a Cartesian grid

Stochastic simulation

Stochastic simulation

Time-dependent boundary conditions

Time-dependent boundary conditions

Setting boundary conditions

Setting boundary conditions

1D problem - Using PDE class

1D problem - Using PDE class

Heterogeneous boundary conditions

Heterogeneous boundary conditions

Storage examples

Storage examples

Brusselator - Using the PDE class

Brusselator - Using the PDE class

Writing and reading trajectory data

Writing and reading trajectory data

Diffusion equation with spatial dependence

Diffusion equation with spatial dependence

Using simulation trackers

Using simulation trackers

Schrödinger’s Equation

Schrödinger's Equation

Kuramoto-Sivashinsky - Using custom class

Kuramoto-Sivashinsky - Using custom class

Custom Class for coupled PDEs

Custom Class for coupled PDEs

1D problem - Using custom class

1D problem - Using custom class

Visualizing a scalar field

Visualizing a scalar field

Kuramoto-Sivashinsky - Compiled methods

Kuramoto-Sivashinsky - Compiled methods

Solver comparison

Solver comparison

Custom PDE class: SIR model

Custom PDE class: SIR model

Brusselator - Using custom class

Brusselator - Using custom class