Skip to content

ChamuV/IMEX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IMEX Solvers for Reaction–Diffusion PDEs

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:

$$ \frac{du}{dt} = \mathcal{L}(u) + \mathcal{N}(u) $$

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:

$$ \frac{u^{n+1} - u^n}{\Delta t} = \mathcal{L}(u^{n+1}) + \mathcal{N}(u^n) $$

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.


Why this exists

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.


What it does

The solvers are built for two-species systems of the form:

$$ \begin{aligned} u_t &= \nabla \cdot (D_u \nabla u) + \gamma f(u, v) \\ v_t &= \nabla \cdot (D_v \nabla v) + \gamma g(u, v) \end{aligned} $$

and also support extensions to nonlinear and variable diffusion, including terms of the form:

$$ \nabla \cdot (D(u, v) \nabla u) $$

This includes both standard diffusion and more general cases such as cross or density-dependent diffusion.


Implemented methods

The following IMEX schemes are included.

AB1–AM1 (IMEX Euler)

$$ (I - \Delta t L) u^{n+1} = u^n + \Delta t , \gamma f(u^n) $$


AB2–AM2

$$ (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) $$

AB2–BDF2

$$ \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) $$

AB4–BDF4

$$ (25 I - 12 \Delta t L) u^{n+1} = 48 u^n - 36 u^{n-1} + 16 u^{n-2} - 3 u^{n-3} $$

$$

  • 12 \Delta t \gamma \left( 4 f(u^n) - 6 f(u^{n-1}) + 4 f(u^{n-2}) - f(u^{n-3}) \right) $$

Structure

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

What’s next

  • include additional IMEX schemes as they are implemented
  • extend support for more general nonlinear diffusion operators
  • apply these solvers to new PDE models

License

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.

About

IMEX time-stepping solvers for reaction–diffusion PDEs with reusable scientific computing infrastructure.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages