Skip to main content

Solver for the Maxey-Riley-Gatignol Equations (MaRGE) in 3D

Project description

MaRGE3D package

Read the Docs Repo status CI pipeline Coverage PyPI - Package PyPI - Downloads

📜 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.

DOI

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

Structure of the code

The main functionality is found in the modules located in the ./marge3d folder:

  • numeric.pyNumericalSolver class implementing Daitche's first, second, and third order schemes for the full 3D MaRGE.
  • analytic.pyAnalyticalSolver class providing the analytical solution for a particle in a 3D vortex under gravity.
  • fields.pyVelocityField3D class defining the vortex velocity field.
  • params.pyDaitcheParameters class 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 ./scripts folder. Tests are located in ./tests and 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.py with particle_density = 500
  • Fig. 1 (right, negatively buoyant particle trajectory) --> scripts/run_Daitche_solution.py with particle_density = 1410
  • Fig. 2 (convergence, lighter particle, zero initial relative velocity) --> scripts/run_convergence.py with particle_density = 500 and zero initial relative velocity W0 = V0 - U0 = 0; vary the Stokes number for S = 3 (left) and S = 0.3 (right)
  • Fig. 3 (convergence, lighter particle, non-zero initial relative velocity) --> scripts/run_convergence.py with particle_density = 500 and W0 = (0, 0.1, 0); S = 3 (left) and S = 0.3 (right)
  • Fig. 4 (convergence, heavier particle, zero initial relative velocity) --> scripts/run_convergence.py with particle_density = 1410 and W0 = 0; S = 3 (left) and S = 0.3 (right)
  • Fig. 5 (convergence, heavier particle, non-zero initial relative velocity) --> scripts/run_convergence.py with particle_density = 1410 and W0 = (0, 0.1, 0); S = 3 (left) and S = 0.3 (right)

ℹ️ The Stokes number S is controlled through the particle radius, kinematic viscosity and characteristic time via S = (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 values T = 0.1 and U = 0.4 used 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

marge3d-0.0.4.tar.gz (597.0 kB view details)

Uploaded Source

File details

Details for the file marge3d-0.0.4.tar.gz.

File metadata

  • Download URL: marge3d-0.0.4.tar.gz
  • Upload date:
  • Size: 597.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for marge3d-0.0.4.tar.gz
Algorithm Hash digest
SHA256 a33140da3229901ce59daa80e02e3514a04f890bd4c46c2898a03808616e7fc1
MD5 794a4f5975c0aa3445bcfb967cb010c5
BLAKE2b-256 4a83ed0aace2a2cb79d9b8d7544d714ee65905eb2331363ea4356746db572a7e

See more details on using hashes here.

Provenance

The following attestation bundles were made for marge3d-0.0.4.tar.gz:

Publisher: publish.yml on CompMath-TUHH/MaRGE_3D_solver

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page