This repo contains the Python code used in
- The Regularised Inertial Dean–Kawasaki Equation: Discontinuous Galerkin Approximation and Modelling for Low-Density Regime. F. Cornalba & T. Shardlow. arXiv:2207.09989.
RIDK is a stochastic partial differential equation (SPDE) arising in the fluctuating hydrodynamics of inertial particles. RIDK-FD is a Python implementation for numerically simulating RIDK. It uses a discontinuous Galerkin approximation-in-space and semi-implicit Euler-Maruyama approximation-in-time. The main functionality for discontinuous Galerkin is provided by Firedrake.
- RIDK.py: library of common routines used to implement the RIDK solver.
- RIDK-DG-1d.py and RIDK-DG-1d_interact.py: examples in 1d (with and without reacting particles).
- RIDK-DG-2d.py and RIDK-DG-2d_interact.py: examples in 2d (with and without reacting particles).
- particle_model_Sec7/: implementation of the particle model given in Section 7. See run.py to generate data and output*.py to generate plots and animations.
Here's some animations corresponding to plots in the paper.
Here's some animations corresponding to the reaction/diffusion example in Section 7.
The orange regions indicate negative density (