Hello,
I've found a major bug in the finite area patch class. The problem hides in line 330 of src/finiteArea/faMesh/faPatches/faPatch/faPatch.C, where the calculation of the neighbour polyPatch face normals (ngbPolyPatchFaceNormals) of faPatches takes place:
forAll(fN(), faceI)
{
fN() = faces[ngbFaces[faceI]].normal(points)
/faces[ngbFaces[faceI]].mag(points);
}
Within the iteration over all face indices of the normal vector field, the whole vector is always replaced with the current index value. The impact is major as it effects all simulations with non-planar polyPatch boundaries in contact with a finite area mesh. Furthermore the calculation of the ngbPolyPatchPointNormals directly depends on the ngbPolyPatchFaceNormals.
The bug can be easily fixed by introducing the face index for the normal vector field fN():
forAll(fN(), faceI)
{
fN()[faceI] = faces[ngbFaces[faceI]].normal(points)
/ faces[ngbFaces[faceI]].mag(points);
}
A simple diff is attached.
Best regards,
Pascal Beckstein
I could not find a way to edit the ticket. For the sake of completeness, there is little information missing in the ticket details:
Projection => "minor-fix"
component => "Finite Area"
Regards,
Pascal
Fixed, together with performance improvement. We will roll this into next bug fix set