Howto:Make a helicopter

From FlightGear wiki
Jump to: navigation, search

This howto learns you how to model a helicopter and how to make it fly.

Model

In this howto we model with SketchUp, a free modeling tool from Google. Download it at http://sketchup.google.com.

What we need:

  • Plans: for the helicopter you want to model, side views, top views, bottom views; as many different views as you can find.
  • Photos: as many as you can find of different angles to.
  • Measurements: if you do a search of the heli in google you can find lots of essential measurements such as length, breadth, height, rotor thickness, angles etc. You will need all this and possibly a little more.
Ah-64a-3-view-m.gif

Now we import a top plan of the helicopter into SkecthUp as an image and drawing over the top to create the tough shape of the body. Then it is a case of fine tuning it over a period of days/weeks/months. Keep in mind that your model will get heavier the more lines it has. So you need to choose between extreme quality or a small file, or pick something between that.

Group the fuselage together and create a separate file for each part. The rotors in a separate file, cockpit etc. Then, as you get some semblance of order, you can start pasting in place and it starts to look something. There is no hard and fast rule, no easy way around and no substitute for hours.

Use all the different face views in SketchUp, such as wireframe and X-ray so you can see everything you are doing. Keep checking if the faces are aligned; with the white face outside and purple inside (or that face will not be shown in flightgear). You could check this by going into View > Face style > Monochrome in Sketchup. If a face is placed with purple side outside reverse it with Right Mouseclick > Reverse faces.

If you are using the free version of SkecthUp you need Blender to convert the .skp file that SkecthUp creates to the .ac file that FlightGear uses. See Modeling - SketchUp for a tutorial about that.

Place the .ac and texture files in FlightGear/data/aircraft/your_heli/Models/.

Flight Dynamics Model (YASim)

In addition to the general XML elements, described on the YASim wiki, the following elements are used to specify the helicopter rotors/engine.

XML Elements

(Below element descriptions are from README.yasim[1], edited formatting, added image, image hint and references.)

rotor

Rotor blade dimensions.

A rotor. Used for simulating helicopters. You can have one, two or even more.
There is a drawing of a rotor in the Doc-directory (README.yasim.rotor.png) (Hint: See the image on the right.) Please find the measures from this drawing for several parameters in square brackets [].
If you specify a rotor, you do not need to specify a wing or hstab, the settings for approach and cruise will be ignored then. You have to specify the solver results manually. See below.
The rotor generates downwash acting on all stabs, surfaces and fuselages. For all fuselages in the rotor downwash you should specify idrag="0" to get realistic results.

  • name: The name of the rotor.
    (some data is stored at /rotors/name/)
    The rpm, cone angle, yaw angle and roll angle are stored for the complete rotor. For every blade the position angle, the flap angle and the incidence angle are stored. All angles are in degree, positive values always mean "up". This is not completely tested, but seem to work at least for rotors rotating counterclockwise.
    A value stall gives the fraction of the rotor in stall (weighted by the fraction the have on lift and drag without stall). Use this for modifying the rotor-sound.
  • x,y,z: The position of the rotor center
  • nx,ny,nz: The normal of the rotor (pointing upwards, will be normalized by the computer)
  • fx,fy,fz: A Vector pointing forward, if not perpendicular to the normal it will be corrected by the computer
  • diameter: The diameter in meter [D]
  • numblades: The number of blades
  • weightperblade: The weight per blade in pounds
  • relbladecenter: The relative center of gravity of the blade. Maybe not 100% correct interpreted; use 0.5 for the start and change in small steps [b/R]
  • chord: The chord of the blade its base, along the X axis (not normal to the leading edge, as it is sometimes defined). [c]
  • twist: The difference between the incidence angle at the blade root and the incidence angle at the wing tip. Typically, this is a negative number so that the rotor tips have a lower angle of attack.
  • taper: The taper fraction, expressed as the tip chord divided by the root chord. A taper of one is a bar blade, and zero would be a blade ending at a point.
    Defaults to one. [d/c]
  • rel-len-where-incidence-is-measured: If the blade is twisted, you need a point where to measure the incidence angle. Zero means at the base, 1 means at the tip. Typically it should be something near 0.7
  • rel-len-blade-start: Typically the blade is not mounted in the center of the rotor [a/R]
  • rpm: rounds per minute.
  • phi0: initial position of this rotor
  • ccw: determines if the rotor rotates clockwise (="0") or counterclockwise (="1"), (if you look on the top of the normal, so the bo105 has counterclockwise rotor). "true" and "false" are not any longer supported to increase my lifespan. ;-)
  • maxcollective: The maximum of the collective incidence in degree
  • mincollective: The minimum of the collective incidence in degree
  • maxcyclicele: The maximum of the cyclic incidence in degree for the elevator like function
  • mincyclicele: The minimum of the cyclic incidence in degree for the elevator like function
  • maxcyclicail: The maximum of the cyclic incidence in degree for the aileron like function
  • mincyclicail: The minimum of the cyclic incidence in degree for the aileron like function
  • airfoil-incidence-no-lift: non symmetric airfoils produces lift with no incidence.
    This is is the incidence, where the airfoil is producing no lift. Zero for symmetrical airfoils (default)
  • incidence-stall-zero-speed:
  • incidence-stall-half-sonic-speed: the stall incidence is a function of the speed.
    I found some measured data, where this is linear over a wide range of speed. Of course the linear region ends at higher speeds than zero, but just extrapolate the linear behavior to zero.
  • lift-factor-stall: In stall airfoils produce less lift.
    Without stall the c-lift of the profile is assumed to be sin(incidence-"airfoil-incidence-no-lift")*liftcoef;
    And in stall:
    sin(2*(incidence-"airfoil-incidence-no-lift"))*liftcoef*"lift-factor-stall";
    Therefore this factor is not the quotient between lift with and without stall.
    Use 0.28 if you have no idea.
  • drag-factor-stall: The drag of an airfoil in stall is larger than without stall.
    Without stall c-drag is assumed to be abs(sin(incidence-"airfoil-incidence-no-lift"))*dragcoef1+dragcoef0);
    With stall this is multiplied by drag-factor
  • stall-change-over: For incidence<"incidence-stall" there is no stall.
    For incidence>("incidence-stall"+"stall-change-over") there is stall.
    In the range between this incidences it is interpolated linear.
  • pitch-a:
  • pitch-b: collective incidence angles,
    If you start flightgear with --log-level=info, flightgear reports lift and needed power for theses incidence angles
  • forceatpitch-a:
  • poweratpitch-b:
  • poweratpitch-0: old tokens, not supported any longer, the result are not exactly the expected lift and power values. Will be removed in one of the next updates.directly. Use "real" coefficients instead (see below) and adjust the lift with rotor-correction-factor.

The airfoil of the rotor is described as follows: The way is to define the lift and drag coefficients directly. Without stall the c-lift of the profile is assumed to be sin(incidence-"airfoil-incidence-no-lift")*liftcoef; And in stall: sin(2*(incidence-"airfoil-incidence-no-lift"))*liftcoef*"lift-factor-stall";

Without stall c-drag is assumed to be abs(sin(incidence-"airfoil-incidence-no-lift"))*dragcoef1+dragcoef0); See above, how the coefficients are defined with stall.

The parameters:

  • airfoil-lift-coefficient: liftcoef
  • airfoil-drag-coefficient0: dragcoef0
  • airfoil-drag-coefficient1: dragcoef1

To find the right values: see README.yasim.rotor.ods (Open Office file) or README.yasim.rotor.xls (Excel file).[2]
With theses files you can generate graphs of the airfoil coefficients and adjust the parameters to match real airfoils. For many airfoils you find data published in the internet. Parameters for the airfoils NACA 23012 (main rotor of bo105) and NACA 0012 (tail rotor of bo105?) are included.

  • rotor-correction-factor: If you calculate the lift of a heli rotor or even of a propeller, you get a value larger than the real measured one. (Due to vortex effects.) This is considered in the simulation, but with a old theory by Prantl, which is known to give still too large. This is corrected by this token, default: 1
  • flapmin: Minimum flapping angle. (Should normally never reached)
  • flapmax: Maximum flapping angle. (Should normally never reached)
  • flap0: Flapping angle at no rotation, i.e. -5
  • dynamic: this changes the reactions speed of the rotor to an input.
    normally 1 (Maybe there are rotors with a little faster reaction, then use a value a little greater than one.
    A value greater than one will result in a more inert, system. Maybe it's useful for simulating the rotor of the Bell UH1.)
  • rellenflaphinge: The relative length from the center of the rotor to the flapping hinge. Can be taken from pictures of the helicopter (i.e. 0 for Bell206, about 0.05 for most rotors) For rotors without flapping hinge (where the blade are twisted instead, i.e. Bo 105, Lynx) use a mean value, maybe 0.2. This value has a extreme result in the behavior of the rotor [F/r]
  • sharedflaphinge: determines, if the rotor has one central flapping hinge (="1") for the blades (like the Bell206 or the tail rotor of the Bo 105), default is "0".
  • delta3: Some rotors have a delta3 effect, which results in a decreasing of the incidence when the rotor is flapping. A value of 0 (as most helicopters have) means no change in incidence, a value of 1 result in a decreases of one degree per one degree flapping.
    So delta3 is the proportional factor between flapping and decrease of incidence. I.e. the tail rotor of a Bo105 has a delta3 of 1.
    In some publications delta3 is described by an angle. The value in YASim is the atan of this angle
  • delta: A factor for the damping constant for the flapping. 1 means a analytical result, which is only a approximation. Has a very strong result in the reaction of the rotor system on control inputs.
    If you know the flapping angle for a given cyclic input you can adjust this by changing this value. Or if you now the maximum roll rate or ...
  • translift-maxfactor: Helicopters have "translational lift", which is due to turbulence. In forward flying the rotor gets less turbulence air and produces more lift. The factor is the quotient between lift at high airspeeds to the lift at hover (with same pitch).
  • translift-ve: the speed, where the translational lift reaches 1/e of the maximum value. In m/s.
  • ground-effect-constant: Near to the ground the rotor produces more torque than in higher altitudes. The ground effect is calculated as factor = 1+diameter/altitude*"ground-effect-constant"
  • number-of-parts:
  • number-of-segments: The rotor is simulated in "number-of-parts" different directions.
    In every direction the rotor is simulated at number-of-segments points. If the value is to small, the rotor will react unrealistic. If it is to high, cpu-power will be wasted. I now use a value of 8 for "number-of-parts" and 8 for number-of-segments for the main rotor and 4 for "number-of-parts" and 5 for "number-of-segments" for the tail rotor.
    "number-of-parts" must be a multiple of 4 (if not, it is corrected)
  • cyclic-factor: The response of a rotor to cyclic input is hard to calculate (its a damped oscillator in resonance, some parameters have very large impact to the cyclic response) With this parameter (default 1) you can adjust the simulator to the real helo.
  • downwashfactor: A factor for the downwash of the rotor, default 1.
  • balance: The balance of the rotor. 1.0: the rotor is 100% balanced, 0.0: half of the blades are missing. Use a value near one (0.98 ... 0.999) to add some vibration.
  • tiltcenterx:
  • tiltcentery:
  • tiltcenterz: The center for the tilting of the complete rotorhead/ mast. Can be used for simulating of the Osprey or small autogyros.
  • mintiltyaw:
  • mintiltpitch:
  • mintiltroll:
  • maxtiltyaw:
  • maxtiltpitch:
  • maxtiltroll: The limits (in degree) for tilting the rotor head

All rotor can have <control> subelements for the cyclic (CYCLICELE, CYCLICAIL) and collective (COLLECTIVE) input. and can have <control> subelements for the tilting the whole rotor head around the y-axis (TILTPITCH), the x-axis (TILTROLL) and the z-axis (TILTYAW). ROTORBALANCE is a factor for the balance.

rotorgear

If you are using one or more rotors you have to define a rotorgear. It connects all the rotors and adds a simple engine. In future it will be possible, to add a YASim-engine.

  • max-power-engine: the maximum power of the engine, in kW.
  • engine-prop-factor: the engine is working as a pd-regulator. This is the width of the regulation-band, or, in other words, the inverse of the proportional-factor of the regulator. If you set it to 0.02, than up to 98% of the rotor-rpm the engine will produce maximum torque. At 100% of the engine will produce no torque. It is planned to use YASim-engines instead of this simple engine.
  • engine-accel-limit: The d-factor of the engine is defined as the maximum acceleration rate of the engine in %/s,
    default is 5%/s.
  • max-power-rotor-brake: the maximum power of the rotor brake, in kW
    at normal rpm (most? real rotor brakes would be overheated if used at normal rpm, but this is not simulated now)
  • rotorgear-friction: the power loss due to friction in kW at normal RPM
  • yasimdragfactor:
  • yasimliftfactor: the solver is not working with rotor-aircraft.
    Therefore you have to specify the results yourself. 10 for drag and 140 for lift seem to be good starting values. Although the solve is not invoked for aircraft with at least one rotor, you need to specify the cruise and the approach settings. The approach speed is needed to calculate the gear springs. Use a speed of approx. 50knots. They do not need to match any real value.

The rotorgear needs a <control> subelement for the engine (ROTORGEARENGINEON) and can have further <control> subelements:
ROTORBRAKE: rotor brake
ROTORRELTARGET: the target rpm of the engine relative to the "normal" value for the governor. Default is 1.
ROTORENGINEMAXRELTORQUE: the maximum torque of the engine relative to the torque defined by the enginepower. Default is 1. By setting the rel-target to a large number you get control over the engine by this control. Alternatively you can use these two values for individual start-up sequences (see the s58)

Example

Here's the main rotor definition of the bo105:

 <rotor name="main" x="-2.75" y="0.0" z="1.55" nx="0.05" ny="0" nz="1." fx="1" fy="0" fz="0" ccw="1"
  maxcollective="15.8" mincollective="0.2"
  mincyclicele="-4.7" maxcyclicele="10.5"
  mincyclicail="-4.23" maxcyclicail="5.65"
  diameter="9.98" numblades="4" weightperblade="75" relbladecenter="0.5"
  dynamic="1" rpm="442" rellenflaphinge="0.18" delta3="0"
  delta=".125"
  pitch-a="10"
  pitch-b="15"
  flapmin="-15"
  flapmax="15"
  flap0="-5"
  flap0factor="0"
  notorque="0"
  dragfactor="0.30"
  translift-ve="20"
  translift-maxfactor="1.5"
  ground-effect-constant="0.1"
  twist="-8.5"
  taper="1"
  chord="0.27"
  number-of-segments="8"
  number-of-parts="8"
  rel-len-where-incidence-is-measured="0.7"
  rel-len-blade-start="0.076"
 
  airfoil-lift-coefficient="3.46"
  airfoil-drag-coefficient0="0.0064"
  airfoil-drag-coefficient1="0.20"
  incidence-stall-zero-speed="15"
  incidence-stall-half-sonic-speed="14.5"
  lift-factor-stall="0.18"
  stall-change-over="5.5"
  drag-factor-stall="2.0"
  cyclic-factor="0.8"
  rotor-correction-factor="0.95"
  downwashfactor="1.0"
>
 
<control-input axis="/controls/flight/aileron-trim" control="CYCLICAIL"/>
 
<control-input axis="/controls/flight/aileron" control="CYCLICAIL"
                 src0="-1.0" src1="1.0"
                 dst0="-1.0" dst1="1.0"/>
 
<control-input axis="/controls/flight/elevator-trim" control="CYCLICELE"/>
 
<control-input axis="/controls/flight/elevator" control="CYCLICELE"
                 src0="-1.0" src1="1.0"
                 dst0="-1.0" dst1="1.0"/>
 
<control-input axis="/controls/engines/engine[0]/throttle" control="COLLECTIVE"
                 src0="0.0" src1="1.0"
                 dst0="1.0" dst1="-1.0"/>
 
</rotor>

Flight Dynamics Models (others)

For other possible models see the main page for FDM's.

See also

References

  1. See FlightGear/data/Docs/README.yasim in your FlightGear installation.
  2. Find them in your FlightGear/data/Docs/ directory.