Computing Flight Forces. Im getting so upset

Click For Summary
SUMMARY

The discussion centers on the challenges faced by a game developer, Andy, in simulating realistic flight dynamics using the Leadwerks engine and the Newton Game Dynamics library. He seeks clarity on the equations governing lift, drag, and thrust, specifically the lift equation (lift = CL*(r*V)/2*A) and drag equation (D = 0.5 * Cd * r * V^2 * A). Key issues include calculating instantaneous velocity in programming and understanding coefficients like Cd0 and the efficiency factor (e). The conversation highlights the need for accurate airfoil data and suggests using resources like XFOIL for generating aerodynamic coefficients.

PREREQUISITES
  • Understanding of flight dynamics principles, including lift and drag equations.
  • Familiarity with programming in Delphi, Lua, and C++ for game development.
  • Basic knowledge of fluid dynamics and the Navier-Stokes equations.
  • Experience with 3D game engines, specifically Leadwerks and physics libraries like Newton Game Dynamics.
NEXT STEPS
  • Research how to calculate instantaneous velocity in a game engine context.
  • Explore the use of XFOIL for generating aerodynamic coefficients and airfoil data.
  • Study the relationship between angle of attack (AoA) and lift coefficient (CL) using airfoil polar data.
  • Investigate numerical integration methods used in high-end flight simulators for real-time physics calculations.
USEFUL FOR

Aviation enthusiasts, game developers, and software engineers interested in flight simulation and physics-based modeling will benefit from this discussion.

Gibbon
Messages
22
Reaction score
0
Hi, ok.. i know I am probably expecting way to much off you guys here but its my only last resort before i give up!

Ill explain.. I am a avid aviation fan as well as an avid game developer whilst also being a fulltime software developer. So i program in delphi at work and what i want as a hobbiest, mostly Lua with C++.

My recent project i am trying to achieve for fun, learning and hobbiest reasons is a "realistic" flight simulation. I am using leadwerks engine (so the 3D part is done), that uses the "Newton game dynamics" library, so the physics calulatiions are done.

And so.. as silly as it sounds all i need to do in order to get a basic 3d model to act like a plane... is give the model the correct forces in order for it to move and act like a plane.

I say its silly because... i cannot seem to do it. And i think its because i am having problems understand the equations needed for this.

I fly planes myself, Rc planes and Rc helicopters i have done for years, I've built my own RC plane designs and I've built all my model helicopters that i fly. So.. i do undertsand flight and the physics... this is why it upsets me! As I am a programmer and flyer yet cannot seem to put these two together!

I know its not easy, but a lot of the work has been done for me.

So.. i am after in computer terms the equation needed for lift, drag and trust.

I know the equations.. i must have read them 100 times now, i also have the book "Physics for game developers" which explains it in there also.. but my lack of math knowledge let's me down. I've refreshed my mind with algebra and Trig as i am very serious about givving this ago, and honestly won't be wasting your time.

Ok, so what i know already...

I know that the lift equation is :

lift = CL*(r*V)/2*A
CL = 2 * pi * AoA

Break down:
V = ? (i don't know how to work out instant velocity in programming)
AoA = is fine, i can get the local angle in degrees or radians.
CL = 2 *... ETC : What is the 2?

Drag = totally confused me because: D = .5 * Cd * r * V^2 * A (thats fine its the Cd)
Cd = Cd = Cd0 + Cl^2 / ( pi * Ar * e) : Ok so what is Cd0 and what e (efficiency factor)?

So.. I am stuck. I have at the moment... a 3d model that i can generate a velocity (by just uping a value) which generates a force from front of the model making it move.

I also seem to successfull give my model lift by using the lift equation and obviosuly changing the AoA of my model, but then once up, it really doesn't act very plane like.

I can roll, pitch and yaw the model by adding a torque force according to each local axis.

This is done currently with gravity turned off, as when i turn it on i cannot seem to get the model off the ground as it seems the only lift comes from AoA and as I am on the ground the AoA is 0!

Does anyone (and again i know its not simple else eveyrone would be doing it) understand "where i am" with this, and possibly suggest any good advise or good "simplish" articles i can read that may help.

I appriciated your help and thanks for reading.

Andy
 
Last edited:
Science news on Phys.org
Coefficient of lift versus AOA varies with the airfoil and Re (Reynolds number):

http://www.ae.illinois.edu/m-selig/uiuc_lsat/s1223/s1223_liftcm.html

http://www.mh-aerotools.de/airfoils/hdipolar.htm

What you need are the "polars" for the airfoils you use for the main wing and elevator. Do a web search for airfoil polar, and you get a number of hits.

Link to a bunch of links:
http://www.ae.illinois.edu/m-selig/ads.html

For takeoff from ground, you need to include the lift component from the elevator, which pitches the aircraft up, increasing AOA of the main wing, which then produces lift.
 
Hi jeff, thanks for the reply, will have a good look into those articles, all helps!

Just on the note of CL, how does this work, or sorry... how can i make this work in programming? Could i have an array of values that represents points of a aerofoil and then somhow calculate the CL at all points...

And also.. i might being blind but, where in the Cl equation is it reading any aerofoil information?

Thanks
Andy
 
Gibbon said:
Just on the note of CL, how does this work, or sorry... how can i make this work in programming?And also.. i might being blind but, where in the Cl equation is it reading any aerofoil information?
The process of creating Cl versus AOA graphs or tables requires using fluid dynamics and some simplified form of Navier Stokes equations.

http://en.wikipedia.org/wiki/Fluid_dynamics
http://en.wikipedia.org/wiki/Navier-Stokes_equations

The Navier Stokes equations normally can't be exactly determined, so they are approximated using various method. You can get xfoil for free:

http://web.mit.edu/drela/Public/web/xfoil

You'll need to do some type of curve fit to turn the table of AOA and CL values into an equation, or just use the table directly and do linear interpolation. Note that second curve you see on those Cl charts is usually the pitching moment, the torque genrated by the wing. To simplify things, you can assume Re is constant (ignoring air speed affect on CL), or you can deal with the equivalent of a 3d table, although the polar generators generally only run a small set of Re numbers.
 
Last edited by a moderator:
Ok, thanks again. Excellent information and although over my head at the moment ill have a good read!

Do most flight simulators use this much information in them? I am not doubting it, asking as a real question? I never know like how much detail a simulator has got...

Is the level of simlation I am trying to achive here.. basic.. mid level or complex?

and the airfoil value your referring to, is that in placement of the "2" i question about in CL? EDIT: Hmm maybe not... Ill read!

Thanks
Andy
 
Click on the links section from FMS:

http://n.ethz.ch/student/mmoeller/fms/index_e.html

Do most flight simulators use this much information in them?
The high end ones like RealFlight generate 3d polar equations or the equivalent based on airfoil data, and use real time numerical integration to do the flight stuff. It pretty complex. The link above is to the FMS free flight simulator, and it's fairly complex. Link to RealFlight, one of several commercial RC flight sims:

http://www.realflight.com/new/index.html
 
Last edited by a moderator:
Yeh i have FMS and RC reflex (which i think is fantastic).

Ill keep reading and having a ago.

thanks again.

Andy
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
9K
Replies
2
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
Replies
6
Views
4K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 17 ·
Replies
17
Views
3K
  • · Replies 2 ·
Replies
2
Views
1K