60 while ((i2 < nElem) && (values[i2] < xIn))
81 ddx = (xIn - values[i1])/(values[i2] - values[i1]);
106 dict.lookup(
"data") >> data;
121 radius_[i] = data[i].second()[0];
123 chord_[i] = data[i].second()[2];
149 return profileIndex_;
173 return profileIndex_;
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 element of the list.
const List< scalar > & chord() const
Return const access to the chord list.
List< word > profileName_
Corresponding profile name per section.
virtual ~bladeModel()
Destructor.
const List< scalar > & radius() const
Return const access to the radius list.
const List< label > & profileIndex() const
Return const access to the profile ID list.
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.
List< label > profileIndex_
Corresponding profile ID per section.
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.
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)
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.
labelList second(const UList< labelPair > &p)