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

turbulent kinetic energy budget terms with openfoam

Register Blogs Community New Posts Updated Threads Search

Like Tree7Likes
  • 3 Post By Thangam
  • 3 Post By dkxls
  • 1 Post By wyldckat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 1, 2014, 07:03
Default turbulent kinetic energy budget terms with openfoam
  #1
Member
 
Thangam Natarajan
Join Date: Dec 2010
Location: Perth
Posts: 70
Rep Power: 16
Thangam is on a distinguished road
Hi,

Is there a way to write out all the components(production, convection, dissipation and turbulent diffusion) of the tke budget separately for a LES case? Any pointers??

Thanks.

Thangam.
Thangam is offline   Reply With Quote

Old   August 13, 2014, 16:06
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Thangam,

Can you provide more information about each variable you are looking to export?
I ask this because even though I'm familiar with many of OpenFOAM's way of working with things, on the other hand I'm not familiar with the terminology in LES. Therefore I need more details on what exactly you're looking for.

Best regards,
Bruno


PS: Re-posting does not make it easier for people to answer your questions. What's more important is that more details are provided with each new post you provide, because if people did not answer your question, it's likely that not enough information was provided in the first place. And many of the people that might be able to answer your question, don't have the time to still have to ask first: What on Earth are you talking about?
__________________

Last edited by wyldckat; August 13, 2014 at 16:10. Reason: see "PS:"
wyldckat is offline   Reply With Quote

Old   August 14, 2014, 01:55
Default
  #3
Member
 
Thangam Natarajan
Join Date: Dec 2010
Location: Perth
Posts: 70
Rep Power: 16
Thangam is on a distinguished road
My bad I thought these were quite obvious! Anyway,

The complete form of the turbulent kinetic energy can be written as,

P_k - C_k - \epsilon_k   + D_k = 0,

where,

P_k is the production term of k given by,

P_k = - \overline{u\prime_i u\prime_m} \frac{\partial U_i}{\partial x_m}

C_k is the mean convection term of k given by,

C_k = U_m \frac{\partial k}{\partial x_m}

\epsilon_k is the dissipation term of k given by,

\epsilon_k = \nu \overline{ \frac{\partial u\prime_i}{\partial x_m}\frac{\partial u\prime_i}{\partial x_m}}

and D_k is the diffusion transport term of k given by,

D_k = \frac{1}{2} \frac{\partial}{\partial x_m}( T_{iim}^{(\nu)} - T_{iim}^{(p\prime)} -  T_{iim}^{(u\prime)} ) and D_k contains

the viscous diffusion,

T_{iim}^{(\nu)} =  - \nu \overline{\frac{\partial u_i\prime u_i\prime}{\partial x_m}}

pressure diffusion,


T_{iim}^{(p \prime)} = \frac{2}{\rho}\overline{u_i \prime p\prime \delta_{im}}

and the turbulent diffusion given by,


T_{iim}^{(u \prime)} = \overline{u_i  u_i u_m}



The problem is I am not able to identify where these terms are embedded in the code and how to write them out by creating a small utility.

Thanks.
amolrajan, manuc and jadidi.cfd like this.
Thangam is offline   Reply With Quote

Old   August 14, 2014, 05:56
Default
  #4
Senior Member
 
dkxls's Avatar
 
Armin
Join Date: Feb 2011
Location: Helsinki, Finland
Posts: 156
Rep Power: 19
dkxls will become famous soon enough
Quote:
Originally Posted by Thangam View Post
The problem is I am not able to identify where these terms are embedded in the code and how to write them out by creating a small utility.
You are familiar with the source code of the one equation model?
Code:
src/turbulenceModels/compressible/LES/oneEqEddy/oneEqEddy.H
src/turbulenceModels/compressible/LES/oneEqEddy/oneEqEddy.C
wyldckat, mgg and amolrajan like this.

Last edited by dkxls; August 14, 2014 at 06:01. Reason: typo
dkxls is offline   Reply With Quote

Old   August 17, 2014, 15:00
Default
  #5
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings to all!

