Live data from Hacker News

Fast real time fluid simulator based on MPM algorithm

kotsoft.github.io

41–50 of 56 posts

Re: Fast real time fluid simulator based on MPM algorithm

#41
post #39

Earlier quoted context omitted.

Hey this was also the first fluid sim paper I ever implemented! I haven't done any grid-based simulations (except maybe the classic "Real-Time Fluid Dynamics for Games" by Jos Stam), but I've been able to greatly improve compressibility by using "Position-Based Fluids" by Miles Macklin. Someday I'll dive into WebGPU and post a JS version on HN... Short clip of my implementation here: https://imgur.com/a/2IARiBq I lik…

Very cool! What does the changing color of the fluid indicate, particle velocity?

I believe specific gravity.

Things like "how do you properly make a B-52?" ( http://www.cocktailhunter.com/bartender-guide/specific-gravi... ) or a Pousse Café ( https://youtu.be/4OJd_phsa5w )

Re: Fast real time fluid simulator based on MPM algorithm

#42
post #18

Maybe I'm spoiled, but I expected a 3-D simulation.

Apart from 3D being harder to implement and slower to solve, it's also quite tricky to visualize.

You can't do like in the examples linked in this discussion and simply plot every (Nth) point, that mainly just dissolves into visual chaos. So you have to do 2D slices, or isosurfaces or streamlines or 3D view of a few tracer particles, preferrably combined with animated rotation of the system.

Re: Fast real time fluid simulator based on MPM algorithm

#43

For someone with high-school level understanding of classical Newtonian mechanics, what would be the best way forward to learn Continuum Mechanics and things like MPM, etc.? Any book/course recommendations?

Continuum mechanics in itself is a very different subject from particle-based methods to approximate continuum mechanics, like MPM.

To actually learn continuum mechanics you need first a good understanding of vector calculus. But this is not necessary at all for using and tweaking particle based methods.

Re: Fast real time fluid simulator based on MPM algorithm

#44

It's neat, but also it's unstable and hyper-energetic. Particles go flying off into space for no reason even long after gross motion has settled on mobile. Two particles falling downward past each other impart upward momentum somehow. Also the fluids appear to be extremely compressible as to appear bouncy, like the whole thing is breathing, so not liquids, but also non-mixing and with surface tension, so not gasses?…

They appear more like a sort of gel, if you ask me. Also, some of the heavier fluids actually freeze into cryshals.

Re: Fast real time fluid simulator based on MPM algorithm

#48
post #33

Hi, I made this demo. This is actually all from the paper Particle-based Viscoelastic Fluid Simulation (Simon Clavet, Philippe Beaudoin, and Pierre Poulin). It is an SPH type (particle-particle interactions), not MPM (particle-grid-particle). I do a lot of MPM nowadays, and I have a multi-grid thing to help with incompressibility, but this was me re-implementing the first fluid sim paper I ever implemented. I did the…

I have been following your work on twitter for quite a while. Didn't know you were on YouTube as well. I guess I was doing this since one of these demos https://youtu.be/BCUh1opDGA4

Re: Fast real time fluid simulator based on MPM algorithm

#49
post #39

Earlier quoted context omitted.

Hey this was also the first fluid sim paper I ever implemented! I haven't done any grid-based simulations (except maybe the classic "Real-Time Fluid Dynamics for Games" by Jos Stam), but I've been able to greatly improve compressibility by using "Position-Based Fluids" by Miles Macklin. Someday I'll dive into WebGPU and post a JS version on HN... Short clip of my implementation here: https://imgur.com/a/2IARiBq I lik…

Very cool! What does the changing color of the fluid indicate, particle velocity?

Yes, particle velocity! I believe this clip is after I implemented metaballs too, so the particles blend together to make it feel more fluid-like.

Re: Fast real time fluid simulator based on MPM algorithm

#50
post #29

Earlier quoted context omitted.

My problem with it is that the substances coalesce into bubbles, but not into layers depending on weights.

They do actually. Red > orange > green > blue. Let it settle.

But there are still bubbles within layers, no?
Post reply on HN