43 void Foam::LESModels::maxDeltaxyz::calcDelta()
45 const fvMesh& mesh = turbulenceModel_.mesh();
47 label nD = mesh.nGeometricD();
49 const cellList& cells = mesh.cells();
54 scalar deltaMaxTmp = 0.0;
55 const labelList& cFaces = mesh.cells()[celli];
56 const point& centrevector = mesh.cellCentres()[celli];
60 label facei = cFaces[cFacei];
61 const point& facevector = mesh.faceCentres()[facei];
62 scalar tmp =
mag(facevector - centrevector);
63 if (tmp > deltaMaxTmp)
69 hmax[celli] = deltaCoeff_*deltaMaxTmp;
74 delta_.primitiveFieldRef() = hmax;
79 <<
"Case is 2D, LES is not strictly applicable\n" 82 delta_.primitiveFieldRef() = hmax;
87 <<
"Case is not 3D or 2D, LES is not applicable" 95 Foam::LESModels::maxDeltaxyz::maxDeltaxyz
130 if (turbulenceModel_.mesh().changing())
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManipArg< error, int > exit(error &err, const int errNo=1)
addToRunTimeSelectionTable(LESfluidThermoCompressibleTurbulenceModel, SmagorinskyLESfluidThermoCompressibleTurbulenceModel, dictionary)
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Abstract base class for LES deltas.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Abstract base class for turbulence models (RAS, LES and laminar).
Macros for easy insertion into run-time selection tables.
const dictionary & optionalSubDict(const word &) const
Find and return a sub-dictionary if found.
A class for handling words, derived from string.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
bool readIfPresent(const word &, T &, bool recursive=false, bool patternMatch=true) const
Find an entry if present, and assign to T.
List< label > labelList
A List of labels.
fileName::Type type(const fileName &, const bool followLink=true)
Return the file type: DIRECTORY or FILE.
defineTypeNameAndDebug(cubeRootVolDelta, 0)
vector point
Point is a vector.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
#define WarningInFunction
Report a warning using Foam::Warning.
dimensioned< scalar > mag(const dimensioned< Type > &)
List< cell > cellList
list of cells
virtual void read(const dictionary &)
Read the LESdelta dictionary.