Jump to content
  • Advertisement
Sign in to follow this  
testyturtle

flight sim physics

This topic is 4079 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does anyone have any good reference material for simple flight dynamics? Of course at the very basic level you have thrust and drag opposing on the longitudinal axis of the aircraft, and lift/mass opposing on the vertical axis (although the lift vector rotates with the airplane). I am having some problems with my sim. First of all, assuming you use the following equation for lift: lift = 0.5 * CoL * rho * speed^2 * wingarea; CoL = coefficient of lift rho = air density it is difficult to balance the lift with the gravitational force acting on the plane. Would you vary CoL with speed to keep these closely balanced? At higher speeds, choose a CoL so the wing produces slightly more lift than the gravitation force, and vice versa at low speeds? I know in the real world CoL varies with angle of attack for a particular airfoil, but i'm trying to keep it simple where possible. And how about this situation: Let's say a plane pulls hard on the elevator and goes into a vertical climb. In a real airplane (fighter jet for example) they will climb straight up when you do this. But in the simulation, the plane will start to move very fast horizontally (in the direction the top of the wing is facing) due to the lift vector, in addition to the climb. Or how about when a plane is inverted? Same problem. Now the gravitation and lift double up and the plane hurtles toward the ground. This isn't what happens in the real world. I would appreciate any help. Thanks everyone.

Share this post


Link to post
Share on other sites
Advertisement
CL is based on the design of the wing and does not vary with speed (not directly, at least). CL actually varies with angle of attack (alpha), and in fact you can probably find the CL - alpha curve, either in equation form or as a table, for most NACA airfoils.

So, when you simplify the lift equation by disregarding the values that are essentially constant, you get L = CL * v^2, or L=AoA*v^2. This, of course, is not what you would use to actually compute the lift force, but can be used to explain the characteristics of a typical airplane.

Now here is a statement that, when considered, will actually solve many of the "problems" that you have mentioned, including flying straight up and down, or upside down, etc. A dynamically stable airplane will continuously develop forces in an attempt to restore the airplane to a state of equilibrium. Equilibrium is when the airplane has no unbalanced forces (e.g. no acceleration). This does not mean an airplane has to be straight and level, on the contrary and airplane may be at equilibrium in a climb or descent, as long as the speed or direction are not changing with respect to time, the airplane is not accelerating.

Also, remember this rule. Lift always acts perpendicular to the relative wind. Relative wind is the opposite of the direction of flight through the airmass. So, lift is a right angle to the direction of flight, not perpendicular to the wing's surface. In a fast climb straight up (in equilibrium assuming the airplane has at least a 1:1 thrust to weight ratio) the wings actually fly at ZERO angle of attack (this is also known as BALISTIC) meaning they don't produce any lift in that horizontal direction.

