43 void Foam::LESModels::maxDeltaxyz::calcDelta()
47 label nD = mesh.nGeometricD();
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;
79 <<
"Case is 2D, LES is not strictly applicable\n"
87 <<
"Case is not 3D or 2D, LES is not applicable"
105 dict.optionalSubDict(
type() +
"Coeffs").lookupOrDefault<scalar>
130 if (momentumTransportModel_.mesh().changing())
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
Internal::FieldType & primitiveFieldRef()
Return a reference to the primitive field.
Delta calculated by taking the maximum distance between the cell centre and any face centre....
maxDeltaxyz(const word &name, const momentumTransportModel &turbulence, const dictionary &)
Construct from name, momentumTransportModel and dictionary.
virtual void read(const dictionary &)
Read the LESdelta dictionary.
Abstract base class for LES deltas.
const momentumTransportModel & momentumTransportModel_
A list of keyword definitions, which are a keyword followed by any number of values (e....
bool readIfPresent(const word &, T &, bool recursive=false, bool patternMatch=true) const
Find an entry if present, and assign to T.
Abstract base class for turbulence models (RAS, LES and laminar).
const fvMesh & mesh() const
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define WarningInFunction
Report a warning using Foam::Warning.
defineTypeNameAndDebug(cubeRootVolDelta, 0)
addToRunTimeSelectionTable(LESdelta, cubeRootVolDelta, dictionary)
errorManipArg< error, int > exit(error &err, const int errNo=1)
List< label > labelList
A List of labels.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
List< cell > cellList
list of cells
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const bool)
Return a word representation of a bool.
vector point
Point is a vector.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensioned< scalar > mag(const dimensioned< Type > &)
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
autoPtr< incompressible::momentumTransportModel > turbulence(incompressible::momentumTransportModel::New(U, phi, viscosity))