Main Content

Aero.Aircraft.CompositeCoefficient Class

Namespace: Aero

Create composite aerodynamic coefficient

Since R2023b

Description

Aero.Aircraft.CompositeCoefficient defines an aerodynamic coefficient. You can specify this coefficient with the sum or product of multiple lookup tables and numeric values. The Aero.Aircraft.CompositeCoefficient object is used as a value for the Aero.FixedWing.Coefficient object.

Class Attributes

Abstract
false
ConstructOnLoad
false
HandleCompatible
false
Hidden
false
Sealed
true
RestrictsSubclassing
true

For information on class attributes, see Class Attributes.

Creation

Description

Aero.Aircraft.CompositeCoefficient(valueCell) creates a composite aerodynamic coefficient with a cell array of Simulink.LookupTable objects, scalar numeric values, or Aero.Aircraft.CompositeCoefficient objects, valueCell.

Aero.Aircraft.CompositeCoefficient(valueCell,functionHandle) uses a specification of how the cell array members are combined.

Aero.Aircraft.CompositeCoefficient(___,stateProperty) creates a composite aerodynamic coefficient with a string array of Aero.FixedWing.State properties. The object uses a specification, functionHandle, of how the valueCell array and stateProperty members are combined.

example

Input Arguments

expand all

Collection of Simulink.LookupTable objects, scalar numeric, Aero.Aircraft.CompositeCoefficient objects, specified as a row or column cell array.

Function handle combination action applied to valueCell cell array and stateProperty string array members, specified as @prod, @sum, @abs, @max, @min, @mean, @power, @mod, @exp, @sin, @cos, @tan, @asin, @acos, @atan, or @atan2.

Properties defined in custom Aero.FixedWing.State, specified as a string array of Aero.FixedWing.State properties.

Example: ["Alpha","DynamicPressure","P"]

Data Types: string

Properties

expand all

Collection of Simulink.LookupTable objects, scalar numeric, Aero.Aircraft.CompositeCoefficient objects, specified as a row or column cell array.

Attributes:

GetAccess
public
SetAccess
private

Function handle combination action applied to valueCell cell array and stateProperty string array members, specified as @prod, @sum, @abs, @max, @min, @mean, @power, @mod, @exp, @sin, @cos, @tan, @asin, @acos, @atan, or @atan2.

Attributes:

GetAccess
public
SetAccess
private

Properties defined in custom Aero.FixedWing.State, specified as a string array of Aero.FixedWing.State properties.

Example: ["Alpha","DynamicPressure","P"]

Attributes:

GetAccess
public
SetAccess
private

Methods

expand all

Examples

collapse all

This example demonstrates how to construct a nonlinear aerodynamic lift and drag coefficient model. The drag coefficient is modeled as the sum of a profile drag lookup table (which varies with angle of attack) and induced drag.

Create a Simulink.LookupTable (Simulink) object for the lift coefficient lutCL and define table data. The lift coefficient ranges from a minimum of -0.9 to a maximum of 1.3 and includes stall.

alpha_deg = [-15 -12 -10 -5 0 5 10 12 15 18];
alpha_rad = deg2rad(alpha_deg);
cl_vals  = [-0.7 -0.9 -0.6 -0.2 0.0 0.6 1.1 1.25 1.3 1.1];

lutCL = Simulink.LookupTable;
lutCL.Table.Value = cl_vals;
lutCL.Breakpoints(1).Value = alpha_rad;
lutCL.Breakpoints(1).FieldName = "Alpha";

Create a Simulink.LookupTable object for the profile drag coefficient called lutCDp using the same angle of attack breakpoints.

cdp_vals = 0.01 * [4, 2.92, 1.85, 1.09, 1, 1.09, 1.85, 3.6, 4.4, 5.2];

lutCDp = Simulink.LookupTable;
lutCDp.Table.Value = cdp_vals;
lutCDp.Breakpoints(1).Value = alpha_rad;
lutCDp.Breakpoints(1).FieldName = "Alpha";

Create Aero.Aircraft.CompositeCoefficient objects for the induced drag, CDi=CL2πARe, and the total drag, CD=CDp+CDi.

AR = 8;
e = 0.85;

CDi = Aero.Aircraft.CompositeCoefficient({lutCL, lutCL, 1/(pi*AR*e)}, @prod, []);
CD = Aero.Aircraft.CompositeCoefficient({lutCDp, CDi}, @sum, [])
CD = 
  CompositeCoefficient with properties:

          ValueCell: {[1×1 Simulink.LookupTable]  [1×1 Aero.Aircraft.CompositeCoefficient]}
    CoefficientImpl: @sum
      StateProperty: [1×0 string]

Compute the coefficient values at a given angle of attack using the calculate method.

state = Aero.FixedWing.State();
state.Alpha = deg2rad(5);
CL_value5 = Aero.Aircraft.CompositeCoefficient.calculate(lutCL, state)
CL_value5 = 
0.6000
CD_value5 = Aero.Aircraft.CompositeCoefficient.calculate(CD, state)
CD_value5 = 
0.0278

Version History

Introduced in R2023b

expand all