48 void Foam::LESModels::DeltaOmegaTildeDelta::calcDelta()
53 tmp<volVectorField> tvorticity =
fvc::curl(U0);
75 const point& cc = cellCentres[celli];
76 const vector& nv = nvecvort[celli];
78 scalar deltaMaxTmp = 0;
80 for (
const label facei : cFaces)
82 const point& fc = faceCentres[facei];
83 const scalar tmp = 2.0*
mag(nv ^ (fc - cc));
85 if (tmp > deltaMaxTmp)
91 delta_[celli] = deltaCoeff_*deltaMaxTmp;
94 const label nD =
mesh.nGeometricD();
99 <<
"Case is 2D, LES is not strictly applicable" <<
nl 115 Foam::LESModels::DeltaOmegaTildeDelta::DeltaOmegaTildeDelta
126 dict.optionalSubDict(
type() +
"Coeffs").getOrDefault<scalar>
134 dict.optionalSubDict(
type() +
"Coeffs").getOrDefault<bool>
141 if (
dict.optionalSubDict(
type() +
"Coeffs").found(
"hmax"))
149 dict.optionalSubDict(
"hmaxCoeffs"),
155 Info<<
"Employing " << maxDeltaxyz::typeName <<
" for hmax" <<
endl;
163 dict.optionalSubDict(
"hmaxCoeffs")
179 coeffsDict.
readIfPresent<
bool>(
"requireUpdate", requireUpdate_);
187 if (turbulenceModel_.mesh().changing() && requireUpdate_)
static word group(const word &name)
Return group (extension part of name)
const fvMesh & mesh() const
List< cell > cellList
List of cell.
errorManipArg< error, int > exit(error &err, const int errNo=1)
addToRunTimeSelectionTable(LESfluidThermoCompressibleTurbulenceModel, SmagorinskyLESfluidThermoCompressibleTurbulenceModel, dictionary)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
virtual void read(const dictionary &)
Read the LESdelta dictionary.
const volVectorField & U() const
Access function to velocity field.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const turbulenceModel & turbulence() const
Return turbulenceModel reference.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
constexpr char nl
The newline '\n' character (0x0a)
Abstract base class for LES deltas.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const dimensionSet dimless
Dimensionless.
GeometricField< vector, fvPatchField, volMesh > volVectorField
Abstract base class for turbulence models (RAS, LES and laminar).
Macros for easy insertion into run-time selection tables.
tmp< GeometricField< Type, fvPatchField, volMesh > > curl(const GeometricField< Type, fvPatchField, volMesh > &vf)
#define forAll(list, i)
Loop across all elements in list.
static autoPtr< LESdelta > New(const word &name, const turbulenceModel &turbulence, const dictionary &dict, const word &lookupName="delta")
Return a reference to the selected LES delta.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Calculate the curl of the given volField by constructing the Hodge-dual of the symmetric part of the ...
A class for handling words, derived from Foam::string.
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)
vector point
Point is a vector.
#define WarningInFunction
Report a warning using Foam::Warning.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
void correctBoundaryConditions()
Correct boundary field.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Field< vector > vectorField
Specialisation of Field<T> for vector.
List< label > labelList
A List of labels.
Delta calculated by taking the maximum distance between the cell centre and any face centre...
const turbulenceModel & turbulenceModel_