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

[mesh manipulation] improveMeshQuality deletes facezones

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By Alczem

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 18, 2022, 05:01
Default improveMeshQuality deletes facezones
  #1
Senior Member
 
Join Date: Dec 2021
Posts: 251
Rep Power: 5
Alczem is on a distinguished road
Hello everybody!


I am interested in producing usable polyhedral meshes with boundary layers and facezones. I found this thread with a procedure to create such a mesh minus the facezones :


polyDualMesh + Layers + cfMesh/improveMeshQuality = usable polyMeshes witH BLayer


I conducted some tests on a simple cylinder meshed with a facezone inside via Salome and Netgen. After polyDualMesh and combinePatchFaces, the facezone is still there, but the checkMesh returns poor quality. After running improveMeshQuality, the mesh seems usable but the facezone ID is gone, although you can see where it supposed to be in Paraview.


Does anyone have an idea on why the facezone is ignored with the improveMeshQuality tool ? I know having facezones with cfMesh is tricky, so maybe using related commands is to be avoided. Any help is appreciated, thanks !
Attached Images
File Type: jpg polydualmesh.JPG (133.9 KB, 43 views)
File Type: jpg polydualmesh_checkmesh.JPG (77.7 KB, 28 views)
Alczem is offline   Reply With Quote

Old   August 19, 2022, 10:19
Default
  #2
Senior Member
 
M
Join Date: Dec 2017
Posts: 703
Rep Power: 13
AtoHM is on a distinguished road
Interesting. I never used this utility, but sometimes the easiest things work, so here is what I would try: the faces belonging to the faceZone are collected in a file in polyMesh. If improveMeshQuality does not renumber anything (does it?), then maybe you can just copy over the file to the mesh after the utility ran?
AtoHM is offline   Reply With Quote

Old   August 19, 2022, 13:44
Default
  #3
Senior Member
 
Join Date: Dec 2021
Posts: 251
Rep Power: 5
Alczem is on a distinguished road
Quote:
Originally Posted by AtoHM View Post
Interesting. I never used this utility, but sometimes the easiest things work, so here is what I would try: the faces belonging to the faceZone are collected in a file in polyMesh. If improveMeshQuality does not renumber anything (does it?), then maybe you can just copy over the file to the mesh after the utility ran?



Okay, simplicity at its best you are a genius ! It does work, or at least it is recognized by checkMesh and Paraview (when you use the Extract Filter).


To sum up the steps to achieve a usable polyhedral mesh with Salome and polyDualMesh and preserving faceZones :

  • Import your .unv mesh
  • polyDualMesh -concaveMultiCells -overwrite [featureAngle]
  • combinePatchFaces -overwrite [featureAngle]
  • In the constant/polyMesh folder, back up the faceZones file somewhere else
  • improveMeshQuality
  • copy the backup of faceZones back in the fresh polyMesh folder


I have yet to see if nothing is out of place during an actual simulation, and to check if the same trick works for cellZones but it is very encouraging for baffles, splitting the mesh for multiregion cases etc. I will post some updates if I make progress.



Thanks again AtoHM !




Edit: it also works for cellZones
Attached Images
File Type: jpg polydualmesh_facezone.JPG (81.5 KB, 11 views)
lourencosm and AtoHM like this.

Last edited by Alczem; August 22, 2022 at 10:05.
Alczem is offline   Reply With Quote

Old   August 22, 2022, 12:31
Default
  #4
Senior Member
 
Join Date: Dec 2021
Posts: 251
Rep Power: 5
Alczem is on a distinguished road
Hi all,


I did more tests with cellZones, and the improveMeshQuality seems to smooth the sharp features of the facezones.


I tried to mesh a small cube inside a bigger cube, and define it as a cellZone with a faceZone at the interface. The result of the steps I described earlier is attached: smoothed edges which mess up the cellZone and the faceZone.


Until someone finds a fix, I would recommend to set up faceZones and cellZones such that they are connected to a boundary or share a boundary with the main mesh (so avoid "floating" cellzones/facezones). It looks like it helps preserve the sharp edges.


I will try to investigate further when I have the time
Attached Images
File Type: jpg smoother_corner.JPG (103.5 KB, 32 views)
Alczem is offline   Reply With Quote

Old   August 15, 2024, 16:22
Default
  #5
Senior Member
 
Julio Pieri
Join Date: Sep 2017
Posts: 109
Rep Power: 9
JulioPieri is on a distinguished road
For those interested in a possible fix for this, you can run createBaffles BEFORE running the "improveMeshQuality" to create internal patches from the faceZones previously preserved. Then, the "improveMeshQuality" command will be forced to preserve the the edges and faces. Of course, by constraining it, the improved mesh will not be as good as before, but at least will have the features...

You can then just ignore/delete this new internal patch.

Didn't try in a running case, but it does visually work
JulioPieri is offline   Reply With Quote

Reply

Tags
cfmesh, facezone, improvemeshquality, polydualmesh, salome


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
[cfMesh] improveMeshQuality does not move points on wall patches GerhardHolzinger OpenFOAM Community Contributions 0 November 18, 2020 13:08
[snappyHexMesh] create two faceZones with single STL file - is it possible? aerogt3 OpenFOAM Meshing & Mesh Conversion 0 September 19, 2016 17:30
Appending faceZones mturcios777 OpenFOAM Programming & Development 1 December 17, 2012 18:59
[swak4Foam] for faceZones andrea.pasquali OpenFOAM Community Contributions 3 August 30, 2011 12:24
[snappyHexMesh] incompleted faceZones ? normal? Tobi OpenFOAM Meshing & Mesh Conversion 1 November 30, 2010 14:42


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