[Android Apps and Games] 12er:
Thank you :).

The grid resolution is given by the resolution of the device times a factor greater than zero and smaller or equal to one. The factor can be chosen by the user in the settings. If for instance 100 % are chosen by the user, the resolution in x and y axis of the grid matches the resolution in x and y axis of the device

.

I haven't measured the frame-rate yet. With the default grid resolution the app runs in real time on my SGS II smartphone.

Yes, it would be possible to implement viscosity in the shaders, but that would add another poisson equation, which needs to be solved (Forward Euler would be unstable for large velocity values, or a large delta time). Additionally fluids with higher viscosity are less turbulent. Hence I ditched the computations dealing with viscosity. If anyone would like viscosity, I could add it.

I used the no slip condition, such that particles at the boundary travel with the solid objects. The implementation of that boundary condition in my app is rather rudimentary: In the advection step the velocity of particles, which would be replaced by particles inside a solid object, if there were no solid objects, is set to the velocity of the solid object. And particles inside the solid objects are moved with the solid objects.

And that's all I did. Furthermore I would have to consider the boundaries of the solid objects in the solution of the poisson equation, and in the projection step by cutting off the parts of the computational molecules, which are located inside the solid objects. But I didn't implement that part, as it would add some if clauses in the shaders.

What happens to stuff advected outside the screen in the advection step? Gridcells from the upper and the lower border of the fluid are treated as adjacent neighbors, and the same holds for the left and the right border. I like this better than adding solid borders on those boundaries, as the simulation looks more vivid. Additionally it offers the user the possibility to create pipes which feed themselves. A perpetuum mobile like this does not have any correspondence in the real world, but I think its fun to play with ^^.

You may be disappointed, I implemented a Jacobi solver. The reason why Jacobi solvers work well with shaders in terms of runtime: There are no dependencies between the particles in the computation of a Jacobi step. Hence the computations for the particles can be assigned to independent processing units, and the whole Jacobi step can be done in one pass executing a fragment program. Multigrid methods in contrast traverse through several hierachies of grids. I don't see any way around running a pass each time I move from a gridlevel to a coarser or finer gridlevel. It would be great if I was wrong, and an efficient multigrid solver could be implemented in the fragment shaders, because the convergence rates of the Jacobi method aren't good, and Red Black Gauss Seidel isn't much better.

Omg, the developer of Magic Fluids :D . I have to say that your work motivated me to implement my app for Android. Before I had no idea that fluid solvers could run in real time on mobile devices at resolutions, which are great enough for interesting dynamics.

Implementing the fluid simulation in glsl was rather painful, as I don't own any devices supporting OpenGl ES 3.x, and OpenGl ES 2.x only supports textures with 8 bits per color channel.

The refraction visualization can be accessed in the settings of the Live Wallpaper by clicking on the "Set image" button (which is just below the fluid visualization spinner), and choosing one of the images, which are displayed after clicking on the button.

Thank you for the advice. The fact that the OpenGl context is killed each time the app is paused caused a lot of trouble, and it would be great if the GLSurfaceView.Renderer interface had a method like "abstract void onSurfaceDestroyed(...". I may try out some of the approaches you proposed. And when I do, I will offer the user the option to turn destroying the OpenGl context off and on, as releasing the resources completely when another app is started might be beneficial.