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

[Gmsh] Trying to convert an already generated gmsh to OpenFOAM

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By mzzmrt

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 7, 2019, 02:08
Default Trying to convert an already generated gmsh to OpenFOAM
  #1
Senior Member
 
Syavash Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
syavash is on a distinguished road
Dear mates,

I am new to Gmsh. I have tried to convert an existing 3-D gmsh file to OpenFOAM format using gmshToFoam utility. I was successful in opening the grid file and I have assigned names to the 2-D surfaces using Physical Groups-->Add. Also, I specified name to the volume. I have attached the geo file for more information (I have renamed it to txt so I can upload it!).

However, when I try to convert the modified gmsh file using gmshToFoam utility, I get messages like the following:

Code:
Unhandled element 12 at line ...
And in the end I have the following error message:

Code:
No cells read from file "test4"
Does your file specify any 3D elements (hex=5, prism=6, pyramid=7, tet=4)?
Perhaps you have not exported the 3D elements?

file: test4 at line 620821.

    From function readCells(..)
    in file gmshToFoam.C at line 726.

FOAM exiting
Unfortunately, the size of the initial gmsh file is large, so I put the link to the file below:

http://www.as.dlr.de/hiocfd/c3.6_gri...x32_p2.msh.bz2

The question is what I am doing wrong? Could anyone please tell me where the problem lies?

Regards,
Syavash
Attached Files
File Type: txt test4.txt (298 Bytes, 4 views)
syavash is offline   Reply With Quote

Old   May 7, 2019, 04:16
Default
  #2
Senior Member
 
Join Date: Mar 2014
Posts: 112
Rep Power: 12
mzzmrt is on a distinguished road
This may be a solution unless you don't have the original *.geo script of this mesh;

1. Open the file (phill_64x32x32_p2_gmsh) with gmsh
2. Create a 3D mesh with it (on the left menu: mesh>3D)
3. File>export test.mesh (as version 2 ascii format)
4. put this *.msh in the OpenFOAM case directory
5. run gmshToFoam test.msh
6. run autoPatch 80 - overwrite
7. run paraFoam to check the pacth names
8. configure the boundary, nut, U, P, etc. files according to this patch names (or change them in the boundary file) and types...



sourav90 and daylen like this.

Last edited by mzzmrt; May 7, 2019 at 06:34. Reason: image upload
mzzmrt is offline   Reply With Quote

Old   May 7, 2019, 07:46
Default
  #3
Senior Member
 
Syavash Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
syavash is on a distinguished road
Quote:
Originally Posted by mzzmrt View Post
This may be a solution unless you don't have the original *.geo script of this mesh;

1. Open the file (phill_64x32x32_p2_gmsh) with gmsh
2. Create a 3D mesh with it (on the left menu: mesh>3D)
3. File>export test.mesh (as version 2 ascii format)
4. put this *.msh in the OpenFOAM case directory
5. run gmshToFoam test.msh
6. run autoPatch 80 - overwrite
7. run paraFoam to check the pacth names
8. configure the boundary, nut, U, P, etc. files according to this patch names (or change them in the boundary file) and types...




Wow! Thank you. The creation of the 3-D mesh did the trick.

Kind Regards,
Syavash
syavash is offline   Reply With Quote

Old   March 11, 2020, 10:15
Default
  #4
New Member
 
Arash
Join Date: May 2017
Posts: 17
Rep Power: 8
arashgmn is on a distinguished road
Quote:
Originally Posted by mzzmrt View Post
This may be a solution unless you don't have the original *.geo script of this mesh;

1. Open the file (phill_64x32x32_p2_gmsh) with gmsh
2. Create a 3D mesh with it (on the left menu: mesh>3D)
3. File>export test.mesh (as version 2 ascii format)
4. put this *.msh in the OpenFOAM case directory
5. run gmshToFoam test.msh
6. run autoPatch 80 - overwrite
7. run paraFoam to check the pacth names
8. configure the boundary, nut, U, P, etc. files according to this patch names (or change them in the boundary file) and types...



This won't identify the interior surfaces (for instance, when there are sliding sub-domains, the intersection can be defined as an interior physical group which is totally invisible to autoPatch.)
arashgmn 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
Frequently Asked Questions about Installing OpenFOAM wyldckat OpenFOAM Installation 3 November 14, 2023 11:58
Getting Started with OpenFOAM wyldckat OpenFOAM 25 August 14, 2022 13:55
Can't convert my mesh created in Gmsh to OpenFOAM Crystal 95 OpenFOAM 1 May 2, 2018 10:42
OpenFOAM Training, London, Chicago, Munich, Sep-Oct 2015 cfd.direct OpenFOAM Announcements from Other Sources 2 August 31, 2015 13:36
Suggestion for a new sub-forum at OpenFOAM's Forum wyldckat Site Help, Feedback & Discussions 20 October 28, 2014 09:04


All times are GMT -4. The time now is 07:40.