WSF
WsfAero2D Class Reference

#include <WsfAero2D.hpp>

Inheritance diagram for WsfAero2D:
Collaboration diagram for WsfAero2D:

Classes

struct  DragPoint

Public Member Functions

 WsfAero2D (const UtAtmosphere &aAtmosphere)
 Constructor.
 ~WsfAero2D () override
WsfAeroClone () const override
bool Initialize (double aSimTime, UtEntity *aPlatformPtr) override
void Update (double aSimTime, double aRequestedYForce=0.0, double aRequestedZForce=0.0, double aTVC_Force=0.0) override
bool ProcessInput (UtInput &aInput) override
double CalculateDrag (double aAltitude_m, double aMach, double aWeight_N) const override
Public Member Functions inherited from WsfAero
 WsfAero (const UtAtmosphere &aAtmosphere)
 ~WsfAero () override
double GetDrag () const
virtual void GetECSForces (double aECSForces[3]) const
 Get the 3-D resultant aerodynamic forces in the Entity Coordinate System frame.
double GetQS () const
double GetMaximumForce () const
double LiftCurveSlope () const
 Return the partial derivative of lift coefficient with angle of attack. Assumed constant.
Public Member Functions inherited from WsfObject
 WsfObject ()
 This is the constructor for the WsfObject class.
 ~WsfObject () override
 This is the destructor for the WsfObject class.
const char * GetScriptClassName () const override
const std::string & GetType () const
WsfStringId GetTypeId () const
 Get the string ID of the 'type' of the object.
void SetType (WsfStringId aType)
const std::string & GetBaseType () const
WsfStringId GetBaseTypeId () const
const TypeListGetTypeList () const
bool IsA_TypeOf (WsfStringId aType) const
WsfObjectoperator= (const WsfObject &aRhs)
 Assignment operator.
template<typename T>
void Serialize (T &aBuff)
 For XIO (de)serialization.
const std::string & GetName () const
WsfStringId GetNameId () const
void SetName (WsfStringId aName)

Protected Types

enum  DragSpecType { cINCOMPRESSIBLE , cPARAMETRIC , cCURVE_POINTS }

Protected Member Functions

 WsfAero2D (const WsfAero2D &aSrc)
 Copy constructor, used by Clone().
WsfAero2Doperator= (const WsfAero2D &aRhs)=delete
bool SetInternalValues (double aSimTime)
void CalcCd0 ()
void CalcCdTotal ()
Protected Member Functions inherited from WsfAero
std::string GetPlatformName () const
 WsfAero (const WsfAero &aSrc)
 Copy constructor, used by Clone().
double GetDynamicPressure (double aAltitude_m, double aSpeed_mps) const
double GetMach (double aAltitude_m, double aSpeed_mps) const
double GetSpeed (double aAltitude_m, double aMach) const
WsfAerooperator= (const WsfAero &aRhs)=delete
 WsfObject (const WsfObject &aSrc)
 Copy constructor (for Clone()).

Protected Attributes

double mAR
double mE
double mClMax
double mK
double mCdZeroSubsonic
double mCdZeroSupersonic
double mMachBeginCdRise
double mMachEndCdRise
double mSubsonicCdSlope
double mSupersonicCdSlope
double mMachMaxSupersonic
std::vector< DragPointmCd0s
double mCl
double mCd0
double mCdTotal
DragSpecType mType
std::vector< DragPoint >::size_type mIndex
double mLateralForce
Protected Attributes inherited from WsfAero
UtEntity * mEntityPtr
UtAtmosphere mAtm
double mRefArea
double mAltitude
double mDynPressure
double mSpeed
double mMach
double mDrag
double mZForce
double mYForce
double mMaximumForce
double mLiftCurveSlope
bool mDebug
bool mInitialized

Additional Inherited Members

Public Types inherited from WsfObject
typedef std::vector< WsfStringIdTypeList
 The list of types returned by GetTypeList.

Detailed Description

A simple 2-D Aerodynamics class, supporting platforms whose motion is influenced by aerodynamic lift and drag.

ASSUMPTIONS:

  • Two dimensional aerodynamics:
    • Lift and Drag, but no moments are developed.
  • Idealized parabolic drag polar:
    • Cd = Cd0 + (CL * CL / (Pi * AR * e)).
    • Cd = Drag Coefficient
    • CL = Lift Coefficient, AR = Aspect Ratio, e = Oswald's Efficiency Factor.
  • Compressibility (Mach) effects are ignored, unless a 2-D table for Cd0 versus Mach number is supplied.
  • North East Down (NED) roll angle is zero, and side force is developed to place the lift vector in whatever plane is desired.
  • The class does not consider the Angle of Attack (AOA) required to generate the forces.

Member Enumeration Documentation

◆ DragSpecType

enum WsfAero2D::DragSpecType
protected
Enumerator
cINCOMPRESSIBLE 

A single zero-lift drag coefficient (Cd0) value has been supplied. Drag is not a function of Mach number, and should not be used for a high speed simulation (Mach > 0.7).

cPARAMETRIC 

Drag has been specified as a low-speed Cd0, supersonic Cd0, and this class applies a generic transonic drag-rise curve shape between the two points. (See separate WSF User Input Guide for more information on this enumeration.)

cCURVE_POINTS 

Drag has been specified as a series of explicit (Mach, Cd0) curve points.

Constructor & Destructor Documentation

◆ WsfAero2D() [1/2]

◆ ~WsfAero2D()

WsfAero2D::~WsfAero2D ( )
override

◆ WsfAero2D() [2/2]

Member Function Documentation

◆ CalcCd0()

void WsfAero2D::CalcCd0 ( )
protected

References mCd0, and WsfAero::mMach.

Referenced by CalcCdTotal(), and operator=().

