|
[Sponsors] |
March 27, 2024, 22:26 |
How to do a proper SnappyHexMesh?
|
#1 |
New Member
Alberto Campuzano
Join Date: Mar 2021
Posts: 14
Rep Power: 5 |
Dear all.
I am quite new using OpenFoam and of course snappyHexMesh. i have a geometry which is not quite simple, is a stack of material they holes arranged in zigzag from plate to plate (material to material), the liquid must pass through those holes, hence i made my geometry in Salome having inlet.stl, outlet.stl, and plate.stl, this last one is composed by the plates and the holes, hence doing my blockMesh everything is fine but after applying the SnappyHexMesh only one plate is meshed and the rest it thrown away. What did i do wrong? In attache file you will find the snappyHexMesh file and also the geometry. Finally i am planning to use incompressibleVOFluid solver |
|
March 28, 2024, 04:28 |
|
#2 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,236
Rep Power: 29 |
Hello,
We will need to have more information to be able to help you. Check here How to give enough info to get help Can you show screenshots of the mesh you get? What is the cell size of your initial mesh (blockMesh) ? My first thought is that your mesh is too coarse compared to the size of the holes in your plate, so snappy doesn't "see" the holes and keeps only the plate corresponding to your locationInMesh point. Of course this is a total blind guess as I didn't see your mesh and I have no idea how you defined your blockMesh. Regards, Yann |
|
March 29, 2024, 17:36 |
|
#3 | |
New Member
Alberto Campuzano
Join Date: Mar 2021
Posts: 14
Rep Power: 5 |
Quote:
First of all sorry for the late reply, i saw your answer and i decided to take a deeper look at my blockMeshDict. Well in attached file you will see the screen shot of the blockMeshDict, look, (the cells are not highly visible but you will more or less see s simplegrading), such a block belongs just to one plate, exactly at Code:
locationInMesh (0.0 0.0 -0.00045); Code:
simpleGrading What can i do in order to get a proper mesh but not having too many cells?. the inlet and outlet are not considered after performing the snappyHexMesh, just the internal Mesh and of course the plate, do i have to increase a bit the size of the initial mesh? If a simplification of the geometry is needed, hence ill remove the upper and bottom plates but ill have to consider the upper holes "cylinders" as inlets, (many inlets), and the bottom holes as outlets (many outlets). hence, how to do that? because ill use the solver Code:
incompressibleVoF Finally you will see the screenshot and also the Code:
blockMeshdict Last edited by baezacaljo; March 29, 2024 at 17:43. Reason: Forgot more info |
||
April 2, 2024, 06:04 |
|
#4 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,236
Rep Power: 29 |
Hello,
It is difficult to see on your screenshot, but snappy often struggles to properly snap to geometry when there is "high" aspect ratio on the cells in the background mesh. It behaves way better with an aspect ratio of 1. Long and thing geometries like your are always tricky to mesh with snappy due to the way snappy works. You mentioned blockMesh, but you didn't post your snappyHexMeshDict file. How did you define the surface refinement levels for the holes, inlet and outlet? Few recommendations :
Regards, Yann |
|
April 12, 2024, 16:05 |
|
#5 | |
New Member
Alberto Campuzano
Join Date: Mar 2021
Posts: 14
Rep Power: 5 |
Quote:
Dear Yann First of all sorry for the late reply, i have been testing several things on my mesh and geometry Thank you very much for your help, now everything is getting easier and better, however, after several test as i mentioned before we decide to change to 2D. of course the mesh is easier and faster i even i already did a simulation and everything was as i expected. After all that, i have a question, look as i already mentioned the geometry will be in 2D hence, i took a "tiny slice" of my geometry because OpenFoam needs 3D, then after performing the Code:
blockMesh Code:
snappyHexMesh thanks in advance |
||
April 13, 2024, 05:54 |
|
#6 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,236
Rep Power: 29 |
Hello Alberto,
You are right, you should keep only one cell in the 3rd direction (and use the empty type on the faces normal to the 3rd direction) Snappy cannot do that due to the way it refines the cells (octree structure). However, you can use the extrudeMesh utility to create a one cell thickness mesh from the mesh generated with snappy. You can type this to get some information and examples: Code:
foamInfo extrudeMesh Yann |
|
Tags |
openfoam, snappyhesmesh, snappyhesmeshdict |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[CAD formats] Creating waterproof STL using snappyHexMesh or salome | Tobi | OpenFOAM Meshing & Mesh Conversion | 58 | May 13, 2020 07:01 |
[snappyHexMesh] Running snappyHexMesh in parallel - optimizing | peterhess | OpenFOAM Meshing & Mesh Conversion | 2 | January 3, 2018 03:54 |
[snappyHexMesh] Tutorial crashes: snappyHexMesh floating point exception. | jasv | OpenFOAM Meshing & Mesh Conversion | 4 | May 10, 2016 03:55 |
Generating a proper STL mesh for snappyHexMesh | riccardomaione | OpenFOAM Pre-Processing | 2 | August 25, 2015 03:17 |
[snappyHexMesh] stitchMesh and snappyHexMesh | gdbaldw | OpenFOAM Meshing & Mesh Conversion | 0 | December 23, 2009 03:09 |