plane icon Welcome to Microsoft Flight Simulator’s SDK Q&A Platform!

You have questions regarding the SDK? DevMode Tools? SimConnect? You would like to submit an idea for future improvements, seek help or exchange knowledge? You’re in the right place.

Please take a moment to read the platform’s guidelines before you get started!

question

boufogre avatar image
boufogre asked ·

Major aerodynamic bug: induced drag and parasitic drag

This is a copy of a post I did over at the forums: https://forums.flightsimulator.com/t/major-aerodynamic-bug-induced-drag-and-parasitic-drag/411364

I though it was worth reporting it here too.

_________________________________


I’ve just uncovered a major aerodynamic bug: it appears that the induced drag is wrongly influencing the basic Cd0 parameter.

The SDK states that Cd = Cd0 + k(Cl-Cl0)²

Cd0 is the zero-lift drag component, in other words the basic parasitic drag and k(Cl-Cl0)² is the induced drag component, with k = 1/(PIARe) according to the scientific litterature, AR being the aspect ratio of the wing, and e the Oswald efficiency factor.

Here is the desired Cd0 of 0.0171 set in the flight_model.cfg file:

https://forums.flightsimulator.com/uploads/default/original/4X/1/9/2/1929246be88a5cebd1cf9628874059f4b9871717.png

And here is the [FLIGHT_TUNING] section of the flight_model.cfg file:

https://forums.flightsimulator.com/uploads/default/original/4X/1/3/1/1313188a258e7b1ad669896c13e09338965c0960.png

However, when looking at the numbers in the sim, here is what appears:

https://forums.flightsimulator.com/uploads/default/original/4X/3/6/e/36e9ac4ab33f7e8de37e0555aeeba0ff741657e9.png

https://forums.flightsimulator.com/uploads/default/original/4X/6/5/6/6569abc0db51e24a8f3fe6aad1b4b162930e5088.png

That Cd (Cx is the French notation for Cd) is way too high.

My manually calculated Cd for the conditions would be according to the SDK formula:

Cd = 0.0171 + k x 0.812² = 0,04796 (I voluntarily chose a Cl0 = 0), with k = 1/(PI x 8.46 x 0.804) = 0.04680

The difference between the sim and the manual calculation is huge: 0.07376 - 0.04796 = 0.0258.

After of lot of time, playing with the various parameters, I’ve come to realise that if the induced drag coefficient is set to 0 in the flight_model.cfg, then the correct Cd0 is calculated by the sim:

https://forums.flightsimulator.com/uploads/default/original/4X/5/7/2/5726b09ce062b907b564fc3d1241467626591956.png

https://forums.flightsimulator.com/uploads/default/original/4X/f/5/3/f53897fc2d414206e6b578f3e81cdc2146af04f4.png

https://forums.flightsimulator.com/uploads/default/original/4X/f/2/4/f2405750f7ea7e238cea20843ed43e2302e1382c.png

The induced drag shouldn’t have any influence over the Cd0 in the sim, but be added to it as the SDK says it does.

I hope this post was clear, and I hope this will get fixed at the next possible opportunity.

Thank you for reading me!

_________________________________

Pictures posted as links to overcome the 5 pictures per post limit. For ease of reading, just follow the link to the forum, at the top of the post.

aircraftflightmodel
10 |10000 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

FlyingRaccoon avatar image
FlyingRaccoon answered ·

Hello boufogre,

First, when you produce what you consider an aberrant behaviour when tweaking your flight model, check the aircraft provided with the SDK to ensure they're showing the same issue to make sure the problem is related to the FM system itself and not your tweaking.

In this case, we don't reproduce the issue you are having with any of the aircraft provided with the game so I'd say it most probably comes from your flight model parameters.
For instance, here are the values we have for the A320 :
1624363388374.png1624363274125.png

In your case, the big difference between the "FSX" and "NEW" values means the wind tunnel normalization has failed. It failed to make your aircraft fly properly and generated aberrant data.
One lead can be your value for the cruise_lift_scalar which is set to 2. This scalar should be used to make small adjustment on the lift but 2 will have a huge impact on the lift for sure, but on the induced drag as well.

Also, the name of the data in the debug panel is not really accurate and can be misleading. This will be changed in further updates

1624364278512.png

Let me know if that helps you solve your problem.

Regards,
Sylvain


1624363274125.png (24.0 KiB)
1624363388374.png (55.4 KiB)
1624364278512.png (81.6 KiB)
26 comments
10 |10000 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Thank you Sylvain for the answer.

My answer is coming in different comments, because of the 600 character limit.

First, here is a screenshot of the default 747 without modification:

capture-decran-2021-06-22-191513.jpg

0 Likes 0 ·

Second, here is a screenshot with the induced_drag_scalar set to 0 (no other modifications were done):


capture-decran-2021-06-22-192444.jpg


The induced drag influence over Cd0 can be clearly seen here.

0 Likes 0 ·

In my initial post, the plane is the default 747 which I am trying to modify to to match the FCOM numbers.

For my modifications, I have changed the lift_coeff_aoa_table to match the FCOM using unreliable airspeed tables as a reference and obtained very good results from this first modification.

