|
[Sponsors] |
[Gmsh] 3D Free surface flow past circular cylinder meshing using GMSH |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 24, 2015, 07:45 |
3D Free surface flow past circular cylinder meshing using GMSH
|
#1 |
Senior Member
ArielJ
Join Date: Aug 2015
Posts: 127
Rep Power: 11 |
Hi everyone,
I am brand new to OpenFOAM, CFD and building meshes and have the excellent task of computing free surface flow around a circular cylinder with an extra focus on turbulence and velocities in the very near wake. I was able to construct a 2D mesh using blockMesh of a cylinder in laminar flow (file is attached as docx... wasn't able to attach it as a text file) and I was hoping to now extend this mesh to include free surface effects and to extend the cylinder above and below the free surface. I have started to try to make this mesh in GMSH but it's just occurred to me that I do not know how to make a finer mesh in the vicinity of the cylinder, as I've done for the 2D case using blockMesh. Can anyone offer some advice on using GMSH for this case? It's been hard enough finding tutorials that get me started at all, let alone finding them to help me to understand this kind of meshing.. Thanks in advance for any help! |
|
August 24, 2015, 09:06 |
|
#2 |
Senior Member
|
Hi,
Let us assume, you have read Gmsh manual, especially part about structured grids (http://www.geuz.org/gmsh/doc/texinfo...ructured-grids), so commands inside this geo file (https://bitbucket.org/mrklein/flow-p...ylinder-2D.geo) will be familiar. To generalize the mesh to 3D case, you can play with extrude command first (just change number of layers to something greater than 1 and remove Recomine clause). If you would further wish to create grading of mesh towards free surface, you can go from extrude to read 3D geometry. |
|
August 26, 2015, 07:59 |
|
#3 |
Senior Member
ArielJ
Join Date: Aug 2015
Posts: 127
Rep Power: 11 |
Hi Alexey,
I am currently working my way through the guide and tutorials so I will thoroughly go through what you sent me to make sure I understand all the commands. Thank you so much for sending that on, really helpful for me and I hope to be able to use it. I was messing around with the extrude commands on a different one I was trying to make so I think I understand how to use it. Thank you so much for helping me out with this.. I am starting from scratch with building meshes and CFD so any help is really really appreciated.. |
|
August 27, 2015, 11:05 |
|
#4 |
Senior Member
ArielJ
Join Date: Aug 2015
Posts: 127
Rep Power: 11 |
Hi Alexey,
I've been going through the code and it mostly makes sense but I just have a few questions to help me understand it a bit better: 1) Does the direction that you describe the line loop make a difference? I notice that some are described counter-clockwise and most are clockwise 2) When you are listing the transfinite lines, why did you set {14, 35, 52} different from {15, 34, 45}? As this is the inlet, I would assume that the number of nodes would be the same? Similar question for the back but is this due to an unsymmetric wake? 3) Also in the list of transfinite lines, you list Transfinite Line {48, 6} = .. and then Transfinite Line {31}. When looking at the geometry, line 31 is in between 48 and 6. I'm understanding this as a finer mesh up until line 31 when the mesh becomes coarser again? Am I understanding this incorrectly? 4) Where you have listed the physical surfaces, is there a way to first mesh just the planar element and then extrude it in order to see the surface numbers? I can't find where to find the surface and node numbers or is that from manually going through the text files? Sorry for all of the questions, your code has been extremely helpful and I just want to fully understand each step. Thanks again |
|
August 27, 2015, 12:17 |
|
#5 |
Senior Member
|
Hi,
1. Since I have never tried to describe line loops manually (I use GUI for this procedure, and there I just create new surfaces), I do not know. 2. These numbers in {} are just ID of line entities, order is not so important. And number of nodes for these lines are the same (RHO2). 3. This one is the combination of my lack of attention to numbering of line nodes and lack of Gmsh knowledge at the time, when the file was created. For meshes without grading it is not so important, while in case of grading it is important where line begins and ends (to calculate grading). So this Code:
Transfinite Line {49, 7} = RHO7 Using Progression 1.03; Transfinite Line {30} = RHO7 Using Progression 0.97; Code:
Transfinite Line {49, 7, -30} = RHO7 Using Progression 1.03; My overall algorithms to create mesh with Gmsh is: 1. Define points (by hand, using script) in GEO-file 2. Open GEO-file in Gmsh, define lines/arcs, planes, extrusions, volumes. 3. Open GEO-file in text editor, define transfinite lines (using GUI to get line numbers) 4. Check if mesh is OK. 5. Define physical groups. |
|
August 31, 2015, 07:49 |
|
#6 |
Senior Member
ArielJ
Join Date: Aug 2015
Posts: 127
Rep Power: 11 |
Hi Alexey,
Thanks a lot for that. I'm just trying to learn about transfinite lines and their use for this sort of mesh. I think I understand your advice for my questions so just a couple more!! 1) This mesh does not look symmetric, based on the different RHO values and where they are applied. This should be correct as this is not a symmetric flow but I just want to be sure that this is the case? 2) Is it possible to extend only the wake to 3D? I am hoping to assume 2d potential flow everywhere outside of the wake and a 3D wake so I was trying to do this but got too many errors to even include here so I don't know if this is possible. 3) I am hoping to use the free surface solver ihFoam for this (not sure if you are familiar with this). With my limited understand of CFD, meshes and OpenFOAM, I am hoping to use this mesh but will need to better understand the mesh and the solvers. Have you ever applied a free surface solver to this sort of mesh? I really appreciate your feedback, it's been very helpful for me to understand how it is created and it is very clear now what you have done to create this mesh. Thanks again for any advice you may have |
|
August 31, 2015, 16:57 |
|
#7 |
Senior Member
|
Hi,
1. This mesh does look symmetric. Surely it depends on the type of symmetry you are looking for. 2. Not quite get, what you trying to do. 3. I used interFoam for free-surface flows in meaders and confluences. I wanted to simulate von Karman vortex street in 3D with free surface, yet it is still on my TODO list. Never used ihFoam. |
|
January 14, 2017, 13:57 |
|
#8 |
Member
Bashar
Join Date: Jul 2015
Posts: 74
Rep Power: 11 |
Hi,
Thanks for sharing this. I just started studying multi phase in openfoam. I want to simulate free surface of a case with a square plate inside river. Can you share your case if you still have it? or can you advice me about tutorial to do this type of simulation? thanks |
|
Tags |
free surface flow, gmsh cylinder, mesh 2d, mesh 3d |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Unable to see vortex sheddding in 3d flow past circular cylinder | venkcy | STAR-CCM+ | 0 | February 5, 2016 05:54 |
Flow past a circular cylinder mesh | Turbulent | Main CFD Forum | 8 | December 9, 2012 05:19 |
Flow past 2 smooth circular cylinder | slip | FLUENT | 0 | July 8, 2010 19:45 |
free surface flow same as FSI??? | Ken | CFX | 1 | February 18, 2008 20:43 |
Simulation of the Flow past a circular cylinder using STAR-CD | M. S. GUEROUACHE | Main CFD Forum | 0 | October 1, 1998 11:51 |