56 const label nElem = values.size();
66 while ((i2 < nElem) && (values[i2] < xIn))
87 ddx = (xIn - values[i1])/(values[i2] - values[i1]);
133 <<
"No profile data specified"
145 scalar invAlpha = -1.0;
146 interpolateWeights(
alpha, AOA_, i1, i2, invAlpha);
148 Cd = invAlpha*(Cd_[i2] - Cd_[i1]) + Cd_[i1];
149 Cl = invAlpha*(Cl_[i2] - Cl_[i1]) + Cl_[i1];
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...
void setSize(const label n)
Alias for resize()
Database for solution data, solver performance and other reduced data.
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
Profile model where polar lift and drag coefficients are linearly interpolated from a polar table by ...
List< scalar > Cl_
List of lift coefficient values.
void interpolateWeights(const scalar &xIn, const List< scalar > &values, label &i1, label &i2, scalar &ddx) const
Return the interpolation indices and gradient.
virtual void Cdl(const scalar alpha, scalar &Cd, scalar &Cl) const
Return the Cd and Cl for a given angle-of-attack.
List< scalar > Cd_
List of drag coefficient values.
List< scalar > AOA_
List of angle-of-attack values [deg] on input, converted to [rad].
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)
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.
constexpr scalar degToRad() noexcept
Multiplication factor for degrees to radians conversion.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define forAll(list, i)
Loop across all elements in list.
Unit conversion functions.