CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[snappyHexMesh] snappy hex mesh error

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 31, 2011, 08:35
Default snappy hex mesh error
  #1
New Member
 
Join Date: Nov 2011
Posts: 22
Rep Power: 11
kd55 is on a distinguished road
Hi there, I am trying to get to grips with sHM but am finding it hard to follow some of the tutorials online and in the user guide. I have an STL file of a cylinder which will be used for preliminary tests. Would it be possible for someone to have a quick look at the error I am getting when I run snappyHexMesh and point me in the right drection:

FOAM Warning :
From function entry::getKeyword(keyType&, Istream&)
in file db/dictionary/entry/entryIO.C at line 78
Reading /home/kd55/OpenFOAM/kd55-1.6/run/tutorials/incompressible/pisoFoam/ras/STLCylinder2-copy/system/snappyHexMeshDict
found on line 86 the punctuation token '{'
expected either } or EOF

keyword meshQualityControls is undefined in dictionary "/home/kd55/OpenFOAM/kd55-1.6/run/tutorials/incompressible/pisoFoam/ras/STLCylinder2-copy/system/snappyHexMeshDict"
file: /home/kd55/OpenFOAM/kd55-1.6/run/tutorials/incompressible/pisoFoam/ras/STLCylinder2-copy/system/snappyHexMeshDict from line 24 to line 87.
From function dictionary::subDict(const word& keyword)
in file db/dictionary/dictionary.C at line 467.
FOAM exiting

relevant files should be attatched bar the STL

Kind Regards,

Kit
Attached Files
File Type: txt snappyHexMeshDict.txt (5.0 KB, 117 views)
File Type: txt blockMeshDict.txt (1.4 KB, 18 views)
kd55 is offline   Reply With Quote

Old   December 31, 2011, 13:23
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,958
Blog Entries: 45
Rep Power: 122
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Kit,

It looks to me like you aren't using a proper text editor. My favourite one is Kate, although it requires KDE to be installed, which can mean that you would need to download and install an additional 200-300 MB of packages.

Either way, I suggest that you take more care with where the brackets "{" and "}" are placed, because the following fields have the "}" ones in the wrong place:
  • addLayersControls - has a closing bracket too soon.
  • meshQualityControls - didn't even have a closing bracket.
Another thing that I advise you is to define in your text editor to use spaces instead of tabs.

Another advice is to always have the original "snappyHexMeshDict" open in another window, so you can consult it and compare it with your current version.

edit: by what I've seen from your previous posts, you might be running on Windows. So you might be interested in this: http://code.google.com/p/bluecfd-sin...epad2_manually

Best regards and good luck!
Bruno
Attached Files
File Type: txt snappyHexMeshDict.txt (5.0 KB, 125 views)
__________________

Last edited by wyldckat; December 31, 2011 at 13:28. Reason: see "edit:"
wyldckat is offline   Reply With Quote

Old   January 5, 2012, 10:01
Default
  #3
New Member
 
Join Date: Nov 2011
Posts: 22
Rep Power: 11
kd55 is on a distinguished road
thanks Bruno, sHM now seems to be working.

Thanks again,

Kit
kd55 is offline   Reply With Quote

Old   January 6, 2012, 12:08
Default
  #4
Member
 
Aqua
Join Date: Oct 2011
Posts: 96
Rep Power: 11
aqua is on a distinguished road
Quote:
Originally Posted by kd55 View Post
thanks Bruno, sHM now seems to be working.

Thanks again,

Kit
Dear Kit,
I have the same problem as yours, could you please tell me how you got your case working?
Thank you so much!
Aqua
aqua is offline   Reply With Quote

Old   January 7, 2012, 11:01
Default
  #5
New Member
 
Join Date: Nov 2011
Posts: 22
Rep Power: 11
kd55 is on a distinguished road
Hi Aqua,

