CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Native Meshers: snappyHexMesh and Others

snappy hex mesh error

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

Reply
 
LinkBack Thread Tools Display Modes
Old   December 31, 2011, 08:35
Default snappy hex mesh error
  #1
New Member
 
Join Date: Nov 2011
Posts: 22
Rep Power: 5
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, 67 views)
File Type: txt blockMeshDict.txt (1.4 KB, 10 views)
kd55 is offline   Reply With Quote

Old   December 31, 2011, 13:23
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,488
Blog Entries: 34
Rep Power: 86
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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, 62 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: 5
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: 5
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: 5
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: 5
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: 5
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, 1 views)
File Type: txt snappyHexMeshDict.txt (5.0 KB, 15 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: 5
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, 37 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: 5
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
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,488
Blog Entries: 34
Rep Power: 86
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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: 5
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: 5
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
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,488
Blog Entries: 34
Rep Power: 86
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
polynomial thermophysical properties II sebastian OpenFOAM Running, Solving & CFD 53 April 10, 2014 05:45
Compile problem ivanyao OpenFOAM Running, Solving & CFD 1 October 12, 2012 09:31
Saving ParaFoam views and case sail OpenFOAM Paraview & paraFoam 9 November 25, 2011 16:46
Problem with compile the setParabolicInlet ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 20:50
user defined function cfduser CFX 0 April 29, 2006 10:58


All times are GMT -4. The time now is 21:59.