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

[snappyHexMesh] Solution Snappy Hex 2D Msh with Surface Layers and cyclic bc for symmetric geometry

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 24, 2013, 08:38
Default Solution Snappy Hex 2D Msh with Surface Layers and cyclic bc for symmetric geometry
  #1
New Member
 
Felix
Join Date: Aug 2012
Posts: 7
Rep Power: 13
flexi182 is on a distinguished road
Dear Foamers,

1 week till now I tried to generate a 2D Mesh with snappyHexMesh. The mesh should have surface layers and cyclic boundaries.
Now I will present my workflow. This solution only works for symmetric geometries because I used mirrorMesh!
If you have questions, please ask

Here is the shell script:

Code:
#!/bin/sh
 
# clean folders
cd small_snappy
rm constant/polyMesh/*.gz constant/polyMesh/boundary
rm -r 0
rm log.*
 
# background mesh
blockMesh > log.blockMesh # Only the half of the geometry get an backroundmesh because we want mirror it later
 
# snappyHexMesh 3D
renumberMesh -overwrite
snappyHexMesh -overwrite  > log.snappy
setSet -batch middlePlane.setSet -noSync # Cut through the mesh, we want a patch with boundary layers for Extrusion
subsetMesh -overwrite halfBoxSlaveCells
flattenMesh
 
# extrudeMesh 2D extrude
cd ../small_extrude
rm -r 0
rm -r constant/polyMesh/
rm log.*
extrudeMesh > log.extrude
mirrorMesh > log.mirror
autoPatch 50 -overwrite
 
# Rename and convert patches
kate 0/polyMesh/boundary 
createPatch -overwrite
checkMesh > log.mesh
cd ../
Have Fun!
flexi182 is offline   Reply With Quote

Reply


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] Surface triangulation using snappyHexMesh shaileshbg OpenFOAM Meshing & Mesh Conversion 4 October 17, 2019 04:42
[snappyHexMesh] FOAM Warnings leading to no geometry, yet OpenFOAM says meshing finished w/o error edomalley1 OpenFOAM Meshing & Mesh Conversion 1 September 5, 2018 18:30
[snappyHexMesh] Snappy Hex Mesh - issue with smoothness of the model edges olek.warc OpenFOAM Meshing & Mesh Conversion 1 August 31, 2018 11:31
Problem with entire domain comprised of split hex cells Arzed23 Main CFD Forum 1 November 7, 2016 23:01
[snappyHexMesh] snappyHexMesh - geometry does not appear in Mesh czhongrong OpenFOAM Meshing & Mesh Conversion 1 January 20, 2016 05:26


All times are GMT -4. The time now is 08:39.