Airplane Flies Strangely...

Started by
8 comments, last by Eelco 18 years, 8 months ago
Hi- i'm working on a little pet project to familiarise myself with various physics techniques. Currently i'm trying to model a fixed-wing aircraft reasonably accurately: -I have an accurate gravity constant -I apply the force from the single propeller in the direction of the canopy -I apply wing lift force in the direction of the wing-normal dependant on air-speed towards the canopy Now these are all pretty obvious I know, but there is another large force acting on a simple aircraft simulation - the one which makes an aircraft change direction very quickly when changing orientation (it doesn't "slide" through the air at all). At the moment I'm modelling this by applying a large force, again in the direction of the wing-normal (straight up from the wing-plane-surface). This force is basically scaled by the difference between the airplane's direction, and that of the current speed (the drag, in other words). This works pretty well mind, but it is by no means perfect! I get some pretty strange behaviour and it doesn't act quite like a real aircraft might... I would really appreciate some input into the various forces acting on such an object - and the direction these forces are acting. Thanks for reading all this
Advertisement
Maybe pick something simpler for familiarizing yourself with physics techniques. It is difficult to think of something more complicated to model accurately than an airplane in flight.

A fixed wing aircraft's direction is controlled by various movable parts that alter the airflow across it. An airplane doesn't just turn through some magical turning force, the forces involved in turning it can actually be modeled. Depending on its physical characteristics, a plane may be able to do things like control its rolling and turning and pitch somewhat independently of each other. There are far more complicated forces involved than just turning left and right.

When a plane turns sharply it tends to roll in one direction because the force is caused by a mechanical flap on the left wing which simultaneously increases drag on that wing and reduces the lift it is producing. Or something like that. You can try to model the control surfaces and the forces they create and then give the pilot control over them and let the physics simulation determine the direction of flight, modeling the forces on the control surfaces. I guess you could do some research into this or just play with the numbers until it feels right. Also I don't know how accurate my description is, I don't really know anything about the topic beyond what I just said, which may be incorrect in places.

It would probably be easier to make a physics simulation of some sort of spacecraft controlled by rockets. In that case it is much easier to determine how to apply the forces, since all the forces are simply generated by the rocket nozzles. Then for each rocket nozzle you apply a force at the location of the nozzle in the opposite direction it is facing proportional to how powerful the rocket is.
I agree with a lot of the above poster, but I believe you can do an airplane just as long as you know what all is going on when you talk about airplanes.

Airplanes fly off the pricipal of lift, and everything they do after they are in the air is governed by aerodynamics, thermodynamics, and fluid mechanics. They're a very deep subject, and a lot of different things are going on.

Depending on the aircraft you are modelling, turning can be done in many different ways. Very much like a car, when an aircraft decides to make a turn, the pilot has more to do than to just turn the wheel. He's gotta look, apply the brake, steer the car through the apex, and allow the car to settle back to normal.

This same kind of thing is happening with an airplane, there's just a lot more surfaces involved. The primary surface for a turn is of course, the rudder flap, which is mounted to the vertical stabilizer on the back of the aircraft. This tells the air to stream in one general direction as its passing over the back of the aircraft and Newton's third pushes the aircraft in that direction.

Like the Anon. above me mentioned, aircraft also use their flaps in a turn, to give them a bit of a body roll. This is like putting your brakes on in your car; when your wing surface comes up, you slow down in the forward direction, and the air that's moving over your tail in the turning direction starts to make a greater affect. This allows the turn to happen faster, and at a higher speed than otherwise capable. It also allows the pilot to not have to worry about adjusting thrust, at a cost of maybe losing a little altitude, which is quick to pick back up after a turn.

To be honest, I think the hardest thing to model in your program will be the drag for the aircraft, as every surface generates drag, and depending how you slam the surface into the wind, it may generate more or less drag. I think modeling a space program's kinda the easy way out; eliminating drag and gravity lead to fun programs, but they're very rarely useful.. unless you work for Nasa or want to do some cool projections of what asteroids can do to planets ^_^.

Good luck! I'll post some links if I can find any specifically relating to the kind of aerodynamics you need to model.

(edit)
I'm sorry if a lot of the above sounds patronizing, I didn't really mean it to, but when I re-read it, it kinda seemed that way. I found a link that might help you with some of your turn calculations, and help you calculuate the G level of what your aircraft is taking (and if you know what G's your airplane is taking, mate it up with what you know your airplane can withstand, and blow it up by turning the thrust on full, and banking into a turn at 90 degrees :)

Anyways, here's the link. http://www.aerospaceweb.org/question/performance/q0146.shtml

Have fun!
Hey, thanks for your replies chaps =)

Ok well i've obviously given some misconceptions here:

- I'm really not a beginner when it comes to dynamics as a whole - I meant I was using this to learn more about this exact subject: airplane flight dynamics - but thanks for your advice - it was perfect for someone starting out in this area.

- I have a pretty decent dynamics simulation set up already for a fixed-wing aircraft - it rolls and yaws just fine (it even simulates flaps and gear drag). However i'm not convinced it is physically accurate, and sometimes gives slightly odd results when gliding in to land.

I was really hoping someone who has experience modelling aircraft in a dynamics engine could give me some tips on what forces I should use - and more importantly the orientation of these forces in respect to the wing/fuselage orientation.

That would be great - thanks again =)
I was so confused about the description of your "forces" and its "direction" at first.

