63 while ((i2 < nElem) && (values[i2] < xIn))
84 ddx = (xIn - values[i1])/(values[i2] - values[i1]);
111 dict.lookup(
"data") >> data;
141 scalar invAlpha = -1.0;
142 interpolateWeights(
alpha, AOA_, i1, i2, invAlpha);
144 Cd = invAlpha*(Cd_[i2] - Cd_[i1]) + Cd_[i1];
145 Cl = invAlpha*(Cl_[i2] - Cl_[i1]) + Cl_[i1];
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
void size(const label)
Override size to be inconsistent with allocated storage.
void setSize(const label)
Reset size of List.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Look-up based profile data - drag and lift coefficients are linearly interpolated based on the suppli...
List< scalar > Cl_
List of lift coefficient values.
lookupProfile(const dictionary &dict, const word &modelName)
Constructor.
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.
bool readFromFile() const
Return true if file name is set.
fileName fName_
File name (optional)
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
errorManipArg< error, int > exit(error &err, const int errNo=1)
scalar degToRad(const scalar deg)
Convert degrees to radians.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
addToRunTimeSelectionTable(polyPatch, mergedCyclicPolyPatch, word)
defineTypeNameAndDebug(combustionModel, 0)