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

[snappyHexMesh] snapControls is undefined in dictionary

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By AtoHM

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 13, 2023, 13:56
Question snapControls is undefined in dictionary
  #1
New Member
 
Jefferson Galeano
Join Date: May 2023
Posts: 4
Rep Power: 2
jeffer7 is on a distinguished road
Hi

I'm trying to mesh the 3D elbow with snappyHexMesh, I created an overall mesh that wraps around the elbow, I run surfaceFeatures and after applying sHM I get an error saying:

--> FOAM FATAL IO ERROR:
keyword snapControls is undefined in dictionary "/home/elbow/system/snappyHexMeshDict"

file: /home/elbow/system/snappyHexMeshDict from line 17 to line 361.

From function const Foam::dictionary& Foam::dictionary::subDict(const Foam::word&) const
in file db/dictionary/dictionary.C at line 1008.

FOAM exiting


I already saw the syntax of snappyHexMesh, specifically in snapControls, but I can't see where the error is

Any suggestions?

Thanks in advance
Attached Images
File Type: jpg generalMesh_elbow.jpg (71.3 KB, 7 views)
Attached Files
File Type: txt snappyHexMeshDict.txt (9.7 KB, 5 views)
jeffer7 is offline   Reply With Quote

Old   July 14, 2023, 02:07
Default
  #2
Senior Member
 
M
Join Date: Dec 2017
Posts: 642
Rep Power: 12
AtoHM is on a distinguished road
There is a ":" instead of ";" at line 193 which probably causes it.
Code:
level    ((1e-4 1)): // distance from the surface patch-refinement level
Usually, if you get a - lets say clearly misleading - error message like that (because the key is obviously present), its related to syntax errors. If the above does not solve the problem, grab a fresh dict you know is working and add in your stuff again gradually to see where it fails.


Addition: Regarding the entries there, the comment appears to be wrong (or I do not understand it correctly): the first number is just a placeholder, the second number determines how many splits of the background mesh cells are done in the volume enclosed by the region. The size at the surface of this region is determined in the refinementSurfaces subdictionary, where you also defined (1 1) - thus get the same size and there is another syntax error there at line 140:
Code:
 level    level (1 1);
Hint #3: do not use insidePoint (0.0 0.0 0.0); . This point has to never coincide with a face or node of the mesh during the whole meshing process. It is recommended to use slightly off float numbers like 0.0142 for each component to decrease the odds of hitting a face or node during meshing.
Yann and jeffer7 like this.
AtoHM is offline   Reply With Quote

Old   July 14, 2023, 13:37
Thumbs up
  #3
New Member
 
Jefferson Galeano
Join Date: May 2023
Posts: 4
Rep Power: 2
jeffer7 is on a distinguished road
I corrected the error and it didn't run, but when I change 'distance' to 'inside' I manage to run sHM and get the mesh,
{
mode inside;
level 1;
}
my other error must be in the 'distance' syntax I still don't understand how it works I'll keep watching the guide.

Thanks for your help

Edit: I already saw the error, I had missed an 's' in level
elbow
{
mode distance;
levels ((1e-4 1)); // distance from the surface patch-refinement level

}
Attached Images
File Type: jpg elbow_mesh.jpg (55.6 KB, 6 views)
jeffer7 is offline   Reply With Quote

Old   July 14, 2023, 15:23
Default
  #4
Senior Member
 
M
Join Date: Dec 2017
Posts: 642
Rep Power: 12
AtoHM is on a distinguished road
Oh sorry, I completely overlooked the mode setting there. Of course, with distance the comment makes sense!
AtoHM is offline   Reply With Quote

Old   February 29, 2024, 02:20
Default
  #5
New Member
 
Kari Maru
Join Date: Feb 2024
Posts: 1
Rep Power: 0
maruusa is on a distinguished road
I am impressed with your article. The information you share will be an important document for me to learn more about this topic. fnf
maruusa is offline   Reply With Quote

Reply

Tags
error, mesh 3d, snapcontrol, snappyhesmeshdict


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
LEMOS InflowGenerator r_gordon OpenFOAM Running, Solving & CFD 103 December 18, 2018 00:58
OpenFOAM 1.6-ext git installation on Ubuntu 11.10 x64 Attesz OpenFOAM Installation 45 January 13, 2012 12:38
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 19:08
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 06:51
G95 + CGNS Bruno Main CFD Forum 1 January 30, 2007 00:34


All times are GMT -4. The time now is 12:43.