Friday, March 30, 2012

Getting back on that horse

I've got the adb connection working with my new tablet (I got a new tablet, a Samsung Galaxy) and have loaded up a basic app to put some graphics in. I'm going to put in the simulation I've been working on some time soon.

Fluid Simulation

So I've been working on a fluid simulation. It's complicated. The Navier-Stokes equations are above my head, but I think I've extracted some useful information about how they work in the abstract; particles in a fluid push way from one another when too close and pull together within a certain range but outside of the repulsion area. I've developed a force model for water particles, but it needs tweaking.

The good part about the way I've designed the simulation is that it is all addition of array elements. I calculate the forces applied by a single particle of fluid, store those in an array, then apply that array to every position where a particle exists within a larger array. The result is a composite array of forces that influence the positions of the particles, which then are used to re-evaluate the composite array.

Fancy pants. I know. Lock up your daughters.

In any case, the simulation seems to be operating well. My problem now is that there are a lot of parameters I need to play with to get it right. I've had some success in places, but the system is very sensitive and balanced in many cases. The slightest tweaks can alter the results quite significantly.

Here's a list of the parameters I can currently manipulate:

>The density of the composite forces: I can make the grid fine or coarse. Strangely enough, the more coarse treatment is giving me better results right now.

>The dimensions of the board in which particles can travel and how many units of this space exist per composite force cell

>The force model equations for the individual particles
>> The degree or presence of attractive forces
>> The strength or relative weakness of repulsive ones; can't really fully zero out repulsive though, as horrible clumping occurs.

>The size of the fields generated by particles in terms of units of the composite grid.

> The number of particles simulated

> Boundary conditions; I've found that boundary conditions really change the way my system acts. I have recently tried to make the boundary conditions perfectly elastic, so hitting the side does not take way or add any energy to the system. Otherwise I was getting some strange effects.

> Inherent friction/slowing of particles. Usually I've applied a 1% slow to existing speed before calculating any changes in speed. This actually rather inexplicably made the model behave better. I have my theories, but it's still strange.

Monday, March 26, 2012

Wow.

Ok so I totally forgot about this blog. I've been doing well at RIT and have considered more Android development, but haven't found the will just yet. I did, however, just yesterday acquire a most beautiful item: a Samsung Galaxy Tab. It helps a ton for reading these papers that I usually download as pdfs. Hopefully it will also encourage me to pick up Android development again as well. I downloaded some of my apps and was impressed that most parts looked pretty good on the tablet.

Fun awaits...

Somewhere.