Computing Aero Parameters for a new plane for CRRCsim:

A guide to AVL input files using the K2 glider as an example:


NOTE:  THIS WAS DONE WITH AVL VERSION 2.    VERSION 3 IS SLIGHTLY DIFFERENT.




The first thing to realize is that the crrcsim .air files contains two distinct parts.

The Aero parameters:


Mass 0.163156 (slug)

I_xx 0.553428 (slug-ft^2)

I_yy 0.139447 (slug-ft^2)

I_zz 0.688787 (slug-ft^2)

I_xz 0.919712E-02 (slug-ft^2)

C_ref 0.666667 reference chord (ft)

B_ref 10.4167 reference span (ft)

S_ref 6.94444 reference area (ft^2)

U_ref 19.6850 CD reference speed (ft/s)

Alpha_0 0.174533E-01 baseline alpha_0 (rad)

Cm_0 -0.527352E-02 baseline Cm_0 at alpha_0

CL_0 0.364570 baseline CL_0 at alpha_0

CL_max 1.10000 upper stall limit CL

CL_min -0.600000 lower stall limit CL

CD_prof 0.220000E-01 profile CD

Uexp_CD -0.500000 CD Re-scaling exponent

CL_a 5.74825 lift slope

Cm_a -1.03352 pitch stability

CY_b -0.177180 sideforce due to sideslip

Cl_b -0.124373 roll due to sideslip

Cn_b 0.321649E-01 yaw stability

CL_q 8.56521 lift due to pitch rate

Cm_q -16.7705 pitch damping

CY_p -0.185460 sideforce due to roll rate

Cl_p -0.630555 roll damping

Cn_p -0.439536E-01 yaw due to roll rate

CY_r 0.120094 sideforce due to yaw rate

Cl_r 0.935016E-01 roll due to yaw rate

Cn_r -0.250904E-01 yaw damping

CL_de 0.238910 lift due to elevator

Cm_de -0.993370 pitch due to elevator

CY_dr 0.132650 sideforce due to rudder

Cl_dr 0.133121E-01 roll due to rudder

Cn_dr -0.381016E-01 yaw due to rudder

CY_da 0.770700E-01 sideforce due to aileron

Cl_da 0.240002 roll due to aileron

Cn_da -0.436442E-03 yaw due to aileron

span_eff 0.95 effective span

CL_CD0 0.0 set to as high as 0.30 for slow sections

CD_CLsq 0.01 deformation drag, as high as 0.02

CD_AIsq 0.0 drag due to aileron deflection

CD_ELsq 0.0 drag due to elevon deflection

eta_loc 0.30 eta_loc for stall model

CG_arm 0.5 CG_arm for stall model

CL_drop 0.0 CL drop during stall break

max_thrust 4.0 One pound max thrust

initial_altitude 0.174 Starting altitude of airplane in feet

initial_theta -1.47 Starting pitch of airplane in degrees

CD_stall 0.05 CD during stall

and the Graphics parameters:

gear 13 Wheels and hard points on the airplane

locations Locations of wheels/hard points relative to CG

-0.3714 5.1666 -0.4525

-0.5797 5.1666 -0.4525

-0.3714 -5.1666 -0.4525

-0.5797 -5.1666 -0.4525

And so on...

There is no interaction between the two parts. In other words, the way that a plane looks has no effect on the way it files. If you study the graphics parameters I think you will get a general idea how they work. Basically you have the option of defining triangles, spheres, extrusions and so on... If you study the aero parameters you will still be lost. Trust me. That stuff comes from Mark and he is a freakin' genius.



He would have a hard time explaining it to you because it's like explaining quantum electrodynamics to your grandmother. So let me break it down for you in my simplistic view:



Step 1: To determine how a plane will fly, you need to know two major things: The shape of the plane, and the mass distribution of the plane. In other words, the shape tells you how big are the wings, the ailerons, the deflections of the surfaces, etc are... and the mass distribution tells you where the weight is, ie, how heavy is the wing, is the weight near the CG, or is it out near the extremities. The weight distribution changes how the plane responds to forces, ie surface deflections. A plane with a lot of weight near the wing tips will roll more slowly than one with light wingtips for the same surface deflection.

