View Issue Details

IDProjectCategoryView StatusLast Update
0000757OpenFOAMBugpublic2013-07-29 11:16
Reporteruser281Assigned Touser2 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionno change required 
PlatformLinuxOSRedhat Enterprise LinuxOS Version6.3
Summary0000757: Face Area Magnitudes (magSf()) Incorrectly Calculated
DescriptionThe face area magnitudes calculated by OpenFOAM are not correct for small negative normal face areas. The following is an example:

mesh.Sf()[f1] = (1.3333333e-06 0 0) -> mesh.magSf()[f1] = 1.3333333e-06, but mesh.Sf()[f2] = (0 -1.3333333e-06 0) -> mesh.magSf()[f2] = 0, however mag(mesh.Sf()[f2]) = 1.3333333e-06.
Steps To ReproduceCreate a mesh with small, negative, normal face areas and compare mesh.magSf to mag(mesh.Sf) for the negative normal face.
TagsNo tags attached.

Activities

henry

2013-02-26 14:04

manager   ~0001947

magSf is calculated thus:

void fvMesh::makeMagSf() const
{
    if (debug)
    {
        Info<< "void fvMesh::makeMagSf() : "
            << "assembling mag face areas"
            << endl;
    }

    // It is an error to attempt to recalculate
    // if the pointer is already set
    if (magSfPtr_)
    {
        FatalErrorIn("void fvMesh::makeMagSf()")
            << "mag face areas already exist"
            << abort(FatalError);
    }

    // Note: Added stabilisation for faces with exactly zero area.
    // These should be caught on mesh checking but at least this stops
    // the code from producing Nans.
    magSfPtr_ = new surfaceScalarField
    (
        IOobject
        (
            "magSf",
            pointsInstance(),
            meshSubDir,
            *this,
            IOobject::NO_READ,
            IOobject::NO_WRITE,
            false
        ),
        mag(Sf()) + dimensionedScalar("vs", dimArea, VSMALL)
    );
}

Issue History

Date Modified Username Field Change
2013-02-26 13:00 user281 New Issue
2013-02-26 14:04 henry Note Added: 0001947
2013-07-29 11:16 user2 Priority immediate => normal
2013-07-29 11:16 user2 Status new => resolved
2013-07-29 11:16 user2 Resolution open => no change required
2013-07-29 11:16 user2 Assigned To => user2