60 while ((i2 < nElem) && (values[i2] < xIn))
81 ddx = (xIn - values[i1])/(values[i2] - values[i1]);
187 interpolateWeights(radius, radius_, i1, i2, invDr);
189 twist = invDr*(twist_[i2] - twist_[i1]) + twist_[i1];
190 chord = invDr*(chord_[i2] - chord_[i1]) + chord_[i1];
#define forAll(list, i)
Loop across all elements in list.
void size(const label)
Override size to be inconsistent with allocated storage.
void setSize(const label)
Reset size of List.
T * first()
Return the first entry.
const List< scalar > & chord() const
Return const access to the chord list.
const List< label > & profileID() const
Return const access to the profile ID list.
List< word > profileName_
Corresponding profile name per section.
virtual ~bladeModel()
Destructor.
const List< scalar > & radius() const
Return const access to the radius list.
List< label > profileID_
Corresponding profile ID per section.
const List< word > & profileName() const
Return const access to the profile name list.
List< scalar > radius_
Radius [m].
List< scalar > chord_
Chord [m].
const List< scalar > & twist() const
Return const access to the twist list.
bool readFromFile() const
Return true if file name is set.
void interpolateWeights(const scalar &xIn, const List< scalar > &values, label &i1, label &i2, scalar &ddx) const
Return the interpolation indices and gradient.
fileName fName_
File name (optional)
List< scalar > twist_
Twist [deg] on input, converted to [rad].
virtual void interpolate(const scalar radius, scalar &twist, scalar &chord, label &i1, label &i2, scalar &invDr) const
Return the twist and chord for a given radius.
bladeModel(const dictionary &dict)
Constructor.
Database for solution and other reduced data.
A list of keyword definitions, which are a keyword followed by any number of values (e....
A class for handling file names.
static const fileName null
An empty fileName.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
errorManipArg< error, int > exit(error &err, const int errNo=1)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
labelList second(const UList< labelPair > &p)
scalar degToRad(const scalar deg)
Conversion from degrees to radians.
Unit conversion functions.