Added immersed boundary support to wall distance
This commit is contained in:
parent
0b56f4494b
commit
c7f24b57ed
3 changed files with 12 additions and 15 deletions
|
@ -80,7 +80,7 @@ void Foam::nearWallDist::correct()
|
|||
if (mesh_.changing())
|
||||
{
|
||||
// Update size of GeometricBoundaryField
|
||||
forAll(mesh_.boundary(), patchI)
|
||||
forAll (mesh_.boundary(), patchI)
|
||||
{
|
||||
operator[](patchI).setSize(mesh_.boundary()[patchI].size());
|
||||
}
|
||||
|
|
|
@ -78,24 +78,22 @@ void Foam::wallDist::correct()
|
|||
}
|
||||
}
|
||||
|
||||
// Get patchids of walls
|
||||
// labelHashSet wallPatchIDs(getPatchIDs<wallPolyPatch>());
|
||||
|
||||
// Calculate distance starting from wallPatch faces.
|
||||
patchWave wave(cellDistFuncs::mesh(), wallPatchIDs, correctWalls_);
|
||||
|
||||
// Transfer cell values from wave into *this
|
||||
transfer(wave.distance());
|
||||
|
||||
// Transfer values on patches into boundaryField of *this
|
||||
forAll (boundaryField(), patchI)
|
||||
{
|
||||
if (!isA<emptyFvPatchScalarField>(boundaryField()[patchI]))
|
||||
{
|
||||
scalarField& waveFld = wave.patchDistance()[patchI];
|
||||
// Make near-wall distance consistent with wall distance
|
||||
// This is needed by immersed boundary walls
|
||||
// HJ, 29/May/2018
|
||||
const fvPatchList& patches = volScalarField::mesh().boundary();
|
||||
|
||||
boundaryField()[patchI].transfer(waveFld);
|
||||
}
|
||||
forAll (patches, patchI)
|
||||
{
|
||||
fvPatchScalarField& yPatch = boundaryField()[patchI];
|
||||
|
||||
boundaryField()[patchI] = 1/patches[patchI].deltaCoeffs();
|
||||
}
|
||||
|
||||
// Transfer number of unset values
|
||||
|
|
|
@ -112,9 +112,8 @@ public:
|
|||
wallDist(const fvMesh& mesh, bool correctWalls = true);
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
virtual ~wallDist();
|
||||
//- Destructor
|
||||
virtual ~wallDist();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
|
Reference in a new issue