Aero.dat

From Silent Wings Wiki
Revision as of 10:30, 6 March 2007 by Ola (talk | contribs)
Jump to: navigation, search

The aero.dat configuration file describes the aerodynamic properties of the flight model. Currently, Silent Wings has two different aerodynamic models to choose from: The "panel model" and the "linear" model.

For all player-controlled aircraft the panel model is recommended. This way of modelling has become quite popular in flight simulators, and is also sometimes called "Blade Element Theory" which is a method commonly used to simulate propellers. Silent Wings uses an extended Blade Element Theory on the propeller model, whereas the Panel Model is modified even more to be suited for a fixed-wing aircraft, even with low aspect ratio wings.

The linear model is implemented for use on autopilot controlled aircraft such as the towplane, and will only behave realistic at a small speed range. See the end of this article for a brief description of the linear model file format.

The Silent Wings panel model describes the geometrical design of the aircraft that is to be simulated. By manually dividing an aircraft into segments, or "panels", the flight dynamics code can calculate the forces that act on the aircraft and let it fly. The panel model works with two different panels: wingpanels and fuselage panels. The Wing panels are used to describe the wings and fins on the aircraft. Every wing panel needs an airfoil to do the aerodynamic definition, so these airfoils need to be defined as well.

The airfoils can be shared between panels of the same wing, and are therefor defined before the wing panels. You must define one airfoil for each wing (or fin), also when they all would use the same airfoil, because the airfoil is defined with 3-dimensional properties (aspect ratio of wing, etc). You may, however, use several airfoils for a single wing, if you like.

Example file

This is an example aero.dat file, taken from the SG38 model. It shows how to quicly create a usable aero model. Below, all options are described. For a more advanced aero.dat example, take a look at the Antares 20E aero model.

# SG38 Panelmodel data file 
# Part of Silent Wings
# Ola Røer Thorsen 25.10.2004

# General things
plane_name		= SG 38
plane_description	= Schulgleiter

# Airfoil data. Note: these are "finite wing airfoils", not
# 2-dimensional data.

airfoil {
   name	= mainwing
   profile	= goe533
   k		= 1.2
   aspectratio	= 6.5
   meanchord	= 1.5
   cd_adjust   = 0.0
}

airfoil {
   name	= elevator
   profile	= naca0012f60
   k		= 1.2
   aspectratio	= 3.1
   meanchord	= 1.0
   cd_adjust   = 0.0
}

airfoil {
   name	= rudder
   profile	= naca0012f60
   k           = 1.2
   aspectratio = 1.1
   meanchord   = 1.2
   cd_adjust   = 0.0
}

# The panels

wingpanel {
name		= left wing tip
airfoil	= mainwing
area		= 3.1
meanchord	= 1.5
position	= [ 0.0 -4.15 -0.5 ]
alpha		= 0.0
dihedral	= 0.0
delta_max	= 25.0
delta_min	= -25.0
delta_neutral	= 0.0
aileron_mix	= 1.0
aileron_delta	= 30.0
aileron_diff   = 1.5
}

wingpanel {
name		= left wing root
dep_panels	= [ "left wing tip" ]
airfoil	= mainwing
#area		= 4.5
area		= 5.0
meanchord	= 1.5
position	= [ 0.0 -1.5 -0.5 ]
alpha		= 0.0
dihedral	= 0.0
}

wingpanel {
name		= right wing tip
airfoil	= mainwing
area		= 3.1
meanchord	= 1.5
position	= [ 0.0 4.15 -0.5 ]
alpha		= 0.0
dihedral	= 0.0
delta_max	= 25.0
delta_min	= -25.0
delta_neutral	= 0.0
aileron_mix	= -1.0
aileron_delta	= 30.0
aileron_diff    = 1.5
}

wingpanel {
name		= right wing root
dep_panels	= [ "right wing tip" ]
airfoil	= mainwing
area		= 5.0
meanchord	= 1.5
position	= [ 0.0 1.5 -0.5 ]
alpha		= 0.0
dihedral	= -3.0
}

wingpanel {
name		= elevator
airfoil	= elevator
area		= 3.1
meanchord	= 1.0
position	= [ -3.5 0.0 -0.6 ]
alpha 		= -3.0
dihedral	= 0.0
delta_max	= 25.0
delta_min	= -25.0
delta_neutral	= 0.0
elevator_mix	= 1.0
}

