This is an open-source fluid simulation code based on the Least Squares Smoothed Particle Hydrodynamics (LS-SPH) [1], a high-precision and generalized extension of classical SPH.
This code provides the following features (📣 indicates new additions):
- A variety of standard fluid benchmark problems, including:
- 2D Taylor-Green vortex 📣
- 2D Lid-driven cavity flow 📣
- 2D Boussinesq convection 📣
- Applications to geophysical and engineering problems (currently under development)
- Implementation of both LS-SPH and classical SPH models
- Support for 2D fluid simulations
- Written in Fortran with OpenMP and Python
- Unix-like environment (Linux, macOS, or WSL on Windows)
- Intel Fortran compiler (using
ifx
) - Intel MKL (Math Kernel Library) for linear algebra routines
make
utility for building Fortran files- Python with common libraries (e.g.,
matplotlib
,scipy
) ffmpeg
for movie generation
The following example shows how to simulate the 2D Taylor-Green vortex:
- Clone or download this repository to your computer.
- Navigate to
sph_code/benchmarks/2d-fixed-wall/source_code/
. - Run
make
to build the program. - Run
./start_calculation
to start the simulation. - After the simulation finishes, run
TG_main.py
to generate figures.
Note
To simulate other cases, please refer to the User Manual (Japanese) and set the appropriate parameters.
If you use this simulator in your research, please cite the following two references:
Shobuzako, K., Yoshida, S., Kawada, Y., Nakashima, R., Fujioka, S., & Asai, M. (2025).
A generalized smoothed particle hydrodynamics method based on the moving least squares method and its discretization error estimation.
Results in Applied Mathematics, 26, 100594. https://doi.org/10.1016/j.rinam.2025.100594
Shobuzako, K. (2025). LS-SPH-Fluid-Simulator (Version 1.0.0) [Computer software].
Zenodo. https://doi.org/10.5281/zenodo.15709255
Please refer to the LS-SPH Fluid Simulator User Manual, which is written in Japanese.
An English version is not currently available.
Please consider using translation tools such as AI.
Contributions are welcome!
If you'd like to improve the code, report a bug, or add a new feature, feel free to submit a pull request.
Please see CONTRIBUTORS.md for contributor information.
[1]
Shobuzako, K., Yoshida, S., Kawada, Y., Nakashima, R., Fujioka, S., & Asai, M. (2025).
A generalized smoothed particle hydrodynamics method based on the moving least squares method and its discretization error estimation.
Results in Applied Mathematics, 26, 100594. https://doi.org/10.1016/j.rinam.2025.100594
This project is licensed under the MIT License. See the LICENSE for details.