So, in equilibrium, the airplane will only develop enough lift to support the weight of the airplane. (** this is actually untrue, the total upward forces combine to counter the total downward forces. In a fast climb, a large component of thrust actually acts in the vertical direction helping lift, so the wings don't need to "work as hard" to keep the airplane aloft. Drag also acts opposite the direction of flight, so a component of drag would act in the downward direction as well). This is why an airplane with a 1:1 thrust to weight ratio can stand on its tail in the air, hovering using only thrust. The only forces are weight and thrust in this case, since the airplane has zero velocity (no lift and no drag).

So, since the weight is also constant, then an airplane in equilibrium will fly with a constant lift force. It's the WAY that the lift is created that matters. Holding L constant, if we increase speed, lift would vary by v^2, so the force due to AoA (aka CL) MUST decrease. And this is true in real life, at a higher airspeed, the wing will fly at a lower angle of attack, which equates to a lower CL, and contributes less to total lift. If the velocity is decreased, the airplane needs to fly at a higher angle of attack (for a greater CL) to make up for the loss of lift due to airspeed.

To break it down, low airspeed, high AOA, high CL. High airspeed, low AOA, low CL.

To actually compute this relationship, don't use something like if (speed == ??) then AoA = blah. Instead you want to continuously solve for AoA by actually subtracting the airplane's physical direction, and its actual velocity. The dot product of those two vectors can be used to find this angle. By allowing the integration of forces to constantly solve for the velocity of your airplane, and incorporating some elements of stability and control (to handle trim and other flight characteristics) you will find that the Aoa to velocity relationship will take care of itself, and the airplane will naturally want to fly the way it does is real life.

Keep in mind things don't happen instantaneously, so any sudden acceleration (adding power or pitching up are accelerations) would take the airplane out of its state of equilibrium and begin developing unbalanced forces in an effort to get back to equilibrium. It is possible that during this acceleration, some excess lift could contribute to the climbing of an airplane... but as a general rule an airplane does not climb because of lift, it climbs due to EXCESS thrust (or power). Think of it this way, energy cannot be created or destroyed, only converted. How does an airplane, sitting on the runway, with zero potential and zero kinetic energy get up to 10,000 ft. and 200 KIAS with lots of potential and kinetic energy? Lift is only produced as a result of the airplane having velocity. All of the energy comes from fuel being converted into an explosion blah blah blah eventually into thrust.

Oh, the flying upside down thing. Wings are perfectly capable of producing lift in the opposite direction than they are designed to. A wing with a high camber will be terrible at flying these "negative angles of attack." Most fighters that have to fly upside down have a symmetric airfoils, with no camber. They produce lift just as efficiently upside down as right side up. A wing with camber will produce some lift in the upward direction at zero AoA, whereas a symmetric airfoil needs an angle of attack to produce lift. Just remember, in equilibrium lift opposes weight, and gravity always acts straight down toward the center of the earth.

This is getting long and it's really all hard to explain and visualize without diagrams or graphs or pictures. Hopefully this has explained a couple of things and wasn't too poorly written. Let me know if I can help any more.

Share this post


Link to post
Share on other sites
Hi y2kiah,

Thanks very much for the reply. Tons of great information in there! One particularly useful tip is the one about constantly calculating AoA, and then doing a table lookup or similar to get CoL (and CoD too I guess). I'll implement that later tonight. Oh and also the part about lift acting perpendicular to the relative airflow instead of perpendicular to the wing. Didn't know that (and i'm training for my pilot's license right now so THX!)

One thing that still confuses me is Lift = 0 in a vertical climb. At zero angle of attack, the wing still produces lift doesn't it? (I believe at AoA = 0 it is common for CoL to be in the neighborhood of 0.5 - 0.6) Anyway, I am sure you are right -- just trying to understand better.

Basically what I am trying to figure out is how to incorporate the lift vector into my force equations when the airplane is at some pitch != 0. Do you reduce it gradually as the plane pitches up? What about if the plane banks 90 degrees, does the lift similarly go to zero?

Thanks for taking the time to help y2kiah! You're really saving my sanity. :)



Share this post


Link to post
Share on other sites
Quote:

One thing that still confuses me is Lift = 0 in a vertical climb


In a vertical climb you wings generate 0 lift, the reason you go up is due to thrust and internia, hence you will stall very quickly unless you have a pair of afterburners behind you :P

Share this post


Link to post
Share on other sites
How are you calculating your lift equations.
If you are using vectors then you can simply use Dot Product to calculate how much lift to apply based on your angle of attack etc.



Share this post


Link to post
Share on other sites
Quote:
Original post by testyturtle
One thing that still confuses me is Lift = 0 in a vertical climb. At zero angle of attack, the wing still produces lift doesn't it? (I believe at AoA = 0 it is common for CoL to be in the neighborhood of 0.5 - 0.6)


Lift is always the same function of AoA and elevator deflection. In a vertical climb you'd just trim the elevators and AoA to give zero lift, even if this means a slight negative AoA.

Share this post


Link to post
Share on other sites
Quote:
Original post by testyturtle
Does anyone have any good reference material for simple flight dynamics?

I have written a basic flight simulator in Lua. The demo is available here (the source is in the file with "lua" extension)
http://apocalyx.sourceforge.net/demos.php#zekeonyoursix

I used informations found in a page that is no longer available but I have cached it somewhere.

To see the demo you need the runtime of the engine (APOCALYX 3D Engine) available here:
http://apocalyx.sourceforge.net/downloads.php#engine

Share this post


Link to post
Share on other sites
Quote:
Original post by chipmeisterc
Quote:

One thing that still confuses me is Lift = 0 in a vertical climb


In a vertical climb you wings generate 0 lift, the reason you go up is due to thrust and internia, hence you will stall very quickly unless you have a pair of afterburners behind you :P


The airfoils don't care which way they are facing in order to produce lift. As long as air particles are going over them (within the angle of attack, that if exceeded induces the wing to stall) then the wings are producing lift. In the case of a vertical climb, the issue is that the lift is not pointing upwards.

The described behavior of the simulator having the aircraft move horizontally while in a climb is because lift isn't zero, I think folk understand that already. It may seem to move horizontal at an abnormal rate but the angle of the lifting force is now perpendicular to the gravity so the two are not opposing each other (well, the vertical component of lift is still opposing gravity, if there is any).

A pilot would pitch forward to cancel out the lift. It probably wouldn't take much elevator movement to do it hence why an aircraft in a vertical climb really does look like it is pointing up.

Share this post


Link to post
Share on other sites
Quote:
Original post by chipmeisterc
Quote:

One thing that still confuses me is Lift = 0 in a vertical climb


In a vertical climb you wings generate 0 lift, the reason you go up is due to thrust and internia, hence you will stall very quickly unless you have a pair of afterburners behind you :P


Interestingly, if you are still moving into the wind while moving vertically upwards, the wings generate a drag force, now acting in the same direction as gravity (opposite the relative free stream), so the wings actually cause the force pulling you down to to be greater than the weight of the aircraft. (By moving "into the wind" I mean that air is passing across the surface of the airplane...the wind isn't perfectly still with respect to the airplane.)

Another thing...in reality it is quite difficult to fly perfectly vertically. The wings of most aircraft aren't symmetric (top-to-bottom through the airfoil), and neither is the freestream airflow. So, really, there will most likely be a lift force when flying vertically. But, lift is always perpendicular to the relative free stream, so when flying vertically the lift is acting horizontally! The lift can be trimmed out to be approximately zero, but it would be near impossible to maintain that for long in real life. And if you have a forward-mounted, prop-driven propulsion system, the wake from the propulsion system would mean the two wings see different angles-of-attack, and so you'd have to trim the two wings separately to balance a nonzero rolling moment as well. (Er, freakchild and rk_simul talked about this. Good info!)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!