Monday, February 12, 2007

Moving Things Around

As I have had to revise the boundary condition code I thought I would test what does and doesn't work with moving boundaries. The big problem is always whats stable and whats accurate. Often getting both features can be tricky.

Originally I would use the velocity vector to provide a force that would then alter the velocity. Unfortunately if more than one "piece" of boundary was interacting with the particle the final velocity could be unbounded. Clearly not a ideal solution. However it did fit into the work flow better than other methods.

I have tried reflected particles and just "dead" boundary particles but have found both solutions somewhat lacking. Both are very slow, and treating density correctly is not as straightforward as it appears. Usually very small time steps are required.

Finally we have the method I'm now settled on. First we use the distance not from the boundary point but from the boundary plane that the point represents. Secondly we use a special step to update the velocity. In that the boundary only affects the velocity and only at fixed time in the update schedule. It give very nice bounded results as shown below in the movies.

There are a few points to consider however. First is that each boundary particle can affect the fluid. This means that the boundary behaviour is determined by how many particles are used to make up that boundary. Secondly there is no bounce, although that can be easily added at a later time.

So the movies consist of the same animation. One with the velocity vectors and the other with the isosurface. The tub that the water is being poured is set to hidden and the paddle does penetrate the tub. When the paddle "squished" the water between the wall and the tub, we see squirt of water. This is where the simulations would go unstable with other boundary condtions. However it should be noted that this "squish" will be very sensitive to parameters, and it will still be possible to send this into unstable regions with sufficient squishing.

Movies of moving paddle:
Raytraced Isosurface
Velocity Vector preview

Friday, February 09, 2007

Huston- we have a problem.

Yep. I have been just blindly using my fluid code that i devloped in NZ. Unfortunaly its not the latest version and the latest version is back in New Zealand on a unpluged HDD. That about 18,000km away!

So what does that mean. Well some dealys anyway. The current code is not "stable" in the sence that the simulation tends to go unstable easily. Even if i keep to all the usual time step limits. There are about 3 different things that it could be, and they will need to be debuged.

But otherwise we continue to make progress. For example we now have a proper object import system. Also moving boundrys are almost there. We are getting some nice previews and it should be quite fast.

Here are a few more movies:
Velocity arrows raster animation
Isosurface of the same animation But cut short.

Monday, February 05, 2007

Current Plan

Quite a lot of progress was made in the weekend. I don't have any screenshots however. Things are really shaping up for a 0.5 beta mid feb (aka ~10 days). Here is a feature milestone outline:

  • Beta 0.5

    • Obstructions

    • non-adaptive time steps

    • Polygon Previews with velocity visualizing

    • Adjustable fluid parameters

  • Beta 0.7

    • Polygon renderings(Could also be used for traingulation of isosurfaces)

    • Adaptive time steps

    • Multitreading fluid solver

    • Limited Moving boundary support

    • Accelerated Isosurface methods and baking

  • Beta 0.9 feature freeze

    • Moving Obstructions

    • Surface tension (for small scale fluids)

    • Scale options

    • Moving fluid source/exit (aka hose end that's moving)

    • Useful presets (like water, honey)

    • Maybe a materials texture for dye and visualization

Going from 0.9 to 1.0 will be just bug fixes. Yea I get bugs in my code sometimes. At this point I'm working on the GUI. Dam I hate GUI's. Last night someone asked why I use the command line for mplayer when watching a DVD, because its easier than trying to find the option you want with clicks.

Thursday, February 01, 2007

Wave Machine...

I remember on TV there was this wave machine where the water is pumped over a surface. Well I thought it would be better to get full on tubes. So here is the first atempt at animating a real wave machine.

Wave Machine

Another polygon preview:


If we look at the last frame and compare a polygon preview with a isosurface render.

So whats going on. Well the last frame took almost 10 mins on a AMD64 X2 5000+ with java64. Thats slow for such a fast machine. This is not so good for debugging so I put some effort into preview visulaizations. So I produce a single axis alginged triangle for each particle. This also includes boundry particles, thats what the stationary ones are. It the first splash you can see them on the surface of the object.

So now with rapid visulaization I should be able to finish this plugin sooner rather than later. But be warned I start my next german course next week so I will be very busy.