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

[Gmsh] Physical Surfaces not becoming patches - gmshToFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By mzzmrt
  • 1 Post By zile96

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 8, 2020, 16:36
Default Physical Surfaces not becoming patches - gmshToFoam
  #1
New Member
 
Daniel Grebe
Join Date: Feb 2020
Posts: 3
Rep Power: 6
turinturambar is on a distinguished road
Hi,



I am totaly new to gmsh and openFoam so it's highly probable that I'm missing something simple, but after spending so time playing with the parameters and searching online I can't seem to find a solution.


In gmsh, I define several Physical surfaces but when I run gmshToFoam, it only creates one patch. Here is the definition of my physical surfaces in the .geo file:

Quote:
//+
Physical Surface("back") = {2};
//+
Physical Surface("front") = {8};
//+
Physical Surface("edges") = {6, 3, 4, 5};
//+
Physical Surface("wall") = {7};
//+
Physical Volume("internal") = {1};

When I run gmshToFoam, it appears to read the physical names, but then only creates one patch. I also get a warning about undefined faces. Here some of the output is gives me:
Quote:
Starting to read physical names at line 5
Physical names:5
Surface 1 back
Surface 2 front
Surface 3 edges
Surface 4 wall
Volume 5 internal

...
Unhandled element 15 at line 1867
Mapping region 0 to Foam patch 0
Mapping region 0 to Foam cellZone 0
...
Patch 0 gets name patch0

--> FOAM Warning :
From function Foam:olyMesh:olyMesh(const Foam::IOobject&, Foam:ointField&&, const cellShapeList&, const faceListList&, const wordList&, const wordList&, const Foam::word&, const Foam::word&, const wordList&, bool)
in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 593
Found 3591 undefined faces in mesh; adding to default patch defaultFaces
Finding faces of patch 0




The full .geo file and the output from gmshToFoam are attached.
Attached Files
File Type: txt cylinder_mesh.geo.txt (750 Bytes, 16 views)
File Type: txt log.txt (2.5 KB, 1 views)
turinturambar is offline   Reply With Quote

Old   February 8, 2020, 17:08
Default
  #2
Senior Member
 
Join Date: Mar 2014
Posts: 112
Rep Power: 12
mzzmrt is on a distinguished road
Did you check the result with paraFoam.


I did and the mesh has been correctly converted with gmshTo Foam...
mzzmrt is offline   Reply With Quote

Old   February 8, 2020, 18:46
Default
  #3
New Member
 
Daniel Grebe
Join Date: Feb 2020
Posts: 3
Rep Power: 6
turinturambar is on a distinguished road
I've checked the result with paraFoam and the mesh imports find. The problem is that all the faces are lumped into one patch instead of multiple patches as specified in gmsh to allow me to define boundry conditions
turinturambar is offline   Reply With Quote

Old   February 9, 2020, 02:39
Default
  #4
Senior Member
 
Join Date: Mar 2014
Posts: 112
Rep Power: 12
mzzmrt is on a distinguished road
Well, I have opne your script with gmsh 4.5.2, made and exported mesh than imported to OpenFOAM 7.0, here is the result which is as expected, patched correctly:


https://ibb.co/9YL8hW4
HPE likes this.
mzzmrt is offline   Reply With Quote

Old   March 19, 2020, 05:01
Default
  #5
Member
 
Join Date: Nov 2011
Posts: 30
Rep Power: 14
Gimlas is on a distinguished road
I have the same problem with my mesh. The geometry was imported from stp file. Then the mesh was generated. I've exported the mesh into msh file using ASCII 2 and saving all elements. Then I try to import the mesh into openFoam. The mesh is imported correctly however the patches are not created. I am using GMSH 4.5.4 and OpenFOAM7. Any sugestions?
Gimlas is offline   Reply With Quote

Old   March 22, 2021, 13:12
Default
  #6
New Member
 
Zivota Lazarevic
Join Date: Mar 2021
Posts: 4
Rep Power: 5
zile96 is on a distinguished road
Has any progress been made on this topic?
I have the same problem with mesh conversion
granzer likes this.
zile96 is offline   Reply With Quote

Old   April 21, 2021, 08:57
Default
  #7
New Member
 
Join Date: Apr 2021
Posts: 1
Rep Power: 0
Sanjay-Kurian is on a distinguished road
Hi, I am a beginner and currently learning about the gmsh software. I have created a simple geometry and meshed it. I also gave physical groups for boundary conditions but the groups are not being read when I export it to openFoam. Any suggestions or tips would be highly appreciated to tackle this issue. Below is the mesh file I have created.
Thanks
Sanjay-Kurian is offline   Reply With Quote

Old   November 16, 2021, 10:07
Default Ansys Mesher
  #8
Senior Member
 
Mandeep Shetty
Join Date: Apr 2016
Posts: 185
Rep Power: 10
granzer is on a distinguished road
Not in gmsh but I faced the same problem in Ansys Mesher. I had named selection in Ansys Mesher which were not created as separate boundary patches in OF. I found that in AM you have to turn on 'Send to solver' in each named selection. This solved the problem. So there may be a similar parameter to be turned on in GMSH too.
granzer is offline   Reply With Quote

Reply

Tags
gmsh, gmshtofoam patch


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
[Gmsh] Nasa Nozzle: Plot 3D -->gmsh -->fluent - no physical groups Nico89 OpenFOAM Meshing & Mesh Conversion 1 June 14, 2016 05:40
Possible bug with stitchMesh and cyclics in OpenFoam Jack001 OpenFOAM Pre-Processing 0 May 21, 2016 08:00
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 18:57
create patches out of a patch with two parallel surfaces Rebecca513 OpenFOAM 6 March 15, 2013 16:14
Can sample work on internal surfaces which are not patches? sega OpenFOAM Post-Processing 0 July 10, 2009 07:19


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