Defining the K2 Mass distribution:

Basically we need to compute the moments of inertia of the airplane along the three major axes. To do this we specify where the bits of the plane are located relative to the CG and then send it to me and I'll run Mark's coef program to compute the moments. Here is the input file:

#

# K2 3-meter glider

# Mass & Inertia breakdown

#

# xyz is location of item's own CG

# Ixx.. are item's inertias about item's own CG

#

# x back

# y right

# z up

#

# x,y,z system here must have origin

# at same location as AVL input file

#

Lunit = in

Munit = oz

#

# mass x y z Ixx Iyy Izz Ixz

#

0.5 -4.0 0. -1. 0. 0. 0. 0. ! Receiver

1.0 -6.0 0. -1. 0. 0. 0. 0. ! servos

4.5 -9.0 0. -1. 0. 0. 0. 0. ! battery

1.25 -5.0 0. -1. 0. 0. 0. 0. ! nosecone

1.25 -10.0 0. -1. 0. 0. 0. 0. ! nosecone

6.5 -12.0 0. -1. 0. 0. 0. 0. ! ballast

1.8 38.75 4.38 3.09 0. 0. 0. 0. ! vtail

1.8 38.75 -4.38 3.09 0. 0. 0. 0. ! vtail

3.238 -10.0 0. -1. 0. 0. 0. 0. ! fuse

3.238 -5.0 0. -1. 0. 0. 0. 0. ! fuse

3.238 0.0 0. -1. 0. 0. 0. 0. ! fuse

3.238 11.0 0. -1. 0. 0. 0. 0. ! fuse

3.238 25.0 0. -1. 0. 0. 0. 0. ! fuse

0.75 5.0 12. -0.5 0. 0. 0. 0. ! servo

0.75 5.0 -12. -0.5 0. 0. 0. 0. ! servo

0.75 5.0 35. 0.75 0. 0. 0. 0. ! servo

0.75 5.0 -35. 0.75 0. 0. 0. 0. ! servo

1.1 4.0 24. 1.25 0. 0. 0. 0. ! joiner

1.1 4.0 -24. 1.25 0. 0. 0. 0. ! joiner

3.92 2.0 0. 0. 0. 0. 0. 0. ! wingcenter

3.92 8.0 0. 0. 0. 0. 0. 0. ! wingcenter

3.92 2.0 18. 1. 0. 0. 0. 0. ! wingcenter

3.92 8.0 18. 1. 0. 0. 0. 0. ! wingcenter

3.92 2.0 -18. 1. 0. 0. 0. 0. ! wingcenter

3.92 8.0 -18. 1. 0. 0. 0. 0. ! wingcenter

1.708 3.0 28. 1.3 0. 0. 0. 0. ! wingtip

1.708 9.0 28. 1.3 0. 0. 0. 0. ! wingtip

1.708 3.0 -28. 1.3 0. 0. 0. 0. ! wingtip

1.708 9.0 -28. 1.3 0. 0. 0. 0. ! wingtip

1.708 4.0 38. 1.925 0. 0. 0. 0. ! wingtip

1.708 8.0 38. 1.925 0. 0. 0. 0. ! wingtip

1.708 4.0 -38. 1.925 0. 0. 0. 0. ! wingtip

1.708 8.0 -38. 1.925 0. 0. 0. 0. ! wingtip

0.854 4.25 46. 2.4 0. 0. 0. 0. ! wingtip

0.854 5.75 46. 2.4 0. 0. 0. 0. ! wingtip

0.854 4.25 -46. 2.4 0. 0. 0. 0. ! wingtip

0.854 5.75 -46. 2.4 0. 0. 0. 0. ! wingtip

0.854 5.0 54. 2.8 0. 0. 0. 0. ! wingtip

0.854 7.0 54. 2.8 0. 0. 0. 0. ! wingtip

0.854 5.0 -54. 2.8 0. 0. 0. 0. ! wingtip

0.854 7.0 -54. 2.8 0. 0. 0. 0. ! wingtip




