54 result += values[i]*
cos(i*xIn);
64 const List<scalar>& values
73 result += values[i]*
sin(i*xIn);
106 FatalIOErrorInFunction(dict)
107 <<
"CdCoeffs must be specified"
108 << exit(FatalIOError);
112 FatalIOErrorInFunction(dict)
113 <<
"ClCoeffs must be specified"
114 << exit(FatalIOError);
123 Cd = evaluateDrag(
alpha, CdCoeffs_);
124 Cl = evaluateLift(
alpha, ClCoeffs_);
if(maxValue - minValue< SMALL)
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 as an ISstream, normally using std::ifstream for the actual input.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
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).
profileModel(const dictionary &dict, const word &modelName)
Constructor.
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.
seriesProfile(const dictionary &dict, const word &modelName)
Constructor from dictionary and model name.
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.
dimensionedScalar sin(const dimensionedScalar &ds)
dimensionedScalar cos(const dimensionedScalar &ds)
#define forAll(list, i)
Loop across all elements in list.