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

[Gmsh] Meshing Backward-Facing step using gmsh-problem

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By alexeym
  • 1 Post By alexeym

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 21, 2015, 01:02
Default Meshing Backward-Facing step using gmsh-problem
  #1
Senior Member
 
tareqkh's Avatar
 
CFD
Join Date: Nov 2010
Location: United States
Posts: 243
Rep Power: 16
tareqkh is on a distinguished road
Hi All,

I am trying to do some studies on backward-facing step. I have plotted the figure on gmsh and trying to use structured mesh in the area that I am interested in. However, I am unable to get a good mesh. Can some body help in this regard?

I am attaching picture shows the strategy that I am following and the .geo file and would be glade if your help...

Screenshot from 2015-03-21 02:00:09.jpg

geo file

geo file.zip

Last edited by tareqkh; March 21, 2015 at 02:40.
tareqkh is offline   Reply With Quote

Old   March 21, 2015, 10:23
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

I guess it would be more productive if you post just the geometry of your case as it is rather difficult to understand why do you need all these lines in your geo file. In general 3 rectangles will be sufficient, after they are extruded to form single-cell-layer mesh for OpenFOAM.

Also can you please explain, what is so special about your case as backward-facing step meshes can be found almost everywhere, from NASA turbulence modeling resource (http://turbmodels.larc.nasa.gov/backstep_grids.html, p3d format, may have certain issues with conversion) to Fluidity tutorials (https://github.com/FluidityProject/f...ng_step_2d/src, Gmsh geo files).
alexeym is offline   Reply With Quote

Old   March 21, 2015, 15:29
Default Thank you for your reply
  #3
Senior Member
 
tareqkh's Avatar
 
CFD
Join Date: Nov 2010
Location: United States
Posts: 243
Rep Power: 16
tareqkh is on a distinguished road
Hey Alexeym,

Thank you for your quick respond.

The reason for study is to able to make a grid convergence study for the laminar case as well as implement turbulence models to compare my data. I am attaching a picture shows the geometry. My issue is how to make a fine mesh in the bottom corner to see the physical believer as well as the top wall and bottom wall.

Backward-Facing step.jpeg
tareqkh is offline   Reply With Quote

Old   March 21, 2015, 15:52
Default
  #4
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

Well, I guess, we are still playing this very interesting game called "guess what I would like to do". If I get you right, you need not only grade the mesh towards usual sold walls (i.e. bottom wall of the inlet, vertical wall of the step, and bottom wall of the outlet) but also to the top surface of the inlet and outlet.

OK. Divide mesh into 3 regions: inlet, outlet lower part, outlet upper part. In the inlet and outlet upper parts you use "Bump" modifier of Transfinite algorithm to make mesh denser towards walls, in case of outlet bottom part you just use "Progression" modifier.
alexeym is offline   Reply With Quote

Old   March 21, 2015, 15:58
Default Not clear how to make it
  #5
Senior Member
 
tareqkh's Avatar
 
CFD
Join Date: Nov 2010
Location: United States
Posts: 243
Rep Power: 16
tareqkh is on a distinguished road
Here is what I mesh look like. See the attached file. However, I am unable to make three squares and mesh them. Would you mind showing me in the attached geo file.

geo file.zip
tareqkh is offline   Reply With Quote

Old   March 21, 2015, 16:51
Default
  #6
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

Still do not get why 3 rectangles are not enough for the mesh. See attached geo. What is wrong with the mesh and with the grading?
Attached Files
File Type: gz backward-facing-step.geo.gz (458 Bytes, 53 views)
tareqkh likes this.
alexeym is offline   Reply With Quote

Old   March 21, 2015, 17:11
Default Question
  #7
Senior Member
 
tareqkh's Avatar
 
CFD
Join Date: Nov 2010
Location: United States
Posts: 243
Rep Power: 16
tareqkh is on a distinguished road
Why did you use D=1; is that necessary? I am not familiar with this strategy.

Regards,
tareqkh is offline   Reply With Quote

Old   March 21, 2015, 17:25
Default
  #8
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

Well, at this point I guess, it time to ask "are joking?". D corresponds to 1 on the figure you have posted.
tareqkh likes this.
alexeym is offline   Reply With Quote

Old   March 21, 2015, 17:32
Default Answer
  #9
Senior Member
 
tareqkh's Avatar
 
CFD
Join Date: Nov 2010
Location: United States
Posts: 243
Rep Power: 16
tareqkh is on a distinguished road
In fact, I have posted n1= number I chose in order to increase number of nodes in using progression function not at points. I apologize!!!
If you have any explanations other than that, it is pointless to use it that way.

Regards,
tareqkh is offline   Reply With Quote

Old   March 22, 2015, 06:13
Default
  #10
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Unfortunately I was not able to understand last post.

Mesh has geometry parameter D - height of the step in meters; and 4 densities (number of points along the line) - 2 horizontal and 2 vertical. Grading of the mesh is governed by progression and bump values.

But as cell size near the wall should be controlled in accordance with y+ values maybe it will be easier to generate the mesh points programmatically.
alexeym is offline   Reply With Quote

Old   March 22, 2015, 12:44
Default gmshToFoam
  #11
Senior Member
 
tareqkh's Avatar
 
CFD
Join Date: Nov 2010
Location: United States
Posts: 243
Rep Power: 16
tareqkh is on a distinguished road
I Have a question in regards to the boundary conditions. I have exported the mesh after defining boundary conditions. For the slip boundary conditions for the front and back wall, do I have to define them also in the boundary file? Have you experienced to define slip inside polymesh folder as well as U and p?


Regards,
tareqkh is offline   Reply With Quote

Old   March 22, 2015, 12:55
Default
  #12
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

In general if you run 2D simulation, front and back walls have "empty" BC type.

Though gmshToFoam sets "patch" type for every converted boundary (because Gmsh mesh format does not have boundary type information), you can use changeDictionary utility to modify boundary dictionary in constant/polyMesh folder.
alexeym is offline   Reply With Quote

Old   March 22, 2015, 13:14
Default Boundary Condtions
  #13
Senior Member
 
tareqkh's Avatar
 
CFD
Join Date: Nov 2010
Location: United States
Posts: 243
Rep Power: 16
tareqkh is on a distinguished road
In fact, I am running this case with slip boundary conditions in the front and back. However, I am not sure whether I put slip at the polymesh/boundary folder for both front and back instead of patch or empty.

Regards,
tareqkh is offline   Reply With Quote

Old   March 27, 2015, 03:12
Default Switch to turbulence
  #14
Senior Member
 
tareqkh's Avatar
 
CFD
Join Date: Nov 2010
Location: United States
Posts: 243
Rep Power: 16
tareqkh is on a distinguished road
Hello Alexey,

I am doing a validation study on the same case that we were discussing and trying to implement k-epsilon with proper boundary conditions. The dynamic viscosity for the problem is 1.96*10^-6 N.s/m2, Re 5100, density 1kg/m3, Ux=1m/s, Uy=0. I have made the proper mesh according to y+ NASA calculator. I have 29000 number of nodes for the mesh. Everything is being step properly. Now, I want to implement k-epsilon with a give value of k=0.015m2/s2 and turbulence intensity of 10%. The aim of the study is to compare my data with the reattachment point. I have tried to set up k and epsilon properly. However, the results do not seem reasonable. I am attaching both k and epsilon boundary conditions and would be more than happy if you could help in this regards.

Boundary condtions.zip
tareqkh 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
Star cd es-ice solver error ernarasimman STAR-CD 2 September 12, 2014 00:01
icoFoam - backward facing step measured by Armaly et. al. (1983) gaurav_bhutani OpenFOAM Verification & Validation 1 January 23, 2014 22:47
Micro Scale Pore, icoFoam gooya_kabir OpenFOAM Running, Solving & CFD 2 November 2, 2013 13:58
backward facing step ryoga Main CFD Forum 1 March 9, 2003 02:52
backward facing step problem Yung-Ming Chen Main CFD Forum 3 May 11, 1999 22:04


All times are GMT -4. The time now is 06:42.