48 void Foam::LESModels::IDDESDelta::calcDelta()
64 scalarField& faceToFacenMax = tfaceToFacenMax.ref().primitiveFieldRef();
71 scalar maxDelta = 0.0;
77 label facei = cFaces[cFacei];
78 const point& fci = faceCentres[facei];
82 label facej = cFaces[cFacej];
83 const point& fcj = faceCentres[facej];
84 scalar ndfc = nci & (fcj - fci);
93 faceToFacenMax[celli] = maxDelta;
97 label nD =
mesh.nGeometricD();
102 <<
"Case is 2D, LES is not strictly applicable" <<
nl 133 Foam::LESModels::IDDESDelta::IDDESDelta
144 dict.optionalSubDict(
type() +
"Coeffs").getOrDefault<scalar>
151 if (
dict.optionalSubDict(
type() +
"Coeffs").found(
"hmax"))
159 dict.optionalSubDict(
type() +
"Coeffs"),
165 Info<<
"Employing " << maxDeltaxyz::typeName <<
" for hmax" <<
endl;
173 dict.optionalSubDict(
type() +
"Coeffs")
196 if (turbulenceModel_.mesh().changing())
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)
const volVectorField & n() const
Return reference to cached normal-to-wall field.
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.
static const wallDist & New(const fvMesh &mesh, Args &&... args)
Get existing or create MeshObject registered with typeName.
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.
void read(const dictionary &)
Read the LESdelta dictionary.
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.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
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 expressions::valueTypeCode::INVALID.
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.
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New(const word &name, IOobjectOption::registerOption regOpt, const Mesh &mesh, const dimensionSet &dims, const word &patchFieldType=fvPatchField< scalar >::calculatedType())
Return tmp field (NO_READ, NO_WRITE) from name, mesh, dimensions and patch type. [Takes current timeN...
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)
Internal::FieldType & primitiveFieldRef(const bool updateAccessTime=true)
Return a reference to the internal field values.
const volScalarField & hmax() const
Return the hmax delta field.
vector point
Point is a vector.
#define WarningInFunction
Report a warning using Foam::Warning.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
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_
Do not request registration (bool: false)
static constexpr const zero Zero
Global zero (0)