CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[snappyHexMesh] What is an under-determined cell?

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 2 Post By beck
  • 1 Post By marango
  • 1 Post By derekm

Reply
 
LinkBack Thread Tools Search this Thread 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: 20
Rep Power: 14
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, 175 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: 740
Rep Power: 28
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, 371 views)
File Type: jpg 03.jpg (98.5 KB, 311 views)
File Type: jpg 01.jpg (80.3 KB, 255 views)
File Type: jpg 04.jpg (80.6 KB, 275 views)
kmou and beatlejuice like 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: 740
Rep Power: 28
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: 16
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?
amuzeshi likes this.
marango is offline   Reply With Quote

Old   March 23, 2015, 09:31
Default
  #6
Member
 
Timm Severin
Join Date: Mar 2014
Location: Munich
Posts: 63
Rep Power: 12
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: 172
Rep Power: 13
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
amuzeshi likes this.
__________________
A CHEERING BAND OF FRIENDLY ELVES CARRY THE CONQUERING ADVENTURER OFF INTO THE SUNSET
derekm is offline   Reply With Quote

Old   April 25, 2015, 15:13
Default
  #8
Member
 
DanielP
Join Date: Jan 2015
Posts: 33
Rep Power: 11
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

Old   March 6, 2020, 14:59
Default
  #9
Senior Member
 
Ali Shayegh
Join Date: Oct 2015
Posts: 131
Rep Power: 11
amuzeshi is on a distinguished road
Quote:
Originally Posted by derekm View Post
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
Dear Derekm,
I read thid paper but did not find any relation between its metrics and cell determinants in OpenFOAM.
Did you find any connection?
Thank you.
Ali
amuzeshi is offline   Reply With Quote

Reply

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


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Other] Contribution a new utility: refine wall layer mesh based on yPlus field lakeat OpenFOAM Community Contributions 58 December 23, 2021 03:36
Partition: cell count = 0 metmet FLUENT 1 August 31, 2014 20:41
Warning 097- AB Siemens 6 November 15, 2004 05:41
monitoring cell Jane Siemens 2 March 4, 2004 22:01
cell to cell relation CMB Siemens 1 December 4, 2003 05:05


All times are GMT -4. The time now is 16:15.