Skip to content

shunsukeyoshimoto/liquidsph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SPH method: Compressible Viscous Liquid

Overview

This porject is for learning how to implement Smoothed-particle hydrodynamics (SPH) for liquid simulation in C language. Let's fill in the code at TODO.

Text

See here

Demo

Liquid SPH

Command Key - when main window is active

q:quit

r:Start simulation

i:Reset paticle position

s:Save simulation result

n:Stop saving

Requirement

  • LIB: math, glut, OpenGL, OpenMP
  • SPH Parameter Data PATH: ../data/param.ini
  • SPH Initial Particle Data PATH: ../data/bunny.stl
  • SPH Container Data PATH: ../data/container.stl
  • Export Data PATH: ../data/dst

Compile command

$ gcc main.c SPH.c Mesh.c GLTool.c MathTool.c -fopenmp -lglut -lGL -lGLU -lm -o sph

$ ./sph ../data/bunny.stl

Licence

MIT

Author

yoshimoto56

About

SPH method: Compressible Viscous Liquid (Exercise)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages