You are browsing as a guest. Sign up (or log in) to start making projects!

1h 35m 19s logged

Bulk flow as been added! Now it kind of behaves like a gas lmfao.

Edit: Unfortunately it seems like stardance does not allow for gifs 😭. I’ve replaced it with a static image.

Pretty much, each cell has it’s own flow velocity vector and gets a
force applied to it if it has neighbors with a lower pressure than its.

granted, there are a good few issues with the approach. For one, as far
as I know from my previous CFD (computational fluid dynamics) reading,
this method of giving individual cells their own flow velocity is
somewhat unstable. Also my method of advection (moving the cell
quantities around depending on their velocity) is forward advection,
which is also known to be quite unstable.

Another issue with my current algorithm is that to keep the fluid in the
grid I clamp which cells it can access. I’m not sure how well that
explains it, but it has the effect of making the fluid clump up and
build high pressures in corners (as can be seen in the gif below).
technically the fluid should be bouncing off of the walls.

One last issue: At this point I pretty much have the basics of an actual
fluid simulation, and fluid simulations are SUPER LAGGY when done in
the cpu! The resolution in the gif below is a tenth of what was in the
last devlog, as at 500x500 cells my cpu simply can’t keep up. Luckily I
already know the solution for this: Parallelization on the GPU! That
being said I’m not sure I’ll bother going down that rabbit hole just
yet…

Next up I think i’ll do my best to improve the advection algorithm a
little bit, then I’ll actually add more gases to this simulation (that
is, kind of the point of this lmao). Maybe I’ll add in some UI after
that (going to be hard convincing myself against going down the rabbit hole of
rending my own text 💀)

I guess I will note that I am basing this initial gas off of molecular
hydrogen. The only real thing that that effects in the current state of
the simulation is the molar mass of the gas. Also each cell should be
sized at ~1 cm in size.

0
25

Comments 0

No comments yet. Be the first!