Polar file formats

From Silent Wings Wiki
Revision as of 22:39, 5 March 2007 by Ola (talk | contribs)
Jump to: navigation, search

A very important part of the aero model in Silent Wings is the airfoil polars. The quality of the polar files has a large impact on the way the aircraft will fly and perform in the simulator.

You will get the highest quality polars from using data from wind tunnel tests. Unfortunately, these are not often available. The second-best option is then to use calculated polars. There are several freely available programs that can do this. For the Silent Wings aircraft, these two programs have been used:

X-Foil is the most advanced program, and the most difficult to use. Used correctly it can produce quite good results.

Single file polar format

The easiest way to define a polar is to use the .polar file format. This is a single text file defining sets of polars with points for lift, drag and pitch moment as a function of angle of attack, at a fixed flap deflection. Here is an example, from a file called naca0012.polar, trimmed down for simplicity. It defines polars for 3 different flap deflections.

# Polar file for naca0012
# This is a comment
# This is another

# Polar with -20.0 degrees flap
set {
    deflection = -20.0
    p = [ -20.000 -1.2712 0.303250 0.2140 ]
    p = [ -15.000 -1.6465 0.097880 0.0669 ]
    :
    :
    p = [ -10.000 -1.7037 0.036230 0.0953 ]
    p = [ 13.000 0.5736 0.026330 0.1448 ]
    p = [ 16.000 0.9769 0.032570 0.1119 ]
    }

# Polar with 0.0 degrees flap
set {
    deflection = 0.0
    p = [ -2.000 -0.2144 0.005810 -0.0030 ]
    p = [ -1.000 -0.1075 0.005490 -0.0014 ]
    p = [ 0.000 0.0000 0.005400 0.0000 ]
    :
    :
    p = [ 6.000 0.6940 0.009730 -0.0041 ]
    p = [ 7.000 0.8267 0.010940 -0.0093 ]
    p = [ 8.000 0.9101 0.012100 -0.0040 ]
    }

# Polar with 20.0 degrees flap
set {
    deflection = 20.0
    p = [ -2.000 -0.2144 0.005810 -0.0030 ]
    p = [ -1.000 -0.1075 0.005490 -0.0014 ]
    p = [ 0.000 0.0000 0.005400 0.0000 ]
    :
    :
    p = [ 6.000 0.6940 0.009730 -0.0041 ]
    p = [ 7.000 0.8267 0.010940 -0.0093 ]
    p = [ 8.000 0.9101 0.012100 -0.0040 ]
    }

If you use X-Foil to generate the polars, you can use [xf2sw | this small tool] to auto-generate the polar file.

Multi-file polar format