Best way to simulate turbulence?

• Jan 2nd 2007, 01:20 AM
TriKri
Best way to simulate turbulence?
What is the best way to simulate air turbulence? I made a program some years ago in VB (really slow, so I converted myself to C++ and SDL). It used a 2-dimensional matrix to represent a plane. Each element represented a square in the plane and had three properties: Density (actually I had two densities, cause there was two differen kind of gases, so there was really four properties), x velocity and y velocity. From the density I calculated a pressure, which gave a force when multiplying it with the side length of the squares (ok I know I have to multiply a pressure with an area to get a force, but let's just say I had divided everything by the height of the squares. Since they really didn't got any height). Each square had a fix position, it was only the gases inside the squares which moved around between the different squares. In this way I could simulate blast waves quite good.

I have already started to make a new such program in C++, using SDL. But I wonder, is there some better way of doing this? There maybe is a better representation form than just a matrix?

And then if you instead of air want to simulate turbulence in an uncompressible fluid, like water, how do you do that? You can't have the density property anymore, since water is uncompressible and hence can't change density, or can you? Or can you replace that property with some other property, or is it possible to do the simulation completely without the property?
• Jan 2nd 2007, 04:04 AM
ticbol
Quote:

Originally Posted by TriKri
What is the best way to simulate air turbulence? I made a program some years ago in VB (really slow, so I converted myself to C++ and SDL). It used a 2-dimensional matrix to represent a plane. Each element represented a square in the plane and had three properties: Density (actually I had two densities, cause there was two differen kind of gases, so there was really four properties), x velocity and y velocity. From the density I calculated a pressure, which gave a force when multiplying it with the side length of the squares (ok I know I have to multiply a pressure with an area to get a force, but let's just say I had divided everything by the height of the squares. Since they really didn't got any height). Each square had a fix position, it was only the gases inside the squares which moved around between the different squares. In this way I could simulate blast waves quite good.

I have already started to make a new such program in C++, using SDL. But I wonder, is there some better way of doing this? There maybe is a better representation form than just a matrix?

And then if you instead of air want to simulate turbulence in an uncompressible fluid, like water, how do you do that? You can't have the density property anymore, since water is uncompressible and hence can't change density, or can you? Or can you replace that property with some other property, or is it possible to do the simulation completely without the property?

I am not good at computers. I cannot write any program. I can only use simple Excel for my calculations. So I do not pretend I can help you with your question here.
But then I understand turbulence, and I love Applied Math. So maybe I can suggest something that might interest you.

You can change the density of a liquid mixture by mixing liquids of different densities. Fresh water and sea water. Water and oil. Cooking oil and Petroleum oil. Honey and molasses. Water, mercury and liquid gold. Etc.
However, since they are incompressible, you change the mixture, you change the volume of the mixture. So your matrix of equal squares may have to be modified to changing sizes of squares too. Better for more chaotic presentation. Or, if you want to maintain the equal squares, then change the height/thickness of the typical square in a changed mixture. Three-Dimension! Better still for more chaotic/turbulent effect.

The change in volume doesn't have to be due to a mixture of different liquids. Increasing or decreasing the volume of the same, single liquid will do.

-------------------
Another.

Instead of a matrix of squares, why not a combination of rows of flows? The rows may have the same width (like the wood flooring in a basketball court) or varying widths. Each row is a different sinusoidal wave (sine or cosine waves). The rows are of varying amplitudes, periods, and/or vertical shifts. The rows may be of squares of varying heights---the heights following the sinusoidal wave in their respective rows.

You may want to create a laminar flow to be transitioned into a turbulent flow here. In the laminar section, use almost similar waves of longer periods and lower amplitudes--or flatter waves. And in the turbulence, use various waves of very short periods and higher amplitudes---for higher and closer peaks and dips.
• Jan 2nd 2007, 04:15 AM
topsquark
Another note. I don't understand turbulence, but I remember reading in my Chaos text that turbulence can arise from vorticity in the flow. You might want to investigate this property.

-Dan