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

[Gmsh] problem converting mesh from gmsh

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 17, 2011, 06:28
Default problem converting mesh from gmsh
  #1
New Member
 
Join Date: Apr 2011
Posts: 9
Rep Power: 15
Fried is on a distinguished road
Hello everyone,
as a OpenFoam user, I always build my mesh with gmsh and then export it with gmshToFoam.
Now, I have a problem I cannot solve. My geometry is a squared horizontal channel on which some vertical channels for inlet and outflow are placed. These channels are not aligned and they are cylindrical. I want to run a 3D simulation.
On gmsh everything is fine, all displayed and with correctly groups (boundaries) assigned. When I export to OpenFoam one of the channels disappears, a defaulfaces region is crated on the face of its intersection with the horizontal channels and in the output file I get this message:

Could not match gmsh face 4(27013 27044 27035 27052) to any of the interior or exterior faces that share the same 0th point

As I said, I checked more than once with gmsh and there everything looks fine. Changing mesh refinement on the sides does not change anything. I also have to say that if I try draw every single vertical channel alone it works.
Please, does anyone have an idea or a tip for that?
Fried is offline   Reply With Quote

Old   October 17, 2011, 17:29
Default
  #2
Senior Member
 
Hisham's Avatar
 
Hisham Elsafti
Join Date: Apr 2011
Location: Braunschweig, Germany
Posts: 257
Blog Entries: 10
Rep Power: 17
Hisham is on a distinguished road
Hi Fried

I have no clear idea (actually no clue). But maybe you could try the following:
2. Generate the parts separately import them to different cases then merge and stitch them with OF utilities (e.g. http://www.cfd-online.com/Forums/ope...titchmesh.html)
1. Try rebuilding your Gmsh model in a strictly incremental way "commenting blocks of the .geo file" and exporting the mesh (after each change) to have a better idea of what went wrong
3. Maybe provide the .geo file

Good luck!
Hisham
Hisham is offline   Reply With Quote

Old   October 18, 2011, 04:36
Default
  #3
New Member
 
Join Date: Apr 2011
Posts: 9
Rep Power: 15
Fried is on a distinguished road
Hello Hisham,
thanks for the answer, I am going to look how the utilities you mentioned work (I guess the stitchMesh, if I want to make the vertexes coincide).
I post here the .geo file I use to build my geometry. Maybe this will give some inspiration? I already tried to make piece by piece and in that case it works; the problem is when I put all the channels at the same time.
Thanks again,
F.
Attached Files
File Type: txt TestChannels.txt (6.5 KB, 12 views)
Fried is offline   Reply With Quote

Old   October 18, 2011, 05:27
Default
  #4
Senior Member
 
Hisham's Avatar
 
Hisham Elsafti
Join Date: Apr 2011
Location: Braunschweig, Germany
Posts: 257
Blog Entries: 10
Rep Power: 17
Hisham is on a distinguished road
Hi Fried,

I ran gmshToFoam on the mesh. I guess maybe some external patches are not defined as physical surface. I would try to carefully review that, but I am sure you did! But why not do that again.

I found all volumes are defined as a physical vol. and I can't spot a bug really.

You may want to re-select your physical surfaces using the GUI and compare them to the ones you did before (just unbiased check)

You may also separate the extrude for the missing vol.

Regards
Hisham
Hisham is offline   Reply With Quote

Old   October 18, 2011, 05:38
Default
  #5
New Member
 
Join Date: Apr 2011
Posts: 9
Rep Power: 15
Fried is on a distinguished road
Hello Hisha,
thanks again for the tips. unluckily I already tried all the options you mentioned. I only have one doubt, concerning surface 3, since i define it using many loop lines: do I need to give them a -/+ direction? (actually I tried also this, then I don't think so...)
But from your answer, should I guess the problem is in gmsh?
Couldn't it be related to the gmshToFoam utility?
Any other idea looking to the geo file?
Thanks again,
Fried
Fried is offline   Reply With Quote

Old   October 18, 2011, 06:02
Default
  #6
Senior Member
 
Hisham's Avatar
 
Hisham Elsafti
Join Date: Apr 2011
Location: Braunschweig, Germany
Posts: 257
Blog Entries: 10
Rep Power: 17
Hisham is on a distinguished road
It is obvious that there is no problem with gmsh. The error is either in the gmshToFoam or just an input error. It is always a good idea to eliminate the second possibility first.

Looking at gmshToFoam.C near line 954, there is a comment about internal faces and faceZones. What I understood is maybe you need to define some extra internal surfaces as physical surfaces and see if it works. They will not appear as patches (in boundary file) rather a faceZone.

Regards,
Hisham
Hisham is offline   Reply With Quote

Old   October 18, 2011, 08:52
Default
  #7
New Member
 
Join Date: Apr 2011
Posts: 9
Rep Power: 15
Fried is on a distinguished road
Hallo again Hisham,
I tried adding internal faces but again it didn't give the result I hope.
Then, I would like to try with stitchMesh, but I am not familiar enough to use it properly, I am afraid.
Please, could you drive me step by step (I mean, with the command lines for stitchMesh)?
I already created the two different meshes. Then, I don't know if I did correctly, I put them in two different directories and built them separately but now?
Thanks a lot in advance!
Regards,
Fried
Fried is offline   Reply With Quote

Old   October 18, 2011, 09:30
Default
  #8
Senior Member
 
Hisham's Avatar
 
Hisham Elsafti
Join Date: Apr 2011
Location: Braunschweig, Germany
Posts: 257
Blog Entries: 10
Rep Power: 17
Hisham is on a distinguished road
Sorry! I have not used these utilities before. Maybe search the forum or Google it. If results are not helpful, try starting a new thread on the topic to attract their users.

I would also suggest trying to play with gmshToFoam switches (gmshToFoam -help).

If all is not working, maybe use blockMesh with #codeStream (OF 2.x) support like the potentialFoam cylinder tutorial (better than typical blockMesh). Or else maybe draw a CAD model and import it to gmsh before meshing!

Regards
Hisham
Hisham is offline   Reply With Quote

Old   October 18, 2011, 09:53
Default
  #9
New Member
 
Join Date: Apr 2011
Posts: 9
Rep Power: 15
Fried is on a distinguished road
Ok, I will try with a new tread about merge/stitchMesh
Thanks for the help
F.
Fried is offline   Reply With Quote

Reply

Tags
gmshtofoam missing parts


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 for internal Flow vishwa OpenFOAM Meshing & Mesh Conversion 24 June 27, 2016 09:54
[snappyHexMesh] SHM problem : KVLCC2 with appendage mesh sc.park OpenFOAM Meshing & Mesh Conversion 1 March 13, 2016 14:28
[Commercial meshers] Problem encountered in converting Fluent mesh to OpenFOAM Mesh sathya123 OpenFOAM Meshing & Mesh Conversion 2 November 22, 2015 04:22
[snappyHexMesh] No layers in a small gap bobburnquist OpenFOAM Meshing & Mesh Conversion 6 August 26, 2015 10:38
Converting Starccm+ mesh Ladnam OpenFOAM 0 September 14, 2011 07:30


All times are GMT -4. The time now is 22:33.