54 result += values[i]*
cos(i*xIn);
73 result += values[i]*
sin(i*xIn);
107 <<
"CdCoeffs must be specified"
113 <<
"ClCoeffs must be specified"
123 Cd = evaluateDrag(
alpha, CdCoeffs_);
124 Cl = evaluateLift(
alpha, ClCoeffs_);
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Input from file stream, using an ISstream.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
bool empty() const noexcept
True if the UList is empty (ie, size() is zero)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
bool readEntry(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, bool mandatory=true) const
Base class for profile models for handling aerofoil lift and drag polar diagrams.
bool readFromFile() const
Return true if file name is set.
fileName fName_
File name (optional)
Profile model where polar lift and drag coefficients are computed as sum of trigonometric series by u...
scalar evaluateDrag(const scalar &xIn, const List< scalar > &values) const
Drag.
List< scalar > ClCoeffs_
List of lift coefficient values.
List< scalar > CdCoeffs_
List of drag coefficient values.
virtual void Cdl(const scalar alpha, scalar &Cd, scalar &Cl) const
Return the Cd and Cl for a given angle-of-attack.
scalar evaluateLift(const scalar &xIn, const List< scalar > &values) const
Lift.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
dimensionedScalar sin(const dimensionedScalar &ds)
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensionedScalar cos(const dimensionedScalar &ds)
#define forAll(list, i)
Loop across all elements in list.