This repository collects a set of IMEX (implicit–explicit) time-stepping schemes developed for solving reaction–diffusion PDEs, and organises them into a reusable and extensible structure.
IMEX methods are designed for problems where different terms have different numerical properties. A general PDE can be written as:
where:
-
$\mathcal{L}(u)$ is typically a stiff linear operator (e.g. diffusion) -
$\mathcal{N}(u)$ is a nonlinear term (e.g. reactions)
IMEX schemes treat these separately:
so that:
- the stiff part is handled implicitly (stable)
- the nonlinear part is handled explicitly (cheap to compute)
This makes them particularly useful for PDEs where fully explicit methods are unstable and fully implicit methods are too expensive.
During coursework, these schemes were implemented multiple times in separate notebooks and scripts. This repository brings them together into a single structure so they can be reused directly for other PDE models without rewriting the numerical method each time.
The solvers are built for two-species systems of the form:
and also support extensions to nonlinear and variable diffusion, including terms of the form:
This includes both standard diffusion and more general cases such as cross or density-dependent diffusion.
The following IMEX schemes are included.
$$ (I - \tfrac{\Delta t}{2} L) u^{n+1} = (I + \tfrac{\Delta t}{2} L) u^n
- \Delta t \left( \tfrac{3}{2} f(u^n) - \tfrac{1}{2} f(u^{n-1}) \right) $$
$$ \left( \tfrac{3}{2} I - \Delta t L \right) u^{n+1} = 2 u^n - \tfrac{1}{2} u^{n-1}
- \Delta t \gamma \left( 2 f(u^n) - f(u^{n-1}) \right) $$
$$
- 12 \Delta t \gamma \left( 4 f(u^n) - 6 f(u^{n-1}) + 4 f(u^{n-2}) - f(u^{n-3}) \right) $$
src/
├── solvers/
│ ├── ab1am1.py
│ ├── ab2am2.py
│ ├── ab2bdf2.py
│ └── ab4bdf4.py
│
├── spatial/
│ ├── laplacian_1d.py
│ ├── laplacian_2d.py
│ ├── variable_diffusion_1d.py
│ └── variable_diffusion_2d.py
│
├── models/
│ ├── schnakenberg.py
│ ├── gierer_meinhardt.py
│ └── tumor_ecm.py
- include additional IMEX schemes as they are implemented
- extend support for more general nonlinear diffusion operators
- apply these solvers to new PDE models
This project is released under the MIT License. See the LICENSE file for details.
Overall, this repository is intended as a reusable base for working with IMEX methods in PDEs, rather than a collection of one-off scripts.