Originally created by: bcoco... (code.google.com)@gmail.com
* What is the issue ? *
This should normally be a feature request but unfortunately, due to a documentation not stating clearly the limitations of YASim, users have developed -in good faith- dozens of FDMs for aircrafts that YASim cannot properly model.
YASim, as it is coded in Git at the moment, is neglecting the effects of compressibility in its calculations. It is harmless as long as the modelled aircrafts are flying at speed below Mach 0.5/0.6. Beyond this speed, compressibility effects are a first order contributor to the lift and drag of the aircraft. For information, compressibility effects increase the lift by 15% at Mach 0.5, 25% at Mach 0.6, 40% at Mach 0.7 and 66% at Mach 0.8 (Prandtl-Glauert rule).
In YASim, FDMs are developed by iterating on a few parameters until the model matches the performance of the real aircraft. Unfortunately, for aircrafts capable of flying at high speed, the real aircraft performances can only be matched by tweaking the model parameters to unrealistic values as a consequence of YASim not modelling compressibility effects. The result is an aircraft that can only have a less than realistic flight envelope at high speeds except perhaps in the two flight conditions (approach and cruise) that YASim uses to estimate the aircraft aerodynamic characteristics. The farther the aircraft is flown from these two flight conditions, the bigger is the error made by YASim.
* What can be done ? *
The most obvious, simple and universal approach would be to allow YASim to use tabulated aerodynamic data. This seems however to go against the foundation principles of YASim and cannot thus be retained as a solution to this problem.
An alternative method would be to use mathematical formulas to apply a correction on YASim calculations. Unfortunately, mathematical analysis is not so well developed for supersonic flight as it is for subsonic flight (closed form formulas are rare because the equations are much more complex). Formulas that exist for the supersonic domain are limited to the linear flight envelope (small angles, laminar flow) and to 2D profiles, with very specific shapes (such as diamonds or arcs). The situation is even worse for transonic speeds.
This bug report is therefore submitted to suggest to YASim developers :
1. To use the Prandtl-Glauert rule for subsonic speeds (ie. below Mach 0.7/0.8 in most cases). Knowing that, altering the aerodynamic formulas in YASim will result in many YASim FDMs being broken since, as mentioned above, some aircrafts have been tweaked to incorrect values in order to compensate the absence of compressibility effects in YASim. Notice however that helicopters and low speed aircrafts should only be marginally impacted. There is also a possibility that YASim solver may no longer be able to converge when using the Prandtl-Glauert rule.
2. In any case, and until this situation is resolved, the documentation of YASim should be updated to clearly state that YASim is, at the moment, not capable of properly modelling aircrafts for flight speeds beyond Mach 0.5/0.6. And that this is due to YASim using incompressible aerodynamic formulas in its calculations.
3. Unfortunately, the method for modelling transonic and supersonic speeds is left as an open question. May be somebody with a better aerodynamic knowledge ?
This bug report is the result of a discussion on the FlightGear forums http://www.flightgear.org/forums/viewtopic.php?f=49&t=10574
View and moderate all "codetickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: zakalawe@mac.com
(No comment was entered for this change.)
Labels: FDM JSBSIM Sim
View and moderate all "codetickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: aeitsch...@yahoo.de
Relabeld to YASim
Labels: -JSBSIM YASIM
View and moderate all "codetickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: andy.ros... (code.google.com)@gmail.com
Vivian pointed me at this. Some notes:
That's basically correct. All the math in YASim is subsonic, and yes, that's wrong for transonic regimes. Though frankly I'd be surprised if this was the biggest error -- everything goes wonky there: Prandtl-Glauert is just some voodoo that happens to work fairly well for airfoils in wind tunnels.
I actually have this vague memory of trying to do something similar (adding a transonic multiplier curve on Surface forces) and giving up becuase I couldn't get the solver stable. But if someone wants to try, it's definitely not "wrong".
I do worry that this kind of thinking is a little hyperspecific. Tools to do "serious" flow analysis from first principle physics exist, people have tried to use them to do flight simulation, and frankly the output isn't any better on the whole than YASim. I'd feel more comfortable if this were accompanied by an actual measured simulation error (e.g. the top speed of aircraft X is way off and fixed by a Prandtl-Glauert correction, etc...).
View and moderate all "codetickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: anders.g... (code.google.com)@gmail.com
(No comment was entered for this change.)
Labels: Type-FeatureRequest
View and moderate all "codetickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: bcoco... (code.google.com)@gmail.com
Andy Ross said:
"All the math in YASim is subsonic, and yes, that's wrong for transonic regimes."
That's incorrect. YASim math is based on incompressible flows and is therefore in error for the higher speeds of the subsonic domain (above Mach 0.5 as stated earlier). I do worry that you do not make the distinction between incompressible and subsonic. Transonic flows are anyway out of reach for YASim because such conditions need experimental data (i.e tabulated data) to be simulated with satisfactory fidelity.
Andy Ross said :
"Prandtl-Glauert is just some voodoo that happens to work fairly well for airfoils in wind tunnels."
??? Not sure what you mean here. The mere fact that Prandtl-Glauert is in accordance with experimental data is an evidence that it is a reliable rule as long as it is used within its domain of validity. It has been used satisfactorily in many "serious" softwares such as AVL (http://web.mit.edu/drela/Public/web/avl), XFOIL (actually using Karman-Tsien which is basically a variation of PG) and DATCOM (although in a bit more sophisticated expression). Why am I under the impression that you are trying to deflate PG rule merits ? How does it help to solve the issue I have raised ?
Andy Ross said:
"(adding a transonic multiplier curve on Surface forces)"
Once again, there seems to be some confusion on your side between incompressible and subsonic flows. Forget transonic flows, there is no "one-size-fits-all" formula for them. There are as many transonic behaviours as there are wing profiles. Only experimental data can help with this situation but it is against YASim approach.
I said:
"There is also a possibility that YASim solver may no longer be able to converge when using the PG rule."
and Andy Ross said:
"and giving up because I couldn't get the solver stable."
I am not surprised given that YASim solver makes no provision to be numerically robust.
Andy Ross said:
"people have tried to use them ("serious" flow analysis tools) to do flight simulation, and frankly the output isn't any better on the whole than YASim."
Any evidence of this claim ? What were the tools that YASim was tested against ? What kind of aircrafts were tested ? How many ? In which flying conditions ? What was the reference that the results were compared against ?
Andy Ross said:
"I'd feel more comfortable if this were accompanied by an actual measured simulation error"
The p51d model in Flight Gear includes a special provision to increase drag as the altitude increases (written by Detlef Faber).
<control-input axis="/position/altitude-ft" control="FLAP1"
src0="0.0" src1="40000.0"
dst0="0.0" dst1="1.0"/>
This is an attempt to compensate the fact that YASim flight model of the P51d is not able to reproduce the published performance of the P51 at all altitudes. Either YASim gets the right top speed at high altitudes but is wrong at low altitudes or the other way around. Indeed the P51 published data show a 25% increase of its drag at max speed at 20,000 ft due to compressibility effects (ie related to the Mach number). The code above is "ad hoc" and tries to obtain the P51 measured behaviour without really reproducing the physics behind (the real effects are non linear and are based on the Mach number).
Whether the PG rule will help to completely resolve this problem, I cannot tell. But I can tell for sure that YASim calcs are wrong as soon as the compressibility noticeably affects the aerodynamic performance. The P51 model is an evidence where noticeable errors occur around Mach 0.6 (that is in the subsonic domain).
I still suggest to make YASim docs state very clearly that YASim calcs are in error as soon as compressible effects can no longer be neglected. The speed at which this occurs depends on the aircraft (for example on the sweep angle of the wings) but Mach 0.5 seems to be a reasonable upper limit under which the errors are acceptable.
View and moderate all "codetickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: hven...@astound.net
Andy Ross said:
"I'd feel more comfortable if this were accompanied by an actual measured simulation error"
bcoco...@gmail.com wrote
"The p51d model in Flight Gear includes a special provision to increase drag as the altitude increases (written by Detlef Faber).
<control-input axis="/position/altitude-ft" control="FLAP1"
src0="0.0" src1="40000.0"
dst0="0.0" dst1="1.0"/>
This is an attempt to compensate the fact that YASim flight model of the P51d is not able to reproduce the published performance of the P51 at all altitudes. Either YASim gets the right top speed at high altitudes but is wrong at low altitudes or the other way around. Indeed the P51 published data show a 25% increase of its drag at max speed at 20,000 ft due to compressibility effects (ie related to the Mach number). The code above is "ad hoc" and tries to obtain the P51 measured behaviour without really reproducing the physics behind (the real effects are non linear and are based on the Mach number)."
This is correct. The mach drag fix in the YASim mdoel is a linear fix to a problem that is actually non-linear. At best it is an approximation of actual behavior but at some points it is fairly far off from published test data for the P-51. The JSBSim version has a drag-due-to-mach function that is based on actual NACA test data and that function adds no drag until about mach 0.65 and above that point drag-due-to-mach increase exponentially.
In addition drag-due-to-mach is only one part of this issue since there are other mach related behaviors that also need to be modeled such as transonic tuck and other transonic flight artifacts. These tend to be very aircraft (airfoil) specific and there is no simple generalized way to model these that I am aware of. For example the P-51D starts to have these onset at about mach 0.75 and it has both tuck and porpoise affects above this mach number. The porpoise affects get strong enough that there is structural failure at around mach 0.84. Other WWII fighter aircraft will have compressibility onset at different (mostly lower) mach numbers and will exhibit different behaviors above the onset speed.