Skip to content

Balvald/SPHSolver3D

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SPHSolver3D

A 3D Smoothed Particle Hydrodynamics (SPH) fluid solver written in C++.

Features

  • Particle integration and neighbor search (LBVH/grid helpers).
  • Optional Vulkan/GL renderer (samples/shaders provided).
  • Unit tests and small Python utilities for quick experiments.

Requirements

  • A C++17-capable compiler (MSVC on Windows, GCC/Clang on Linux/macOS).
  • Python 3 (for Meson and small scripts).
  • Meson build system and Ninja (or another Meson backend).
  • Vulkan SDK and graphics drivers for the renderer.

On Windows, install the Visual Studio Build Tools (or full Visual Studio) and the Vulkan SDK if you plan to run without the --no_visualisation cmdline argument.

Building (Meson)

The project uses Meson. From the repository root run:

python -m pip install --user meson ninja
meson setup builddir --buildtype=release
meson compile -C builddir

On Linux/macOS the commands are the same (use your system Python):

pip install --user meson ninja
meson setup builddir --buildtype=release
meson compile -C builddir

Run tests with:

meson test -C builddir

Binaries will be in builddir (or the directory you chose). Example executables you may find after a successful build:

  • SPHSolver / SPHSolver.exe — SPH solver

    Usage example:

    ./builddir/SPHSolver --method wcsph --search lbvh --steps 1000 --dt 0.001 --h 1.0

    Options:

    Option Description
    --method <method> Simulation method (iisph or wcsph)
    --search <method> Neighborhood search method (shi, sh, ug, ugm, sg, sgi, lbvh, naive)
    --load <file> Path to .xyz file to load scenario from
    --steps <n> Maximum number of time steps
    --save_interval <n> Save .xyz file every n steps
    --dt <dt> Time step size
    --h <h> Smoothing length
    --stiffness <k> Stiffness parameter (WCSPH)
    --rho0 <rho> Rest density
    --viscosity <nu> Viscosity parameter
    --gamma <gamma> Gamma parameter (WCSPH)
    --omega <omega> Omega parameter (IISPH)
    --lbvh_update_freq <n> LBVH rebuild frequency (default: 1)
    --fluid_size <x> <y> <z> Size of fluid block (three values)
    --boundary_size <x> <y> <z> Size of boundary/container (three values)
    --save_latest Overwrite a single particles.xyz file on each save (keep only latest snapshot)
    --no_visualization Run without graphical visualization (headless)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages