Drake
 All Classes Files Functions Variables
RigidBodyWing Class Reference

This class implements a wing element, supporting flat plates and airfoils defined with NACA numbers, a geometry profile (with xfoil and AVL backend) and .mat files defining wing performance. More...

Inheritance diagram for RigidBodyWing:
Collaboration diagram for RigidBodyWing:

Public Member Functions

function RigidBodyWing (frame_id, profile, chord, span, stallAngle, velocity)
 calls AVL and XFOIL over different angles of attack at the given velocity, generates first order polynomials of the CL, CD, and pitch moments of the wing. More...
 
function onCompile (obj, model)
 Runs on model compilation, constructs an airfoil if one does not exist with these parameters. More...
 
- Public Member Functions inherited from RigidBodyForceElement
function updateBodyCoordinates (obj, body_ind, T_old_body_to_new_body)
 
function setInputNum (obj, input_num)
 
function energy (obj, manip, q, qd)
 
- Public Member Functions inherited from RigidBodyElement
function bindParams (body, model, pval)
 Bind parameters from msspolys to doubles. More...
 

Public Attributes

Property fCl
 
Property fCd
 
Property fCm
 
Property dfCl
 
Property dfCd
 
Property dfCm
 
Property area
 
Property rho
 Air density for 20 degC dry air, at sea level. More...
 
Property has_control_surface
 
Property span
 
Property stall_angle
 
Property chord
 
Property profile
 
Property visual_geometry
 
Property parent_id
 
Property airfoil_needs_update
 flag that tells us if we need to create a new airfoil on compile More...
 
Property velocity
 
Property kinframe
 
- Public Attributes inherited from RigidBodyForceElement
Property name
 
Property direct_feedthrough_flag
 
Property input_num
 
Property input_limits
 
- Public Attributes inherited from RigidBodyElement
Property param_bindings
 structure containing msspoly parameterized representations of some properties More...
 

Additional Inherited Members

- Static Public Member Functions inherited from RigidBodyForceElement
static function cartesianForceToSpatialForce (varargin)
 This method is deprecated. More...
 

Detailed Description

This class implements a wing element, supporting flat plates and airfoils defined with NACA numbers, a geometry profile (with xfoil and AVL backend) and .mat files defining wing performance.

Constructor & Destructor Documentation

function RigidBodyWing ( frame_id  ,
profile  ,
chord  ,
span  ,
stallAngle  ,
velocity   
)

calls AVL and XFOIL over different angles of attack at the given velocity, generates first order polynomials of the CL, CD, and pitch moments of the wing.

The axes for use in DRAKE are: X = forward, in the usual direction of travel Y = out the left side of the wing Z = up Note: an sign inversion is needed for the moment coefficient, as a positive pitching moment from AVL/XFOIL represents a pitch up, but a positive y-axis rotation represents a pitch down.

Parameters
frame_id= RigidBodyFrame specifying the location (and orientation) of the quarter-chord of the airfoil and the body which is it mounted on.
profile= Profile can either be a:
         -NACA airfoil designation starting with 'NACA'
         -File location of a .dat file generated by xfoil
         -File location of a .mat file which contains the
         variables 'CLSpline', 'CDSpline', 'CMSpline'
         -the words 'flat plate'
         
chord= the chord of the wing (meters)
span= the wing span (width) of the wing (meters)
stallAngle= user-defined angle at which the wing stalls (degrees). The negative of the stall angle is used for AoA<0, even though airfoils do not stall at exactly the same abs(AoA).
velocity= the approximate operating velocity of the wing. Needed to pass in the correct Reynolds and Mach numbers to the to the numerical solvers to generate appropriate CL and CD splines.

TODO: Implement some values for post-stall CMs i.e. at 90 degrees aoa, the center of pressure should be at the half chord. use variables for path to xfoil and AVL

Return values
obj

Member Function Documentation

function onCompile ( obj  ,
model   
)

Runs on model compilation, constructs an airfoil if one does not exist with these parameters.

Parameters
modelmodel we are a part of
Return values
objupdated object
modelupdated model. you need to put the updated object back into this model on return from this function

Member Data Documentation

Property airfoil_needs_update

flag that tells us if we need to create a new airfoil on compile

Property area
Property chord
Property dfCd
Property dfCl
Property dfCm
Property fCd
Property fCl
Property fCm
Property has_control_surface
Property kinframe
Property parent_id
Property profile
Property rho

Air density for 20 degC dry air, at sea level.

Property span
Property stall_angle
Property velocity
Property visual_geometry

The documentation for this class was generated from the following file: