Main Content

Aero.Aircraft.CompositeCoefficient.calculate

Class: Aero.Aircraft.CompositeCoefficient
Namespace: Aero

Calculate numeric aerodynamic force or moment of Aero.Aircraft.CompositeCoefficient for Aero.FixedWing.State object

Since R2024a

Syntax

outputForceOrMoment = Aero.Aircraft.CompositeCoefficient.calculate(inputValue,inputState)

Description

outputForceOrMoment = Aero.Aircraft.CompositeCoefficient.calculate(inputValue,inputState) calculates the aerodynamic numeric force or moment of Aero.Aircraft.CompositeCoefficient for an Aero.FixedWing.State object.

You can use the numeric aerodynamic force or moment to check the validity of the defined Aero.Aircraft.CompositeCoefficient.

Input Arguments

expand all

Simulink.LookupTable or Aero.Aircraft.CompositeCoefficient property, specified as a scalar.

Aero.FixedWing.State object, specified as a scalar.

Output Arguments

expand all

Numeric force or moment of Aero.Aircraft.CompositeCoefficient object for Aero.FixedWing.State object, returned as a numeric scalar.

Attributes

Static1

To learn about attributes of methods, see Method Attributes.

Examples

expand all

Calculate the drag force for the aerodynamic coefficient (cdAlpha) and state object.

Create the Simulink.LookupTable object, lutCDGE, due to ground effect.

lutCDGE = Simulink.LookupTable;

Define table data for lutCDGE.

lutCDGE.Table.Value = [1.25 1.2 1.15 1.1 1.05 1];

Define breakpoint values for lutCDGE. Assign the state name 'AltitudeAGL' to the field.

lutCDGE.Breakpoints(1).Value = [0 0.2 0.4 0.6 0.8 1.0];
lutCDGE.Breakpoints(1).FieldName = 'AltitudeAGL';

Create Simulink.LookupTable object, lutCDAlpha, due to alpha.

lutCDAlpha = Simulink.LookupTable;

Define table data for lutCDAlpha.

lutCDAlpha.Table.Value = [0.005 0.004 0.003 0.002 0.001 0 0.0012 0.0035...
     0.0054 0.0075 0.01 0.015 0.02 0.026];

Define breakpoint values for lutCDAlpha and assign the state name 'Alpha' to the field.

lutCDAlpha.Breakpoints(1).Value = [-0.1 -0.08 -0.06 -0.04 -0.02 0 0.02...
     0.05 0.1 0.15 0.2 0.25 0.3 0.35]; 
lutCDAlpha.Breakpoints(1).FieldName = 'Alpha';

Create the Aero.Aircraft.CompositeCoefficient cdAlpha object as a product of the Simulink.LookupTable objects.

cdAlpha = Aero.Aircraft.CompositeCoefficient({lutCDGE,lutCDAlpha,200},...
     @prod,["DynamicPressure"]);

Calculate the drag force coefficient due to alpha, value.

state = Aero.FixedWing.State();
state.Alpha = deg2rad(5);
value = Aero.Aircraft.CompositeCoefficient.calculate(cdAlpha,state)
value = 
1.8964e+03

Version History

Introduced in R2024a