Skip to content

[particles] Add basic particle implementation and Fokker-Planck solver

Timo Koch requested to merge feature/particles into master

What this MR does / why does DuMux need it:

Adds

  • Dumux::Particles::Particle: a simple particle class
  • Dumux::Particles::SimpleParticleCloud: a simple cloud class that assumes independent particles
  • Dumux::Particles::FokkerPlanck: a particle solver for simulating a density evolution satisfying the Fokker-Planck equation (e.g. advection-diffusion in a particular case)
  • Dumux::IO::Particles::Writer: a gridformat-based output writer for particle clouds
  • some simple compile and run tests

This can be used as the basis for implementing particle trackers, coupled particle-based grid-based simulation, and so forth. The current Fokker-Planck equation solver far from perfect with several hopefully documented assumptions. But I still think this will be a valuable starting point. Here is an example from the 1D simulation (the example should work in 2D and 3D as well). It should even work on unstructured grids, but this is not tested now and can be added later.

particles_example

Notes to the reviewer

  • There is no checking against a reference solution, as I didn't have a good idea how to test because the solver relies on random variables. One option would be to disable stochasticity in the simple rotating disc example and use the last step as a reference solution.
Edited by Timo Koch

Merge request reports

Loading