dkavolis / Ferram-Aerospace-Research

Aerodynamics model for Kerbal Space Program
Other
77 stars 32 forks source link

Grid fin support #20

Open alex-dev opened 5 years ago

alex-dev commented 5 years ago

Would it be possible to support grid fin? I unfortunately don't have the knowledge to implement it by myself.

dkavolis commented 5 years ago

I would need a simplified mathematical model for how the grid fins behave under different conditions, mainly Mach number, and their influence on other aerodynamic surfaces. The difficulty is in getting the transonic behaviour approximately right since the shocks will block some of the flow, whereas supersonic and subsonic are relatively much easier, simply model grid fin as a flat plate and lots of many small wings respectively.

Also, the way FAR is currently implemented is not very extendable - each aerodynamic surface has references to each other aerodynamic surface which adds tons of cyclic references. I think it could have been done better by storing the interactions in a matrix form in a vessel module instead which would make adding new types of aerodynamic surfaces much easier.

alex-dev commented 5 years ago

That may be hard. I've found many studies.. But they are all compiling data with few useable equations.

Also, the way FAR is currently implemented is not very extendable - each aerodynamic surface has references to each other aerodynamic surface which adds tons of cyclic references. I think it could have been done better by storing the interactions in a matrix form in a vessel module instead which would make adding new types of aerodynamic surfaces much easier.

That I could actually help. I may know very little about aerodynamics.. Programming, I know. I could try to redesign FAR legacy and anything else you want me to check out.

dkavolis commented 5 years ago

That may be hard. I've found many studies.. But they are all compiling data with few useable equations.

A polynomial fit would do for the behaviour or maybe even a float curve specified in the config. However, calculating interactions would be difficult.

That I could actually help. I may know very little about aerodynamics.. Programming, I know. I could try to redesign FAR legacy and anything else you want me to check out.

Before refactoring the code I would like to have some more tools to check that FAR values are the same. I'm playing around with Unity's GUI system, that would make extending the current GUI much easier and separate the logic from visualization. But before that I'm working on getting nice plots in the GUI for simulation visualizations, I like matplotlib and even minimal similar plots would be acceptable. With that, I would add a lot more simulation plots, something like Kerbal Wind Tunnel, and exporting data to files. These could work as regression tests, just to make sure physics are not broken by the new changes.

BenChung commented 5 years ago

Grid fins aerodynamics are horrible, as their dynamics is wildly mach dependent due to shock interactions between the fin elements as the fin passes through the transonic and supersonic regimes. I've been able to find one paper that proposes a theoretical model of grid fin dynamics (Aerodynamic Prediction Methodology for Grid Fins, by Kretzshmar and Burkhalter 1998 at the NATO RTO symposium for missile aerodynamics p. 168-178 of the PDF) but it's utterly horrifying and relies on several coefficients derived from direct testing.

As a result, my approach to modelling grid fins has revolved around developing a CFD model of the fins that I care about to derive the requisite coefficients, but these are nonindicative for other grid fin designs and (since they were made for Kerbal) may not be optimized.