To complement Armin's answer: the class "oneEqEddy" is derived from the class "GenEddyVisc", which in turn derives from "LESModel". This last class is the base class for accessing turbulence data that is readily available on the solver's side.
For example, have a look at the solver "applications/solvers/heatTransfer/thermoFoam" in OpenFOAM 2.3, namely in the file "setAlphaEff.H". There you can see how it explicitly loads the turbulence of type "LESModel".

Correlating the information given in #3 with the information here on the wiki, it looks like the terms you've looking for are these: http://www.cfd-online.com/Wiki/Kinet...id-scale_model
Checking Armin's answer in post #4 does reveal the same equations in this method:
Code:
void oneEqEddy::correct(const tmp<volTensorField>& tgradU)
All of the terms of the equation are all solved directly in a single equation and are not available for outside use.

Which means that you will have to either create a new derived class from "oneEqEddy" or modify directly OpenFOAM's class "oneEqEddy", to write out each term of the equation.
Or you can modify the solver and do a dynamically cast to the instance of "LESModel" class to "oneEqEddy" and then access directly the "k()" method and other methods that give the components used in the equation that is solved in "oneEqEddy::correct".

Although I don't know how practical that is, because each term of the equation is in the form of "fvScalarMatrix" and not of in the form of a standard field.

Best regards,
Bruno
amolrajan likes this.
__________________
wyldckat is offline   Reply With Quote

Old   September 5, 2015, 18:58
Default
  #6
Senior Member
 
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
syavash is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Greetings to all!

To complement Armin's answer: the class "oneEqEddy" is derived from the class "GenEddyVisc", which in turn derives from "LESModel". This last class is the base class for accessing turbulence data that is readily available on the solver's side.
For example, have a look at the solver "applications/solvers/heatTransfer/thermoFoam" in OpenFOAM 2.3, namely in the file "setAlphaEff.H". There you can see how it explicitly loads the turbulence of type "LESModel".

Correlating the information given in #3 with the information here on the wiki, it looks like the terms you've looking for are these: http://www.cfd-online.com/Wiki/Kinet...id-scale_model
Checking Armin's answer in post #4 does reveal the same equations in this method:
Code:
void oneEqEddy::correct(const tmp<volTensorField>& tgradU)
All of the terms of the equation are all solved directly in a single equation and are not available for outside use.

Which means that you will have to either create a new derived class from "oneEqEddy" or modify directly OpenFOAM's class "oneEqEddy", to write out each term of the equation.
Or you can modify the solver and do a dynamically cast to the instance of "LESModel" class to "oneEqEddy" and then access directly the "k()" method and other methods that give the components used in the equation that is solved in "oneEqEddy::correct".

Although I don't know how practical that is, because each term of the equation is in the form of "fvScalarMatrix" and not of in the form of a standard field.

Best regards,
Bruno
I had a similar experience with Tecplot in extracting turbulent production terms from Reynolds stress tensor and mean velocity gradients.
I could effectively use Tecplot "Calculate Variable" option to construct each term of the production and dissipation.
I think paraFoam can perform such calculations as well.

Regards,
Syavash
syavash is offline   Reply With Quote

Old   July 15, 2016, 10:21
Default
  #7
Senior Member
 
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
syavash is on a distinguished road
For anyone interested in this subject, I have created a new thread.

http://www.cfd-online.com/Forums/ope...e-budgets.html

Regards,
Syavash
syavash is offline   Reply With Quote

Reply

Tags
openfoam, tke, turbulent kinetic energy


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
Suggestion for a new sub-forum at OpenFOAM's Forum wyldckat Site Help, Feedback & Discussions 20 October 28, 2014 10:04
Kinetic Turbulent Energy... mohammad_mec87 Main CFD Forum 4 July 2, 2014 05:35
Significance of turbulent kinetic energy oj.bulmer CFX 1 February 25, 2014 18:30
Turbulent kinetic energy at wall? alanlove FLUENT 1 November 23, 2012 12:24
turbulent kinetic energy and dissipation panneerselvam.R CFX 1 July 22, 2005 02:55


All times are GMT -4. The time now is 13:53.