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

[snappyHexMesh] snappyHexMesh refinement in 2 instead of 3 directions

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By nucat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 15, 2014, 11:59
Default snappyHexMesh refinement in 2 instead of 3 directions
  #1
New Member
 
Ramon
Join Date: Feb 2014
Location: Eindhoven
Posts: 25
Rep Power: 12
RjwV is on a distinguished road
Hello everyone,

I've been trying to insert multiple cylinders in my mesh by using the snappyHexMesh tool. Also, I would like to refine the grid around these cylinders. The cylinders can easily be added via searchableCylinder, the refinment can easily be done via castellatedMeshControls - refinementSurfaces - inserted_cylinder_name - level {...}. So far so good.

However, I would like to have a 2D simulation where the column is one cell deep, so I would like to refine the grid ONLY in the x and y directions, not in the z direction. As shown in this picture, the grid has refined in the z direction (depth).

First question; is refinement in two directions instead of three possible via snappyHexMesh?

Furthermore, I have tried using extrudeMesh to extrude the mesh into a one layered (i.e. 2D) mesh by extruding exposedPatchName "cyl01", which results in what I wanted w.r.t. the number of cells in depth. Also, this results in the cylinder being 'attached' to the front patch (see picture). This is something I do not want. Furthermore, I have noticed that implementing a boundary condition for the inlet can under specific circumstances cause problems; e.g. one side of the inlet patch has no velocity and the other has the given velocity in the input file.

So my second question; is there any better way to create a 2D mesh for my case, or are there any better extrudeMesh or perhaps even snappyHexMesh settings to achieve this?

I am using the twoPhaseEulerFoam solver btw. The case has been attached. Case can be replicated by using the "blockMesh", "snappyHexMesh -overwrite" and "extrudeMesh" commands, in that order. If anymore information is required I will try to supply it. Hope you guys can give me some ideas in which direction to go after this. Thank you in advance.

Kind regards,
Ramon
Attached Images
File Type: jpg cyl_refined_depth.jpg (88.1 KB, 185 views)
File Type: jpg extrudedMesh_cyl_stuck.jpg (41.3 KB, 127 views)
Attached Files
File Type: gz test_snappy_extrude_forum.tar.gz (9.1 KB, 20 views)
RjwV is offline   Reply With Quote

Old   September 15, 2014, 14:27
Default
  #2
New Member
 
Join Date: Jan 2013
Posts: 10
Rep Power: 13
nucat is on a distinguished road
Hey,

you can use extrudeMesh (maybe with combination of createPatch) after generating refined Mesh, so you get 2D refined Mesh.

That document describes how to setup such kind of 2D case with snappyHexMesh:
http://upcommons.upc.edu/pfc/bitstre...9/1/memory.pdf

Greeting,
Nucat
mwaqas likes this.
nucat is offline   Reply With Quote

Old   September 16, 2014, 13:48
Default
  #3
New Member
 
Ramon
Join Date: Feb 2014
Location: Eindhoven
Posts: 25
Rep Power: 12
RjwV is on a distinguished road
Thank you nucat. I managed to avoid getting the same problem this way.

I did a similar procedure, blockMesh, snappyHexMesh -overwrite, extrudeMesh (in that order). My mistake was in extrudeMesh:

My settings extrudeMesh (resulting in the merging of "front" and "cyl01":
sourcePatches (back);
exposedPatchName "cyl01";

The settings to avoid this merging behavior:
sourcePatches (front);
exposedPatchName back;

Quite a simple mistake, but a very clear and good solution. Thanks again!

Kind regards,
Ramon
RjwV is offline   Reply With Quote

Old   September 17, 2014, 09:35
Default
  #4
Member
 
Julian Langowski
Join Date: May 2011
Location: Bremen, Germany
Posts: 91
Rep Power: 14
Ruli is on a distinguished road
Dear Ramon,

if you mesh "only" cylinders (which means relatively simple, structured geometries), why do you not use blockMesh for meshing. Gives you much better control of mesh quality...

Best regards
Julian
__________________
πάντα ῥεῖ - Heraclitus
Ruli is offline   Reply With Quote

Old   September 17, 2014, 10:09
Default
  #5
New Member
 
Ramon
Join Date: Feb 2014
Location: Eindhoven
Posts: 25
Rep Power: 12
RjwV is on a distinguished road
I have though about it, and two things have stopped me from doing this;

- The number of cylinders I want to add can reach up to about 50, to me it seems this will create complex and difficult to see understand blockMesh files (correct me if this is not the case, I have not used blockMesh yet to simulate large number of cylinders).

- I have not yet set-up a lot of non rectangular blockMesh meshes, I know it is possible to create round objects via arcs and such, but I do not fully understand it still.

I also heard that m4 could be a good option to add cylinders via blockMesh, however again the question arises whether this is more convenient when adding a large number of cylinders.

Any further thoughts on this?

Kind regards,
Ramon
RjwV 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] snappyHexMesh sticking point natty_king OpenFOAM Meshing & Mesh Conversion 11 February 20, 2024 09:12
[snappyHexMesh] SnappyHexMesh running killed! Mark JIN OpenFOAM Meshing & Mesh Conversion 7 June 14, 2022 01:37
[snappyHexMesh] Adding layers goes wrong with SnappyHexMesh Elise OpenFOAM Meshing & Mesh Conversion 1 April 22, 2013 02:32
killed "snappyHexMesh" parkh32 OpenFOAM Pre-Processing 2 April 8, 2012 17:12
[snappyHexMesh] snappyHexMesh aborting Tobi OpenFOAM Meshing & Mesh Conversion 0 November 10, 2010 03:23


All times are GMT -4. The time now is 18:43.