CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Open Source Meshers: Gmsh, Netgen, CGNS, ...

3D Free surface flow past circular cylinder meshing using GMSH

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

Reply
 
LinkBack Thread Tools Display Modes
Old   August 24, 2015, 06:45
Default 3D Free surface flow past circular cylinder meshing using GMSH
  #1
Member
 
Ariel Edesess
Join Date: Aug 2015
Posts: 45
Rep Power: 2
arieljeds is on a distinguished road
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!
Attached Files
File Type: docx blockMeshDict.docx (5.7 KB, 10 views)
arieljeds is offline   Reply With Quote

Old   August 24, 2015, 08:06
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,301
Rep Power: 23
alexeym will become famous soon enoughalexeym will become famous soon enough
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.
alexeym is offline   Reply With Quote

Old   August 26, 2015, 06:59
Default
  #3
Member
 
Ariel Edesess
Join Date: Aug 2015
Posts: 45
Rep Power: 2
arieljeds is on a distinguished road
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..
arieljeds is offline   Reply With Quote

Old   August 27, 2015, 10:05
Default
  #4
Member
 
Ariel Edesess
Join Date: Aug 2015
Posts: 45
Rep Power: 2
arieljeds is on a distinguished road
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
arieljeds is offline   Reply With Quote

Old   August 27, 2015, 11:17
Default
  #5
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,301
Rep Power: 23
alexeym will become famous soon enoughalexeym will become famous soon enough
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;
is an attempt to make mesh look OK. As a direction of line 30 is opposite to the direction of the lines 49 and 7 (messed up numbering of nodes while defining the line), I needed to have progression value below 1 for line 30. Now I would express the same thought as:

Code:
Transfinite Line {49, 7, -30} = RHO7 Using Progression 1.03;
4. I use mouse-over (see attachment) to learn numbers of the entities such as lines and planes. And I use GUI to define physical groups, so I just click on the entities with mouse. Though after it is necessary to change physical group numbers to desired names.

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.
Attached Images
File Type: png mouse-over.png (48.2 KB, 17 views)
alexeym is offline   Reply With Quote

Old   August 31, 2015, 06:49
Default
  #6
Member
 
Ariel Edesess
Join Date: Aug 2015
Posts: 45
Rep Power: 2
arieljeds is on a distinguished road
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
arieljeds is offline   Reply With Quote

Old   August 31, 2015, 15:57
Default
  #7
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,301
Rep Power: 23
alexeym will become famous soon enoughalexeym will become famous soon enough
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.
alexeym is offline   Reply With Quote

Reply

Tags
free surface flow, gmsh cylinder, mesh 2d, mesh 3d

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Flow past rotating cylinder: Problem with ForeCoeffs raf1111 OpenFOAM 1 December 16, 2013 10:45
flow around a circular cylinder with velocity inlet and outflow outlet shuoxue OpenFOAM Running, Solving & CFD 0 November 2, 2013 05:32
Flow past a circular cylinder mesh Turbulent Main CFD Forum 8 December 9, 2012 05:19
UDF for inlet BC, Free Surface Open Channel Flow VOF arshiya4 Fluent UDF and Scheme Programming 3 March 6, 2012 19:13
free surface flow same as FSI??? Ken CFX 1 February 18, 2008 20:43


All times are GMT -4. The time now is 02:40.