I'm not so sure I have got it working now, as I am using snappy in the pisofoam solver which I can't run at the moment as it has a bug which is caused by the R file in the 0 directory. However, I do have a few pointers on where you might be going wrong as I have spent quite a lot of time on this now:
- if you are using paraview (not parafoam), i would use foamToVTK to transfer the data files
- copy the snappyHexMesh dict from the motorbike tutorial and make sure you are carefull when making changes to it, i.e. be carefull with th {,(,),}. change little bits at a time and make sure you know what you are changing, there is plenty of info on here. There are also some online tutorials:
http://www.hydroniumion.de/general/s...mesh-tutorial/
http://www.hydroniumion.de/studium/s...torial-part-2/

Regards,

Kit
kd55 is offline   Reply With Quote

Old   January 9, 2012, 06:53
Default
  #6
Member
 
Aqua
Join Date: Oct 2011
Posts: 96
Rep Power: 11
aqua is on a distinguished road
Quote:
Originally Posted by kd55 View Post
Hi Aqua,

I'm not so sure I have got it working now, as I am using snappy in the pisofoam solver which I can't run at the moment as it has a bug which is caused by the R file in the 0 directory. However, I do have a few pointers on where you might be going wrong as I have spent quite a lot of time on this now:
- if you are using paraview (not parafoam), i would use foamToVTK to transfer the data files
- copy the snappyHexMesh dict from the motorbike tutorial and make sure you are carefull when making changes to it, i.e. be carefull with th {,(,),}. change little bits at a time and make sure you know what you are changing, there is plenty of info on here. There are also some online tutorials:
http://www.hydroniumion.de/general/s...mesh-tutorial/
http://www.hydroniumion.de/studium/s...torial-part-2/

Regards,

Kit
Hello Kit,
Thank you so much for your help! I am reading the turorials and hopefully will find some solution!

Thank you so much and wish you good luck in your research!

Aqua
aqua is offline   Reply With Quote

Old   February 17, 2012, 04:07
Default
  #7
New Member
 
Elise
Join Date: Jan 2012
Posts: 15
Rep Power: 10
Elise is on a distinguished road
I get the same error; keyword meshQualityControls is undefined in dictionary snappyHexDict. I looked at the right places for the brackets but I can't figure it out?

I'm trying to make a mesh inside the scour stl file instead of outside the region.
Attached Files
File Type: txt blockMeshDict.txt (1.4 KB, 4 views)
File Type: txt snappyHexMeshDict.txt (5.0 KB, 29 views)
Elise is offline   Reply With Quote

Old   February 17, 2012, 05:42
Default
  #8
New Member
 
Elise
Join Date: Jan 2012
Posts: 15
Rep Power: 10
Elise is on a distinguished road
I had the wrong internal co-ordinates and also had an old mesh in the polymesh folder.

However, I want to refine my grid at the walls inside the stl file, how can I do this?

And further I want to make a patch at the left small tube to let water in and a patch on the left largest circle part to let water out again. The rest I want as a patch to specify a B.C. on it (wall, no velocity, no flux). How can I do this?
Attached Images
File Type: jpg Screenshot at 2012-02-17 10_39_25.jpg (40.2 KB, 53 views)
Elise is offline   Reply With Quote

Old   February 17, 2012, 17:20
Default
  #9
Member
 
Aqua
Join Date: Oct 2011
Posts: 96
Rep Power: 11
aqua is on a distinguished road
Quote:
Originally Posted by Elise View Post
I had the wrong internal co-ordinates and also had an old mesh in the polymesh folder.

However, I want to refine my grid at the walls inside the stl file, how can I do this?

And further I want to make a patch at the left small tube to let water in and a patch on the left largest circle part to let water out again. The rest I want as a patch to specify a B.C. on it (wall, no velocity, no flux). How can I do this?
Hi,
I think you need to creat different parts in stl file first according to how many patches you want to creat.

Aqua
aqua is offline   Reply With Quote

Old   February 18, 2012, 08:02
Default
  #10
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,958
Blog Entries: 45
Rep Power: 122
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings to all!

@Elise: You can with createPatch. You can find several examples by running:
Code:
find $WM_PROJECT_DIR -name createPatchDict
If your geometry has good features (i.e., not trying to create a small patch in a flat surface), you can use autoPatch.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   February 20, 2012, 07:55
Default
  #11