Actually, in my experiences, building a "physically correct" aircraft model results in very hard-to-control simulation. A very accurate physically dynamic results in very hard to play with. You can check out Microsoft Flight Simulation and the open-source FlightGear. These use quite accurate models, but it's very hard to have fun with. The controls are very sensitive!
Of course you can tweaks it, but it's not trivial. Tweaking with a physical model (by modifying "coefficients" and aircraft data) actually made things very complicate.
Some of the "easy-to-play-with" simulator, such as some RC-simulation, use alot of "0"-coefficient to reduce the effects between parts of the airplane. For example, roll-pitch, pitch-yaw etc.

You can check out FlightGear to see how a aircraft is modeled "physically accurate". The forces acting on the airplane are the lift, drag, "sideforce", gravity and thrust. If it's in ground then of course frictions and ground reaction must be considered. Lift, drag and sideforce are the three forces requires some aerodynamic knowledges to understand of. They are actually a sum of some terms involves many coefficients (lift, drag, yaw moment, pitch moment, roll moment , yaw-roll moment,... just name a few). A very good paper about things involves aircraft dynamic model is this: http://citeseer.ist.psu.edu/joseph92npsnet.html You can check it out first. You might need a good Mechanics of Flight book if you want to understant all of the stuffs in there. If you just need math models, then it's enough.

Thrust (engine thrust), friction and other stuffs are also very painfull to model accurately. But if you want to model it simple, then it's really simple!
here's a quicky recipe:

lift on an airfoil is 0.5*CL*rho*A*v^2

CL is the coefficient of lift, which depends on the angle between the incoming flow and the plane of the wing (either positive or negative angle). a rough guess of this is CL=0 when the angle between the flow and wing is zero, and +/-1.0-1.2 when the angle is +/- 12 degrees. rho is approximately 1.17 kg/m^3 for air, A is the area of the wing in m^2 and V is the plane velocity in m/s.

Drag is exactly the same equation, but with CD (drag coefficient) instead. the graph of this with respect to angle of attack is closer to a parabola, here's a plot of an example drag curve:

http://www.centennialofflight.gov/essay/Theories_of_Flight/Two_dimensional_coef/TH14G5.htm

So now what you do is this:

give each half of the wing has its own angle of attack, you do this to implicitly add ailerons. for each half, calculate lift and drag forces based on the two equations above. apply lift normal to the wing, and drag tangentially.

for your horizontal stabilizer and elevator, use a single surface, again with its own angle of attack, again apply lift normal to the stabilizer surface, and drag tangentially.

for your vertical stabilizer, do the same thing.

apply the propeller thrust force exactly as you have been.

take all these forces, and biff them into a rigid-body dynamics code (ODE, Tokamak, Newton, etc.) with a single rigid body that has the appropriate mass and inertia tensor for a plane (i would try one box that encloses the fuselage and one that encloses the wing, with the fuselage having about 2/3 of the mass to start with).

add callbacks which allow you to vary the angles of attack on the two wings, the horizontal stabilizer, and the vertical stabilizer. you should never use values greater than +/- 12 degrees, because the lift and drag curves i mentioned aren't valid there. if your incoming flow angle is greater than +/- 12 degrees, the flow is separated, and you should set the lift force to zero and probably double the drag force for that surface. this is a stall.

for each update, calculate the lift/drag forces for each surface, sum them, and add them to the plane. you will also need to determine the torques they induce on the plane based on the location of the wing/tail panel centers and apply those to the plane as well.

that's about the simplest possible flight model which is still somewhat physical. if you want more accuracy and also to be able to model the interactions between wings and fuselage and tail you should look into panel methods, particularly what are called source-doublet methods. these are much more complicated however. a book called "low speed aerodynamics" has information on them if you are interested.

james
Use generalized Fluid Samples to simulate everything from airplanes to boats to car aerodynamics. This method is simple, fast, and stable enough to use on low-powered, integer-only devices (including cell phones and PDA's: I first used this method on Amiga and 486 PC). More implementation info here.
Quote:Original post by ciroknight

This same kind of thing is happening with an airplane, there's just a lot more surfaces involved. The primary surface for a turn is of course, the rudder flap, which is mounted to the vertical stabilizer on the back of the aircraft. This tells the air to stream in one general direction as its passing over the back of the aircraft and Newton's third pushes the aircraft in that direction.

Like the Anon. above me mentioned, aircraft also use their flaps in a turn, to give them a bit of a body roll. This is like putting your brakes on in your car; when your wing surface comes up, you slow down in the forward direction, and the air that's moving over your tail in the turning direction starts to make a greater affect. This allows the turn to happen faster, and at a higher speed than otherwise capable. It also allows the pilot to not have to worry about adjusting thrust, at a cost of maybe losing a little altitude, which is quick to pick back up after a turn.



Actually, the rudder is not the main "turning surface" on the airplane, the rudder is just there for the pilot to correct for adverse yaw when utilizing the ailerons, which roll the airplane. What makes an airplane turn is the lift "normal" of the airplane tilting to one side (such as when the plane is in a bank).

Also, the effect of control surfaces degrades when the airspeed slows down, they don't increase effectiveness, because the air hitting the deflected surface is not hitting it with as much force as when the airspeed is higher. The only reason you could turn within a smaller radius when you are going slower is because you are moving less distance forward, and therefore covering less ground.



Sorry if that explanation wasn't well written, but I'm a pilot and I just had to say something.
My Current Project Angels 22 (4E5)
That's brilliant - thanks (and cookies) to everyone who has helped - i'll have a serious stab at implementation over the next couple of days.

Its especially easy for me to change my dynamics behaviour because its all script-driven =)

Thanks again
one important thing: you mention only one airfoil, but for somewhat realistic behavior, simulating the tail is absolutely needed.

sometime ago someone posted a link here to an article explaining how to implement a generalized airfoil. then its simply a matter of approximating your aircraft with some of these airfoils, and youll be able to get fairly realistic behavoir.

This topic is closed to new replies.

Advertisement