CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[cfMesh] bad cells when using cartesianMesh (cfMesh) for a special geometry

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 4, 2014, 10:44
Default bad cells when using cartesianMesh (cfMesh) for a special geometry
  #1
Senior Member
 
Join Date: Mar 2010
Location: Germany
Posts: 154
Rep Power: 16
cutter is on a distinguished road
Hi Foamers!

First of all: Many thanks to Dr. Franjo Juretic for providing cfMesh under an OSS license! It's a really impressing mesher. I've obtained amazingly good meshes for really complex geometries in almost no time.

I've got a specific geometry that's causing some trouble though. Please have look at the attached screenshots and the sample case! I played with various settings and discretizations, but had no luck so far. Especially the finer discretizations that are required in my case are resulting in the worst cells. What could I try to obtain higher quality meshes?

These are the parameters used for the screenshots:

Code:
surfaceFile "TestGeometry.fms";
maxCellSize 0.25;
boundaryCellSize 0.125;
Code:
surfaceFile "TestGeometry.fms";
maxCellSize 0.05;
boundaryCellSize 0.025;

keepCellsIntersectingBoundary 1;
Code:
surfaceFile "TestGeometry.fms";
maxCellSize 0.05;
boundaryCellSize 0.025;

//keepCellsIntersectingBoundary 1;
I used surfaceFeatureEdges -angle 25 TestGeometry.stl TestGeometry.fms to convert my surface triangulation and extract the feature edges.


BTW: What's the correct forum/subforum for cfMesh related issues? Maybe someone could create a special area and move the already existing entries!

Many Thanks
Cutter
Attached Images
File Type: jpg screenshot1.jpg (37.0 KB, 220 views)
File Type: jpg screenshot2.jpg (97.9 KB, 231 views)
File Type: jpg screenshot3.jpg (98.1 KB, 242 views)
Attached Files
File Type: gz TestCase_cfMesh.tar.gz (27.3 KB, 29 views)
cutter is offline   Reply With Quote

Old   November 10, 2014, 08:55
Default
  #2
Senior Member
 
Franjo Juretic
Join Date: Aug 2011
Location: Velika Gorica, Croatia
Posts: 124
Rep Power: 17
franjo_j is on a distinguished road
Send a message via Skype™ to franjo_j
Hello,

This geometry seems simple, and the settings are simple. However, the mesher has hard time deciding how to adapt the mesh onto the geometry. Please check the following figure generated by using maxCellSize 0.25, boundaryCellSize 0.125 and keepCellsIntersectingBundary 0:


You can notice that the mesh and the template are not similar and it is difficult to choose a suitable corner. When the mesh is refined it gets a bit better, and the result is shown here:

The problem is still similar, and it will not go away only by mesh refinement. The solution is to generate the template matching the geometry as much as possible.

I order to resolve the problem you need to modify the template such that you get a candidate for each problematic corner as close as possible to the geometry. Can you please try using:

keepCellsIntersectingPatches
{
Face_9
{
keepCells 1;
}
}
The mesher will then use the cells intersected by Face_9 in the mesh, and my impression is that it should make the mesh more similar to the geometry.
In addition, can you please try to refine the mesh locally near the problematic corners by using objectRefinements? I would try with lines and boxes to localize the problem.
Furthermore, you can analyze what is going on in the process by writing out the mesh after surfacePreparation and mapMeshToSurface functions in cartesianMeshGenerator.C

I hope this helps.

Regards,

Franjo
franjo_j is offline   Reply With Quote

Old   November 20, 2014, 12:53
Default
  #3
Senior Member
 
Join Date: Mar 2010
Location: Germany
Posts: 154
Rep Power: 16
cutter is on a distinguished road
Hi,

thanks for the suggested changes.

I did not use these parameters before and played a little while with them. The mesh now conforms somewhat better to the geometry but still contains some really bad shaped cells. I'm going to keep an eye at this issue, this kind of geometry occurs frequently in my projects.

I finally changed the geometry for this case. I moved the hole away from the sharp feature edge to allow the mesher to add better shaped polyhedrons there. This is of course not possible for every project.

Many Thanks
Cutter
cutter 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[snappyHexMesh] snappyHexMesh does not create any mesh except one for the reference cell Arman_N OpenFOAM Meshing & Mesh Conversion 1 May 20, 2019 18:16
[snappyHexMesh] Delete cells with special volume Tobi OpenFOAM Meshing & Mesh Conversion 0 May 30, 2016 10:45
[snappyHexMesh] SnappyHexMesh no layers and no decent mesh for complex geometry pizzaspinate OpenFOAM Meshing & Mesh Conversion 1 February 25, 2015 08:05
[ICEM] error analysis despaired student ANSYS Meshing & Geometry 7 June 27, 2012 12:57
Problems of Duns Codes! Martin J Main CFD Forum 8 August 15, 2003 00:19


All times are GMT -4. The time now is 04:42.