CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... (
-   -   OpenFOAM cannot read the mesh .neu (GAMBIT mesh file) (

spk October 3, 2011 14:33

OpenFOAM cannot read the mesh .neu (GAMBIT mesh file)
Hi guys,

I use ubuntu system in order to run openFoam.
I created a 2D mesh using Gambit (orifice.neu)
I saved this file in a folder.
Using terminal i find this folder and type
gambitToFoam orifice.neu

Then terminal writes:

cannot find file

file: /home/spyros/OpenFOAM/spyros-2.0.1/run/system/controlDict at line 0.

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

FOAM exiting

Where is the problem?
Can you help me?

Thanks a lot,

akidess October 4, 2011 02:33


Originally Posted by spk (Post 326522)
Hi guys,

cannot find file

file: /home/spyros/OpenFOAM/spyros-2.0.1/run/system/controlDict at line 0.

You have to set up an OpenFOAM case before you can do the mesh conversion, i.e. a system folder containing a controlDict file.

zaynah04 November 17, 2012 04:38

hi Anton,

i have looked a lot on net, but have not find any step by step method on how to create an openfoam case before doing the conversion.. i have followed some steps but all the time after i run the fluent3DMeshToFoam, i obtain that command not find..:(
can you please find some time and explain to me how to proceed stepwise..
i am new to openfoam..
thanks a lot..

zaynah04 November 17, 2012 12:32

i have followed this:


In order to convert a mesh to OpenFOAM format it suffices to make the following steps:
  • Create an OpenFOAM directory case structure:
    • mkdir casename
    • mkdir casename/system
    • mkdir casename/constant
    • mkdir casename/constant/polyMesh
    • mkdir casename/0
  • Create the controlDict file which contains temporal evolution information (see the OpenFOAM User Guide):
    • vi casename/system/controlDict
  • Create the files for setting the solutor and other stuffs (see the OpenFOAM User Guide):
    • vi casename/system/fvSchemes
    • vi casename/system/fvSolution
  • Run the appropriate library:
    • library < caseroot > < casename > < meshfile >
      for example, if the case has been created in the current directory:
    • fluent3DMeshToFoam . casename file.msh

But each time i come to

  • Create the controlDict file which contains temporal evolution information (see the OpenFOAM User Guide):
    • vi casename/system/controlDict

my system freeze over..;(

-mAx- November 19, 2012 09:05

copy a case in the tutorial folder and paste it into your /run directory.
Then adapt all files especially

zaynah04 November 19, 2012 09:13

thanks Max,

it worked...

now i do not understand how to use the boundary condition in openfoam!

I had use 4m/s in fluent and k-upsilone

Also i use velocity inlet outflow and wall..

now i am lost as how to proceed..:(

-mAx- November 19, 2012 09:19

now you can import your mesh.
Once it is done, you should have in contant/polyMesh a boundary file.
In this file you will retrieve all the patches you defines in Gambit.
Then in:
enter right patch names and right boundary conditions

Then don't forget that in Gambit your model is not scaled. In OF you can do it with transformPoints

Then chekMesh

Then specify turbulence models in /constant/RASProperties and viscosity in /constant/transportProperties.

Finally if you copied a tutorial for you wanted solver, you can start in serial.
hope it helped

zaynah04 November 19, 2012 09:39

mesh was imported successfully..

i am newbie and a bit unfamiliar with all those terms..:(

after i change the boundary condition, what do i do in the terminal? i mean what command to use?

-mAx- November 19, 2012 09:43

if everything is ready, then you can simple type name of your solver
for instance

zaynah04 November 19, 2012 10:09


fileName::stripInvalid() called for invalid fileName UbuntuOne
For debug level (= 2) > 1 this is considered fatal
Aborted (core dumped)
i get this error after type icoFoam..:(

-mAx- November 19, 2012 10:12

ok no idea about this error.
Just to be sure: again copy and paste the tutorial, and run it
is it cavity tutorial?

zaynah04 November 19, 2012 10:27

yes cavity tutorial..

-mAx- November 19, 2012 10:29

can you run the tutorial?

zaynah04 November 19, 2012 10:30

yes of course..:(

zaynah04 November 19, 2012 10:34

can i modify my parameters in that folder system/foamData to fluent dict?

i found that i can change directly paramters there example

p 1;

U 2;

T 3;

h 4;

k 5;

epsilon 6;

gamma 150;

-mAx- November 19, 2012 10:34

ok it sounds good.
Now go to your case, and paste here what's in:
* /constant/polyMesh/boundary

zaynah04 November 26, 2012 05:05

in the dimensions units
1 for mass
2 for length etcc...

we have all 7 parameters but in the book i found parameter -1 what does it mean? from my dimensions unit the third parameter means time...we cannt have negative time..
what does [ 0 2 -1 0 0 0 ] the -1 means?


-mAx- November 26, 2012 05:32

here -1 means 1/s
[ 0 2 -1 0 0 0 ] --> m**2/s

zaynah04 November 26, 2012 05:55


You mean 2 m/s?

but in the dimension unit is a list of 7 units..i though the parameters inside the brackets corresponded with the units.

-mAx- November 26, 2012 06:01

[m**2/s] = [m^2/s] = [m*m/s] = square meter per second

All times are GMT -4. The time now is 09:35.