• FEATURED

View more

View more

View more

Image of the Day Submit

IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

Viscosity and volume mixing in fluid dynamics

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

3 replies to this topic

#1irreversible  Members

Posted 27 July 2014 - 12:13 PM

I've been working on a rather simple fluid dynamics implementation that I now wish to expand. I have my single-fluid vortices up and tracer particles following the velocity grid. However, I'm trying to figure out a way to create a mix of fluids that interact upon friction.

Since I'm not up to speed with the terminology, I'll just describe what I want in my own words: what I have in mind is a "non-particulate" (eg closed, fixed volume) flow map that always fills the entire region. Though it would be my next step, compressible fluids isn't something I outright need. So far as my knowledge goes, while the latter would be a solution, I'm not sure whether the answer in this case is somehow propagating the material type based on the density map or populating the entire chart with particles and making them all one unit in size.

Another thing I'm not entirely sure how to implement is shearing and fluid mixing based on viscosity differentials. Here's my test setup:

The screenshot is of a horizontally wrapping velocity grid where blue tones = left-moving and red tones = right-moving. Green = stationary. Color brightness denotes velocity, also shown by arrow lengths. The bright lines between the bands are the regions where flow directions cancel each other out, so shearing occurs as expected, but no mixing.

The reddish dots are tracer particles used to gauge flow.

Ideally I'd like to see adjacent bands start mixing at the boundary layer due to viscosity while none of the layers loses volume (eg the amount of material that each band comprises remains the same throughout the system). I suppose the closest example to this would be any horizontally closed system, such as a gas giant.

I'm looking for resources with less emphasis on the math and more on implementation (seeing as I'm not as mathematically well-endowed as I would like to be) - Googling has had me jump around from one place to another and it turns out finding good information isn't quite as straightforward as I would've hoped.

#2brucedjones  Members

Posted 28 July 2014 - 07:10 AM

The search term you need is multiphase and/or multicomponent flow. There is plenty of good information on this though you have to embrace the math, this is arguably the most challenging field of computational fluid dynamics. The maths is complicated, and the calculations involved are extremely intensive.

The simplest way I know of is to use SPH with van der waals forces hacked in. I say hacked, because strictly speaking this isn't the correct way, but its the easiest way to get a model that looks about right.

An added bonus is that most SPH implementations follow a weakly compressible assumption.

#3irreversible  Members

Posted 28 July 2014 - 03:32 PM

Thanks! I think this got me started down the path I was looking for!

#4JohnnyCode  Members

Posted 28 July 2014 - 05:16 PM

Van der Vaal relies on a random facing real phenimena law. You realy should not relly on this in case of fast aproximantion. Though I have noidea what result you wish to simulate

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.