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 = momentumTransportModel_.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();
174 geometricDelta_().
read(coeffsDict);
175 coeffsDict.lookup(
"maxDeltaRatio") >> maxDeltaRatio_;
182 geometricDelta_().correct();
184 if (momentumTransportModel_.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.
static autoPtr< LESdelta > New(const word &name, const momentumTransportModel &turbulence, const dictionary &dict)
Return a reference to the selected LES delta.
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.
addToRunTimeSelectionTable(LESdelta, cubeRootVolDelta, dictionary)
bool read(Istream &, const bool keepHeader=false)
Read dictionary from Istream, optionally keeping the header.
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.
defineTypeNameAndDebug(cubeRootVolDelta, 0)
Abstract base class for turbulence models (RAS, LES and laminar).
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
smoothDelta(const word &name, const momentumTransportModel &turbulence, const dictionary &)
Construct from name, momentumTransportModel and dictionary.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.