Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Anyone fancy doing a good deed? Aerodynamics.

  1. Dec 8, 2009 #1
    I am trying to write a basic flight simulator, i have "tried" to write many now without any real success.

    So if anyone is feeling kind and wants to have ago at talking me threw the equations in a more meaningful way than i kind find on the net, it would very much appriciated.

    I think... to be honest, my pitfall is the Lift coefficient. I am.. just so confused about how i go about calculating this???

    I know that L = CL * (r * (V sqrd)/2) * A

    but CL??? i have seen many ways of doing it, and i dont realy understand it at all and dont get the correct results, and without "understanding" it, i cant go about trying to change it or make it work.

    Im not trying to create Mircrosoft flight sim.

    Just trying to simulate a simple plane and get the correct movement which i cannot seem to do.

    I am using using Newtons Physics Dynamics in C++ and Lua.

    So it really is a case of once the caluclations are done, then its a case of simply giving a body that force.

    The programming is not a problem, it the correct calculations i just cannot seem to do.

    Again, nothing complex, just basic for now and then i can slowly learn and add to it, but i just cannot seem to get any sort of resemblance of flight.

    Hope you can help.
    Andy
     
  2. jcsd
  3. Dec 8, 2009 #2

    rcgldr

    User Avatar
    Homework Helper

    Coeffecient of lift is a function of airfoil shape, angle of attack, Reynolds number (basically wing chord x air speed x constant), ...

    For most wings at reasonable speeds, it's nearly linear until you get near peak lift, where it curves, and then falls off (stall region). Do a web search for

    airfoil polars

    and you'll find plots of Cl versus AOA for specific Reynolds Number, usually mixed with pitching moment, a torque value you can ignore for a simple simulation.
     
  4. Dec 8, 2009 #3
    Hi Jeff, thanks for stopping by again, you helped me last time with a related question.

    I have looked into this and this is where i get confused. In Computer programming terms, do i then have to somehow calculate (in real time) the CL by pulling data from a table of "aerofoil" data?

    CL is somthing that can completely calculated in realtime?

    Thanks
    Andy
     
  5. Dec 8, 2009 #4

    rcgldr

    User Avatar
    Homework Helper

    Try something simple, like CL = .1 θ, where θ is AOA in degrees. This gives you a CL of 1.0 at 10 degrees AOA.
     
  6. Dec 8, 2009 #5
    Ok, thats sort of somthing i have been using. And if thats a "around about way for now" about doing it then that is what ill do. When you refer to:

    "This gives you a CL of 1.0 at 10 degrees AOA." Is that AoA in radians? I am understood it needs to be? Or am i incorrect?

    Thanks
    Andy
     
  7. Dec 8, 2009 #6
    Another problem i am finding, i have wrote a quick app that simulates a wing that i can change AoA so i can see the effects to lift.

    And when my wing is at 0 AoA along the vector --------> its fine and if i tilt the wing up, Cl goes up and lift goes up (and using the above equation u stated at 10degreees AoA CL=1.0) but when i go below 0, obviously that is 359 and lower so the lift shoots up dramatically?

    Also... my Cl doesnt seem to tail off towards 16degrees (rad)?

    The equations im using are:

    The wing is simply rotated using keys.

    CL = 0.1*AoA
    Lift = CL*((R*(V^2)/2)*A
    R (air denisity) = 0.0027 , or 1,225 ???
    V (velocity) is in Meters Per Second
    A (wing area) = 100 ft^2 (not specific)

    And lift and CL when V = 40ms

    horizontal 0 AoA : CL=0 : Lift = 0
    vertical 90 AoA : CL = 9 : Lift = 1.6
    Horizontal (upside down) 180 AoA: CL = 18 : Lift = 25.3

    As you can see higher the angle the more lift, which imsure should only happen to a certain angle (16 degrees radian?) and then tail off?

    Thanks
    Andy

    Thanks
    Andy
     
    Last edited: Dec 8, 2009
  8. Dec 8, 2009 #7

    rcgldr

    User Avatar
    Homework Helper

    If you go below zero, the AOA goes to -1, not +359.

    Try CL = -.0001497 AOA3 + .11497 AOA

    CL = -1 at -10 degrees, +1 at +10 degrees, peaks at -16 and +16 degrees:

    cl.jpg
     
    Last edited: Dec 8, 2009
  9. Dec 9, 2009 #8
    Thanks Jeff, Thanks again for taking time to help. I figured out the problems you refered to in your last post (should of reposted and said, sorry). I therefore started to put things into practise in 3D, and recieving strange problems.

    Without "trying" to explain, ive drawn a very crude quick diagram to explain. The arrows are the vector the plane is moving in.

    http://img192.imageshack.us/img192/2172/problemf.jpg [Broken]

    I have anough power to move forward and take off, and then if i try to pitch up, or elevate up this allways seems to happen. In "real life" its as if the plane is underpowered, but if i add more power, it just moves the plane along that vector (red arrows) faster?

    ... very confused.

    Andy
     
    Last edited by a moderator: May 4, 2017
  10. Dec 9, 2009 #9

    rcgldr

    User Avatar
    Homework Helper

    From looking at your diagram, you have the center of mass behind the center of lift, resulting in a pitch unstable aircraft. Decrease weight in the rear end and/or add weight to the front end of your model until the center of mass is about 25% to 30% behind the leading edge of the main wing. This should get it flying.

    To test for the amount of pitch stablity, trim your controls and/or the model so it flies level at some moderate cruise speed with the control inputs centered. Apply down elevator to pitch the model down about 10 to 15 degrees, then recenter the controls. The aircraft should level out, and perhaps pitch up a bit depending on the overcorrection. If the aircraft levels out, you have positive pitch stability.

    The amount of time it takes to level out determines the amount of pitch stability you have. The longer it takes to level out, the less pitch stability you have. I have radio control gliders, and for the thermal models, I have just a hint of positive pitch stability, where it takes 3 to 5 seconds to level out from a shallow dive.

    For my slope models, I trim similar to aerobatic aircraft with neutral (zero) stability. If I nose the model down and recenter the controls, the model maintains it's current pitch angle. This makes for smoother looking aerobatics.

    For powered models, the prop axis should be pitched downwards a small amount. This is to compensate for the prop wash being diverted downwards by the main wing and applying some downforce to the elevator, resulting in an unwanted pitch up response under heavy power. The prop axis may also be angled to the side a bit to compensate for torque roll and yaw effects, but only if you're modeling the swirling air from the prop wash which would apply a side force to the vertical stabilizer.
     
    Last edited: Dec 9, 2009
  11. Dec 9, 2009 #10
    Cheers Jeff, ill have a good luck into it later. Ive not really give the center of mass and gravity much thought. Well not alot anyway.

    Im also now thinking if im going about adding forces and torque correctly.

    You see i have made my plane up from 4 rigid bodies.

    fuselarge with a mass
    main wing with a mass
    tail plane with a mass
    engine with a mass (so i can add weight at the front)

    The main wings , tail palne and engine body are all joined to the fuselarge using a fixed joint.

    I am apply lift force local to the main wing body, drag to the local fuselarge body, thrust to the engine body and for pitch i apply torque to the fuselarge. maybe i need to give this a bit more thought? (not sure how though)

    Thanks
    Andy
     
  12. Dec 9, 2009 #11

    rcgldr

    User Avatar
    Homework Helper

    There should be two lift forces, both perpendicular to the direction of travel, as opposed to perpendicular to the orientation of the fuselage. The main wing should produce a lift force, either up or down (perpendicular to direction of travel), at about 50% back from the leading edge of the main wing. The elevator should also produce a lift force, either up or down (also perpendicular to direction of travel), also about 25% back from the leading edge of the elevator, unless you have a model where the entire horizontal stabilizer rotates, in which case put the lift force at about 50% of the stabilizer. You can use the same CL equation for both wing and elevator, noting that the elevator has less lift force (about 1/8th) for the same AOA because of it's much smaller area, which should be taken care of by your equation for total lift. Assume the elevator has about 1/8th the area of the main wing.

    Place the center of mass 35% behind the leading edge of the main wing. This means that the center of mass is .35 x wing chord length behind leading edge of main wing, and center of lift of main wing is .15 x wing chord length behind center of mass. The tail should be long enough that the center of lift of the elevator is about 2.65 times wing chord distance behind center of mass.

    There are 2 pitching torques for the main wing and for the elevator. Each torque = (lift force) x (distance from center of lift to center of mass) x cos(AOA of fuselage)

    pitching torque of main wing = (main wing lift force) x .15 x (main wing chord length) x cos(AOA of fuselage)
    pitching torque of elevator = (elevator lift force) x 2.65 x (main wing chord length) x cos(AOA of fuselage)

    In level flight, the total lift force equals the weight of the plane.

    When the torques between main wing and elevator are opposing but equal in magnitude, the aircraft holds it's current pitch angle, otherwise, the plane pitches up if there's a net upwards torque, or pitches down if there's a net downwards torque.

    http://en.wikipedia.org/wiki/Elevator_(aircraft)

    This is OK, although you might want to include a drag component based on sin(AOA of fuselage), essentially a Cd for the entire aircraft.

    You can just apply thrust at the nose of the fuselage, with a direction straight back relative to the orientation of the fuselage (not the direction of travel).
     
    Last edited: Dec 10, 2009
  13. Dec 10, 2009 #12
    Thank you Jeff, very, very helpful information! Later today im going to do all the new calculations and see how it goes. Every night though it gets closer and closer.

    Ill keep you informed how it goes.

    You have been a huge help.

    Thanks
    Andy
     
  14. Dec 15, 2009 #13
    If your still around jeff :), im getting closer but its still not working as it should, and i think thats down to the fact im being ignorant to what your said here:

    And i think thats because im not 100% understanding it (down to me!!) So im going to keep reading it and trying too. But the reason for my post is, i posted a similer thread on another forum and got a responce that i think is the same.... is it?

    I think this is (if is the same as what your saying) is what is missing. As currently my plane acts very strange!

    Im slightly confused to how many forces (are at LEAST needed) to get a half decent flying model in simulation? As i see it there is forces acting on both wings all the time aswell as 2 torques acting on the wings all the time, so 4? Not including drag, gravity ETC?


    Thanks
    Andy
     
    Last edited: Dec 15, 2009
  15. Dec 15, 2009 #14

    rcgldr

    User Avatar
    Homework Helper

    It covers more aspects of flight while I tried to give you some actual numbers to use, and I was trying to keep the model very simple.

    You need to be able to control the 3 axis of rotation via torques. For a simple model, allow entire wing surfaces to move rather than just trailing edges (ailerons, elevator, rudder). There are radio control gliders that do this. For example, at 9 seconds into this DVD trailer, you can see a 'wingeron' model in helicopter mode (one wing pitched up, the other pitched down):

    http://www.youtube.com/watch?v=kz9_vNnjUks&fmt=18

    Allow the entire horizontal stablizer to change AOA. This will add pitch control.

    Allow the entire left and right sides of the main wing to change AOA independently, as opposed to using ailerons. This will add roll control. For a left roll, the left wing would have less (even negative) AOA than the right wing. To keep things simple, assume that each wing produces lift force at it's center. Then the torque component is related to difference in lift from each wing x (1/2 wing length + 1/2 wing length) = difference in lift x wing length.

    Allow the entire vertical stabilizer to rotate on a vertical axis. This will give you yaw control. Assume that it acts in line with the fuselage instead of above it so you don't introduce a roll effect.

    If you want roll stability, then you need to angle both wing tips upwards a bit (dihedral), and take crosswind (relative to wing) components into account, when calculating the overall AOA -> lift. For yaw stability, you need to include a crosswind component on the vertical stabilizer (weather vane effect). You already have pitch stability by having the center of mass in front of the center of lift, assuming the elevator is trimmed for level flight (or a steady glide slope).
     
    Last edited: Dec 15, 2009
  16. Dec 15, 2009 #15
    You need to get a book on flight dynamics.
     
  17. Dec 17, 2009 #16
    You're going to need a lot more knowledge of flight mechanics, particularly such concepts as body frames, wind frames, and Euler angles. You will also need to know how to formulate the 6-DOF equations of motion in the body frame of the airplane. I can guarantee that you won't get anywhere if you aren't familiar with these concepts.
     
  18. Dec 17, 2009 #17
    Hi Brian, cheers for your advise. And yes i agree and i am doing my best learn about all these, but please correct me if im wrong (because more than likely i am!) but 6-DOF and a few other factors mentioned are not actually necessary for the basic flight sim. For instance, im sure Microsofts flight sim 98 and maybe 200o wasnt 6DOF? (from what ive read), again might be wrong.

    being new to flight simulation programming, i thought i would (if possible) try and start from the very beginning. Even just to get a working model act and move somwhat like a plane by applying forces would be a start. Which i sort of have got, but its very unstable and not working how it should, which is obviously down to my lack of knowledge.

    But im going to keep on trying, reading, asking and learning.

    And again, thanks for the advise, keep it coming if you feel like helping me along! :)

    One thing i havnt accounted for in my sim yet is the vertical stablizer which i really dont think is helping matters. So any input on how i put forces on this to keep it from "slipping" would be great. I presume its very similer to the lift equations, only on a different axis but also equal on both sides (untill rudder input of course)?

    Thanks
    Andy
     
  19. Dec 17, 2009 #18

    rcgldr

    User Avatar
    Homework Helper

    The 6 DOF: an aircraft can move in the x, y, z direction, and it can rotate about 3 different axis, pitch, roll, yaw. Probably the simplest game with these 6 DOF was Descent, a spacecraft in a gravity free enviroment, moving around in a series of tunnels. There was something equivalent to aerodynamic drag though (or the equivalent of accelerometers) that allowed it to stop moving or rotating without a lot of effort.

    You probable need some dampening factors, which is the drag on the wing tips that dampen roll, drag on the fuselage and vertical stabilizer that dampens yaw, and drag on the horizontal stabilizer that dampens pitch.

    You can use the same CL equation I suggested before. You can set the vertical stabilizer size to about 1/8th the area of the main wing, similar to what I suggested for the elevator.
     
  20. Dec 17, 2009 #19
    Ok, thanks Jeff, ill have good go at adding the vertical stablizer in. Also i think i need to have another good look over my variables measurements as i dont think there consistant and also... i know for sure some are based on real specs of a cessna (which i chose to base it on) and others that ive just set randomly which i really dont think help matters!

    And also dampening factors sound like a definate need of. So ill loo kinto them to.

    Thanks again for the advise, ill try and get soe photos and/or vids up soon so you (if your interested) can see whats happening for youself.

    thanks
    Andy
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Anyone fancy doing a good deed? Aerodynamics.
  1. Learn aerodynamics? (Replies: 6)

  2. Car aerodynamics (Replies: 4)

Loading...