CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Native Meshers: snappyHexMesh and Others

What is an under-determined cell?

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By beck

Reply
 
LinkBack Thread Tools Display Modes
Old   November 14, 2012, 05:08
Question What is an under-determined cell?
  #1
New Member
 
Lydia Schulze
Join Date: Jan 2012
Location: Karlsruhe, Germany
Posts: 18
Rep Power: 6
Lydia is on a distinguished road
Hello FOAMers,

currently we are trying to mesh a rather big, complex geometry with the snappyHexMesh tool.
Unfortunately, we are always getting lots of "under.determined cells" which occur after the first meshing step (= in the castellated mesh).

Does anyone have an idea what the criteria for these "under-determined cells" is? And how can they be avoided

After extracting them I loaded the VTK-file in paraview - the cells look rectangular, no irregularity visible - see attached image. Since I'm having about 700 cells, i don't dare to just delete them from my mesh.

Did anyone experience similar problems or maybe have an advise for solving this problem? I think remeshing doesn't really help....

Thanks in advance!
Regards,
Lydia
Attached Images
File Type: jpg underdeterminedCells.jpg (45.2 KB, 56 views)
Lydia is offline   Reply With Quote

Old   November 14, 2012, 14:07
Default
  #2
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 727
Rep Power: 20
mturcios777 will become famous soon enough
You may want to check if this is even a problem. Run checkMesh on your case and if it tells you its okay, then don't worry about them.

I'm thinking under-determined cells is a designation for snappyHexMesh in assessing mesh quality. As long as your final mesh passes muster I would go ahead with it.
mturcios777 is offline   Reply With Quote

Old   November 16, 2012, 03:16
Default
  #3
New Member
 
tarek
Join Date: Nov 2012
Posts: 2
Rep Power: 0
beck is on a distinguished road
After getting around 6k under-determined cells in my grid I had a closer look at them in paraview and found out that every under-determined cell has two opposite faces that have no connection to another cell.

So this could be the criterion of checkMesh to locate under-determined Cells.

In the attached pictures u can see the filtered under-determined cells marked in red.
Attached Images
File Type: jpg 02.jpg (71.7 KB, 101 views)
File Type: jpg 03.jpg (98.5 KB, 92 views)
File Type: jpg 01.jpg (80.3 KB, 82 views)
File Type: jpg 04.jpg (80.6 KB, 76 views)
kmou likes this.
beck is offline   Reply With Quote

Old   November 16, 2012, 13:08
Default
  #4
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 727
Rep Power: 20
mturcios777 will become famous soon enough
Looks like these occur in regions where the STL domain is "thin" relative to the background hex mesh. What does the final snapped mesh look like, and what is the output from checkMesh when you run it on the final mesh?
mturcios777 is offline   Reply With Quote

Old   January 29, 2013, 06:33
Default
  #5
New Member
 
Join Date: Jun 2010
Location: Germany
Posts: 13
Rep Power: 8
marango is on a distinguished road
When you have a look at the source code of the check mesh utility, you will see that there are two kinds of underdetermined cells.

The first kind of cells do have two or less free internal faces that do not belong to boundary patches. This can lead to numerical errors, for example when a tet element has 3 boundary faces.

About the second kind of cells I cannot tell you much. I still don't know what's going on there. But it has something to do with the ration of one face area and the complete element area.

Does anyone else have further information about that?
marango is offline   Reply With Quote

Old   March 23, 2015, 09:31
Default
  #6
Member
 
