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 Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By mzzmrt

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 8, 2020, 17:36
Default Physical Surfaces not becoming patches - gmshToFoam
  #1
New Member
 
Daniel Grebe
Join Date: Feb 2020
Posts: 2
Rep Power: 0
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, 2 views)
File Type: txt log.txt (2.5 KB, 0 views)
turinturambar is offline   Reply With Quote

Old   February 8, 2020, 18:08
Default
  #2
Member
 
Join Date: Mar 2014
Posts: 60
Rep Power: 7
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, 19:46
Default
  #3
New Member
 
Daniel Grebe
Join Date: Feb 2020
Posts: 2
Rep Power: 0
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, 03:39
Default
  #4
Member
 
Join Date: Mar 2014
Posts: 60
Rep Power: 7
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

Reply

Tags
gmsh, gmshtofoam patch

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 06:40
Possible bug with stitchMesh and cyclics in OpenFoam Jack001 OpenFOAM Pre-Processing 0 May 21, 2016 09:00
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 19:57
create patches out of a patch with two parallel surfaces Rebecca513 OpenFOAM 6 March 15, 2013 17:14
Can sample work on internal surfaces which are not patches? sega OpenFOAM Post-Processing 0 July 10, 2009 08:19


All times are GMT -4. The time now is 09:14.