|
[Sponsors] |
[mesh manipulation] Refine a 3D-Mesh resulting in pure hex-mesh |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 5, 2015, 15:30 |
Refine a 3D-Mesh resulting in pure hex-mesh
|
#1 |
New Member
Join Date: Nov 2014
Posts: 10
Rep Power: 12 |
Hi FOAMers!
I tried to use refineMesh to refine some regions of my mesh. Unfortunately, it produces polyhedral-cells, which are unacceptable for our purposes. Does anyone of you have any idea how to refine those cells while not producing non-hexa-cells. Hanging nodes are not a problem. Normally it should be possible to split every convex hexa cell in eight smaller hexas, by simply splitting the edges in half and adding 7 additional vertices, or am I mistaken? If it is possible, do you know if there is a tool, which does exactly that? Thank you very much in advance!! Thomas Last edited by smoerebroet; February 5, 2015 at 15:31. Reason: hexa polyhedral refine |
|
February 6, 2015, 11:34 |
|
#2 |
New Member
Join Date: Nov 2014
Posts: 10
Rep Power: 12 |
It would even be helpful, if somebody knew that its not possible in openFoam! Or even better would know a tool which can refine keeping up the hexa-structure of mesh.
Thanks alot! |
|
February 6, 2015, 13:02 |
|
#3 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
The answer depends on a few parameters:
1) Is your original mesh hexahedral only? 2) What coordinate system and directions are your refining your region in? A visual example and your refineMeshDict would be helpful. |
|
February 9, 2015, 20:00 |
|
#4 | ||
New Member
Join Date: Nov 2014
Posts: 10
Rep Power: 12 |
Hi Marco!
Thanks alot for your reply! I hope you had a nice weekend. Sorry for answering late. I didnt find the time to write earlier. Regarding your questions: Yes, it is. Quote:
My refineMeshDict: Quote:
Thomas |
|||
February 10, 2015, 05:16 |
|
#5 |
Senior Member
Paulo Vatavuk
Join Date: Mar 2009
Location: Campinas, Brasil
Posts: 200
Rep Power: 18 |
Hi,
Are you sure that the resulting mesh has polyhedral cells? Sometimes Paraview produces artifacts in the image showing some edges that are not really in the model. I've seen a thread about this some time ago, but I wasn't able to locate it. Does checkmesh report polyhedral cells? Best Regards, Paulo |
|
February 10, 2015, 08:38 |
|
#6 |
New Member
Join Date: Nov 2014
Posts: 10
Rep Power: 12 |
Hi Paulo,
thank you for your relpy. Indeed checkMesh reports polyhedral cells. And as I said it seems as though they are located at the interface between the refined and the non-refined cells. Best regards, Thomas |
|
February 10, 2015, 12:04 |
|
#7 |
Senior Member
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19 |
Hi Thomas,
this is totally normal, so don't worry, if they were hexahedral cells initially that has not changed with the refinement. See this example of a general (level 0) hex next to a refined one: Code:
·----·----·--------· | | | | ·----·----· | | | | | ·----·----·--------· Also don't pay attention on how paraview splits the cells, it is just a visualization artifact. Best, Pablo |
|
February 10, 2015, 13:47 |
|
#8 |
Senior Member
Paulo Vatavuk
Join Date: Mar 2009
Location: Campinas, Brasil
Posts: 200
Rep Power: 18 |
Hi Thomas,
Pablo is correct; you always will have polyhedral cells in the interface, and Paraview divides polyhedral cells in tetrahedra before visualization. The only remaining question is: Do you need to be completely sure that there are only hexahedra in your mesh? I found the thread about the visualization artifacts: http://www.cfd-online.com/Forums/ope...-parafoam.html Best Regards, Paulo |
|
February 10, 2015, 15:54 |
|
#9 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
Excellent response from Vatatuk. There is another thing you should be aware of. When you refine in the global direction, things get weird when your faces are not aligned with major coordinate sections. Think of refining a cube rotated 45 degrees on the z axis. If you refine in x and y, you will need to cut the cell into triangles (cutting from corner to corner) so you get the same number of cells in x as in y, something like this: http://www.mathematische-basteleien....0of%20a%20Cube
If you want the division to be aligned with the local coordinate system, you will need to use the patchLocal coordinate system, and only refine a subset where a patch normal can be aligned to one of the local coordinate systems. |
|
February 10, 2015, 16:33 |
|
#10 |
New Member
Join Date: Nov 2014
Posts: 10
Rep Power: 12 |
Thank you Pablo and Paulo for your replies. It fells like I am one step closer to the solution, if there is any.
Ok, so what you are saying, Pablo is that at the interface of refined to non refined cells the faces get split. Therefore, the unrefined cell at the interface has no more six faces but nine, since one of the former six faces got split into four new faces. Each of the for new faces should then have four vertices. However, in the faces-file there are faces with five and six vertices. Is there a contradiction to your post Pablo, or did I understand something wrong? We in deed need a perfectly hexaedral mesh, Paulo. We want to use adaptive Mesh refinement, and our in-house code uses isotropic mesh refinement based on a hexadrical mesh. Best regards, Thomas |
|
February 10, 2015, 17:08 |
|
#11 | |
New Member
Join Date: Nov 2014
Posts: 10
Rep Power: 12 |
Hey Marco,
thank you too! I changed to local refinement, but the result is exactly the same. However, you are right of course I will keep the local coordinate setting, just in case. Therefore, an update on my refineMeshDict: Quote:
Thomas |
||
February 10, 2015, 18:19 |
|
#12 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
I've been using refineMesh in 2.3.x, so the entries might be different. The most important entry is patch, which defines the normal direction, and the other direction tan1. The local coordinate system is such that tan1 X tan2 = normal.
If you wanted to refine a purely cylindrical mesh, the patch I would select the outer surface of the cylinder (to get the radial direction), and set tan1 as the axial direction, so that tan2 is the azimuthal direction. Judging from your mesh, you won't be able to do this on all cells at once, so you should select subsets of the mesh using topoSet. One last thing; when refineMesh is run without arguments, global refinement happens in all directions no matter what. At least it does in 2.3.x. You need to use -dict as an option to specify you want to use the dictionary. |
|
February 11, 2015, 07:42 |
|
#13 | |
Senior Member
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19 |
Quote:
this probably has to do with the issue that Marco pointed out and I had not noticed before: some of your cells are not aligned with the global XYZ axes. Since you have already tried the local directions, I don't know how to correct this issue. Best, Pablo |
||
February 11, 2015, 08:06 |
|
#14 |
New Member
Join Date: Nov 2014
Posts: 10
Rep Power: 12 |
Sounds reasonable, thanks a lot guys!
|
|
May 5, 2015, 12:14 |
|
#15 | |
Member
Howar
Join Date: Mar 2015
Posts: 53
Rep Power: 11 |
Quote:
|
||
May 5, 2015, 13:25 |
|
#16 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
Either make the mesh in blockmesh and enforce hexahedral cells everywhere, or use snappyHexMesh and adjust the settings as best you can.
|
|
October 31, 2018, 10:56 |
|
#17 | |
Senior Member
Lukas Fischer
Join Date: May 2018
Location: Germany, Munich
Posts: 117
Rep Power: 8 |
Quote:
Do not write: Code:
directions (tan1, tan2, normal); Code:
directions (tan1 tan2 normal); Using the commas can result in problems in my experience if several overlapping topoSets are used to be refined. In my test cases ( see my post at refineMesh Problems: strange cells/cuts were added ) you would not be able to do the Allrun_wrong_command_order with the case "0_understandRefineMesh" and you could not run Allrun with the case "1_understandRefineMesh". The error message would be something like Code:
could not find direction "tan1,"; As long as your topoSets do not overlap with already refined topoSets you can use the comma without issues. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
pimpleDyMFoam - rho not found | maasyraf3 | OpenFOAM Running, Solving & CFD | 10 | June 5, 2017 14:05 |
This mesh contains patches of type empty but is not 1D or 2D | oric | OpenFOAM Running, Solving & CFD | 36 | November 28, 2016 08:12 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |
[snappyHexMesh] Pure hex mesh with snappy | alf23 | OpenFOAM Meshing & Mesh Conversion | 17 | February 17, 2013 15:24 |
[Other] 2D hex mesh on multi element airfoil | Verfblikje | OpenFOAM Meshing & Mesh Conversion | 0 | January 19, 2012 11:55 |