wingpanel {
name		= rudder
dep_panels     = [ elevator ]
airfoil	= rudder
area		= 1.5
meanchord	= 1.2
position	= [ -3.5 0.0 -0.6 ]
alpha		= 0.0
dihedral	= 90.0
delta_max	= 30.0
delta_min	= -25.0
delta_neutral  = 0.0
rudder_mix	= 1.0
broken_drag    = 0.3
}

fuselage {
name		= fuselage
position	= [ 0.0 0.0 0.0 ]
ref_area	= 12.53
ref_volume	= 1.0
cd_front	= sg38
cd_side	= 0.05
cd_top	        = 0.05
k_y		= 0.0
k_z		= 0.0
alpha_fuselage = 0.0
}

Airfoils

An airfoil is defined like this:

airfoil 
{ 
   name = xxx 
   profile = xx 
   ... 
} 

The variables to be defined are:

name = <string> 

The name of the airfoil. This can be called whatever you like, and is the name to be used in the wing panels.

profile = <name> 

There are two airfoil file formats available. The <name> specifies the file name without the extension (.polar or .cl/.cd/.cm). The polar files are to be put in the Silent Wings/data/airfoils directory.

k = <float> 

The "k" factor defines the induced drag finesse of the wing. A setting of 1.0 gives the optimum, planar wing with elliptical lift distribution. So any other planar wing will have a value higher than 1.0.

Wings with winglets may get values lower than 1.0. The best wings currently available (Antares) have a k factor of 0.95.

aspectratio = <float> 

The aspect ratio of the wing that will use this airfoil.

meanchord = <float> 

The mean chord of the wing that will use this airfoil

cl_adjust = <float> 

This factor can be used to fine-tune the lift curve. The variable is multiplied with the lift from the lift polar. Leave this to 1.0 when you start up, and use it as a last resort when fine tuning your model.

cd_adjust = <float> 

This factor can be used to fine-tune the drag curve. The variable is added to the drag polar. Use with caution.


Wing panel

A wingpanel is defined with "wingpanel" followed by brackets containing the wing panel variables, one variable per line.

wingpanel 
{ 
   name = xxx 
   area = xxx 
   ... 
} 

A wing can be defined with one or several panels. For elevator and rudder surfaces, one panel is mostly sufficient. A main wing should have at least 4 panels in total (two left, two right).

When not defined, variables default to zero. That means, if certain things are not to be used on the wing panel (such as a spoiler), the variables do not have to be set.

Please see the example illustration of the Ventus aero model to get a picture of how the panels are defined.

Variable descriptions:

General data:

name = <text string>

Wing panel name

airfoil = <text string> 

The airfoil to use. The name to use is the same as defined in one of the airfoil sections.

position = [ x.x y.y z.z ] 

The panel position coordinate. See the illustration on how to define this point.

area = <float> 

Wing panel area

meanchord = <float> 

The mean chord of the wing panel (not the wing!)

alpha = <float> 

The panel's angle of incident.

dihedral = <float> 

The panel's dihedral angle.

sweep = <float> 

The panel's sweep angle.

propwash = 0.0 to 1.0 

If the panel is positioned behind a propeller, you can set this value higher than 0.0 to have a propwash effect on the panel. This will for example allow for rudder and elevator authority when standing still on the Antares model.

Control surface variables:

The control system of Silent Wings is quite flexible, and can handle more exotic designs like canards, v-tails and flying wings. You can add all the controllers to have an effect on every panel in different ways. If the panel has no controls, these entries need not be defined.

delta_max = <float> 

The flap's maximum (positive) deflection angle, in degrees.

delta_min = <float> 

The flap's minimum (negative) deflection angle, in degrees.

delta_neutral = <float> 

The flap's position when the controls are centered

aileron_mix = -1.0 to 1.0 

The amount of aileron control that is to be applied to the flap. For the left wing, normally 1.0 is used, for the right wing -1.0. For less effect use smaller numbers. For no aileron control set to 0.0 or leave it out.

aileron_delta = <float> 

The maximum difference in deflection between the left and right aileron. For example, if with fully deflected ailerons the left one is at +10 and the right one at -10, this value should be set to 20.0.

aileron_diff = <float> 

