random thought on creating liquid movement.

Started by
12 comments, last by Vlion 21 years, 5 months ago
Hi guys,

quote:I''m more trying to simulate the actions and see if the results approximate reality.


If I understand you correctly does this mean you want to make up a set of laws which have a similar effect to the actual physical laws?
Here is a random suggestion then (it''s probably quite slow but it might give you a few more ideas hopefully).

In 2D:

Divide your container in to equal size squares. Count the number of particles in each square. For each square determine which adjacent square has the fewest particles. Give the particles in your square a drift towards this square. If the square being analysed has the fewest particles then don''t change anything about them.

You''d have to tweak the numbers quite a bit e.g. consider the difference in number of particles when applying the drift, different square sizes.

This would give you a system of massy and unmassy regions and all the calculations can be scaled ofcourse producing a less reliable model for less divisions).

You could also consider all surrounding squares and calculate the drift based on the difference in particles for each one.
e.g. with a linear example for simplicity.

|-|-|-|
|1|X|2|
|-|-|-|

-----+X->

For the central square the total drift would be equal to the negative X drift = - (X-1)/X plus the positive X drift = (X-2)/X.
So if X was 3 the drift would be - (3-1)/3 + (3-2)/3 = -1/3.

Correct me if I''m wrong here but atoms/molecules in a fluid do not in general interact through gravitational or electrostatic means unless the ''fluid'' is at a _very_ low temperature (e.g. bose-einstein condensates).
So all the interactions are just collisions.
In a dense section of the fluid there will be more collisions and therefore more scattering. So this section will expand and eventually you will reach a macroscopic equillibrium.

A lot of crap there so please if I''ve said something stupid hit me :-)

-Meto / Karle
Advertisement
You should investigate SPH (Smooth Particle Hydro-dynamics), invented over 30 years ago by Professor Joe Monoghan. It does everything you want and more and is considered one of the best methods for modelling granular flows (which includes fluids).

Cheers,

Timkin
A link you might be interested in, just someone else''s thoughts on liquid simulation (check out the rest of the site, there is some other pretty cool stuff there too )

Arrows in the Fluid Mind

Trying is the first step towards failure.
Trying is the first step towards failure.
First time I`ve been able to get to the forums.

This link seems to describe basically what I would wind up with.

http://www.ventrella.com/Ideas/Fluid/fluid.html

Basically after my last post I sat down and coded up the basic graphics end.
Then I looked at my Process function which would implement the rules, and I went: okaaay, now how do I translate things into wha I want.

uutee:
What I''m after is not modelling precisly.
Like the Ventrella sim, what I''m after is more of a result-based system, not a simulation system.

Because fluid dynamics+turbulence is such a computationally expensive subject, I''m more looking for somthing that merely looks like whats out there- like Ventrella.

SPH is cool looking but I think I''ll have to reasearch it at the uni library.

~V''lion

Bugle4d
~V'lionBugle4d

This topic is closed to new replies.

Advertisement