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

[snappyHexMesh] How to iddentify and get rid of cells with too small volume?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 26, 2014, 08:10
Default How to iddentify and get rid of cells with too small volume?
  #1
Senior Member
 
Eloïse
Join Date: Jul 2012
Location: Trondheim, Norway
Posts: 113
Rep Power: 14
Eloise is on a distinguished road
Hello Foamers,

I am working on the layer addition phase for a complex snappyHexMesh (sHM) mesh. I encountered a crash of sHM with the error message:
Code:
#1  Foam::sigFpe::sigHandler(int) in  "/share/apps/OpenFOAM-2.2.2//OpenFOAM-2.2.2/platforms/linux64Gcc46DPOpt/lib/libOpenFOAM.so"
which I overcame by unsetting FOAM_SIGFPE before generating my mesh.

Now that sHM runs until the end, I get a mesh with layers but it's quality is not sufficient. As shown by checkMesh output, I have some cells with minimum volume of magnitude e-300:
Code:
Checking geometry...
    Overall domain bounding box (-140 -140 -300) (140 140 0.000368027)
    Mesh (non-empty, non-wedge) directions (1 1 1)
    Mesh (non-empty) directions (1 1 1)
    Boundary openness (-nan nan -nan) OK.
    Max cell openness = 6.65112e-16 OK.
    Max aspect ratio = 24.5205 OK.
    Minimum face area = 3.61586e-06. Maximum face area = 149.753.  Face area magnitudes OK.
    Min volume = 1.66667e-300. Max volume = 518.268.  Total volume = 1.83588e+07.  Cell volumes OK.
    Mesh non-orthogonality Max: 64.9964 average: -nan
    Non-orthogonality check OK.
    Face pyramids OK.
 ***Max skewness = 49.8663, 6557 highly skew faces detected which may impair the quality of the results
  <<Writing 6557 skew faces to set skewFaces
    Coupled point location match (average 0) OK.

Failed 1 mesh checks.
I run sHM layer phase with the following relaxed mesh quality:
Code:
    relaxed
    {
    maxNonOrtho 65; 
      maxBoundarySkewness -1; 
      maxInternalSkewness -1;
      maxConcave 180;
      minVol 1e-6;
        minArea 1e-6;
      minTetQuality -1e30; 
      minTwist -1e30;
      minDeterminant -1; 
      minFaceWeight -1;
    }
But at the end of sHM, I see in the output that 153 cells still don't respect the minimum volume criteria:
Code:
[...]
Setting up information for layer truncation ...

Checking mesh with layer ...
Checking faces in error :
    non-orthogonality > 65  degrees                        : 0
    faces with face pyramid volume < 1e-06                 : 153
    faces with area < 1e-06 m^2                            : 0
Detected 153 illegal faces (concave, zero area or negative cell pyramid volume)
Extruding 125954 out of 128858 faces (97.7%). Removed extrusion at 0 faces.
Added 125954 out of 128858 cells (97.7%).
Edge intersection testing:
    Number of edges             : 29892999
    Number of edges to retest   : 0
    Number of intersected edges : 2258776

Doing final balancing
---------------------

Writing 125954 added cells to cellSet addedCells
Writing 0 faces inside added layer to faceSet layerFaces
Layer mesh : cells:8664071  faces:29892999  points:12677767
Cells per refinement level:
    0    8664071
Writing mesh to time 3
Wrote mesh in = 346 s.
Layers added in = 346 s.
Finished meshing in = 391 s.
End
My questions are:
1. I would like to know where are the problematic faces/cells but checkMesh does not isolate them in a face or cell set. How can I create a set of cells which have a volume lower than 1e-6?
2. Which quality criteria or sHM criteria will force the cells volume to be above 1e-6?

Thanks for reading me
Regards,
Eloïse
Eloise is offline   Reply With Quote

Old   September 21, 2014, 15:25
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Eloïse,

I have to say I found your post by accident, while searching for a very similar question.

The solution in your case is theoretically something like this:
  1. Use the function object "writeRegisteredObject": http://openfoamwiki.net/index.php/Ti...gisteredObject - to write the field "V" which is the cell volume field.
  2. I think you can use the utility writeCellCentres to trigger the usage of this function object. This way you also get a field with the cell centres, which could come in handy...
  3. Then use setSet or topoSet to use the "fieldToSet" (found this explanation here: http://www.cfd-online.com/Forums/ope...tml#post431107). Additional details:
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Reply


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



All times are GMT -4. The time now is 08:32.