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

[Gmsh] gmshToFoam - Hybrid mesh conversion creates 2 regions

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By bhanu2204

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 8, 2018, 12:27
Default gmshToFoam - Hybrid mesh conversion creates 2 regions
  #1
New Member
 
Bhanu Prakash
Join Date: Feb 2018
Posts: 2
Rep Power: 0
bhanu2204 is on a distinguished road
Hello every one,

I am trying to import a hybrid test mesh from gmsh to OpenFoam. The mesh basically three extended cubes as in the attached image 1. The left is completely unstructured, right is structured (transfinite) and the middle is unstructured but meshed with TransfQuadTri volume to facilitate the transition.

The issue is the face connecting the transfinite and TransfQuadTri volume is separating the mesh into regions. The red coloured face in image 2.

The checkMesh result is fine as attached in the checkmesh file here. Except for this.

Quote:
Checking topology...
Boundary definition OK.
Cell to face addressing OK.
Point usage OK.
Upper triangular ordering OK.
Face vertices OK.
*Number of regions: 2
The mesh has multiple regions which are not connected by any face.
<<Writing region information to "0/cellToRegion"
<<Writing region 0 with 49935 cells to cellSet region0
<<Writing region 1 with 6859 cells to cellSet region1
Any ideas on how could I include this single separating face into the internal volume. I tried stitchMesh, removeFaces, zipUpMesh but no positive result. Any idea if this can be imported to another opensource meshing tool and merged into mesh ?

I will be happy to provide any further details you might need. Thanks for your time.

Cheers.
Attached Images
File Type: jpg image 1.jpg (122.6 KB, 51 views)
File Type: jpg image 2.jpg (140.4 KB, 38 views)
Attached Files
File Type: txt checkmesh.txt (2.8 KB, 2 views)
bhanu2204 is offline   Reply With Quote

Old   February 9, 2018, 13:52
Default
  #2
Member
 
James Gross
Join Date: Nov 2017
Posts: 77
Rep Power: 9
jgross is on a distinguished road
Hi OFers and Bhanu,

I am getting something quite similar when I use gmshToFoam for a 2D mesh with a structured boundary layer. The boundary layer has been included in the same physical groups as the rest of the domain, but when I use gmshToFoam, the boundary layer is designated it's own patch.

I guess this is because gmsh designates the structured region as its own mesh partition, and gmshToFoam uses the mesh partitions to create the patches.

This wouldn't be as big of an issue if the boundary layer didn't span across a number of domains (as in the image included). This makes it almost impossible to change the boundary file such that the boundary layers are in their respective regions.

Does anyone have any help or advice to fix this?

J
Attached Images
File Type: jpg BoundaryLayer.jpg (197.7 KB, 34 views)
jgross is offline   Reply With Quote

Old   February 11, 2018, 06:43
Default
  #3
Member
 
James Gross
Join Date: Nov 2017
Posts: 77
Rep Power: 9
jgross is on a distinguished road
As a follow up to the previous post, it seems my original issue is only true for the OF extend 4.0 version I was using. I tried it in OF5 and there was no issue with separating the structured boundary layer from the rest of the unstructured domain.

J
jgross is offline   Reply With Quote

Old   February 15, 2018, 10:38
Default
  #4
Member
 
James Gross
Join Date: Nov 2017
Posts: 77
Rep Power: 9
jgross is on a distinguished road
As another follow on, by using createPatch feature in OF, it doesn't matter if the two regions are separated. I can just combine them after using createPatch.

J
jgross is offline   Reply With Quote

Old   February 18, 2018, 03:56
Default
  #5
New Member
 
Bhanu Prakash
Join Date: Feb 2018
Posts: 2
Rep Power: 0
bhanu2204 is on a distinguished road
Hi James,

Thanks for your comments on the post.

Probably, we are doing the hybrid meshes in a slightly different from each other. My process involves meshing unstructured volumes and structured volumes separately. Then, connecting them using TransQuadTri algorithm based volumes. If I am right, you might be using boundary layer field in gmsh and later developing unstructured mesh on it.

So, for me as in the image in the first post, the face separating the transfquadtri volume and transfinite volume is being seen as separating the mesh regions , when I do gmshToFOAM. I sorted this issues partially by creating separate geo and .msh files. Later using mergeMeshes feature of OpenFOAM. Followed by stitchMesh that literally stitches the two meshes and most importantly converts the connecting face as internalFace. Currently, the issue is arising because of the necessity to apply stitchmesh for multiple patches. This multiple patches issue, from my knowledge, doesn't have a perfect solution yet in OpenFOAM. Correct me, if I am wrong. I am still playing around in this aspect as this connecting face must be an internal face in my case.

I tried with OpenFOAM 5 but it still sees as different regions in the same cavity cases attached above. I tried to use createPatch, it works but the problem is it remains as a patch that needs a boundary condition to be defined. However, I need it as an internal face. Do you have any suggestions in this regard ?

In reality, I am doing full scale 3D ahmed mesh with hybrid grid ideology. The front curved parts will have the unstructured mesh enclosed in a volume.And the rest of the mesh completely structured. I am using the cavity case attached above to resolve errors using gmshToFoam and implementing the methods in ahmed body parallely.

My experience working with boundary layer field is very limited and may be my partial solution might not even work for you, considering there might not be a connecting face in your situation. Sorry for that. From your knowledge, can you also comment if it is possible to generate a structured boundary layer (Edit: Using boundary layer field) around front curved parts of 3D ahmed body ? I tried but failed miserably in that.

Also, I am trying cyclicAMI with transform option as coincidentFullMatch. I will let you how it goes.

Let me know if you need any other details. Thanks for your comments again.


Cheers.
finn_amann likes this.
bhanu2204 is offline   Reply With Quote

Old   February 18, 2018, 08:04
Default
  #6
Member
 
James Gross
Join Date: Nov 2017
Posts: 77
Rep Power: 9
jgross is on a distinguished road
Hi Bhanu,

You're right. I am using boundary layer field in Gmsh, which is fine for 2D. I haven't tried it for 3D, but my guess is that isn't any where near as good.

In general, Gmsh seems to be really good for 2D stuff, but is still very much in development when it comes to 3D. I might suggest you to try cfMesh. It's similar to snappyHexMesh, but it's way much easier to use.

As for the other questions, sorry I am unable to be of assistance as I don't have any experience with it.

Best of luck,
James
jgross 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
how to set periodic boundary conditions Ganesh FLUENT 15 November 18, 2020 07:09
[ICEM] Hybrid mesh with conformal interface and matching boundary layer expansion jgross ANSYS Meshing & Geometry 1 February 5, 2019 14:07
[ICEM] Error reading 2D hybrid ICEM mesh into Fluent Kloz ANSYS Meshing & Geometry 1 June 6, 2016 14:45
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! sc298 OpenFOAM Meshing & Mesh Conversion 2 March 27, 2011 22:11
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 12:55


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