Advertisement

Simulation of drag in flightsims

Started by September 16, 2014 12:29 PM
28 comments, last by Viik 10 years, 4 months ago

CM - is it a point of application of Lift force?

No - it's the pitching moment. So

Torque = 0.5 * air_density * relative_airspeed^2 * wing_area * wing_chord * Cm

For conventional planes you don't need to worry about it, at least at first. However, for flying wings then the way the control surfaces (elevons) change Cm is the mechanism for pitching up and down.

Edit: Fixed equation so it uses Cm not Cl!

I see, for torque I relly on physics engine, I'm just applying resulting lift/drag forces at the places of aerofoil elements and physics figures out the rest.

I remember seeing one model where center of application of forces slightly shift along the chord as AoA changes, so I thought CM was related to that.

Advertisement

I see, for torque I relly on physics engine, I'm just applying resulting lift/drag forces at the places of aerofoil elements and physics figures out the rest.

I remember seeing one model where center of application of forces slightly shift along the chord as AoA changes, so I thought CM was related to that.

The torque should come from your calculations - just like the lift and drag forces.

With forces you need to decide where to apply the force. All the graphs you'll see (pretty much) will be for applying the force at the "quarter chord" position - so 25% of the way back from the leading edge (remember to flip it if you want to hand the case where the plane ends up flying backwards!). This is chosen because the pitching moment is approximately independent of the angle of attack, during laminar flow. However, this is not the same as the pitching moment being zero (though it will be, approximately, for a symmetric aerofoil).

However - when your wing stalls, the centre of pressure shifts, and after a certain point it's basically in the centre of the wing. So you need a way to shift the position at which you apply the lift/drag force as the wing stalls. However, if you look at some plots of CL/CD/CM against AoA, then the CM will go way off scale - that's because the pitching moment is still being plotted for the force being applied at the quarter chord point.

Hope that makes sense :/

sorry i have so little knowledge about flight dynamics but i saw you are talking about torque, i have a different view


float elevationangle = ELEVATOR_LEFT->GetAngle(); //result is percentage of elevation //*17.5 is the max degree that elevator can reach

float elevator_drag_force = 0.90f *  ((dens * squareSpeed )/ 2.0f) * Abs(elevationangle) * 2.0f*13.2040f;
float leverlen = 8.50f;
float alphaangularity =	 (dt*((leverlen * elevator_drag_force) * sin( (elevationangle*(17.50f+ 90.0f) )*imopi) ) )/ (mass * leverlen*leverlen);// elevator_drag_force*elevator_drag_force);
float angvel = alphaangularity*dt;


No - it's the pitching moment. So



Torque = 0.5 * air_density * relative_airspeed^2 * wing_area * CL

Just second, does it mean that resulting angular force of the body will depend only on Lift force in relation to center of mass of full system?

I thought that process is like this:

- we calculate Lift and Drag at aifoil system of coordinates, then we sum them up and after transforming to airplane system of coordinates apply them to center of mass of airplane

- to find resulting angular velocity our torque would be T = vector_from_com_to_airfoil X (Lift_airfoil + Drag_airfoil).


No - it's the pitching moment. So



Torque = 0.5 * air_density * relative_airspeed^2 * wing_area * wingChord * Cm

Just second, does it mean that resulting angular force of the body will depend only on Lift force in relation to center of mass of full system?

I thought that process is like this:

- we calculate Lift and Drag at aifoil system of coordinates, then we sum them up and after transforming to airplane system of coordinates apply them to center of mass of airplane

- to find resulting angular velocity our torque would be T = vector_from_com_to_airfoil X (Lift_airfoil + Drag_airfoil).

(Note - I fixed the pitching moment equation - sorry!)

The torque from the Cm term is in addition to that due to the lift and drag forces being applied away from the centre of mass.

So the procedure is this:

For each aerofoil component:

1. Calculate the local air flow (taking into account the movement of the plane), Set to zero the component that is along the wing's spanwise direction

2. From this calculate the angle of attack, AoA

3. From this calculate/look up Cl, Cd and Cm

(modify Cl, Cd, Cm and AoA depending on control surface deflections)

