This repository contains a Jupyter notebook implementing a multi-stage Runge-Kutta-like time integration scheme for solving PDE systems using Devito.
The notebook demonstrates a Multi-Stage Minimum Failure Example (MFE) Time Stepping Simulation that implements high-order time integration methods for partial differential equations.
- Multi-stage Runge-Kutta time integration for PDE systems
- Source term handling with Taylor series expansion
- Strong Stability Preserving Runge-Kutta (SSPRK) coefficients
- Devito-based finite difference implementation
- 2D wave equation example with multiple source terms
The method formulates PDE systems as first-order in time:
∂U/∂t = HU + f(x,t)
where the solution is approximated using matrix exponentials and multi-stage Runge-Kutta methods following the approach from:
- Al-Mohy AH, Higham NJ (2010) - Matrix exponential algorithms
- Gottlieb S, Gottlieb LAJ (2003) - Strong stability preserving Runge-Kutta methods
MFE_time_size.ipynb- Main Jupyter notebook with complete implementation
- Python 3.7+
- NumPy
- SymPy
- Devito
- Install Devito following the official installation guide
- Clone this repository:
git clone https://github.com/fernanvr/time-stepping-devito.git cd time-stepping-devito - Launch Jupyter and open the notebook:
jupyter notebook MFE_time_size.ipynb
The notebook is self-contained and includes:
- Environmental setup - Grid and variable configuration
- PDE system definition - Wave equation with source terms
- Source derivatives computation - Symbolic differentiation
- Operator construction - Multi-stage method implementation
- Simulation execution - Running the Devito operator
Simply run all cells in sequence to execute the complete simulation.
The implementation follows these key steps:
- Formulate the PDE system as first-order in time
- Expand source terms using Taylor series
- Apply multi-stage Runge-Kutta integration
- Use Devito for efficient finite difference computation
The simulation produces time-evolved wavefields demonstrating the effectiveness of the multi-stage time integration approach for wave propagation problems.
This project is open source. Please cite the relevant papers when using this code in academic work.
Fernando V. R. - GitHub
- Al-Mohy AH, Higham NJ (2010) A new scaling and squaring algorithm for the matrix exponential. SIAM Journal on Matrix Analysis and Applications 31(3):970–989
- Gottlieb S, Gottlieb LAJ (2003) Strong stability preserving properties of runge–kutta time discretization methods for linear constant coefficient operators. Journal of Scientific Computing 18(1):83–109