|
[Sponsors] |
[snappyHexMesh] blockMesh/snappyHexMesh for refining a coarse mesh |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 29, 2020, 05:05 |
blockMesh/snappyHexMesh for refining a coarse mesh
|
#1 |
Member
Tom Waits
Join Date: Aug 2018
Posts: 38
Rep Power: 7 |
I want to have a mesh that is very coarse (to save on computational costs) except for a cylinder in the middle which I want to be very finely meshed.
I use blockMesh to generate a cube with few grid points Code:
blocks ( hex (0 1 2 3 4 5 6 7) (10 10 10) simpleGrading (1 1 1) ); Code:
geometry { cylinder { type searchableCylinder; point1 (0.0 0.0 0.0); point2 (0.0 0.0 10); radius 1.0; } } Code:
refinementRegions { cylinder { mode inside; levels ((10 10)); } } What is the best workflow for this? How do I create a (very) fine cylinder surrounded by very coarse elements? Many thanks, Tom Waits |
|
October 29, 2020, 10:14 |
|
#2 |
Senior Member
M
Join Date: Dec 2017
Posts: 642
Rep Power: 12 |
The problem with refinementRegions is, that cells must lay inside to be refined. If your blockMesh is too coarse, nothing happens. What you can do is go and grab a CAD tool like FreeCAD, model your cylinder there and import it as slt file. Then you can specify refinementSurfaces to get to your level no matter what the background mesh looks like. I guess you gonna need a cellZone so snappy doesnt cut away the cells inside the cylinder.
Are you sure you want level 10? This might give you an insanely high number of cells. |
|
November 1, 2020, 23:35 |
refineMesh
|
#3 |
Senior Member
Charles
Join Date: Aug 2016
Location: Vancouver, Canada
Posts: 148
Rep Power: 9 |
First, I would suggest to make the background mesh relative coarse but not too coarse. With a proper background mesh size, the region refinement can work better.
And I might also want to try refineMesh before snappyHexMesh. You can refer to tutorial DTCHullMoving.
__________________
Charles L. |
|
February 10, 2023, 13:57 |
|
#4 |
Member
Giles Richardson
Join Date: Jun 2012
Location: Cambs UK
Posts: 98
Rep Power: 13 |
This is a good reply - I have not used refineMesh before, but in the DTCHull case its used to refine the mesh after blockMesh but before snappyHexMesh. I have a similar issue recently with a coarse blockMesh (1m cells) and then trying to do surface refinement of a sphere STL geometry which is also 1m diameter, and it doesn't get refined (at all) because the background mesh is too coarse.
The issue can be resolved (a workaround) by increasing the size of the sphere to 2m diameter OR reducing the size of the background mesh to 0.5m cells. This seems like a flaw in snappyHexMesh, but the use of refineMesh before snappyHexMesh could also be an good option. Another workaround is to use the feature edges instead to refine the whole surface - this can be done by changing your surfaceFeaturesDict includedAngle from 150 to say 179. This has the effect of selecting all edges of your geometry, as long as you specify the feature edge refinement level needed within SHMDict too. I wonder how many other people have fallen foul of this quirky behaviour in SHM? Last edited by ufocfd; February 11, 2023 at 06:03. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] Creating multiple multiple cell zones with snappyHexMesh - a newbie in deep water! | divergence | OpenFOAM Meshing & Mesh Conversion | 0 | January 23, 2019 04:17 |
Star CCM Overset Mesh Error (Rotating Turbine) | thezack | Siemens | 7 | October 12, 2016 11:14 |
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! | sc298 | OpenFOAM Meshing & Mesh Conversion | 2 | March 27, 2011 21:11 |
fluent add additional zones for the mesh file | SSL | FLUENT | 2 | January 26, 2008 11:55 |
Icemcfd 11: Loss of mesh from surface mesh option? | Joe | CFX | 2 | March 26, 2007 18:10 |