CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Open Source Meshers: Gmsh, Netgen, CGNS, ...

GmshToFoam

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   November 30, 2007, 09:32
Default Hi I am trying to convert t
  #1
New Member
 
Varun Vikas
Join Date: Mar 2009
Posts: 17
Rep Power: 8
varun is on a distinguished road
Hi

I am trying to convert the "CubeVer1.msh" (present in $FOAM_UTILITIES/mesh/conversion/gmshToFoam/). I created a case gmshTest in $FOAM_RUN/tutorials/icoFoam/ and then executed the following command

gmshToFoam $FOAM_RUN/tutorials/icoFoam/ gmshTest $FOAM_RUN/tutorials/icoFoam/gmshTest/CubeVer1.msh

and got the following output

/*---------------------------------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.3 |
| \ / A nd | Web: http://www.openfoam.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/

Exec : gmshToFoam /home/vxv/OpenFOAM/varun-1.3/run/tutorials/icoFoam/ gmshTest /home/vxv/OpenFOAM/varun-1.3/run/tutorials/icoFoam/gmshTest/CubeVer1.msh
Date : Nov 30 2007
Time : 18:49:21
Host : sarkeshwar
PID : 30400
Root : /home/vxv/OpenFOAM/varun-1.3/run/tutorials/icoFoam/
Case : gmshTest
Nprocs : 1
Create time

Read nVerts:167

Read nElems:838

Mapping region 27 to Foam patch 0
Mapping region 28 to Foam patch 1
Mapping region 29 to Foam patch 2
Mapping region 30 to Foam cellZone 0
Cells:
total:622
hex :0
prism:0
pyr :0
tet :622

Patches:
Patch Size
0 36
1 36
2 144

CellZones:
Zone Size
0 622

--> FOAM Warning :
From function polyMesh::polyMesh(... construct from shapes...)
in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 573
Found 216 undefined faces in mesh; adding to default patch.
Finding faces of patch 0
Finding faces of patch 1
Finding faces of patch 2

FaceZones:
Zone Size

Writing zone 0 to cellZone cellZone_0 and cellSet
End


After running the solver, I use the followign command for opeining the case in paraFoam

paraFoam $FOAM_RUN/tutorials/icoFoam/ gmshTest

When I click accept, paraFoam crashes with folowing error:

/*---------------------------------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.3 |
| \ / A nd | Web: http://www.openfoam.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/



--> FOAM FATAL IO ERROR : attempt to read beyond EOF

file: /home/vxv/OpenFOAM/varun-1.3/run/tutorials/icoFoam//gmshTest/0/p::internalField at line 30.

From function ITstream::read(token& t)
in file db/IOstreams/Tstreams/ITread.C at line 70.

FOAM exiting

I am new to OpenFoam. I will be extremely grateful if somebody could help.

Thanks
Varun
varun is offline   Reply With Quote

Old   January 30, 2012, 14:03
Default gmshToOpenFoam
  #2
Senior Member
 
Goutam Saha
Join Date: Dec 2011
Location: UK
Posts: 128
Rep Power: 5
Goutam is on a distinguished road
Quote:
Originally Posted by varun View Post
Hi

I am trying to convert the "CubeVer1.msh" (present in $FOAM_UTILITIES/mesh/conversion/gmshToFoam/). I created a case gmshTest in $FOAM_RUN/tutorials/icoFoam/ and then executed the following command

gmshToFoam $FOAM_RUN/tutorials/icoFoam/ gmshTest $FOAM_RUN/tutorials/icoFoam/gmshTest/CubeVer1.msh

and got the following output

/*---------------------------------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.3 |
| \ / A nd | Web: http://www.openfoam.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/

Exec : gmshToFoam /home/vxv/OpenFOAM/varun-1.3/run/tutorials/icoFoam/ gmshTest /home/vxv/OpenFOAM/varun-1.3/run/tutorials/icoFoam/gmshTest/CubeVer1.msh
Date : Nov 30 2007
Time : 18:49:21
Host : sarkeshwar
PID : 30400
Root : /home/vxv/OpenFOAM/varun-1.3/run/tutorials/icoFoam/
Case : gmshTest
Nprocs : 1
Create time

Read nVerts:167

Read nElems:838

Mapping region 27 to Foam patch 0
Mapping region 28 to Foam patch 1
Mapping region 29 to Foam patch 2
Mapping region 30 to Foam cellZone 0
Cells:
total:622
hex :0
prism:0
pyr :0
tet :622

Patches:
Patch Size
0 36
1 36
2 144

CellZones:
Zone Size
0 622

--> FOAM Warning :
From function polyMesh:olyMesh(... construct from shapes...)
in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 573
Found 216 undefined faces in mesh; adding to default patch.
Finding faces of patch 0
Finding faces of patch 1
Finding faces of patch 2

FaceZones:
Zone Size

Writing zone 0 to cellZone cellZone_0 and cellSet
End


After running the solver, I use the followign command for opeining the case in paraFoam

paraFoam $FOAM_RUN/tutorials/icoFoam/ gmshTest

When I click accept, paraFoam crashes with folowing error:

/*---------------------------------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.3 |
| \ / A nd | Web: http://www.openfoam.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/



--> FOAM FATAL IO ERROR : attempt to read beyond EOF

file: /home/vxv/OpenFOAM/varun-1.3/run/tutorials/icoFoam//gmshTest/0/p::internalField at line 30.

From function ITstream::read(token& t)
in file db/IOstreams/Tstreams/ITread.C at line 70.

FOAM exiting

I am new to OpenFoam. I will be extremely grateful if somebody could help.

Thanks
Varun
-----------------------------------------

Hi

Varun, I am new user of OpenFOAM and I have the same problem. How I will solve this? COuld you please help me?

Thanks

Goutam
Goutam is offline   Reply With Quote

Old   February 1, 2012, 04:27
Default
  #3
New Member
 
GregorS's Avatar
 
Gregor Seljak
Join Date: Oct 2010
Posts: 21
Rep Power: 6
GregorS is on a distinguished road
Maybe you forgot some semicolon - ';' at the end of line in you 0/p file.
Additionally, when executing gmshToFoam on you *.msh file, you need to do some minor changes in your constant/polymesh/boundary file (change patch types, ...).

So for start, please post your:
-/home/vxv/OpenFOAM/varun-1.3/run/tutorials/icoFoam//gmshTest/0/p
-/home/vxv/OpenFOAM/varun-1.3/run/tutorials/icoFoam//gmshTest/constant/polymesh/boundary
files, to see if there are some corrections needed.
GregorS is offline   Reply With Quote

Old   February 1, 2012, 06:36
Default Gmsh
  #4
Senior Member
 
Goutam Saha
Join Date: Dec 2011
Location: UK
Posts: 128
Rep Power: 5
Goutam is on a distinguished road
Dear friends,

Could you please see my attached files. You will find my cubic.geo, cubic.msh, and 0/p , 0/U files.

Thanks
Attached Files
File Type: zip goutam Gmsh.zip (5.0 KB, 12 views)
Goutam is offline   Reply With Quote

Old   March 13, 2012, 04:24
Default
  #5
Member
 
Join Date: Feb 2012
Posts: 57
Rep Power: 5
matt.mech.eng is on a distinguished road
Hi all,

Was there a solution to this problem I am having similar difficulties, I tried to copy the bubbleFoam tutorial folder and copied my .msh file into the case directory and ran gmshToFoam from this directory.
I get the following output:

/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.0.1 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.0.1-51f1de99a4bc
Exec : gmshToFoam approx_profile.msh
Date : Mar 13 2012
Time : 19:04:53
Host : matthew-desktop
PID : 3326
Case : /home/matthew/Documents/FYP/OpenFOAM/TEST_CASE_1/PARABOLIC_TANK
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing 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 points at line 5
Vertices to be read:1032
Vertices read:1032

Starting to read cells at line 1040
Cells to be read:5271

Unhandled element 15 at line 1042
Unhandled element 15 at line 1043
Unhandled element 15 at line 1044
" " " " " 1045

Unhandled element 15 at line 1053
Unhandled element 1 at line 1054
Unhandled element 1 at line 1055
" " " " " 1056

Unhandled element 1 at line 1225
Mapping region 0 to Foam patch 0
Mapping region 0 to Foam cellZone 0
Cells:
total:3219
hex :0
prism:0
pyr :0
tet :3219

CellZones:
Zone Size
0 3219

Skipping tag at line 6314
Patch 0 gets name patch0

--> FOAM Warning :
From function polyMesh:olyMesh(... construct from shapes...)
in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 614
Found 1868 undefined faces in mesh; adding to default patch.
Finding faces of patch 0

FaceZones:
Zone Size

Writing zone 0 to cellZone cellZone_0 and cellSet
End

What corrections would be required in ploymesh/boundary and 0/p files?

What are unhandled elements? And what has caused undefined faces to occur?

I forgot to mention running paraFoam crashed and I got the following error:


--> FOAM FATAL IO ERROR:
size 1875 is not equal to the given value of 3219

file: /home/matthew/Documents/FYP/OpenFOAM/TEST_CASE_1/PARABOLIC_TANK/0/p from line 17 to line 1921.

From function Field<Type>::Field(const word& keyword, const dictionary&, const label)
in file lnInclude/Field.C at line 236.

FOAM exiting


Cheers
matt.mech.eng is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
GmshToFoam basic question tdzurny Open Source Meshers: Gmsh, Netgen, CGNS, ... 1 August 30, 2009 17:52
GmshToFoam example guillaume OpenFOAM Mesh Utilities 3 February 25, 2008 21:06
GmshToFoam basic question tdzurny Open Source Meshers: Gmsh, Netgen, CGNS, ... 3 December 3, 2007 11:22
Error using gmshToFoam derath OpenFOAM Mesh Utilities 2 April 25, 2007 15:51
GmshToFoam undefined faces derath Open Source Meshers: Gmsh, Netgen, CGNS, ... 7 May 22, 2006 04:54


All times are GMT -4. The time now is 00:53.