IonSolver is a magnetohydrodynamic simulation software using an extended Lattice Boltzmann method implemented in Rust and OpenCL. The software features a rudimentary GUI and both a single-node and multi-node execution model. IonSolver uses the Lattice Boltzman method for the simulated fluids, initial kernel functions for the LBM where taken with permission from the software FluidX3D by Dr. Moritz Lehmann. To allow for simulations of all detail levels, this software can be compiled in single-node or multi-node mode. In single-node mode the simulation may be distributed over multiple OpenCL-capable compute devices (ideally GPUs) on a single compute node and in multi-node mode the simulation is distributed over multiple compute nodes that communicate over MPI. This makes it possible to run IonSolver efficiently on devices ranging from laptops to supercomputers.
This software was created as part of the Jugend Forscht competition 2024 and reached 4th place in the Physics category on the state level. It will continue to receive updates past the competition.
IonSolver is not provided as a single executable but needs to be compiled from source. It also features multiple optional features that need to be manually activated. To run this software, first clone this repository and install rust if not installed already. The software is compiled with the command:cargo build --release --features "list of desired features"
Available features are:
gui
: A simple gui displaying and providing control over the simulation. Only supported in single-node mode for now.multi-node
: Distribute the simulation over multiple compute nodes. The compiled executable must be distributed to all nodes and started over MPI
To run the software in single-node mode use
cargo run --release
multi-node mode requires an mpi executor. These vary by system, but the executables do not need special arguments so running the program should be simple. The program aborts if the configured number of domains does not match up with the number of compute nodes exactly.
IonSolver simulations can be saved to a file that allows complete recovery of a previous simulated state. The file format is documented in FILE_LAYOUT.txt
. Saving and loading simulations is fully implemented in single-node mode, but not yet for multi-node setups. The easiest way to use this feature is to enable the gui feature that provides a simple interface for saving/loading simulations.
IonSolver orients itself along the License of its base project FluidX3D. It is however not affiliated with FluidX3D directly. Personal/scientific use is allowed, commercial and millitary use in any way is forbidden. When using using this software, give credit through the references below. If you publish data/results generated by altered source versions, the altered source code must be published as well. See the license for details.
- OpenCL-Headers for GPU parallelization (Khronos Group)
- marching-cubes tables for isosurface generation on GPU (Paul Bourke)
- ocl for high-level OpenCL bindings
- ocl-macros convenience macros for ocl (self-written)
- image for image saving
- egui for immediate mode ui rendering (only with
gui
feature) - mpi for distributed memory computing (only with
multi-node
feature) - bincode for mpi communication (only with
multi-node
feature) - serde for mpi communication (only with
multi-node
feature)
- Lehmann, M.: Computational study of microplastic transport at the water-air interface with a memory-optimized lattice Boltzmann method. PhD thesis, (2023)
- Lehmann, M.: Esoteric Pull and Esoteric Push: Two Simple In-Place Streaming Schemes for the Lattice Boltzmann Method on GPUs. Computation, 10, 92, (2022)
- Lehmann, M., Krause, M., Amati, G., Sega, M., Harting, J. and Gekle, S.: Accuracy and performance of the lattice Boltzmann method with 64-bit, 32-bit, and customized 16-bit number formats. Phys. Rev. E 106, 015308, (2022)
- Lehmann, M.: Combined scientific CFD simulation and interactive raytracing with OpenCL. IWOCL'22: International Workshop on OpenCL, 3, 1-2, (2022)
- Lehmann, M., Oehlschlägel, L.M., Häusl, F., Held, A. and Gekle, S.: Ejection of marine microplastics by raindrops: a computational and experimental study. Micropl.&Nanopl. 1, 18, (2021)
- Lehmann, M.: High Performance Free Surface LBM on GPUs. Master's thesis, (2019)
- Lehmann, M. and Gekle, S.: Analytic Solution to the Piecewise Linear Interface Construction Problem and Its Application in Curvature Calculation for Volume-of-Fluid Simulation Codes. Computation, 10, 21, (2022)