Notice each line has a mass of the object, and the location of the object in a coordinate system where the CG is at 0,0,0 and the x axis is pointing to the tail, the y axis is pointing out the right wing, and the z-axis is pointing up. Each object can also have an moment associated with it, but generally I keep the last three numbers at 0 and simply break the plane down into small enough pieces that they can be treated as point masses.



Defining the K2 Shape

Ok, the easy part is done. Now we need to define the shape of the plane. In a perfect world we would use the same system as the graphics part of the CRRCsim file, but that would make your life too easy, so we can't do that. That's right, you guessed it, we need to define the shape of the plane in a completely new file format. Here's what it looks like for the K2 glider:



Jose's Custom K2 3M SAILPLANE

0.0 Mach

0 0 0.0 iYsym iZsym Zsym

#

1000.0 8.0 125 Sref Cref Bref reference area, chord, span

3.75 0.0 0.0 Xref Yref Zref moment reference location

#

#

#==============================================================

SURFACE

Wing

5 1.0 Nchord Cspace

#

YDUPLICATE

0.00000 reflect image wing about y=0 plane

#

ANGLE

1.00000 twist angle bias for whole surface

#

#--------------------------------------------------------------

SECTION

# XLE YLE ZLE chord angle

0.00000 0.00000 0.00000 7.625 0.000 7 -2.0

AFIL 0.0 0.8026

mh32.dat

#

SECTION

# XLE YLE ZLE chord angle

0.250 24.0 1.25 7.375 0.000 9 1.0

AFIL 0.0 0.797

mh32.dat

SECTION

# XLE YLE ZLE chord angle

2.75 50.0 4.106 5.18 0.00 5 1.0

AFIL 0.0 0.767

mh32.dat

#

SECTION

# XLE YLE ZLE chord angle

4.25 56.0 4.7728 3.75 0.0 5 1.0

AFIL 0.0 0.7142

mh32.dat

#

SECTION

# XLE YLE ZLE chord angle

5.75 62.0 5.4248 2.8568 0.0 0 0

AFIL 0.0 0.7142

mh32.dat

#

#==============================================================

SURFACE

Flap

4 1.0

YDUPLICATE

0.0

ANGLE

1.0

CONTROL

1

F 45.0

#--------------------------------------------------------------

SECTION

# XLE YLE ZLE chord angle

7.6250000 0.00000 0.00000 1.875 0.000 7 -2.0

AFIL 0.763 1.0

mh32.dat

#

SECTION

# XLE YLE ZLE chord angle

7.6250 24.0 1.25 1.875 0.000 7 -2.0

AFIL 0.7567 1.0

MH32.dat

#

#==============================================================

SURFACE

Aileron

4 1.0

YDUPLICATE

0.0

ANGLE

1.0

CONTROL

1

A -32.76

SECTION

# XLE YLE ZLE chord angle

7.625 24.0 1.25 1.875 0.0 9 1.0

AFIL 0.797 1.0

mh32.dat

#

SECTION

# XLE YLE ZLE chord angle

7.93 50.0 4.106 1.57 0.00 5 1.0

AFIL 0.767 1.0

mh32.dat

#

SECTION

# XLE YLE ZLE chord angle

8.0 56.0 4.7728 1.5 0.0 5 1.0

AFIL 0.6744 1.0

mh32.dat

##

##==============================================================

SURFACE

Dummy outer aileron

4 1.0

YDUPLICATE

0.0

ANGLE

1.0

SECTION

# XLE YLE ZLE chord angle

8.0 56.0 4.7728 1.5 0.0 5 1.0

AFIL 0.7142 1.0

mh32.dat

#

SECTION

# XLE YLE ZLE chord angle

8.428 62.0 5.4248 1.1432 0.00 0 0

AFIL 0.7142 1.0

mh32.dat

#

#==============================================================

SURFACE

Right tail

5 1.0 Nchord Cspace

#

YDUPLICATE

0.00000

#

ANGLE

0.0000

#

TRANSLATE

# deltaX deltaY deltaZ

36.75000 0.00000 0.0000 position bias for whole surface

#

