Go to the documentation of this file.
38 namespace tabulatedWallFunctions
43 tabulatedWallFunction,
56 { interpolationType::itLinear,
"linear" },
100 else if (xi >=
x.last())
113 return (xi -
x[i1])/(
x[i2] -
x[i1])*(fx[i2] - fx[i1]) + fx[i1];
121 <<
"Unknown interpolation method" <<
nl
134 const dictionary&
dict,
138 tabulatedWallFunction(
dict,
mesh, typeName),
139 interpType_(interpolationTypeNames_.
get(
"interpType", coeffDict_)),
140 log10YPlus_(coeffDict_.
get<
bool>(
"log10YPlus")),
141 log10UPlus_(coeffDict_.
get<
bool>(
"log10UPlus")),
145 List<Tuple2<scalar, scalar>> inputTable;
147 coeffDict_.readEntry(
"inputTable", inputTable);
149 if (inputTable.size() < 2)
152 <<
"Input table must have at least 2 values" <<
nl
156 yPlus_.setSize(inputTable.size());
157 uPlus_.setSize(inputTable.size());
163 yPlus_[i] =
pow(10, inputTable[i].first());
167 yPlus_[i] = inputTable[i].first();
172 uPlus_[i] =
pow(10, inputTable[i].second());
176 uPlus_[i] = inputTable[i].second();
219 if (invertedTable_.log10())
221 os <<
"log10(Re), y+, u+:" <<
endl;
224 scalar
uPlus = invertedTable_[i];
232 os <<
"Re, y+, u+:" <<
endl;
235 scalar
uPlus = invertedTable_[i];
236 scalar
Re = this->
Re(uPlus);
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
List< scalar > scalarList
A List of scalars.
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
static constexpr const zero Zero
Ostream & endl(Ostream &os)
general(const dictionary &dict, const polyMesh &mesh)
bool interpolate(const vector &p1, const vector &p2, const vector &o, vector &n, scalar l)
General relative velocity model.
virtual void invertTable()
dimensionedScalar log10(const dimensionedScalar &ds)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
label max(const labelHashSet &set, label maxValue=labelMin)
virtual void writeData(Ostream &os) const
static void writeData(Ostream &os, const Type &val)
OBJstream os(runTime.globalPath()/outputName)
Macros for easy insertion into run-time selection tables.
virtual scalar yPlus(const scalar uPlus) const
virtual scalar interpolate(const scalar xi, const scalarList &x, const scalarList &fx) const
errorManip< error > abort(error &err)
errorManipArg< error, int > exit(error &err, const int errNo=1)
static const Enum< interpolationType > interpolationTypeNames_
#define FatalErrorInFunction
scalarField Re(const UList< complex > &cf)
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
virtual scalar Re(const scalar uPlus) const
defineTypeNameAndDebug(combustionModel, 0)
uniformInterpolationTable< scalar > invertedTable_