Monday, August 29, 2005

Another Weak end

Yep... Still not that much closer to a release. Because of the change of plan, I have gone over the code to ensure that it is physically correct. Quite a few changes where required, but now its a correct SPH solver. We are using a 2nd order leap frog method that provides good stability. I have done some simulations with 100,000 particles without too much trouble. There has been a few issues with boundary conditions that now need a few options. But otherwise everything is progressing nicely, just a little slower than I would like.

So first is too include the Floating body code. Then finish the GUI. Before the release I will add a marching cubes iso-surface output option.

I may, in the near future add a POVRAY output option. This will allow very cool visualisation of shocks and over parameters with its volume rendering.

So i should have some animation by next week...

Monday, August 22, 2005

Blender Python GUI and new directions

Well the weekend was not so good. I tried to do a GUI in blender with python, and when in circles. I hate writing GUI's at the best of times, but learning the limitations of the integration of python was slow. So I'm ending up with a simplified interface with some restrictions that will be lifted later. At this point the restrictions are not too bad, which is just one, only 10 objects total. But again this is a GUI limitation not a code limitation.

Also I'm changing the focus a little. Originally it was just for good looking fluid. But now its target is fluid simulation. Eventually for compressible flows including shocks. But interacting fluids is first, and modeling floating objects looks like it will make the now delayed first release. I'm changing the focus for two reasons. One, the fluid engine thats going into blender is plenty good enough, and theres reason to believe that it will be always a bit quicker. Two, I have always done fluid dynamic solvers in my free time, and I love doing them, but usually end up spending a huge amount of time getting the geometry of the problem into my programs. Alto blender is not a solid modeler, the python scripting really makes getting geometry in and out very easy. Its internal renderer is more than good enough and fast enough and yafray adds that sex appeal to presentations. So thats what i'm going to do. Heres the basic plan.

  • Fluid dynamics of incompressible liquids with interfaces.
  • interactive objects. Both "floating/sinking" and manually animated interaction.
  • Lots of options and a reference set so it be used for "real" studies.
  • Smoke--ok this will be purely for effects..
  • compressible flows
  • 2D domains (its all 3D up to here)
  • shocked flows.

No dates since this will be a work in progress. The first 2 will be done soon. At that point making it OS will be a option. But i intend to eventually get a publication out of this.


Thursday, August 18, 2005

Blender Fluid Dynamics

Well blender will soon have Fluid dynamics. Only I started to do a fluid dynamics plugin b4 I found out about the Summer of Code. [elYsiunm]

So i'm gunna finish it anyway. Mainly because i really want code i can play with. But also because i think my fluid code will fill a different need. Also my code will be ready to roll some time in the next 2 weeks.

The desgin is a bit strange, but I have my reasons. A python plugin will run/interact with a java program. The java sovles all the fluid dynamics stuff, and even floating and rigid body motion (hopefully). This writes output that a python script link then reads for the "baked" fluild simulation. The result is a mesh or a set of vertices that you can then dupvert or subsurface to your heats content. But you won't be able to "edit" the mesh and keep the changes i'm affraid.

The fluid simulation uses Smoothed particle hydrodynamics. Basicaly a bunch of particles, with the needed math to make it work like a real fluid.

I'm hoping that it will even do smoke. But that will need to wait.

The image is with halo particles and the fluid simulation time was about 5 mins on a AMD64. The animation is here and there another one here. There is a dupverted sphere animation here .