56 const label nElem =
values.size();
66 while ((i2 < nElem) && (
values[i2] < xIn))
97 const dictionary&
dict,
101 profileModel(
dict, modelName),
114 dict.readEntry(
"data", data);
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];
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Unit conversion functions.
List< scalar > AOA_
List of angle-of-attack values [deg] on input, converted to [rad].
Macros for easy insertion into run-time selection tables.
#define forAll(list, i)
Loop across all elements in list.
List< T > values(const HashTable< T, Key, Hash > &tbl, const bool doSort=false)
List of values from HashTable, optionally sorted.
void setSize(const label n)
Alias for resize()
List< scalar > Cd_
List of drag coefficient values.
fileName fName_
File name (optional)
lookupProfile(const dictionary &dict, const word &modelName)
Constructor from dictionary and model name.
Base class for profile models for handling aerofoil lift and drag polar diagrams. ...
defineTypeNameAndDebug(combustionModel, 0)
virtual void Cdl(const scalar alpha, scalar &Cd, scalar &Cl) const
Return the Cd and Cl for a given angle-of-attack.
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
Profile model where polar lift and drag coefficients are linearly interpolated from a polar table by ...
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
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.
bool readFromFile() const
Return true if file name is set.
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
constexpr scalar degToRad(const scalar deg) noexcept
Conversion from degrees to radians.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...