CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Native Meshers: snappyHexMesh and Others (
-   -   FOAM FATAL IO ERROR: keyword features is undefined in dictionary?? (

amorenelchino May 14, 2013 05:55

FOAM FATAL IO ERROR: keyword features is undefined in dictionary??
1 Attachment(s)
Hello all!!

Can someone tell me why i am getting this error? I followed some tutorials and i still not knowing.. why?? I am really new and alone with this..

i have also attached the SnappyHexMeshDict (Maybe is not good enough but at the beginning i only want that Snappy works with my sistema.STL)
In my .STL i named "solid objeto" and also at the end "endsolid objeto"

Thanks a lot!!!

keyword features is undefined in dictionary "/home/amorenelchino/openfoam/amorenelchino-2.2.0/run/sistema/system/snappyHexMeshDict.castellatedMeshControls"

file: /home/amorenelchino/openfoam/amorenelchino-2.2.0/run/sistema/system/snappyHexMeshDict.castellatedMeshControls from line 37 to line 60.

From function dictionary::lookupEntry(const word&, bool, bool) const
in file db/dictionary/dictionary.C at line 402.

FOAM exiting

colinB May 14, 2013 06:10


if you read the error message carefully you will recognize it says


keyword features is undefined in dictionary
and identifying a file afterwards.

This means you haven't defined the keyword "features"
in your snappyHexMeshDict file

To fix this include something like:



    maxLocalCells 10000000;
    maxGlobalCells 2000000;
    minRefinementCells 1;
    nCellsBetweenLevels 1;



      level (4 5);

    resolveFeatureAngle 30;

            mode distance;
            levels ((0.1 5) (0.4 4) (1 2));

    locationInMesh (0 30 2);



    nSmoothPatch 3;
    tolerance 4.0;
    nSolveIter 30;
    nRelaxIter 5;


you can leave the bold section empty however if you use
surfaceFeatureExtract to resolve knuckle lines you have to fill in that part
as well e.g.


  file "yourFile.eMesh";
  level 5;


between the round brackets.

I hope I could contribute

amorenelchino May 14, 2013 06:31

Yuhuuuu! :D so fast!!
Thanks Colin!

sometimes i have the things in front of me..:-/
I was trying a mesh, but i would need to use these eMesh, because my geometry has sharp corners, i tried to get a tutorial, but the link in OpenFOAMWiki is not working...:-( Do you know one??

Really thanks!!

colinB May 14, 2013 07:12


the command you are looking for is:


How to use it correctly type:

surfaceFeatureExtract -help

For me it usually works with:

surfaceFeatureExtract -includedAngle 150 constant/triSurface/your.stl

patchname is without the inverted commas and consist usually
of the stl file name without .stl and the name of the solid.

for reference see here

post #4


amorenelchino May 15, 2013 05:07

If i understand good...with only typing this command in terminal, works these "Surface Feature", but it is also correct write the "SurfaceFeatureExtractDict" and type the command? and another question...the ".eMesh" is the result? :o

Sorry, because i am trying to use openfoam since two weeks!and in my freetime! i am getting crazy! :eek:

Thank you very very much!!


colinB May 15, 2013 05:42


yes it is enough to simply type the command with the required

I never used a surfaceFeatureExtractDict file, however I have never used
of220 maybe in the latest version it is required.

the *.emesh file is indeed the result of that command and
will be stored in the triSurface folder.
It also will be automatically read out by sHM when specified in the
features section.


amorenelchino May 15, 2013 09:25

Thanks you are being a great help!!

Ok! i was using "surfaceFeatureExtractDic", it worked...
now i want to use "decomposePar" i did it and was ok, if i want to make SHM with this decompose'Par...what should I type in terminal?? only the command "SnappyHexMesh"?
And the last...i have done "SHM", everything was running ok, but in "Surface refinement iteration 4"----> Bus error (core dumped) any idea?
Always appears something...i am not going to see my mesh

Thanks in advance! :)

colinB May 15, 2013 09:46

puh it is a little bit difficult to figure out what is wrong with so little

common mistakes when running sHM (in parallel) are

- using wrong decompostion method (simple is the one you need)

-overseeing that snappyHexMesh is writing the mesh in different time
steps if the option -overwrite is not used

- since you are asking what to type for sHM in parallel the question is:
did you use a command like this:


mpirun -np 2 snappyHexMesh -parallel -overwrite |tee snappy_Log

what it does is:

mpirun = multiprocessor run
np gives the number of processors you use so 2 has to be replaced with
your number if you use more than 2

snappyHexMesh -parallel should be clear

-overwrite see above

|tee snappy_Log

will write the output on the screen in a log file called "snappy_Log"
-> this is handy if you want to ask questions in the forum
you can simply copy and paste the error message in your post and
it helps us to analyse your problem.

If I haven't posted the solution up there yet you might want to provide
us your


and the log of your meshing process


amorenelchino May 16, 2013 07:06

3 Attachment(s)
Really thanks for your time...

Ok, i was trying..and trying..and i think my .stl in ASCII was not good, because paraView gave me an error and closed suddenly when i tried to open it...but the geometry was ok, so i tried with .STL but binary and it was better...Paraview has opened my .stl without problems..

So i made it again, but i still have problems..

I attach the documents that you told me...

if I get this i have to at least thank you in my work! i want to write my thesis..

I had to delete i bit of snappy_log, it was too heavy...

colinB May 21, 2013 03:08

Hi Laura,

sry for my late reply, but i had some urgent projects to work on and a long
weekend so I haven't been at the computer too much the recent time.


The lines of your snappy_log kind of confuse me, especially the ones
with the numbers in front. The only explanation which comes to my mind
is that you forgot the -parallel flag when using the mpirun command.
If you don't use it several calculations will be started but not in parallel.

Concerning ASCII and binary I made the experience that the ASCII works
usually very good, however when you use spaces in the name of the
solids this can cause trouble for paraview (paraview even complains when
a not OF related file in the same folder with improper naming is present).
Binary files i think can not be treated by sHM.

When you look at the meshing time of your snappy log you see that the
time is very short which is actually unusual for sHM and that means he
probably skipped some parts. Combined with the huge file size I would say
that the meshing went wrong ( the huge file size can come from the error
messages which are sometimes printed for each cell which leads to big

Therefore my hint, try it again with a ASCII file and if it goes wrong post
the error message which would give us another hint.


All times are GMT -4. The time now is 22:54.