1

I'm looking for some algorithms (or some applets/examples with source code) to simulate fluids in a 2D container (which can be moved and rotated).

An example of what I need is a 2D glass with some water inside, like the iBeer application for smart phones.

peoro
  • 25,562
  • 20
  • 98
  • 150
  • your question is very general, you should specify exactly which kind of detail you need in your simulation, and then have a look at some undergraduate text in computational fluid dynamics – Open the way Mar 06 '11 at 10:48
  • @Werner: what do you mean by "detail"? What options do I have? Having to learn fluid dynamics to simulate water sounds like an overkill to me... – peoro Mar 07 '11 at 09:22
  • I mean, how realistic you want to do your simulation. I would read some review or general article about fluid dynamics so you can understand where to look for algorithms/methods and so, and which are the advantages/disadvantages on each case – Open the way Mar 07 '11 at 09:34
  • @Werner: it's hard to qualify how realistic I want it. The best the hardware can do in real time (and here the question is "how is your hardware? how much fluid do you need to simulate?" "it varies a lot, it depends, I'm not sure"). I started this question right to obtain a list of algorithms/methods to look at, because I couldn't find any good (and simple - I'm not a physician) one. Besides most (almost all) of the documentation I could find is about _pools_ of fluid seen from above, or for 3D liquid simulation, which is not what I need. – peoro Mar 07 '11 at 18:59
  • have a look at this: http://stackoverflow.com/questions/427151/algorithms-for-simulating-fluid-flow – Open the way Mar 07 '11 at 19:02
  • @Werner: I was hoping for something more specialized on what I need, but probably there's nothing like that. If you post it as an answer I'll accept it. – peoro Mar 07 '11 at 19:24
  • you said you are not a physicist. if you want something more realistic you should get some background in physics. the solutions they propose there are quite good in the cases one is not a specialist. we should always try to be in an equilibrium between what we want and what we can do, in my modest opinion – Open the way Mar 07 '11 at 21:02

1 Answers1

0

I think what you are after are "sloshing algorithms", some of them are specifically designed for cross-sections.

Julik
  • 7,676
  • 2
  • 34
  • 48