Aileron differential. This factor will define how much more the up-going (negative) aileron will go up compared with the down-going one (positive). The value 1.0 (default) means equal deflection in both directions. A setting of 2.0 means the up-going aileron will do twice as much deflection as the down-going aileron. This is common on sailplanes as it reduces the adverse yaw effect of the ailerons.

flap_pos = <float> 

If the panel has flap control, set the most positive flap setting in degrees here.

flap_neg = <float> 

If the panel has flap control, set the most negative flap position in degrees here.

elevator_mix = -1.0 to 1.0 

The amount of elevator control that is to be applied to the flap.

rudder_mix = -1.0 to 1.0 

The amount of rudder control that is to be applied to the flap.

throttle_mix = -1.0 to 1.0 

The amount of throttle control that is to be applied to the flap (this is rather uncommon, so it will mostly be left out. It can be used to compensate or emulate some throttle effects)

Spoiler/airbrake variables:

If the panel has no controls, these entries need not be defined.

brake_on = 0 or 1 

Set this variable to 1 to enable the spoiler/airbrake

brake_surface = <float>

The surface frontal surface of the fully extended brake.

brake_liftdest = <float> 

The amount of lift coefficient reduction with a fully extended brake. This is normally around 1.0, but must be experimented with.

brake_cd = <float> 

The drag coefficient of the fully extended brake.

brake_superp = 0 or 1 

Setting this to 1 enables superpositional mode. With this a brake can be added upon a wing and will have an effect on the lift and drag from the other wing panels only when the brake controller is on. When set to zero the wing panel is just a normal wing panel, that also has an airbrake/spoiler attached. Which to use depends on how the panelling of the wing is chosen.


Fuselage panel

The fuselage panel is a model of an aircraft fuselage. Its largest effect is to add drag to the aero model.

It is defined as

fuselage 
{ 
   name = xxx 
   position = xxx 
   ... 
}

Variable description:

name = <string> 

Panel name

position = [ x.x y.y z.z ] 

The panel position. This is the position where the drag force is applied, and does influence flight mechanics of your model, especially in spins. Start out by positioning this near to your model's centre of gravity.

ref_area = <float> 

Reference frontal area of the fuselage

ref_volume = <float> 

Reference volume of the fuselage. In most cases, this can be set to 1.0.

cd_front = frontal_drag_filenamename (but without the .cd extension) 

The frontal drag is defined in a name.cd file that is placed in the airfoils directory. Use this file to finetune your model's glide polar.

cd_side = <float> 

Sidewards drag coefficient

cd_top = <float> 

Top/bottom drag coefficient

k_y = 0.0 to 1.0 
k_z = 0.0 to 1.0 

These two factors set the magnitude of instability of the fuselage. Try something like 0.1 first. A larger value means more instability.

alpha_fuselage = <float> 

The fuselage's angle of incidence. Normally 0.0.

cd_landinggear = <float> 

The drag of an extended landing gear.


Linear aero model

Here are a sample aero.dat file when the linear aero model is used:

#-----------
# Main wing
#-----------
wing_area               = 17.0
wing_span               = 12.0
mean_chord              = 1.5
k_factor                = 1.5

#------------------
# Control surfaces
#------------------
aileron_limits          = [ -23.0 20.0 ]
elevator_limits         = [ -23.0 28.0 ]
rudder_limits           = [ -16.0 16.0 ]

flap_min                = 0.0
flap_max                = 1.0
flap_eff                = 0.2

#--------------------------
# Aerodynamic coefficients
# --------------------------
c_lift_0                = 0.410
c_lift_a                = 5.143
c_lift_elev             = 0.340
c_drag_0                = 0.08
c_drag_i                = 0.08
c_side_beta             = -0.31
c_side_rudder           = 0.25
c_yaw_beta              = 0.165
c _yaw_rudder            = -0.25
c_yaw_aileron           = 0.0
c_yaw_roll_rate         = 0.0
yaw_damping             = -0.099
c_pitch_0               = 0.02
c_pitch_a               = -0.8
c_pitch_elev            = -0.7
c_pitch_dot_a           = 0
pitch_damping           = -12.4
c_roll                  = 0.178
roll_damping            = -0.47

Here, a conventional coefficient based model is used to simulate the aircraft. If you have experience with such models you might recongnise the parameters and what they do.