The cruise_lift_scalar was set to 2 to allow for scaling of the Cl based on Mach number using the lift_coeff_mach table. Unfortunately, this table only has an effect with scalars lower than one, only allowing for scaling down of the Cl when it increases with increasing Mach number.

0 Likes 0 ·

Interestingly, I have made the same test using the cruise_lift_scalar = 1 and doubling the Cl directly from the lift_coeff_aoa_table, and I obtain the same results.

0 Likes 0 ·

I will update this comment by testing all the default planes, and posting screenshots from the debug panel as well as the [AERODYNAMICS] section from their respective flight_model.cfg file.


The only modification will be to leave the induced_drag_scalar to the default value, then setting it to 0 and observe and compare the Cd0 calculated by the sim.


0 Likes 0 ·
Show more comments
Alec246 avatar image
Alec246 answered ·

Now this is a very interesting discussion! Thanks boufogre for bringing this to this platform!

Sylvain, I never head of Asobo ever mentioning the issue of Wind Tunnel Normalization failing. This is indeed very common when you deal with Aerodynamic softwares such as XFLR5, AVL, etc, and expected in such approach as MSFS uses, but the SDK never said to look after those.

I suspect a LOT of strange Behavior in lots of MSFS aircraft can be explained by those failed iterations, where the values just failed to converge, and it was never pointed out anywhere in the DevTool Debug Windows.

The number one thing I would change is to make it clear that Iteration and Normalization has failed, and then the developers can go look why that happened in the first place.

Another thing that you guys seem to be already looking into it is changing the nomenclatures. They really are all over the place, not following standard names used on books and articles, so it gets very tough to decipher, this will be a very welcome improvement to the SDK! A good example I always give is Rudder_Effectiviness attribute does nothing to the Rudder itself, but is instead a Scalar to modify Vertical Stab Effectiveness as a whole. Also, trying to understand the Normalization process is nearly impossible right now with so many abreviations, so you never know which is the Airplane CL, Wing Cl, FSX Cl, actually Normalized CL, etc.


Great to see this kind of improvements coming!

2 comments
10 |10000 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Hello Alec,

I understand, we really need to better document that part.
We are actually working on video tutorials about this and expect the doc to be completed as well.

There's no explicit normalization failure "warning". It's more of a habit of checking that FSX and NEW figures are relatively close or something is going wrong.
I'm sure those video tutorials will answer most of your questions on this.

If you have any suggestions on how to improve the usability and readability of the AircraftEditor, feel free to create ideas about this.

Regards,
Sylvain

1 Like 1 ·
Alec246 avatar image Alec246 FlyingRaccoon ♦♦ ·
That is excelent Sylvain! Keep documenting and the Addons will only improve with time.


I will be more aware of the FSX and NEW values. Is there any estimate on when these new improved nomenclatures will arrive at the SDK?

I will sure create some posts with IDEAS in the future! I can already think of some!

Regards





0 Likes 0 ·
FlyingRaccoon avatar image
FlyingRaccoon answered ·

Hello Bouforge,

There seems to be a misunderstanding here and I think it comes from our current debug panel not being very clear.
The values displayed after "FSX" and "NEW" are not Cd0 but Cd with 0 AoA (hence my picture with the modified naming). Therefore it takes induced drag into account.

Regards,
Sylvain

5 comments
10 |10000 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Merci Sylvain for the answer.


It makes a lot more sense and I wish the debug tool was clearer.

I have noticed something else that I quite can't understand and it is the fact that for fixed landing gear aircraft, the induced_drag_scalar appears to have an effect on Cd by excluding the drag_coef_gear in the Total NEW value. I will tag you in the comment about the DA40NG results, it will be easier for you to find them that way.

Cheers,

Romain

EDIT: tried tagging you in the results but it doesn't seem to work...

0 Likes 0 ·

This is a convention we use. To prevent having to set the gear drag in different places, depending on if this is a fixed or retractable gear, it is always defined in the drag_coef_gear.

It means the Cd0 we set for an aircraft with fixed gear doesn't actually take the gear into account. The influence of the gear in the Cd will come from the drag_coef_gear.

Regards,
Sylvain

0 Likes 0 ·
boufogre avatar image boufogre FlyingRaccoon ♦♦ ·
Sorry for not replying before, but the flying schedule is looking busy again.


Thanks for the clarification on the gear drag being excluded from the Cd0, I think it is quite unique as it's my understanding that it is normally included as a convention in the Cd0 for fixed gear aircraft.

Why is it that when I set induced_drag_coef = 0 the gear drag is not being applied anymore?

I'll copy my comments on the DA40NG down below, but I think they apply to all the fixed gear aircraft.


Thanks again!


0 Likes 0 ·
Show more comments
boufogre avatar image
boufogre answered ·

Hello,

@FlyingRaccoon, sorry to come back to this, but I think this is a bug in the end and that this is not only a matter of a wrong label in the debug windows.

When opening the Sim debug window, the window showing all the curves is showing the Cd0 and the Cd0 shown there is including the induced drag at AOA=0°, which it should not.

I calculate the exact same value by doing Cd = Cd0(from the file) + k (Cl(AOA=0°) - Cl0)² in an Excel spreadsheet.

Here is a screenshot showing this:

1625730918940.png

1625730252025.png



1625730252025.png (26.5 KiB)
1625730918940.png (25.3 KiB)
10 |10000 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.