CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[snappyHexMesh] poorly growing boundary layers in SnappyHexMesh

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

LinkBack Thread Tools Search this Thread Display Modes
Old   August 26, 2016, 06:22
Default poorly growing boundary layers in SnappyHexMesh
New Member
Join Date: Aug 2016
Posts: 23
Rep Power: 5
DaveR is on a distinguished road
Hi all,

I am new to openFOAM and have been trying a range of 2D and 3D cases. Currently, I am attempting to model vortex shedding over a 2D sphere at low Reynolds number. I have been hoping to get the lift and drag coefficients out for validation of my methods.

My methodology has been to create a 3D sphere utilising snappyHexMesh - centered at the origin - and then to define my blockmesh to intersect only one half. When this has meshed, I use extrudeMesh to extrude the intersecting half 1 cell in the z-direction.

To fix Re = 100, my parameters are set to:
L = dia of circle = 0.07 m,
u = 0.021 ms^-1
nu = 1.48e-05 m^2s^-1

I have tried solving using both pisoFoam and icoFoam set up for a laminar flow.

Vortex shedding is well illustrated, however my drag coefficient is consistently low at ~6e-03.

I understand there is a comflics tutorial on YouTube, so I re-ran my simulation set up setting the variables in the same way (l = 2, u = 1, nu = 2e-02) and get the exact same results.

Adjusting all simulation parameters result in essentially the same output for the drag coefficient, so I feel as if I've exhausted all simulations options other than my mesh - which is relatively crude. I cannot for the life of me get the boundary layers to grow however as soon as the mesh is somewhat refined, which I feel is the cause of the discrepancy. Furthermore, if I increase the levels of my refinement too far it crashes my computer - could this be indicative of my relatively low computer spec (3rd gen i3), or a problem with the dictionaries? (I initially wanted a refinement cylinder in the wake region to better characterise the flow, however this made it impossible to mesh at any reasonable refinement without crashing).

I've attached my case below if anyone could be so kind to take a look and offer any pointers in the right direction. Apologies if I've missed anything glaringly obvious - I'm still learning!

Best Regards,

DaveR is offline   Reply With Quote

Old   August 29, 2016, 08:12
Senior Member
matej forman
Join Date: Mar 2009
Location: Brno, Czech Republic
Posts: 158
Rep Power: 12
matejfor is on a distinguished road
Mesh Quality forever. If the mesh is no good, you cannot expect good results.

2D sphere is actually cylinder, right?

Assuming your Re number is low enough to have only 2D vortex shedding, the mesh quality is crutial. You approach of snappy mesh extrusion might work, if the mesh on a cut is really nice.
Advanced tricks you can use to build nice prism. layers are described for OpenFOAM-v3+ :

Maybe nicer mesh can be obtained using block-structured mesh built with blockMesh. You can create edges of your block as arcs so it is possible.

And not to stop there, 3rd option is to use foamyQuadMesh to create 2D surface mesh and then extrude. foamyQuadMesh will create body fitted mesh. See tutorials in: $FOAM_TUTORIALS/mesh/foamyQuadMesh

happy foaming
matejfor is offline   Reply With Quote

Old   August 31, 2016, 09:26
New Member
Join Date: Aug 2016
Posts: 23
Rep Power: 5
DaveR is on a distinguished road

Thank you kindly for your response.

I managed to fix the problem. For some reason the mesh wouldn't snap properly to the sphere. Not sure how you'd get around this for modelling in 3D, but in the case of 2D modelling a cylinder produced much better snapping (and viscous layers were present).

In terms of creating a cross section, I ultimately made a 2D blockmesh opposed to using the extrudeMesh facility. This prevented the explosion in cell count that was previously crashing my PC.


DaveR is offline   Reply With Quote


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
[cfMesh] boundary layers JensD OpenFOAM Community Contributions 5 September 17, 2018 12:49
My radial inflow turbine Abo Anas CFX 27 May 11, 2018 02:44
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 08:00
RPM in Wind Turbine Pankaj CFX 9 November 23, 2009 05:05
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Meshing & Mesh Conversion 2 July 15, 2005 05:15

All times are GMT -4. The time now is 19:59.