Go to the documentation of this file.
34 namespace tabulatedWallFunctions
39 tabulatedWallFunction,
102 else if (xi >=
x.last())
115 return (xi -
x[i1])/(
x[i2] -
x[i1])*(fx[i2] - fx[i1]) + fx[i1];
123 <<
"Unknown interpolation method" <<
nl
136 const dictionary&
dict,
140 tabulatedWallFunction(
dict,
mesh, typeName),
141 interpType_(interpolationTypeNames_[coeffDict_.
lookup(
"interpType")]),
144 log10YPlus_(coeffDict_.
lookup(
"log10YPlus")),
145 log10UPlus_(coeffDict_.
lookup(
"log10UPlus"))
148 if (inputTable.
size() < 2)
151 <<
"Input table must have at least 2 values" <<
nl
155 yPlus_.setSize(inputTable.
size());
156 uPlus_.setSize(inputTable.
size());
162 yPlus_[i] =
pow(10, inputTable[i].first());
166 yPlus_[i] = inputTable[i].first();
171 uPlus_[i] =
pow(10, inputTable[i].second());
175 uPlus_[i] = inputTable[i].second();
218 if (invertedTable_.log10())
220 os <<
"log10(Re), y+, u+:" <<
endl;
223 scalar
uPlus = invertedTable_[i];
231 os <<
"Re, y+, u+:" <<
endl;
234 scalar
uPlus = invertedTable_[i];
235 scalar
Re = this->
Re(uPlus);
List< scalar > scalarList
A List of scalars.
#define forAll(list, i)
Loop across all elements in list.
List< scalar > yPlus_
Input y+ values.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
scalarField Re(const UList< complex > &cf)
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual ~general()
Destructor.
general(const dictionary &dict, const polyMesh &mesh)
bool interpolate(const vector &p1, const vector &p2, const vector &o, vector &n, scalar l)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
interpolationType
Enumeration listing available interpolation types.
general distribution model
virtual void invertTable()
Invert the table.
dimensionedScalar log10(const dimensionedScalar &ds)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
virtual void writeData(Ostream &os) const
Write to Ostream.
const bool writeData(readBool(pdfDictionary.lookup("writeData")))
List< scalar > uPlus_
Input U+ values.
Macros for easy insertion into run-time selection tables.
virtual scalar yPlus(const scalar uPlus) const
Return y+ as a function of u+.
virtual scalar interpolate(const scalar xi, const scalarList &x, const scalarList &fx) const
Interpolate.
errorManip< error > abort(error &err)
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
static const NamedEnum< interpolationType, 1 > interpolationTypeNames_
void size(const label)
Override size to be inconsistent with allocated storage.
virtual scalar Re(const scalar uPlus) const
Return Reynolds number as a function of u+.
defineTypeNameAndDebug(combustionModel, 0)
uniformInterpolationTable< scalar > invertedTable_
Inverted table.
Initialise the NamedEnum HashTable from the static list of names.
stressControl lookup("compactNormalStress") >> compactNormalStress