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.

ajayboora14 June 1, 2016 15:38

gmshToFoam
 
friends my gmshToFoam command is not working

in terminal it show
gmshToFoam command not found
other all mesh conversion command are working properly

coloursfordirectors June 4, 2016 19:37

Same problem here on Ubuntu 15.10 and OpenFoam 3.0.1. Any clues what the problem might be?

ajayboora14 June 5, 2016 05:52

Mine problem is solved it is not working because your OpenFOAM software is not installed properly so first you have to remove your existing software and reinstall it by the help of command mention in www.OpenFOAM.org

Installation tme in these command is very less and OpenFOAM will work correctly.
This is the site of OpenFOAM developers the installation command work for only ubuntu 15.10 and 14.04 if you intstalled latest version of ubuntu you have to compile manually and it will work

coloursfordirectors June 5, 2016 07:00

Hi Ajay, thanks for your quick response. I followed steps 1 to 3 under new installation on http://openfoam.org/download/3-0-1-ubuntu/ and left out step 4 as I already have ParaView installed. Is there anything else that needs to be done?

ajayboora14 June 5, 2016 09:49

You don't need anything else to do perform a check if everything works okay than go ahead.Check all the commands are working properly or not may be this time they are working properly.
you can ask any query at https://cfdforbeginner.blogspot.in/
Its a blog for beginners in CFD

coloursfordirectors June 5, 2016 10:45

Thanks, Ajay. gmshToFoam is still not working, but I'll try to figure out.


All times are GMT -4. The time now is 10:11.