This repository contains a Unity package with a simulator for shallow water flows, based on the D2Q9 model of the Lattice Boltzmann method.
I wanted to try out Unity's Job System and Burst compiler, and the LBM simulation is very paralellizable i.e., it is good problem to solve with Jobs and Burst. (Compute shaders would also be a great tool.)
The algorithm and equations are explained excellently and in great detail by Zhou, J. G. (2013). Lattice Boltzmann Methods for Shallow Water Flows (2004th ed.). Springer.
To see a Unity project demonstrating how to setup and visualize the LBM sim...
- Clone the repo
- Open the Unity project here:
<repo-root>/LBM-SWE-UnityProject
To install the package into a Unity project...
- Follow these instructions to install via a Git URL: https://docs.unity3d.com/Manual/upm-ui-giturl.html
- Use this URL for the package:
https://github.com/kircher1/LBM-SWE-Unity.git?path=/com.kircher.lbmswe