#--------------------------------------------------------------

SECTION

0.00000 0.00000 0.00000 3.75 0.000 7 1.0

SECTION

1.50 11.97 9.02700 2.5 0.000 1 0

#

#

#==============================================================

SURFACE

Right ruddervator

5 1.0 Nchord Cspace

#

YDUPLICATE

0.00000

#

ANGLE

0.0000

#

TRANSLATE

# deltaX deltaY deltaZ

36.750000 0.00000 0.0000 position bias for whole surface

#

CONTROL

2

E 37.68 unit elevator command gives 25 degrees of tail rotation

R -42.9

#--------------------------------------------------------------

SECTION

3.75000 0.00000 0.00000 1.5 0.000 7 1.0

SECTION

4.00 11.97 9.027 1.25 0.000 1 0




Mark describes the AVL system in this document: avl.doc

Let me spare you some reading and cut to the chase:

We only need to define the wing and the tail. AVL doesn't handle fuselage aerodynamics at this point in time, although Mark is working on it in his “spare” time. So let's look at the file line by line:

Jose's Custom K2 3M SAILPLANE

0.0 Mach

0 0 0.0 iYsym iZsym Zsym

#

1000.0 8.0 125 Sref Cref Bref reference area, chord, span

3.75 0.0 0.0 Xref Yref Zref moment reference location

#

#

#==============================================================



The first line can be anything you want. In this case, we were trying to simulate my friend Jose's K2 (also jokingly known as the K-9, get it... it's a dog, which incidentally was totaled two years ago on an aggressive winch launch that tip stalled and sent the plane to its death, but I digress).



The second line tells AVL that Jose's plane will be flying at Mach 0.0. If you are planning on Dynamic Soaring you might consider playing with this number, just kidding.



The third line allows you to tell AVL if the plane is a mirror image about any of the three axes. This can make it easier to specify the shape of the plane. In this case, we will not take advantage of this capability, so setting each to zero tells AVL not to do any automatic mirroring of the plane shape.



The fourth line defines the basic size of the wing. The K2 has 1000 square inches of wing area and a 125 inch span. That works out to an average chord of 8 inches.

The fifth line defines the position of the CG in 3-D coordinates where 0,0,0 is center of the wing at the leading edge. In this case, the K2 will be flying with a CG 3.75 inches back from the leading edge of the wing.

Now we define the wing shape:

#==============================================================

SURFACE

Wing

5 1.0 Nchord Cspace

#

YDUPLICATE

0.00000 reflect image wing about y=0 plane

#

ANGLE

1.00000 twist angle bias for whole surface

#

#--------------------------------------------------------------

SECTION

# XLE YLE ZLE chord angle

0.00000 0.00000 0.00000 7.625 0.000 7 -2.0

AFIL 0.0 0.8026

mh32.dat

#

SECTION

# XLE YLE ZLE chord angle

0.250 24.0 1.25 7.375 0.000 9 1.0

AFIL 0.0 0.797

mh32.dat

SECTION

# XLE YLE ZLE chord angle

2.75 50.0 4.106 5.18 0.00 5 1.0

AFIL 0.0 0.767

mh32.dat

#

SECTION

# XLE YLE ZLE chord angle

4.25 56.0 4.7728 3.75 0.0 5 1.0

AFIL 0.0 0.7142

mh32.dat

#

SECTION

# XLE YLE ZLE chord angle

5.75 62.0 5.4248 2.8568 0.0 0 0

AFIL 0.0 0.7142

mh32.dat

#

#==============================================================



Here we want define five points along the leading edge of the wing. The first is at 0,0,0, and the rest go out and up to reflect the swept back leading edge and the upward dihedral angle. YDUPLICATE is used to make an identical opposite wing. Notice that the wing chord is getting shorter as we go out to the tip, but this chord does not include the flap or aileron. We will be adding this next. The airfoil is specified as the MH32, but notice that the AFIL statement tells AVL to only use the first 80.26% of the mh32 for the first section, 79.6% of the section for the next section, and so on. The rest will be defined as a flap, or aileron. In this case there is no twist in the wing, so all the angle parameters are set to 0. The other two numbers are of less concern to you. Just ignore them and I'll fix them when you send me your file, or read the avl.doc file if you really need to know. OK, the wing is done. Now we must add the flaps and ailerons:



