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

[snappyHexMesh] SnappyHexMesh with local refinement of ONE STLfile

Register Blogs Community New Posts Updated Threads Search

Like Tree17Likes

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   February 18, 2009, 07:46
Default SnappyHexMesh with local refinement of ONE STLfile
  #1
Senior Member
 
Wolfgang Heydlauff
Join Date: Mar 2009
Location: Germany
Posts: 136
Rep Power: 21
wolle1982 will become famous soon enough
Hallo all,

while using the great Tool snappyHexMesh one can quickly get too many cells. But if some level of refinement is required in only some special regions of the geometry, e.g. an airfoil nose, there is the possibility to let snappyHexMesh refine those special regions separately.



Here's a little manual how to do so.

1. Create geometry in CAD Programm and split into so many region as different refinement levels are required. Export each File as separate STL file.

2. Copy-Paste single STL files into one STL file. In my example the file is names Input.stl. Inside the Input.stl file you have to name the different regions. Look at attached file-example. Regions named "NumberOne" and "NumberTwo".
Input.stl

3. In snappyHexMeshDict one has to define the regions as region and give the patches names (here: "shpere" and "ellipse"). See attached snappyHexMeshDict.

4. Under refinementSurfaces one now can define the separat refinement level for both regions ("NumberOne" and "NumberTwo"). See attached snappyHexMeshDict.

5. Under addLayerControls one can now define the separate layers to be added to the defined patches ("sphere" and "ellipse"). See attached snappyHexMeshDict.
snappyHexMeshDict

6. Doing sHM eather
a) as usual:
- blockMesh
- snappyHexMesh

or

b) in parallel computing
- blockMesh
- decomposePar
- foamJob -p -s snappyHexMesh
- reconstructParMesh -mergeTol 1e-06 -time 1
- reconstructParMesh -mergeTol 1e-06 -time 2
- reconstructParMesh -mergeTol 1e-06 -time 3

with the (very common) attached decomposeParDict.
decomposeParDict

As results you get a meshed surface with separate local refined regions which safes a lot of cells to compute.

Step one: Refining in different local refinementlevels


Step two: Snapping to the surface


Step three: Building boundary layer by adding structured cells to surface


Notice: To view the single patches in paraView, you have to load in the given patches (as usual). Then change something in the markement of the patches (e.g. take away the inlet-patch) and update view, now you can see the defined single patches.

Notice: a different refinement level on the surface means that neighbour bounary layers have pourly a different thickness.

Notice: the triangle Cells are only a display mistake by paraView. In reality they are hexes and polyhexes. See picture




Have fun with it!
Wolfgang
wolle1982 is offline   Reply With Quote

 


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
pimpleDyMFoam computation randomly stops babapeti OpenFOAM Running, Solving & CFD 5 January 24, 2018 05:28
[snappyHexMesh] snappyHexMesh aborting Tobi OpenFOAM Meshing & Mesh Conversion 0 November 10, 2010 03:23
[blockMesh] BlockMeshmergePatchPairs hjasak OpenFOAM Meshing & Mesh Conversion 11 August 15, 2008 07:36
Could anybody help me see this error and give help liugx212 OpenFOAM Running, Solving & CFD 3 January 4, 2006 18:07


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