4. Calculate the "dynamic pressure": q = 0.5 * density * square(local air speed)

5. Calculate the lift force liftForce = Cl * wingArea * q

6. Apply the lift force at the "quarter chord" position (adjust this if the wing is stalled or in reverse flow), in a direction perpendicular to the local air flow and the spanwise wing direction (so this applies torque as well as force to the centre of mass). Note that this is _not_ the wing's "up" direction.

7. Calculate the drag force dragForce = Cd * wingArea * q

8. Apply the drag force at the quarter chord position (adjust as above), in the direction of the local air flow (this applies torque as well as force to the centre of mass). Note that this is _not_ the wing's "back" direction

9. Calculate the pitching moment: pitchingMoment = Cm * wingArea * q * wingChord

10. Apply the pitching moment (torque) around the wing's spanwise axis.

Advertisement


(Note - I fixed the pitching moment equation - sorry!)
Oh, I see now - you mean Cm coefficient.

I was just reading today about pitching moment and if I understand it correctly it accounts for additonal torque at aerofoil due to the shifting centre of pressure as AoA changes.

So far I got from 1 to 8 implemented. But not with all the details that you've mentioned:

- "modify Cl, Cd, Cm and AoA depending on control surface deflections" - I take into account only AoA right now. Ailerons are attached to the sides at the back of the wing as separate surfaces and tail consists solely of a single elevator surface. I'll add a rudder and then look into baking ailerons and elevators into Cl/Cd/Cm coefficients of the main and tail wings. Should be trivial using JavaFoil for the start.

- "Apply the lift force at the "quarter chord" position (adjust this if the wing is stalled or in reverse flow)" - I guess for the reverse flow I should take a quarter chord from a trailing edge and for stall it will be somewhere between 25-50% of the chord.

I definitely should add pitching moment. According to wiki:

How do you transfer pitching moment to the centre of mass of airplane? Is it just a cross product of pitching moment at aerofoil with a vector from COM to aerofoil?

Thank you for your help, MrRowl!

How do you transfer pitching moment to the centre of mass of airplane? Is it just a cross product of pitching moment at aerofoil with a vector from COM to aerofoil?

You don't - torque just results in an angular acceleration of the body, depending on the moment of inertia. It doesn't matter "where" it is applied. That might seem counter-intuitive, but it's true :)

If you're using a physics engine, then it will probably have functions like this:

Body::ApplyForce(Vector3 force, Vector3 worldPos);

to apply a force in world space to a body. But for torque it will just have something like this:

Body::ApplyTorque(Vector3 torque);

It does sound counter-intuitive, I've imagined that it would be something like a right part of this illustration: https://www.dropbox.com/s/nsqdfy4xrgry56n/AddTorqueAtPoint.png?dl=0
So the part of the torque originating not at the center of mass would lead to some both linear and angular acceleration.

EDIT: Or you mean that in this specific case of pithing moment, the relative application to center of mass is already accounted in Lift and Drag portion of forces?

EDIT2: Just to be sure, expected value of pitchingMoment = Cm * wingArea * q * wingChord is in radians, right?

So the part of the torque originating not at the center of mass would lead to some both linear and angular acceleration.


No - if you apply a torque to a body, the position at which it is applied is irrelevant. For a given torque vector, the angular velocity of the body (when integrated over time) change is always the same wherever it is applied. The linear velocity of the centre of mass is unaffected by any torque you apply.

To see this: Imagine that you replace the torque with two force vectors, F and -F, slightly offset from one another so that they're equivalent to the torque, and offset by vector R +/- delta from the object's centre of mass. As you know, to figure out the resulting acceleration, you can convert each of these to a linear acceleration of the centre of mass, and an angular acceleration. The linear acceleration of the centre of mass is then F/m - F/m so just zero.

I made a little diagram - hopefully it will help, rather than confuse matters! https://www.dropbox.com/s/6fgn0w90ebwgw5j/torque.png?dl=0


In practice, if you're using a decent physics engine (Bullet, PhysX etc - I suggest you do), this doesn't matter too much - you just call the functions to add a force or torque to a body.

This topic is closed to new replies.

Advertisement