35 namespace tabulatedWallFunctions
40 tabulatedWallFunction,
88 *(
exp(kUPlus) -
pow3(kUPlus)/6 - 0.5*
sqr(kUPlus) - kUPlus - 1);
95 +
exp(kUPlus)*(kUPlus + 1)
96 - 2.0/3.0*
pow3(kUPlus)
102 scalar uPlusNew =
uPlus -
f/(df + ROOTVSMALL);
103 error =
mag((
uPlus - uPlusNew)/uPlusNew);
110 <<
"Newton iterations not converged:" <<
nl
111 <<
" iters = " << iter <<
", error = " << error <<
endl;
124 const dictionary&
dict,
128 tabulatedWallFunction(
dict,
mesh, typeName),
129 kappa_(coeffDict_.
get<scalar>(
"kappa")),
130 E_(coeffDict_.
get<scalar>(
"E"))
152 + 1/
E_*(
exp(kUPlus) -
pow3(kUPlus)/6 - 0.5*
sqr(kUPlus) - kUPlus - 1);
167 if (invertedTable_.log10())
169 os <<
"log10(Re), y+, u+:" <<
endl;
172 scalar
uPlus = invertedTable_[i];
180 os <<
"Re, y+, u+:" <<
endl;
183 scalar
uPlus = invertedTable_[i];
184 scalar
Re = this->
Re(uPlus);
static const Foam::dimensionedScalar A("", Foam::dimPressure, 611.21)
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
scalar Re() const
Real part of complex number.
Computes the near wall for turbulence models.
Computes U+ as a function of Reynolds number by inverting Spaldings law.
virtual void invertFunction()
Invert the function.
scalar kappa_
Von Karman constant.
static const scalar tolerance_
Tolerance.
static const label maxIters_
Maximum number of iterations.
scalar E_
Law-of-the-wall E coefficient.
virtual scalar Re(const scalar uPlus) const
Return Reynolds number as a function of u+.
virtual void writeData(Ostream &os) const
Write to Ostream.
uniformInterpolationTable< scalar > invertedTable_
Inverted table.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
OBJstream os(runTime.globalPath()/outputName)
#define WarningInFunction
Report a warning using Foam::Warning.
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensionedScalar exp(const dimensionedScalar &ds)
scalarField Re(const UList< complex > &cf)
Extract real component.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar pow3(const dimensionedScalar &ds)
dimensionedScalar log10(const dimensionedScalar &ds)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
constexpr char nl
The newline '\n' character (0x0a)
#define forAll(list, i)
Loop across all elements in list.
const bool writeData(pdfDictionary.get< bool >("writeData"))