◆ CalcCdTotal()

void WsfAero2D::CalcCdTotal ( )
protected

References CalcCd0(), cINCOMPRESSIBLE, mCd0, mCdTotal, mCl, mK, and mType.

Referenced by operator=(), and Update().

◆ CalculateDrag()

double WsfAero2D::CalculateDrag ( double aAltitude_m,
double aMach,
double aWeight_N ) const
overridevirtual

◆ Clone()

WsfAero * WsfAero2D::Clone ( ) const
overridevirtual

Return a copy of this object. Must be implemented by all derived types. If cloning is impossible, a WsfUncloneableException should be thrown.

Implements WsfAero.

References WsfAero::WsfAero(), and WsfAero2D().

◆ Initialize()

bool WsfAero2D::Initialize ( double aSimTime,
UtEntity * aPlatformPtr )
overridevirtual

Initialize the aerodynamics object. Method will be used to place drag values into increasing order by Mach number, and facilitate run-time interpolations.

Returns
'True' if object successfully initialized, or 'false' if an error occurred.

Reimplemented from WsfAero.

References WsfAero::Initialize(), WsfAero::mInitialized, and SetInternalValues().

◆ operator=()

WsfAero2D & WsfAero2D::operator= ( const WsfAero2D & aRhs)
protecteddelete

◆ ProcessInput()

bool WsfAero2D::ProcessInput ( UtInput & aInput)
overridevirtual

Recognize and process aerodynamics input.

Returns
'True' if it is a command I recognize, 'false' if not.

Reimplemented from WsfAero.

References cCURVE_POINTS, cINCOMPRESSIBLE, cPARAMETRIC, mAR, mCd0, mCd0s, mCdZeroSubsonic, mCdZeroSupersonic, mClMax, mE, mMachBeginCdRise, mMachEndCdRise, mMachMaxSupersonic, mSubsonicCdSlope, mSupersonicCdSlope, mType, and WsfAero::ProcessInput().

◆ SetInternalValues()

bool WsfAero2D::SetInternalValues ( double aSimTime)
protected

SetInternalValues is a protected method which initializes the aerodynamics object. It assures that necessary values are set in the object before it is used. Method will make sure that drag table mach numbers (if used) are continuously increasing, to facilitate run-time interpolations. Depending upon how drag values are specified, it may create Cd versus Mach number drag values to produce the desired transonic drag rise shape.

Returns
'True' if object successfully initialized, or 'false' if an error occurred.

References cCURVE_POINTS, cINCOMPRESSIBLE, cPARAMETRIC, WsfAero::GetPlatformName(), mAR, mCd0, mCd0s, mCdZeroSubsonic, mCdZeroSupersonic, mClMax, WsfAero::mDebug, mE, mK, mMachBeginCdRise, mMachEndCdRise, mMachMaxSupersonic, mSubsonicCdSlope, mSupersonicCdSlope, and mType.

Referenced by Initialize(), and operator=().

◆ Update()

void WsfAero2D::Update ( double aSimTime,
double aRequestedYForce = 0.0,
double aRequestedZForce = 0.0,
double aTVC_Force = 0.0 )
overridevirtual

Update() is the primary method of the class. Using the internal platform pointer, calculate aerodynamic data in the body frame for this motion state (as appropriate): The input (desired) body-frame forces may not be physically attainable under the current conditions, so the input values are merely requests, and may not be satisfied.

Parameters
aSimTimeCurrent simulation time.
aRequestedYForceDesired body-frame lateral force (positive to the right).
aRequestedZForceDesired body-frame vertical force (positive down).
aTVC_ForceThrust vector control force
Note
In the base class implementation, roll angles are zero!

Reimplemented from WsfAero.

References CalcCdTotal(), cINCOMPRESSIBLE, mCd0, mCdTotal, mCl, mClMax, WsfAero::mDebug, WsfAero::mDrag, WsfAero::mDynPressure, mLateralForce, WsfAero::mMach, WsfAero::mMaximumForce, WsfAero::mRefArea, mType, WsfAero::mYForce, WsfAero::mZForce, and WsfAero::Update().

Member Data Documentation

◆ mAR

double WsfAero2D::mAR
protected

◆ mCd0

double WsfAero2D::mCd0
protected

◆ mCd0s

std::vector<DragPoint> WsfAero2D::mCd0s
protected

◆ mCdTotal

double WsfAero2D::mCdTotal
protected

◆ mCdZeroSubsonic

double WsfAero2D::mCdZeroSubsonic
protected

◆ mCdZeroSupersonic

double WsfAero2D::mCdZeroSupersonic
protected

◆ mCl

double WsfAero2D::mCl
protected

◆ mClMax

double WsfAero2D::mClMax
protected

◆ mE

double WsfAero2D::mE
protected

◆ mIndex

std::vector<DragPoint>::size_type WsfAero2D::mIndex
protected

Referenced by WsfAero2D(), and WsfAero2D().

◆ mK

double WsfAero2D::mK
protected

◆ mLateralForce

double WsfAero2D::mLateralForce
protected

Referenced by Update(), WsfAero2D(), and WsfAero2D().

◆ mMachBeginCdRise

double WsfAero2D::mMachBeginCdRise
protected

◆ mMachEndCdRise

double WsfAero2D::mMachEndCdRise
protected

◆ mMachMaxSupersonic

double WsfAero2D::mMachMaxSupersonic
protected

◆ mSubsonicCdSlope

double WsfAero2D::mSubsonicCdSlope
protected

◆ mSupersonicCdSlope

double WsfAero2D::mSupersonicCdSlope
protected

◆ mType

DragSpecType WsfAero2D::mType
protected

The documentation for this class was generated from the following files:
Copyrights Multiple, All Rights Reserved