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

[Gmsh] gmshToFoam error

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 24, 2017, 07:51
Default gmshToFoam error
  #1
New Member
 
Mihai
Join Date: Jan 2017
Posts: 1
Rep Power: 0
mytzu is on a distinguished road
Hi, I am new to OpenFoam, I am trying to import a .msh generated in gmsh as in the tutorials below:
https://www.youtube.com/watch?v=1A-b84kloFs
https://www.youtube.com/watch?v=aIvDtyAYnI8

In gmsh everything is ok (same as in tutorials), but when I try to import the msh file into OpenFoam using gmshToFoam, I get the following error:
(any help is appreciated, thx!)

#0 Foam::error:rintStack(Foam::Ostream&) in "/opt/OpenFOAM/OpenFOAM-v1612+/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so"
#1 Foam::sigSegv::sigHandler(int) in "/opt/OpenFOAM/OpenFOAM-v1612+/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so"
#2 ? in "/lib64/libc.so.6"
#3 Foam::UPtrList<Foam:olyPatch>:perator[](int) const in "/opt/OpenFOAM/OpenFOAM-v1612+/platforms/linux64GccDPInt32Opt/bin/gmshToFoam"
#4 ? in "/opt/OpenFOAM/OpenFOAM-v1612+/platforms/linux64GccDPInt32Opt/bin/gmshToFoam"
#5 __libc_start_main in "/lib64/libc.so.6"
#6 ? in "/opt/OpenFOAM/OpenFOAM-v1612+/platforms/linux64GccDPInt32Opt/bin/gmshToFoam"
Segmentation fault (core dumped)
mytzu is offline   Reply With Quote

Old   February 1, 2017, 19:18
Default
  #2
Member
 
Declan
Join Date: Oct 2016
Location: Ireland
Posts: 40
Rep Power: 9
decah is on a distinguished road
Hi Mihai,

What are you typing into the terminal exactly?

And what is the location of your .msh files in relation to your case directories?

The command should read something like:

Code:
 gmshToFoam yourMesh.msh -case yourCase
decah is offline   Reply With Quote

Old   January 29, 2018, 04:48
Default
  #3
New Member
 
Nick
Join Date: Dec 2017
Location: UK
Posts: 7
Rep Power: 8
NICKTAVOUKT is on a distinguished road
Hi Everyone,

I'm facing a similar problem! The thing is that gmsh generates a 3Dmesh on its interface but when I save it to a.msh file something goes wrong.
This is the error I'm getting:

Quote:
[nta@guinode02 OpenChannel_Cylinder_Current]$ gmshToFoam system/FINALCylindricalBase.msh
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 3.0.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 3.0.x-4b5e129783d9
Exec : gmshToFoam system/FINALCylindricalBase.msh
Date : Jan 29 2018
Time : 09:19:33
Host : "guinode02.hrw-uk.local"
PID : 48252
Case : /home/HR/nta/waveFoam_30x/tutorials/waveFoam/OpenChannel_Cylinder_Current
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time
Starting to read mesh format at line 2
Read format version 2.2 ascii 0
Starting to read physical names at line 5
Physical names:6
Surface 1 atmosphere
Surface 2 Cylinder
Surface 3 bottom
Surface 4 frontBack
Surface 5 inlet
Surface 6 outlet
Starting to read points at line 14
Vertices to be read:37004
Vertices read:37004
Starting to read cells at line 37021
Cells to be read:37004
Mapping region 3 to Foam patch 0
Mapping region 2 to Foam patch 1
Mapping region 5 to Foam patch 2
Mapping region 4 to Foam patch 3
Mapping region 6 to Foam patch 4
Mapping region 1 to Foam patch 5
Cells:
total:0
hex :0
prism:0
pyr :0
tet :0

--> FOAM FATAL IO ERROR:
No cells read from file "system/FINALCylindricalBase.msh"
Does your file specify any 3D elements (hex=5, prism=6, pyramid=7, tet=4)?
Perhaps you have not exported the 3D elements?
file: system/FINALCylindricalBase.msh at line 74027.
From function readCells(..)
in file gmshToFoam.C at line 726.
FOAM exiting
And this is my rather long .geo file
Attached Files
File Type: txt geometry.txt (21.6 KB, 5 views)
NICKTAVOUKT is offline   Reply With Quote

Old   January 29, 2018, 05:05
Default
  #4
New Member
 
Nick
Join Date: Dec 2017
Location: UK
Posts: 7
Rep Power: 8
NICKTAVOUKT is on a distinguished road
Figured out my silly mistake.

I just had to define a Physical Volume for my 3d mesh as follows:

Physical Volume("fluid")={all individually defined,..., .... , ....., volumes};
NICKTAVOUKT 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
DPM udf error haghshenasfard FLUENT 0 April 13, 2016 06:35
OpenFOAM without MPI kokizzu OpenFOAM Installation 4 May 26, 2014 09:17
Errors in UDF shashank312 Fluent UDF and Scheme Programming 6 May 30, 2013 20:30
Compile problem ivanyao OpenFOAM Running, Solving & CFD 1 October 12, 2012 09:31
Ansys Fluent 13.0 UDF compilation problem in Window XP (32 bit) Yogini Fluent UDF and Scheme Programming 7 October 3, 2012 07:24


All times are GMT -4. The time now is 03:49.