Timm Severin
Join Date: Mar 2014
Location: Munich
Posts: 60
Rep Power: 4
Astrodan is on a distinguished road
Quote:
Originally Posted by marango View Post
The first kind of cells do have two or less free internal faces that do not belong to boundary patches. This can lead to numerical errors, for example when a tet element has 3 boundary faces.
Could you point out where in the code this can be found? I checked github and doxygen and couldn't find that part. The only code I found on under-determined cells is in polyMeshGeometry (or same for primitiveMeshGeometry):
Code:
bool Foam::polyMeshGeometry::checkCellDeterminant
(
    const bool report,
    const scalar warnDet,
    const polyMesh& mesh,
    const vectorField& faceAreas,
    const labelList& checkFaces,
    const labelList& affectedCells,
    labelHashSet* setPtr
)
{
    const cellList& cells = mesh.cells();

    scalar minDet = GREAT;
    scalar sumDet = 0.0;
    label nSumDet = 0;
    label nWarnDet = 0;

    forAll(affectedCells, i)
    {
        const cell& cFaces = cells[affectedCells[i]];

        tensor areaSum(tensor::zero);
        scalar magAreaSum = 0;

        forAll(cFaces, cFaceI)
        {
            label faceI = cFaces[cFaceI];

            scalar magArea = mag(faceAreas[faceI]);

            magAreaSum += magArea;
            areaSum += faceAreas[faceI]*(faceAreas[faceI]/(magArea+VSMALL));
        }

        scalar scaledDet = det(areaSum/(magAreaSum+VSMALL))/0.037037037037037;

        minDet = min(minDet, scaledDet);
        sumDet += scaledDet;
        nSumDet++;

        if (scaledDet < warnDet)
        {
            if (setPtr)
            {
                // Insert all faces of the cell.
                forAll(cFaces, cFaceI)
                {
                    label faceI = cFaces[cFaceI];
                    setPtr->insert(faceI);
                }
            }
            nWarnDet++;
        }
    }

    // Reporting stuff
    // ...
}
But here I don't really understand what is happening (failing at the tensor areaSum). Anyway, your explanation sounds reasonable, as my underdeterminedCells are all tets at two boundaries at once.

At sort of off topic: I have been googling and cfd-onlining all kind of checkMesh errors lately, and it's quite often hard work of gathering hints and explanations here and there.. would anyone appreciate (and help) collecting that information in a checkMesh-errors wiki-page?

-Timm
__________________
PhD Student at the Institute of Biochemical Engineering at TU München
Modelling of fluid dynamics in open photobioreactors.

System:
OpenFOAM 2.3.x, 64bit, 8 Core Xeon Workstation
Astrodan is offline   Reply With Quote

Old   March 23, 2015, 10:13
Default
  #7
Senior Member
 
Derek Mitchell
Join Date: Mar 2014
Location: UK, Reading
Posts: 131
Rep Power: 5
derekm is on a distinguished road
it related to the determinant of the cell see this reference

ALGEBRAIC MESH QUALITY METRICS PATRICK M. KNUPP

http://www.google.co.uk/url?sa=t&rct...Y0ZL3Cq9Cl2W1w
__________________
A CHEERING BAND OF FRIENDLY ELVES CARRY THE CONQUERING ADVENTURER OFF INTO THE SUNSET
derekm is offline   Reply With Quote

Old   April 25, 2015, 14:13
Default
  #8
Member
 
DanielP
Join Date: Jan 2015
Posts: 33
Rep Power: 3
danielpiaget is on a distinguished road
Hello Timm,

Regarding this piece code:

-the forAll loops are standard C++ for loops that are defined as macros in openFOAM to permit looping over containers such as map,list,etc.. This way one does not need to define an iterator every time.The iretator in this case is the cFaceI.

-the function appers to do two things, return a true or false value (boolean) and write information to hash table structure via the setPtr pointer of all the faces that have cells that have negative determinants.

-It will keep track of the following qunatities:
-How many determinant calculations have been executed (nSumDet)
-How many determinant of negative value (nWarDet)
-The minimum determinant that was calculated for all the cells(minDet)
-the total sum of all the determinants for all the cells that were treated.

Hope that helps,

Daniel
danielpiaget is offline   Reply With Quote

Reply

Tags
castellated mesh, snappyhexmesh, under-determined cells, underdetermined cells

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help Me, what's the Cell Above any given cell in 3D. gomane8 Main CFD Forum 3 September 11, 2011 21:29
Cells with t below lower limit Purushothama CD-adapco 2 May 31, 2010 21:58
How to determine the direction of cell face vectors on processor patches sebastian_vogl OpenFOAM Programming & Development 0 October 26, 2009 13:10
Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 2 July 15, 2005 04:15
Warning 097- AB CD-adapco 6 November 15, 2004 05:41


All times are GMT -4. The time now is 01:02.