Rodhern / Ferram-Aerospace-Research

Aerodynamics model for Kerbal Space Program
Other
2 stars 1 forks source link

Editor performance data (e.g. L/D) does not match flight scene figures. #4

Open Rodhern opened 4 years ago

Rodhern commented 4 years ago

You have probably noticed that the FAR aircraft aerodynamic analysis data displayed in the Space Plane Hangar, such as the Lift-to-Drag ratio plot and stability derivatives, will not always accurately mirror the aircraft handling and performance you experience in the flight scene.

This is nothing new, and it may even be fun when your prediction of the aircraft's aerodynamic properties is not entirely accurate and you 'have to' test fly your questionable contraption to see for sure how it flies. However, one of the points of the revised stability derivatives interpretations in Rodhern's updates is to create a stronger (more intuitive) connection between the in-editor data and the data you could obtain by test flights. In that sense it is a bit unsatisfactory when flight scene aircraft performance data does not match the data shown on the Static Analysis and Stability Derivatives tabs in the editor. Obviously, small differences are perfectly acceptable; but I find that larger differences are annoying.

In one example I saw a difference where the FAR L/D value shown in flight was maybe 20 % better than the in-editor figures. One possible explanation could be that the default skin friction coefficient used for in-editor calculations might not be representative of the flight scene skin friction coefficient for my particular example.

The default skin friction coefficient is defined here.

Maybe it is worth a try to let the default in-editor skin friction coefficient depend on factors such as speed, aircraft size and expected air density.

Rodhern commented 4 years ago

The in-editor Stability Derivatives calculations use a normalization trick that in turn explains why we settle for a default skin friction coefficient. The normalization trick, that can be seen here, really has three parts to it.

The first part of the trick is to use a nominal speed of one unit (i.e. u = 1 m/s). That is the vel.normalized part. This ensures that all scaling with respect to speed is irrelevant.

The second part is to use a fictitious default air density of two units (i.e. rho = 2 kg/m^3). This ensures that the dynamic pressure used in the calculations is exactly one unit (i.e. 1 Pa). The dynamic pressure q is q = 0.5 rho u^2. That way q also cancels from the force formulas.

Do not get confused by the multiplication by 1000. It is just to turn the result from kilonewton to newton, because ComputeForceEditor (see here) returns a result in kN.

Already these two parts tell us why we cannot estimate a non-default skin friction coefficient. The force calculations do not know about the true aircraft speed and air density, and thus have little idea of the Reynolds number.

The third part of the trick is that all wing part vel vectors in this main loop are individually normalized. Intuitively that must introduce a level of distortion to the more susceptible stability derivatives. Imagine an aircraft with winglets doing a yawing motion. We expect one winglet to speed up and one to slow down. If you normalize the velocity of each on its own then the model end up treating them as travelling the same speed. There may be grounds for further revising (interpretations of) the stability derivatives.