liam-clink / SPH

Smoothed Particle Hydrodynamics

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dependencies

armadillo

Usage

Currently only meant to be run on Linux.

Compile by running 'make' Open 'input.txt' and edit the numbers after each parameter label. Run 'sph.x' To get frames (eventually for an animation of the result using ffmpeg), run "python3 make_frames.py"

About

Currently, I have implemented I/O. This took a lot more time and effort to do than I expected, but now that it's out of the way, about all that is left to do is the implementation of the physics. I have implemented the timestepping, so to get the physics working, all that is needed is force calculation and particle pushing. Because the time that I've been able to allocate to this has been more limited than I would've liked, I'm going to have to do this part as a regrade. Hopefully though I have demonstrated that I am competent at doing what has been implemented. Unfortunately, the dynamic memory management ate up a lot of time and I've had to put that off for later on.

I have a python script for generating plots from the output position data as well, which can be stitched together into an animation for further troubleshooting. This is hardly the final means of visualization, but I have to stop now to turn in what I have.

The primary files that you should read are simulation.cpp and simulation.h, as pretty much all of the currently used code is there. However, I have started work on the kernel.h and kernel.cpp, which is required for SPH.

Update

I have added the generation of an arbitrary boundary layer of dummy particles. This took quite a lot more effort than I expected as well, so unfortunately I do not have fluid moving yet, but hopefully you can appreciate the complexity achieved already.

Update

Next I need to implement an interpolation function, given the particle list for fields sampled by the particles. Each particle has a scale value and a position, in combination with a kernel function. There is a gradient kernel as well, that needs to be sorted out.

About

Smoothed Particle Hydrodynamics

License:GNU General Public License v3.0


Languages

Language:C++ 81.8%Language:Python 13.7%Language:C 3.8%Language:Shell 0.4%Language:Makefile 0.3%