Menu

#268 Missing vector index in faPatch.C

fixed
None
normal
major
Always
none
Bug
other
2015-04-01
2015-04-01
No

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

1 Attachments

Discussion

  • 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

     
  • Hrvoje Jasak

    Hrvoje Jasak - 2015-04-01
    • status: new --> fixed
    • assigned_to: Hrvoje Jasak
     
  • Hrvoje Jasak

    Hrvoje Jasak - 2015-04-01

    Fixed, together with performance improvement. We will roll this into next bug fix set

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.