#==============================================================

SURFACE

Flap

4 1.0

YDUPLICATE

0.0

ANGLE

1.0

CONTROL

1

F 45.0

#--------------------------------------------------------------

SECTION

# XLE YLE ZLE chord angle

7.6250000 0.00000 0.00000 1.875 0.000 7 -2.0

AFIL 0.763 1.0

mh32.dat

#

SECTION

# XLE YLE ZLE chord angle

7.6250 24.0 1.25 1.875 0.000 7 -2.0

AFIL 0.7567 1.0

MH32.dat

#

#==============================================================

SURFACE

Aileron

4 1.0

YDUPLICATE

0.0

ANGLE

1.0

CONTROL

1

A -32.76

SECTION

# XLE YLE ZLE chord angle

7.625 24.0 1.25 1.875 0.0 9 1.0

AFIL 0.797 1.0

mh32.dat

#

SECTION

# XLE YLE ZLE chord angle

7.93 50.0 4.106 1.57 0.00 5 1.0

AFIL 0.767 1.0

mh32.dat

#

SECTION

# XLE YLE ZLE chord angle

8.0 56.0 4.7728 1.5 0.0 5 1.0

AFIL 0.6744 1.0

mh32.dat

##

##==============================================================

SURFACE

Dummy outer aileron

4 1.0

YDUPLICATE

0.0

ANGLE

1.0

SECTION

# XLE YLE ZLE chord angle

8.0 56.0 4.7728 1.5 0.0 5 1.0

AFIL 0.7142 1.0

mh32.dat

#

SECTION

# XLE YLE ZLE chord angle

8.428 62.0 5.4248 1.1432 0.00 0 0

AFIL 0.7142 1.0

mh32.dat

#



The FLAP and aileron definitions follow the same general rule. Notice how the AFIL statement is used to only use the last part of the MH32.dat file in this case. The only new thing here is the addition of the CONTROL statement to define how many degrees the surface should move. In the case of the K2 glider, the aileron does not extend all the way to the tip, therefore we add a small dummy outer aileron with no CONTROL. Also note that the aileron and flap must have the same chord locations as the previously defined wing, and the two magic numbers at the end must also be the same.



We're almost done! Now we need to add the tail. Rudders and elevators are defined in the same way as wings and ailerons, only the CONTROL statement differs.



#==============================================================

SURFACE

Right tail

5 1.0 Nchord Cspace

#

YDUPLICATE

0.00000

#

ANGLE

0.0000

#

TRANSLATE

# deltaX deltaY deltaZ

36.75000 0.00000 0.0000 position bias for whole surface

#

#--------------------------------------------------------------

SECTION

0.00000 0.00000 0.00000 3.75 0.000 7 1.0

SECTION

1.50 11.97 9.02700 2.5 0.000 1 0

#

#

#==============================================================

SURFACE

Right ruddervator

5 1.0 Nchord Cspace

#

YDUPLICATE

0.00000

#

ANGLE

0.0000

#

TRANSLATE

# deltaX deltaY deltaZ

36.750000 0.00000 0.0000 position bias for whole surface

#

CONTROL

2

E 37.68 unit elevator command gives 25 degrees of tail rotation

R -42.9

#--------------------------------------------------------------

SECTION

3.75000 0.00000 0.00000 1.5 0.000 7 1.0

SECTION

4.00 11.97 9.027 1.25 0.000 1 0




The only tricky thing here is that we define the CONTROL statement to respond to both rudder and elevator. This is how the mixing required for a v-tail is accomplished. We also introduce the TRANSLATE statement to move the tail to the back of the tail boom where it belongs. THAT'S IT! Once you have these files and are triple sure that they are correct, send them to me and I'll run them through the program and send you the aero portion of the .air file. GOOD LUCK, and please read the avl.doc for more details if you have any questions.

Here are the K2 files for your convenience:

k2.avl

k2.mass

-Jan