44 void Foam::LESModels::smoothDelta::setChangedFaces
48 DynamicList<label>& changedFaces,
49 DynamicList<deltaData>& changedFacesInfo
52 for (
label facei = 0; facei < mesh.nInternalFaces(); facei++)
54 scalar ownDelta = delta[mesh.faceOwner()[facei]];
56 scalar neiDelta = delta[mesh.faceNeighbour()[facei]];
60 if (ownDelta > maxDeltaRatio_ * neiDelta)
62 changedFaces.append(facei);
63 changedFacesInfo.append(deltaData(ownDelta));
65 else if (neiDelta > maxDeltaRatio_ * ownDelta)
67 changedFaces.append(facei);
68 changedFacesInfo.append(deltaData(neiDelta));
76 const polyPatch& patch = mesh.boundaryMesh()[
patchi];
82 label meshFacei = patch.start() + patchFacei;
84 scalar ownDelta = delta[mesh.faceOwner()[meshFacei]];
86 changedFaces.append(meshFacei);
87 changedFacesInfo.append(deltaData(ownDelta));
92 changedFaces.shrink();
93 changedFacesInfo.shrink();
97 void Foam::LESModels::smoothDelta::calcDelta()
99 const fvMesh& mesh = turbulenceModel_.mesh();
104 DynamicList<label> changedFaces(mesh.nFaces()/100 + 100);
105 DynamicList<deltaData> changedFacesInfo(changedFaces.size());
107 setChangedFaces(mesh, geometricDelta, changedFaces, changedFacesInfo);
110 List<deltaData> cellDeltaData(mesh.nCells());
112 forAll(geometricDelta, celli)
114 cellDeltaData[celli] = geometricDelta[celli];
118 List<deltaData> faceDeltaData(mesh.nFaces());
122 FaceCellWave<deltaData, scalar> deltaCalc
129 mesh.globalData().nTotalCells()+1,
135 delta_[celli] = cellDeltaData[celli].delta();
142 Foam::LESModels::smoothDelta::smoothDelta
177 geometricDelta_().
read(coeffsDict);
178 coeffsDict.lookup(
"maxDeltaRatio") >> maxDeltaRatio_;
185 geometricDelta_().correct();
187 if (turbulenceModel_.mesh().changing())
bool read(Istream &)
Read dictionary from Istream.
#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.
addToRunTimeSelectionTable(LESfluidThermoCompressibleTurbulenceModel, SmagorinskyLESfluidThermoCompressibleTurbulenceModel, dictionary)
virtual void read(const dictionary &)
Read the LESdelta dictionary.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Abstract base class for LES deltas.
Abstract base class for turbulence models (RAS, LES and laminar).
Macros for easy insertion into run-time selection tables.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const dictionary & optionalSubDict(const word &) const
Find and return a sub-dictionary if found.
A class for handling words, derived from string.
static autoPtr< LESdelta > New(const word &name, const turbulenceModel &turbulence, const dictionary &dict)
Return a reference to the selected LES delta.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if successful.
fileName::Type type(const fileName &, const bool followLink=true)
Return the file type: DIRECTORY or FILE.
defineTypeNameAndDebug(cubeRootVolDelta, 0)
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.