CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Open Source Meshers: Gmsh, Netgen, CGNS, ... (http://www.cfd-online.com/Forums/openfoam-meshing-open/)
-   -   gmshToFoam problem. (http://www.cfd-online.com/Forums/openfoam-meshing-open/70915-gmshtofoam-problem.html)

nilashansen December 9, 2009 12:50

gmshToFoam problem.
 
Hi.

I'm quite new at using OpenFOAM, but I'm getting there. I'm trying to convert a gmsh mesh to FOAM format, using gmshToFoam. Every time I do so I get an error message (Shown at the end of this post).

First I thought that it was a problem with the physical entities format (see the thread gmshToFoam : problem with patch). So I tried to do the sample provide with the OpenFoam installation in applications/utilities/mesh/conversion/gmshToFoam/gmsh/.CubeVer1.msh. This did not work either.

Does any of you have suggestions of what might be the problem. I'am running ubuntu 9.10 if that can be of any help.

Thanks.

Best regards,
Nilas Hansen


nilas@nilas-desktop:~/OpenFOAM/OpenFOAM-1.6.x/applications/utilities/mesh/conversion/gmshToFoam$ gmshToFoam gmesh/CubeVer1.msh/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 1.6.x-f7a690f5c3ca
Exec : gmshToFoam gmesh/CubeVer1.msh
Date : Dec 09 2009
Time : 17:46:54
Host : nilas-desktop
PID : 2705
Case : /home/nilas/OpenFOAM/OpenFOAM-1.6.x/applications/utilities/mesh/conversion/gmshToFoam
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time



--> FOAM FATAL IO ERROR:
cannot open file

file: /home/nilas/OpenFOAM/OpenFOAM-1.6.x/applications/utilities/mesh/conversion/gmshToFoam/system/controlDict at line 0.

From function regIOobject::readStream()
in file db/regIOobject/regIOobjectRead.C at line 62.

FOAM exiting

nilas@nilas-desktop:~/OpenFOAM/OpenFOAM-1.6.x/applications/utilities/mesh/conversion/gmshToFoam$

Alan December 10, 2009 02:55

try:

gmshToFoam$ gmshToFoam gmesh/CubeVer1

without the .msh extension, I have found that gmsh sometimes doesnt export with the .msh extension, hence gmshtofoam can't find the file

elorriaux December 10, 2009 06:37

Quote:

Originally Posted by nilashansen (Post 239326)
Hi.
nilas@nilas-desktop:~/OpenFOAM/OpenFOAM-1.6.x/applications/utilities/mesh/conversion/gmshToFoam$ gmshToFoam gmesh/CubeVer1.msh/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 1.6.x-f7a690f5c3ca
Exec : gmshToFoam gmesh/CubeVer1.msh
Date : Dec 09 2009
Time : 17:46:54
Host : nilas-desktop
PID : 2705
Case : /home/nilas/OpenFOAM/OpenFOAM-1.6.x/applications/utilities/mesh/conversion/gmshToFoam
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time



--> FOAM FATAL IO ERROR:
cannot open file

file: /home/nilas/OpenFOAM/OpenFOAM-1.6.x/applications/utilities/mesh/conversion/gmshToFoam/system/controlDict at line 0.

From function regIOobject::readStream()
in file db/regIOobject/regIOobjectRead.C at line 62.

FOAM exiting

You are trying to convert a mesh without setting up a directory path for the OF case. This error is totally normal and has nothing to do with the conversion tool.

ericnutsch December 15, 2009 04:23

elorriaux,

I set up my directory path and a controlDict file and made it passed the error. Unfortunately I keep hitting other errors.

Just out of curiosity: do i need to put any special instructions for the gmshToFoam function in the controlDict file? (seems logical since it has to reference it, but im not sure)


Thanks for your help!

Alan December 15, 2009 06:19

no, the controlDict file (and all other files not in the constant/polymesh directory) are independent of the mesh file. I'd say theres a problem with your mesh if you are still getting errors.

ericnutsch December 28, 2009 13:41

Indeed, there was a problem with my mesh. Thanks for your help Alan.


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