Member
 
Aqua
Join Date: Oct 2011
Posts: 96
Rep Power: 11
aqua is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Greetings to all!

@Elise: You can with createPatch. You can find several examples by running:
Code:
find $WM_PROJECT_DIR -name createPatchDict
If your geometry has good features (i.e., not trying to create a small patch in a flat surface), you can use autoPatch.

Best regards,
Bruno
Hello Bruno,
I wonder, If my geometry is a car with only one part named "car", in a stl file.
After snappyHexMesh, in the boundary file there is only the patch named "car". Then,
Now I want to create different parts for the car such as "car_frontwindow", "car_backwindow", "car_leftsidewindow" etc.
Is it possible to do that in OF?

Thank you so much!
Aqua
aqua is offline   Reply With Quote

Old   February 20, 2012, 08:41
Default
  #12
New Member
 
Elise
Join Date: Jan 2012
Posts: 15
Rep Power: 10
Elise is on a distinguished road
I loaded in the different stl files instead of one stl file, now I have the different patches.
Next time I will use autopatch, easier to use I think.
Elise is offline   Reply With Quote

Old   February 20, 2012, 09:56
Default
  #13
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,958
Blog Entries: 45
Rep Power: 122
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by aqua View Post
Hello Bruno,
I wonder, If my geometry is a car with only one part named "car", in a stl file.
After snappyHexMesh, in the boundary file there is only the patch named "car". Then,
Now I want to create different parts for the car such as "car_frontwindow", "car_backwindow", "car_leftsidewindow" etc.
Is it possible to do that in OF?
It should be possible. Like I wrote on the other post, search for the examples that already exist

Quote:
Originally Posted by Elise View Post
I loaded in the different stl files instead of one stl file, now I have the different patches.
Next time I will use autopatch, easier to use I think.
The downside of autoPatch (besides the previously mentioned issue) is that you then have to manually rename every patch on "*/polyMesh/boundary". If the geometry doesn't change, or at least not the order of the patches being found, you can use a "changeDictionaryDict" for renaming patches with a pre-done renaming pattern

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   July 16, 2018, 22:07
Default snappyHexMeshDict IOstream issue
  #14
New Member
 
Ewan
Join Date: Nov 2016
Posts: 15
Rep Power: 6
EFRENCH is on a distinguished road
I am trying to run snappyHexMesh having only modified a couple of things in the control Dict to suit my patches but the following error keeps cropping up "keyword meshQualityControls is indefined in dictionary "IOstream"". The 'meshQualityControls' has also been 'castellatedMeshControls' depending on which parts I comment out.

I am working in Docker if that has any effect but I think it is probably me just missing some punctuation somewhere! Please could someone help?


(I've had to rename the file to a .txt but if you change it back to .mh it should open!)
Attached Files
File Type: txt snappyHexMeshDict.txt (5.5 KB, 0 views)
EFRENCH is offline   Reply With Quote

Old   July 17, 2018, 03:13
Unhappy understanding SHM
  #15
New Member
 
ABDUR REHMAN
Join Date: Jul 2018
Posts: 2
Rep Power: 0
MANI567 is on a distinguished road
hello everyone. i am new to openFoam and i have been working on it for 3 weeks. i failed in finding any reference videos that tell me how i can use shm on different geometries and how to create thir shm files.



can anyone help me in this regard !


thank you

MANI567
MANI567 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 19:57
Compiling dynamicTopoFvMesh for OpenFOAM 2.1.x Saxwax OpenFOAM Installation 25 November 29, 2013 06:34
[blockMesh] apparently the mesh doesn't want to be created in one direction Maxime Thomas OpenFOAM Meshing & Mesh Conversion 1 August 18, 2012 07:05
Building OpenFOAM1.7.0 from source ata OpenFOAM Installation 42 May 14, 2012 21:48
CheckMeshbs errors ivanyao OpenFOAM Running, Solving & CFD 2 March 11, 2009 03:34


All times are GMT -4. The time now is 01:42.