[ANN] SPHExample - A teaching package for small SPH dam-break simulations

Hi everyone!

First time doing this sort of annoucement so a bit excited and nervous :slight_smile:

I’d like to announce a new package that I’ve been working on: an SPH (Smoothed Particle Hydrodynamics) dam-break simulation tutorial in Julia. The purpose of this code is to serve as an introduction to the SPH method, and I’ve designed it to be relatively simple and easy to understand.

Using this package as a teaching example one can learn how to get the following results:

The code includes a variety of features such as weakly compressible SPH, dynamic boundary conditions, density diffusion, and a Wendland Quintic kernel. It can simulate a 2d or 3d dam break, and it makes use of external packages such as CellListMap and WriteVTK to simplify the calculation process and output results in the .vtp format.

I’ve structured the code into “input” and “src” directories. The “input” directory includes some pre-generated particle layouts, and the “src” directory contains all the code files. The package also includes some auxiliary functions and time stepping controls.

If you find this code repository helpful, please feel free to star the project on GitHub. And if you end up using this code for your own learning or teaching, please let me know – it’s always a motivation boost to hear about how the code is being used!

You can find the code repository at the following link: GitHub - AhmedSalih3d/SPHExample: Simple SPH dam-break simulation in Julia

In a way this my concept of giving back to the Julia community. Some of you might have seen my name pop up in a lot of different questions and finally I was able to produce something in my field which I felt was worth sharing with others and the Julia community at large.

As always, please let me know if you have any questions or feedback.

Thank you!


Really great job! :slight_smile: This can (GitHub - InteractiveComputerGraphics/SPlisHSPlasH: SPlisHSPlasH is an open-source library for the physically-based simulation of fluids.) insight what else can be done.

1 Like

Thank you very much!

That is a really impressive repo :slight_smile:

Part of producing this example is actually due to me personally finding that a lot of these great and already quite big SPH libraries are very complicated due to the amount of features and options they have - which is a great experience for a user, but wanting to learn/develop it can quickly become “over-loaded”. So my aim with this was to hopefully lower barrier to entry as much as possible :slight_smile:

Kind regards