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

k-epsilon boundary condition in openFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By bhattach

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 27, 2013, 01:32
Default k-epsilon boundary condition in openFoam
  #1
New Member
 
Amitabh
Join Date: Feb 2013
Posts: 7
Rep Power: 13
bhattach is on a distinguished road
I am trying to validate k-epsilon model on openFoam for a simple turbulent channel via the pisoFoam solver. The boundary condition being used for k and epsilon is the kqRWallFunction. While the previous forum posts suggest that kqRWallFunction simply applies a zero gradient condition for k at the wall, I'm not seeing dk/dy=0 at the wall for the solutions I am getting. In fact, for the converged solution, there seems to be a very steep gradient in k at the wall, and k(y=0) seems to be non-zero. My first grid point at the wall is at around y^+=1.

I am still not very good at reading the source code, and I found scare documentation for this. So does anyone know what exactly the kqRWallFunction wall BC means ? I'm guessing it is some sort of log-law based wall-function, and maybe my first grid point needs to be outside the viscous region.

Any insight on this would be great.

Amitabh
bhattach is offline   Reply With Quote

Old   February 27, 2013, 02:48
Default
  #2
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22
Bernhard is on a distinguished road
You are right about your first grid cell. If you got y+ around wall, you should not use wall functions. How did you calculate y+? (See this thread: http://www.cfd-online.com/Forums/ope...-testcase.html )

You can find the wall functions here:
src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions

Of special interest is the epsilonWallFunction, have a look at epsilonWallFunctionFvPatchScalarField.C , the member function updateCoeffs (line 175 and further). Here you can see what is actually being calculated (G is the production term).
Bernhard is offline   Reply With Quote

Old   February 27, 2013, 03:40
Default
  #3
New Member
 
Amitabh
Join Date: Feb 2013
Posts: 7
Rep Power: 13
bhattach is on a distinguished road
Thanks Bernhard, this was very helpful. The source code seems to indeed use a log-law based wall function for epsilon. I clearly need to use a larger grid size near the wall.

I am basically imposing pressure gradient in the flow, so it is then easy to calculate u_tau from dP/dx and channel half-width H. I calculate l^+ as nu/u_tau. Let me know if this does not sound right.

thanks !

Amitabh
bhattach is offline   Reply With Quote

Old   February 27, 2013, 03:52
Default
  #4
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22
Bernhard is on a distinguished road
You could also choose to switch to a Low-Re RANS-model, but than you may have to do some implementation yourself. It depends a bit on your needs.

I am not 100% sure about your way of calculating y+, but you can easily check it afterwards with the utilities provided in the thread I linked above. You may want to just calculate y* if you decide to coarsen your mesh.
Bernhard is offline   Reply With Quote

Old   February 27, 2013, 08:51
Default
  #5
New Member
 
Amitabh
Join Date: Feb 2013
Posts: 7
Rep Power: 13
bhattach is on a distinguished road
I had a follow-up question. It seems to me that (for high-Re RANS) there should be a slip velocity at the wall if y+ of the first grid point is large. The slip velocity can be obtained from the log-law, i.e. U=u_tau*(log(y+)/kappa+B_i). Alternatively dU/dy=u_tau/(kappa*y) can be imposed.

For all the example problems I have seen, U=0 is imposed at the wall, which seems wrong.

Again, any insight on this would be great.

regards

Amitabh

p.s.: seems like I'll need to start writing my own boundary condition routines soon
charmc likes this.
bhattach is offline   Reply With Quote

Old   January 9, 2014, 10:47
Default
  #6
Member
 
Kapa Lilla
Join Date: Mar 2009
Location: Bruxelles, Belgium
Posts: 57
Rep Power: 17
klilla is on a distinguished road
Dear Amitabh,

did you finally managed with k-epsilon? I did a periodic channel flow simulation with different turbulence models. I tried low Re k-epsilon model, but did not manage to get the right velocity gradient at the wall, no matter what wall treatment I'm using. My wall+ is around 0.8.

In any case my wall gradient is under estimated, it is around 2/3 of the DNS database I'm using. If I use v2f instead, everything is fine.

Thanks,
Lilla
klilla is offline   Reply With Quote

Old   January 9, 2014, 11:37
Default
  #7
New Member
 
Amitabh
Join Date: Feb 2013
Posts: 7
Rep Power: 13
bhattach is on a distinguished road
I did indeed manage to figure out the low Re k-epsilon last year -- it seemed to be working ok. I can send you the files if you can somehow send me your email, since there are upload limits here.
bhattach is offline   Reply With Quote

Old   January 9, 2014, 11:50
Default
  #8
Member
 
Kapa Lilla
Join Date: Mar 2009
Location: Bruxelles, Belgium
Posts: 57
Rep Power: 17
klilla is on a distinguished road
Thank you very much! My email is kapalilla@gmail.com
klilla is offline   Reply With Quote

Old   January 17, 2014, 05:50
Default
  #9
Member
 
Manan
Join Date: Oct 2013
Location: Göteborg
Posts: 37
Rep Power: 13
MaLa is on a distinguished road
Hi

Is it possible for you to send me the low Re k epsilon model files too? I am trying a similar exercise in validating the model for channel flow with periodic inlet and outlet. My email id is manan.lalit@gmail.com. Thanks.

Last edited by MaLa; February 14, 2014 at 12:13.
MaLa 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
domain imbalance for enrgy equation happy CFX 14 September 6, 2012 02:54
A general openfoam development question about boundary condition kaifu OpenFOAM 10 August 15, 2012 13:51
Problem occurs in Boundary condition of pressure in openFOAM jignesh_thaker2007 OpenFOAM 0 February 6, 2012 14:05
How to transfer boundary condition from Openfoam to fluent sachinlb OpenFOAM Post-Processing 1 January 6, 2012 02:41
[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 18:58.