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

[snappyHexMesh] Issues in using snappyHexMesh

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Yann

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 18, 2021, 05:32
Default Issues in using snappyHexMesh
  #1
Senior Member
 
starter
Join Date: Sep 2012
Posts: 125
Rep Power: 15
sihaqqi is on a distinguished road
Greetings, I am following Tobias' exhaust manifold tutorial. When I combine all STLs into regionSTL, I cannot achieve water tight STL. In Salome, I had reached solid and meshed it according to the parameters in the video. Also, while performing snappyHexMesh, I get the error as below:

I understand that this is due to some curly bracket missing in snappyHexMeshDict but despite my numerous efforts I could not find where the error is. I have attached my Dict for anyone who can have a quick review and please guide me on this. I shall be very grateful.

--> FOAM FATAL IO ERROR:
keyword castellatedMeshControls is undefined in dictionary "/home/imad/cad/system/snappyHexMeshDict"

file: /home/imad/cad/system/snappyHexMeshDict from line 19 to line 293.

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

FOAM exiting
sihaqqi is offline   Reply With Quote

Old   January 18, 2021, 05:43
Default keyword mode is undefined
  #2
Senior Member
 
starter
Join Date: Sep 2012
Posts: 125
Rep Power: 15
sihaqqi is on a distinguished road
All, I resolved the error I earlier posted but this new one has popped up and I cannot resolve it. I do not have the word mode at all in my Dict attached.

--> FOAM FATAL IO ERROR:
keyword mode is undefined in dictionary "/home/imad/cad/system/snappyHexMeshDict/castellatedMeshControls/refinementRegions/regionSTL.stl"

file: /home/imad/cad/system/snappyHexMeshDict/castellatedMeshControls/refinementRegions/regionSTL.stl from line 68 to line 82.

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

FOAM exiting

Shall be grateful for help in resolution of this error.
Attached Files
File Type: txt snappyHexMeshDict.txt (5.1 KB, 4 views)

Last edited by sihaqqi; January 18, 2021 at 06:06. Reason: New error
sihaqqi is offline   Reply With Quote

Old   January 19, 2021, 03:13
Default
  #3
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,062
Rep Power: 26
Yann will become famous soon enough
Hi !

This error tells you exactly where the problem is:

Code:
--> FOAM FATAL IO ERROR: 
keyword mode is undefined in dictionary  "/home/imad/cad/system/snappyHexMeshDict/castellatedMeshControls/refinementRegions/regionSTL.stl"

 file: /home/imad/cad/system/snappyHexMeshDict/castellatedMeshControls/refinementRegions/regionSTL.stl from line 68 to line 82.
The "mode" parameter is missing in the refinementRegions section of your snappyHexMeshDict, line 68 to 82.

Have a look at any tutorial using snappyHexMesh, for instance the motorbike tutorial, and you will find the proper syntax to define refinementRegions:


Code:
     refinementRegions
    {
        refinementBox
        {
            mode inside;
            levels ((1E15 4));
        }
    }
The documentation will also help you to choose which mode you need to use for your case: https://cfd.direct/openfoam/user-gui...27-2020005.4.5

Cheers,
Yann

Last edited by Yann; January 19, 2021 at 03:14. Reason: typo
Yann is offline   Reply With Quote

Old   January 19, 2021, 03:20
Default
  #4
Senior Member
 
starter
Join Date: Sep 2012
Posts: 125
Rep Power: 15
sihaqqi is on a distinguished road
Thanks Yann,
Just for information as I am not fluent in C++, what does double parenthesis mean in levels ((1E15 4)).
sihaqqi is offline   Reply With Quote

Old   January 19, 2021, 03:42
Default
  #5
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,062
Rep Power: 26
Yann will become famous soon enough
This is not C++ specific, this is just the syntax used by OpenFOAM. there are a double parenthesis because you can specify several distances and refinement levels, as you can see in the documentation:

Code:
sphere1 
    {                             // refinement level 5 within 1.0 m 
        mode distance;            // refinement level 3 within 2.0 m 
        levels ((1.0 5) (2.0 3)); // levels must be ordered nearest first 
    }
AtoHM likes this.
Yann is offline   Reply With Quote

Reply

Tags
error, snappyhexmesh 3d


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
[snappyHexMesh] SnappyHexMesh Issues deji OpenFOAM Meshing & Mesh Conversion 16 October 20, 2021 07:13
[snappyHexMesh] Running snappyHexMesh in parallel - optimizing peterhess OpenFOAM Meshing & Mesh Conversion 2 January 3, 2018 02:54
[swak4Foam] and snappyHexMesh gives erratic mesh result Coke Rivas Ordenes OpenFOAM Community Contributions 3 April 17, 2017 13:06
[snappyHexMesh] snappyHexMesh add-layers issues, warped cells heling OpenFOAM Meshing & Mesh Conversion 9 August 19, 2013 13:01
[snappyHexMesh] SnappyHexMesh issues Alessio_1985 OpenFOAM Meshing & Mesh Conversion 4 November 6, 2012 19:59


All times are GMT -4. The time now is 04:26.