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

[snappyHexMesh] SnappyHex + refinement

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 9, 2019, 15:45
Default SnappyHex + refinement
  #1
New Member
 
Join Date: Jul 2019
Posts: 1
Rep Power: 0
jdotfr is on a distinguished road
Hello!


I am trying to generate a 2-D domain for a breakwater in a flume with a slope and I have encountered two problems, which I present in the two attached cases. I am using OpenFOAM 2.3.0, but I also have 1712+ to postprocess.



The first problem concerns both two cases. At first I created a box and inserted it into the domain. With a box, snappyHexMesh performed great (picture: mesh_.png). However, when replacing the box for a structure with a slope, snappyHexMesh was creating cells in places it shouldn't (picture: mesh_2.png). I am quite new with snappyHexMesh, but I have tried almost every combination of inputs and none have worked yet. The only option is not including refinement (either through refineMesh > better; or creating a refinement box in the snappyHexMeshDict > worse); however, I have a very long domain and I cannot afford to have so many cells in the x-direction, so I need to find out. Here I attach the full case (file: Case1.tar.gz). It takes very short to run (Allrun). Within the constant/polymesh I also give the raw geometry (named caisson) in .geo format.


Regarding the second issue, it is that when using a refinementBox in snappyHexMeshDict instead of refineMesh my domain is no longer 2D. At the intersection between the bounding box and the .stl object, where the refinement has taken place, new nodes are created in the y-direction (detailed picture: mesh_3.png). In fact, there is one mesh check that fails and when checking topology it says that "... this mesh is not 1D or 2D". The file for this case is given as Case2.tar.gz


Case1.tar.gz


Case2.tar.gz

mesh_.png

mesh_2.png

mesh_3.png



I appreciate any help you can provide me, particularly for the first problem, as I am struggling a lot with this snappyHexMesh.


Thank you very much!!!!
jdotfr is offline   Reply With Quote

Old   August 12, 2019, 21:16
Default Snappy2D As Expected
  #2
Member
 
Peter Brady
Join Date: Apr 2014
Location: Sydney, NSW, Australia
Posts: 54
Rep Power: 12
pbrady2013 is on a distinguished road
Quote:
Originally Posted by jdotfr View Post
Hello!

Regarding the second issue, it is that when using a refinementBox in snappyHexMeshDict instead of refineMesh my domain is no longer 2D. At the intersection between the bounding box and the .stl object, where the refinement has taken place, new nodes are created in the y-direction (detailed picture: mesh_3.png). In fact, there is one mesh check that fails and when checking topology it says that "... this mesh is not 1D or 2D". The file for this case is given as Case2.tar.gz

Hi,


I've not looked in detail at the first issue but I've come across the second. First: snappy is doing exactly as expected. It does not know about 2D per se and simply splits in all directions.


Second: what I usually do with snappy for 2D is run as per you have done until I'm happy with the results when visualised from the side. I then run an extrusion of one cell into the direction of the 2D. From there if I want the mesh centred over an origin I do a transform back to the origin. So its:


Code:
snappyHexMesh
extrudeMesh
transformPoints
checkMesh
Hope that helps,
-pete
pbrady2013 is offline   Reply With Quote

Reply

Tags
breakwater, refinementbox, slope, snap controls, snappyhexmesh 2d

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
[snappyHexMesh] SnappyHexMesh running killed! Mark JIN OpenFOAM Meshing & Mesh Conversion 7 June 14, 2022 01:37
SimpleFoam & Theater jipai OpenFOAM Running, Solving & CFD 3 June 18, 2019 10:11
[snappyHexMesh] Edge Refinement fracasce OpenFOAM Meshing & Mesh Conversion 3 December 2, 2017 13:30
killed "snappyHexMesh" parkh32 OpenFOAM Pre-Processing 2 April 8, 2012 17:12
[snappyHexMesh] snappyHexMesh aborting Tobi OpenFOAM Meshing & Mesh Conversion 0 November 10, 2010 03:23


All times are GMT -4. The time now is 09:35.