WaSH (Warwick Smooth Hydrodynamics) is a Domain Specific Language built with C++ designed to accelerate Smooth Particle Hydrodynamics (SPH) simulations, and to help developers and researchers best utilise all of available hardware functionaly, using OpenMP and MPI, without needing specialist HPC programming knowledge.
Four example SPH simulation are provided in the src/examples directory:
ca_fluid_sim- Basic 2D fluid simulation built as a proof of concept of API usage. Kernels were inspired by Fluid-Sim (MIT license).3d_fluid_sim- Slightly more complex 3D fluid simulation, following the same basic forces as the 2D version. Also inspired by Fluid-Sim.sedov_blast_wave- Sedov–von Neumann–Taylor blast wave simulation. Kernels are heavily based on the implementation from SPH-EXA (MIT license).noh- Noh spherical implosion simulation. Also heavily based on SPH-EXA.
Additional programs and scripts for comparison with analytical solutions are provided:
sedov_solution- Compares Sedov blast wave simulation results with analytical solution. Based on SPH-EXA.noh_solution- Compares Noh implosion simulation results with analytical solution. Based on SPH-EXA.
Ensure you have a working installation of Clang, MPI, HDF5, and Python (with h5py package). If working on the DCS
system at Warwick University, Clang and MPI can be loaded with module load cs402-mpi. See this
gist for HDF5 installation instructions. To build
one of the example simulations, run make flsim2_wone, make flsim3_wone, make sedov_wone, or make noh_wone
respectively. To build Sedov analytical solution generator, run make sedov_sol. You can also run make to build
everything.
To create your own simulations, refer to the documentation.
Compiled programs reside in the build directory. A sample script sim_test.sh is provided that can be used for
testing Sedov and Noh simulations and comparing the results with analytical solutions. When executed without arguments,
it will run the Sedov simulation and generate output graphs. Refer to comments inside sim_test.sh for additional
information.
The project makes use of the following libraries:
This project is released under the MIT license.
