SPH fluid simulation (3rd) test, dam breaking and ramp.
Uploader Comments (jahkr)
All Comments (19)
-
cool, well im glad I helped
-
lol, I know that there are much more efficient ways of doing it, but I just wanted to do the easiest way for me. Thanks for all of the help. And natethegreatBlitzMax, I deleted the comment. I think I was going to ask another question or something, but I had solved it myself.
-
thats why I use fixed grid and other stuff but I figured that might complicate rather than simplify things for luketheduke since he was just asking how to make the water react right
-
If you use a double loop the program works very slow (because is n^2 order), will be better to do list with the particles in collision with each one at every time.
-
also you might want to put your types into arrays instead of lists... its generally much faster
-
no problem... and you must use a fixed grid optimization if you want maximum efficiency :)
-
:] It worked! Thank you! It's extremely inefficient, but it works!
-
to answer your question luke that got removed for some reason? idk why
no I was just saying how to do the part that said "physics stuff here" and make sure you have a variable to make sure you only check collisions once between all points like so
for i:point = eachin pointlist i.done = true for j:point = eachin pointlist if i.done = false then 'do physics stuff endif next
next
i suspect this is your problem
Hi! Nice demo!
Do you use particle-particle collisions or is it a collision-free model (use pressure force)? Thanks!
NoctumDeVir 1 year ago
Thanks for comment.
The SPH (Smoothed particle hydrodynamics) model uses the "interaction" between nearest particles to calculate the pressure. Then the presure gradient is used to get the acceleration.
jahkr 1 year ago