Sign in to follow this  
coder0xff

Flight model in liquids

Recommended Posts

The basis for all compressible (air) and incompressible(water) fluids is usually the same Navier-Stokes equations, so from that perspective they are the same.

However, derivations used for real-time model are just that. They settle for a set of parameters and assumptions to make them viable.

Depending on what kind of model you're using, it might be usable for both cases. At the basic level, you could just assume neutral buoyancy, 0 gravity, and put drag coeficient at some absurdly high value.

it all depends on the results you're trying to achieve, and accuracy/realism you need.

Just any arbitrary model is not applicable for both cases.

An example would be, that under water you very quickly go "super-sonic", or exceed the speed of waves (every ship does that). Turbulent properties are also different, water is incompressible, air isn't, and so on.

Share this post


Link to post
Share on other sites
Yes, though the various coefficients will be very different. You also have to be wary of phase transitions (i.e. cavitation, but see also supercavitation).

Quote:
An example would be, that under water you very quickly go "super-sonic", or exceed the speed of waves (every ship does that).


The speed of sound in water (~1500 m/s) is quite higher than the speed of sound in air (~334 m/s). Sound is made of compression waves (P waves).

Quote:
Turbulent properties are also different, water is incompressible, air isn't, and so on.


If you assume that water is incompressible, then you assume that your object's speed is much less than the speed of sound in water. [smile]

Share this post


Link to post
Share on other sites
For the type of fluid dynamics used for games, you can generalize using a FluidSample type system.

See also Drag and lift per triangle (boat simulation).

Using these concepts and a working rigid body simulator, simplified, generalized fluid dynamics for both aircraft and boats can be implemented in just a few hours (perhaps less if you type fast [wink]). Realistic looking turbulence can be implemented using lookup tables (index on angle of attack). Simple flow propagation (better turbulence) could also be quickly and simply implemented using a very low resolution 3D subdivided grid (cube, world aligned, etc.).

More info from a PM I recently sent regarding FluidSamples:
Quote:

For a simple flat plate "wing", you can just apply the resulting force in the direction of the surface normal (for the FuildSample). The resulting vector contains both lift and ("induced") drag. Lift is typically referred to relative to flow velocity (perpendicular), drag (induced+parasitic, etc.) in the direction of flow velocity, weight opposite lift, etc.

A typical airplane has its wing set with a small angle of incidence so that enough lift is generated while cruising the pilot does not need to constantly pull back on the stick/yoke to keep the plane flying level.

If you draw the velocity and normal vectors on paper, you can see that you can totally adjust wing efficiency/behavior by modifing net lift+drag. Wing shape simply dictates how you should modify efficiency (+/- lift, +/- drag). You can study lift+drag plots for various wing shapes to help build lookup tables (or model in other ways).

Share this post


Link to post
Share on other sites
On a related note there are a couple of really good articles (with source and demos) relating to liquid physics in the latest Game-Programming-Gems-6

1) Exact Buoyancy for Polyhedra by Erin Catto
2) Real-Time Particle-Based Fluid Simulation with Rigid Body Interaction by Takashi Amada

I picked up a new copy from amazon.com for just over $40 (a bargain!)

-Steve

Share this post


Link to post
Share on other sites
Quote:
Original post by Fruny
The speed of sound in water (~1500 m/s) is quite higher than the speed of sound in air (~334 m/s).


He was however was talking about the speed of liquid waves, not the speed of sound in liquids.

Share this post


Link to post
Share on other sites
Quote:
Original post by Rockoon1
He was however was talking about the speed of liquid waves, not the speed of sound in liquids.


He did say that ships went "supersonic", which is definitely not the case. Surface waves such as are created in a ship's wake are an entirely different beast, I agree.

Share this post


Link to post
Share on other sites
Quote:
Original post by Fruny
Quote:
Original post by Rockoon1
He was however was talking about the speed of liquid waves, not the speed of sound in liquids.


He did say that ships went "supersonic", which is definitely not the case. Surface waves such as are created in a ship's wake are an entirely different beast, I agree.


Sorry, I gave bad example. The "supersonic" behaviour is just used to demonstrate what happens when breaking sound barrier, it's does not apply to actual physics model.

Speed of sound under water and related effects are indeed completely different. Feel free to disregard that comment as incorrect.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this