53 label nElem =
values.size();
63 while ((i2 < nElem) && (
values[i2] < xIn))
101 List<Tuple2<word, vector>> data;
109 dict.readEntry(
"data", data);
124 radius_[i] = data[i].second()[0];
126 chord_[i] = data[i].second()[2];
132 <<
"No blade data specified" 186 interpolateWeights(radius, radius_, i1, i2, invDr);
188 twist = invDr*(twist_[i2] - twist_[i1]) + twist_[i1];
189 chord = invDr*(chord_[i2] - chord_[i1]) + chord_[i1];
errorManipArg< error, int > exit(error &err, const int errNo=1)
List< scalar > radius_
Radius [m].
const List< scalar > & radius() const
Return const access to the radius list.
Unit conversion functions.
T & first()
Access first element of the list, position [0].
List< scalar > chord_
Chord [m].
List< scalar > twist_
Twist [deg] on input, converted to [rad].
#define forAll(list, i)
Loop across all elements in list.
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.
List< T > values(const HashTable< T, Key, Hash > &tbl, const bool doSort=false)
List of values from HashTable, optionally sorted.
bladeModel(const dictionary &dict)
Construct from dictionary.
void setSize(const label n)
Alias for resize()
const List< scalar > & twist() const
Return const access to the twist list.
List< word > profileName_
Corresponding profile name per section.
const List< label > & profileID() const
Return const access to the profile ID list.
bool readFromFile() const
Return true if file name is set.
const List< scalar > & chord() const
Return const access to the chord list.
List< label > profileID_
Corresponding profile ID per section.
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)
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
constexpr scalar degToRad(const scalar deg) noexcept
Conversion from degrees to radians.
const List< word > & profileName() const
Return const access to the profile name list.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...