Solver for the Maxey-Riley-Gatignol Equations (MaRGE) in 3D
Project description
MaRGE3D package
📜 Solver for Maxey-Riley-Gatignol Equations (MaRGE) in 3D flow based on the method by Daitche (2013). Analytical solution in simple vortex is provided to validate the method.
MaRGE3D solves the full MaRGE, including the Basset history term, for inertial particles moving in three-dimensional fluid flow fields. The history term is treated with the specialized quadrature schemes of Daitche, matched with first, second, and third order Adams–Bashforth methods. The package also provides an analytical reference solution for a particle in a three-dimensional vortex flow under gravity, which can be used to verify any implementation of a 3D MaRGE solver.
Attribition
You can freely use and reuse this code in line with its license. If you use it (or parts of it) for a publication, please cite
@article{Rathi2026,
author = {Rathi, Vamika and Ruprecht, Daniel},
title = {Numerical Modeling of Inertial Particles in Three-Dimensional Fluid Flow},
journal = {Proceedings in Applied Mathematics and Mechanics},
volume = {26},
number = {2},
pages = {e70158},
year = {2026},
doi = {10.1002/pamm.70158},
url = {https://doi.org/10.1002/pamm.70158}
}
Installation
pip install marge3d
🔔 Checkout the latest documentation build and in particular the notebook tutorials
Links
- Documentation : https://marge-3d-solver.readthedocs.io
- Issues Tracker : https://github.com/CompMath-TUHH/MaRGE_3D_solver/issues
Structure of the code
The main functionality is found in the modules located in the
./marge3d
folder:
numeric.py—NumericalSolverclass implementing Daitche's first, second, and third order schemes for the full 3D MaRGE.analytic.py—AnalyticalSolverclass providing the analytical solution for a particle in a 3D vortex under gravity.fields.py—VelocityField3Dclass defining the vortex velocity field.params.py—DaitcheParametersclass converting physical parameters into the dimensionless quantities (R,S,G) used by the solver.utils.py— helper routines. Scripts to produce the figures from the paper can be found in the./scriptsfolder. Tests are located in./testsand can be run by typing
pytest ./tests/
while in the base folder of the code.
How can I reproduce figures from the paper "Numerical Modeling of Inertial Particles in Three-Dimensional Fluid Flow"?
The scripts to reproduce the figures from this paper can be found here.
- Fig. 1 (left, positively buoyant particle trajectory) -->
scripts/run_analytical_solution.pywithparticle_density = 500 - Fig. 1 (right, negatively buoyant particle trajectory) -->
scripts/run_Daitche_solution.pywithparticle_density = 1410 - Fig. 2 (convergence, lighter particle, zero initial relative velocity) -->
scripts/run_convergence.pywithparticle_density = 500and zero initial relative velocityW0 = V0 - U0 = 0; vary the Stokes number forS = 3(left) andS = 0.3(right) - Fig. 3 (convergence, lighter particle, non-zero initial relative velocity) -->
scripts/run_convergence.pywithparticle_density = 500andW0 = (0, 0.1, 0);S = 3(left) andS = 0.3(right) - Fig. 4 (convergence, heavier particle, zero initial relative velocity) -->
scripts/run_convergence.pywithparticle_density = 1410andW0 = 0;S = 3(left) andS = 0.3(right) - Fig. 5 (convergence, heavier particle, non-zero initial relative velocity) -->
scripts/run_convergence.pywithparticle_density = 1410andW0 = (0, 0.1, 0);S = 3(left) andS = 0.3(right)
ℹ️ The Stokes number
Sis controlled through the particle radius, kinematic viscosity and characteristic time viaS = (1/3) a²/(ν T). The analytical solution is only valid for particles less dense than the fluid (ρ_p/ρ_f < 5/8) and assumes zero initial relative velocity; for the heavier particle and for non-zero initial relative velocity, the error is computed against a higher-resolution numerical reference solution instead of the analytical one. The analytical and numerical solutions agree only for the characteristic valuesT = 0.1andU = 0.4used in the paper.
Acknowledgements
This project is funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) – SFB 1615 – 503850735. Open access funding enabled and organized by Projekt DEAL.
Developers
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file marge3d-0.0.5.tar.gz.
File metadata
- Download URL: marge3d-0.0.5.tar.gz
- Upload date:
- Size: 596.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ff9a28405c081594eb05b8a4e02abde743b8fed5d6b89c75320b5351003a87e
|
|
| MD5 |
294e6b04682e80a36621cbb7c7ddaa11
|
|
| BLAKE2b-256 |
7bedee8393cd37765caa620548e8c5f6cc432fffd9388d3062bd59217f9c4bfd
|
Provenance
The following attestation bundles were made for marge3d-0.0.5.tar.gz:
Publisher:
publish.yml on CompMath-TUHH/MaRGE_3D_solver
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
marge3d-0.0.5.tar.gz -
Subject digest:
2ff9a28405c081594eb05b8a4e02abde743b8fed5d6b89c75320b5351003a87e - Sigstore transparency entry: 1670066561
- Sigstore integration time:
-
Permalink:
CompMath-TUHH/MaRGE_3D_solver@c72d77e1b53356cd4216ad6227bf4cd94b47b55e -
Branch / Tag:
refs/heads/main - Owner: https://github.com/CompMath-TUHH
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c72d77e1b53356cd4216ad6227bf4cd94b47b55e -
Trigger Event:
workflow_dispatch
-
Statement type: