movingMappedWallVelocity: Fix calculation of mapped shear velocity

This commit is contained in:
Will Bainbridge
2024-09-11 16:52:25 +01:00
parent f1068151ee
commit 2853f9ddfd

View File

@ -107,18 +107,19 @@ void Foam::movingMappedWallVelocityFvPatchVectorField::updateCoeffs()
: tmp<scalarField>(new scalarField(fvp.size(), Zero));
// Calculate and map the mesh velocity from the neighbour
vectorField nbrCf0(nbrFvp.size());
vectorField nbrCf(nbrFvp.size()), nbrCf0(nbrFvp.size());
forAll(nbrCf0, nbrPatchFacei)
{
const label nbrPolyFacei =
nbrMesh.polyFacesBf()[nbrFvp.index()][nbrPatchFacei];
nbrCf[nbrPatchFacei] =
nbrMesh.faceCentres()[nbrPolyFacei];
nbrCf0[nbrPatchFacei] =
nbrMesh.faces()
[
nbrMesh.polyFacesBf()[nbrFvp.index()][nbrPatchFacei]
].centre(nbrMesh.oldPoints());
nbrMesh.faces()[nbrPolyFacei].centre(nbrMesh.oldPoints());
}
const vectorField nbrUp
(
(nbrFvp.Cf() - nbrCf0)/db().time().deltaTValue()
(nbrCf - nbrCf0)/db().time().deltaTValue()
);
const vectorField Up(mapper.fromNeighbour(nbrUp));