48 void Foam::LESModels::vanDriestDelta::calcDelta()
62 mesh.time().constant(),
74 if (isA<wallFvPatch>(
patches[patchi]))
78 const scalarField& nuSgsw = nuSgs().boundaryField()[patchi];
81 nuw/
sqrt((nuw + nuSgsw)*
mag(Uw.snGrad()) + VSMALL);
87 wallDistData<wallPointYPlus>
y(
mesh, ystar);
92 static_cast<const volScalarField&>(geometricDelta_()),
93 (kappa_/Cdelta_)*((scalar(1) + SMALL) -
exp(-
y/ystar/Aplus_))*
y 100 Foam::LESModels::vanDriestDelta::vanDriestDelta
120 kappa_(
dict.getOrDefault<scalar>(
"kappa", 0.41)),
123 dict.optionalSubDict(
type() +
"Coeffs").getOrDefault<scalar>
131 dict.optionalSubDict(
type() +
"Coeffs").getOrDefault<scalar>
140 if (!coeffsDict.readIfPresent(
"calcInterval", calcInterval_))
145 delta_ = geometricDelta_();
155 geometricDelta_().
read(coeffsDict);
156 dict.readIfPresent<scalar>(
"kappa", kappa_);
157 coeffsDict.readIfPresent<scalar>(
"Aplus", Aplus_);
158 coeffsDict.readIfPresent<scalar>(
"Cdelta", Cdelta_);
160 if (!coeffsDict.readIfPresent<label>(
"calcInterval", calcInterval_))
162 coeffsDict.readIfPresent(
"updateInterval", calcInterval_);
171 if ((turbulenceModel_.mesh().time().timeIndex() % calcInterval_) == 0)
173 geometricDelta_().correct();
const fvMesh & mesh() const
fvPatchField< vector > fvPatchVectorField
addToRunTimeSelectionTable(LESfluidThermoCompressibleTurbulenceModel, SmagorinskyLESfluidThermoCompressibleTurbulenceModel, dictionary)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
const volVectorField & U() const
Access function to velocity field.
bool read(Istream &is)
Read dictionary from Istream. Discards the header.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Abstract base class for LES deltas.
virtual tmp< volScalarField > nu() const =0
Return the laminar viscosity.
dimensionedScalar sqrt(const dimensionedScalar &ds)
GeometricBoundaryField< scalar, fvPatchField, volMesh > Boundary
Type of boundary fields.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
GeometricField< vector, fvPatchField, volMesh > volVectorField
Abstract base class for turbulence models (RAS, LES and laminar).
Macros for easy insertion into run-time selection tables.
#define forAll(list, i)
Loop across all elements in list.
constexpr const char *const group
Group name for atomic constants.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
dimensionedScalar exp(const dimensionedScalar &ds)
A class for handling words, derived from Foam::string.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
Find an entry if present, and assign to T val. FatalIOError if it is found and the number of tokens i...
Info<< "Reading field U\"<< endl;volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);volScalarField rho(IOobject("rho", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), thermo.rho());volVectorField rhoU(IOobject("rhoU", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *U);volScalarField rhoE(IOobject("rhoE", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *(e+0.5 *magSqr(U)));surfaceScalarField pos(IOobject("pos", runTime.timeName(), mesh), mesh, dimensionedScalar("pos", dimless, 1.0));surfaceScalarField neg(IOobject("neg", runTime.timeName(), mesh), mesh, dimensionedScalar("neg", dimless, -1.0));surfaceScalarField phi("phi", fvc::flux(rhoU));Info<< "Creating turbulence model\"<< endl;autoPtr< compressible::turbulenceModel > turbulence(compressible::turbulenceModel::New(rho, U, phi, thermo))
defineTypeNameAndDebug(cubeRootVolDelta, 0)
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const polyBoundaryMesh & patches
static scalar yPlusCutOff
The cut-off value for y+.
virtual void read(const dictionary &)
Read the LESdelta dictionary.
virtual tmp< volScalarField > nut() const =0
Return the turbulence viscosity.
const turbulenceModel & turbulenceModel_
Defines the attributes of an object for which implicit objectRegistry management is supported...
PtrList< fvPatch > fvPatchList
Store lists of fvPatch as a PtrList.