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

A Modified Solver for Calculating LES Turbulence Budgets

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 1 Post By sidworks
  • 3 Post By syavash

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 11, 2016, 21:24
Default A Modified Solver for Calculating LES Turbulence Budgets
  #1
Senior Member
 
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
syavash is on a distinguished road
Hi Foamers,

Finally, I decided to modify a solver for calculating budgets of TKE transport. Currently, there is not any utility on the forum capable of calculating all the budgets, so I think it is a useful job to gather and put all the terms into action!

I had help from some peoples, Alexey Matveichev who helped me understand LES classes, and a group of researchers at ETH who developped a useful utility, resLES, for LES post-processing. A modified version of their utility is developped for post-processing of averaged results.

I have named the solver LESpimpleFoam, as its feature is to calculate LES TKE budgets. As the solver name screams, it has been developped from native solver pimpleFoam.

Well, I will keep posting...
syavash is offline   Reply With Quote

Old   July 12, 2016, 11:33
Default
  #2
Senior Member
 
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
syavash is on a distinguished road
All rights,

It is the solver plus an essential utility. I have added some comments to the main solver which should make it easy to understand the terms of TKE budgets.

Both solver and utility have been compiled on OF 2.3.1. Only some important notes remain:

1-This implementation requires a well established averaged Velocity field (UMean) to exist in the time folder. The process of averaging of TKE budgets happens within the main solver and UMean is NOT updated within the code. So a reasonable averaged field must exist prior to beginning of simulation using LESpimpleFoam. To provide this averaged field, one can perform simulation for several flow-through time using the native pimpleFoam solver.

2-Three of TKE budgets are calculated afterwards the simulation through the postLES utilitiy provided. This utility requires averaged fields, including:

UMean

kMean

UPrime2Mean

turbDiffMean

SGSDiffMean

If any of the above fields would not exist, the utility will be terminated. So make sure to activate averaging process for them in the fieldAverage function object within controlDict. It is recommended to add all the defined variables in the main solver to the function object.

Feel free to comment

https://dl.dropboxusercontent.com/u/...pleFoam.tar.gz

https://dl.dropboxusercontent.com/u/...postLES.tar.gz

Enjoy.
Syavash

Last edited by syavash; August 7, 2016 at 12:38.
syavash is offline   Reply With Quote

Old   July 12, 2017, 12:56
Default
  #3
New Member
 
Join Date: Feb 2015
Posts: 2
Rep Power: 0
sidworks is on a distinguished road
Quote:
Originally Posted by syavash View Post
All rights,

It is the solver plus an essential utility. I have added some comments to the main solver which should make it easy to understand the terms of TKE budgets.

Both solver and utility have been compiled on OF 2.3.1. Only some important notes remain:

1-This implementation requires a well established averaged Velocity field (UMean) to exist in the time folder. The process of averaging of TKE budgets happens within the main solver and UMean is NOT updated within the code. So a reasonable averaged field must exist prior to beginning of simulation using LESpimpleFoam. To provide this averaged field, one can perform simulation for several flow-through time using the native pimpleFoam solver.

2-Three of TKE budgets are calculated afterwards the simulation through the postLES utilitiy provided. This utility requires averaged fields, including:

UMean

kMean

UPrime2Mean

turbDiffMean

SGSDiffMean

If any of the above fields would not exist, the utility will be terminated. So make sure to activate averaging process for them in the fieldAverage function object within controlDict. It is recommended to add all the defined variables in the main solver to the function object.

Feel free to comment

https://dl.dropboxusercontent.com/u/...pleFoam.tar.gz

https://dl.dropboxusercontent.com/u/...postLES.tar.gz

Enjoy.
Syavash
Hello,

The links posted above do not contain any files. It would be very helpful if you could post the links again.

Thank you,
sidworks
Elliptic CFD likes this.
sidworks is offline   Reply With Quote

Old   August 25, 2017, 12:04
Default
  #4
Senior Member
 
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
syavash is on a distinguished road
OK,

I would need more requests to reupdate the files since I have to dig out my old docs.

Syavash
syavash is offline   Reply With Quote

Old   August 26, 2017, 09:14
Default
  #5
Member
 
Jack
Join Date: May 2015
Posts: 98
Rep Power: 11
Jack001 is on a distinguished road
I would also like to see the files! Many thanks.
Jack001 is offline   Reply With Quote

Old   January 19, 2018, 12:39
Default source files?
  #6
New Member
 
Join Date: Aug 2016
Posts: 16
Blog Entries: 68
Rep Power: 10
kindle is on a distinguished road
Hi Syavash,

Are the files available? It would be nice if you can find them and update the link
kindle is offline   Reply With Quote

Old   September 5, 2018, 04:07
Default
  #7
New Member
 
amigoo
Join Date: Sep 2010
Posts: 5
Rep Power: 16
Joseee is on a distinguished road
Hi Syavash,

Are the files available? It would be nice if you can find them and update the link[/QUOTE]
Joseee is offline   Reply With Quote

Old   September 5, 2018, 16:29
Default
  #8
Senior Member
 
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
syavash is on a distinguished road
Quote:
Originally Posted by Joseee View Post
Hi Syavash,

Are the files available? It would be nice if you can find them and update the link

Hi Joseee,


I have started uploading my files on my github repository. I guess I will eventually upload that solver. You can remind me in a week or so if I would not already uploaded it.


https://github.com/syavash20/TurbLab

Kind Regards,
Syavash

Last edited by syavash; September 6, 2018 at 03:33.
syavash is offline   Reply With Quote

Old   September 17, 2018, 22:57
Default
  #9
Member
 
Join Date: Feb 2014
Posts: 63
Rep Power: 12
Uyan is on a distinguished road
Hi syavash,

A kind reminder to see if we could get access to the turbulent kinetic energy budget calculation method that you implemented.
Uyan is offline   Reply With Quote

Old   September 19, 2018, 05:14
Default
  #10
Senior Member
 
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
syavash is on a distinguished road
Quote:
Originally Posted by Uyan View Post
Hi syavash,

A kind reminder to see if we could get access to the turbulent kinetic energy budget calculation method that you implemented.

Hi Uyan,


Thanks for the remind and sorry for the delay. I will upload the solver and the postLES utility by tomorrow. I already have the main .C files of both but intend to upload the whole directory.


Regards,
Syavash
syavash is offline   Reply With Quote

Old   September 19, 2018, 13:12
Default
  #11
Senior Member
 
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
syavash is on a distinguished road
Hi everyone,


I could finally upload both the LESpimpleFoam solver and the postLES utility on my github repository:


https://github.com/syavash20/TurbLab


Please read the provided ReadMe file before use.


Regards,
Syavash
amolrajan, missios and kooki_13 like this.
syavash is offline   Reply With Quote

Old   November 2, 2018, 00:44
Default
  #12
New Member
 
adam oler
Join Date: Oct 2018
Posts: 1
Rep Power: 0
olerbear is on a distinguished road
Quote:
Originally Posted by syavash View Post
Hi everyone,


I could finally upload both the LESpimpleFoam solver and the postLES utility on my github repository:


https://github.com/syavash20/TurbLab


Please read the provided ReadMe file before use.


Regards,
Syavash
Thanks for posting this. I was able to modify the solver to use in OF6 and combine it into one utility. Will post the solver here when I do some more thorough validation on it.
olerbear is offline   Reply With Quote

Old   November 2, 2018, 04:25
Default
  #13
Senior Member
 
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
syavash is on a distinguished road
Quote:
Originally Posted by olerbear View Post
Thanks for posting this. I was able to modify the solver to use in OF6 and combine it into one utility. Will post the solver here when I do some more thorough validation on it.

Dear Adam,


Your welcome.

It would be great if you share the version of the LESpimpleFoam solver you modified for ver. 6.


Regards,
Syavash
syavash is offline   Reply With Quote

Old   September 30, 2019, 04:56
Default
  #14
Senior Member
 
Andrea
Join Date: Feb 2012
Location: Leeds, UK
Posts: 179
Rep Power: 16
Andrea1984 is on a distinguished road
Hello, this might be relevant to the topic:

I needed to calculate the resolved turbulent kinetic energy and its dissipation rate at runtime so I have modified pimpleFoam in order to do this.

Since I was there, I also added a field representing the fraction of the resolved TKE to the total TKE, i.e.:

LESResIndex = k_resolved/(k_resolved+k_sgs)

The solver can be downloaded here

I have tested the code on a channel flow at Re_t=395 and the results were ok, nevertheless any feedback is welcome

Andrea
Andrea1984 is offline   Reply With Quote

Old   November 29, 2019, 01:07
Default
  #15
Member
 
godfatherBond's Avatar
 
Maximus Arelius
Join Date: Jan 2017
Location: Morocco
Posts: 36
Rep Power: 9
godfatherBond is on a distinguished road
Quote:
Originally Posted by Andrea1984 View Post
Hello, this might be relevant to the topic:

I needed to calculate the resolved turbulent kinetic energy and its dissipation rate at runtime so I have modified pimpleFoam in order to do this.

Since I was there, I also added a field representing the fraction of the resolved TKE to the total TKE, i.e.:

LESResIndex = k_resolved/(k_resolved+k_sgs)

The solver can be downloaded here

I have tested the code on a channel flow at Re_t=395 and the results were ok, nevertheless any feedback is welcome

Andrea
Hi Andrea,
If you see Pope's Ten questions concerning LES, to calculate the LES index shouldn't the quantities Ksgs and Kres be averaged in time and them the ratio of them (averaged Ksgs and Kres) be used to calculate LESResIndex. Your code is calculating the instantaneous value, shouldn't it be doing that using averaged values?
Please correct me if I am wrong!
__________________
--
🃏Maximus🃏
godfatherBond is offline   Reply With Quote

Old   November 29, 2019, 06:20
Default
  #16
Senior Member
 
Andrea
Join Date: Feb 2012
Location: Leeds, UK
Posts: 179
Rep Power: 16
Andrea1984 is on a distinguished road
Hi,

indeed in Pope's paper it looks like it is using the time-averaged resolved and subgrid TKE to evaluate the index.

In my solver I did not do that, so the index value refers to the instantaneous ratio of k_res to k_tot. If I am not mistaken (I did not have time to go through the paper properly) this is what Celik et al, Index of Resolution Quality for Large Eddy Simulations (2005) are doing (Equation 9 in the paper). You could then use fieldAverage to evaluate a time-averaged value of the index calculated by my code. I guess this would be equivalent to the definition in Pope's paper but for a term related to the covariance of k_res and k_sgs (don't quote me on this though, I did not do the math). On the other hand, this should not make a big difference since the entire definition of the index is based on assumptions and therefore is only going to provide a rough estimate of how good your resolution is.

Andrea
Andrea1984 is offline   Reply With Quote

Old   May 29, 2021, 16:02
Default
  #17
New Member
 
Join Date: Aug 2020
Posts: 20
Rep Power: 6
Agavi is on a distinguished road
Quote:
Originally Posted by syavash View Post
All rights,

It is the solver plus an essential utility. I have added some comments to the main solver which should make it easy to understand the terms of TKE budgets.

Both solver and utility have been compiled on OF 2.3.1. Only some important notes remain:

1-This implementation requires a well established averaged Velocity field (UMean) to exist in the time folder. The process of averaging of TKE budgets happens within the main solver and UMean is NOT updated within the code. So a reasonable averaged field must exist prior to beginning of simulation using LESpimpleFoam. To provide this averaged field, one can perform simulation for several flow-through time using the native pimpleFoam solver.

2-Three of TKE budgets are calculated afterwards the simulation through the postLES utilitiy provided. This utility requires averaged fields, including:

UMean

kMean

UPrime2Mean

turbDiffMean

SGSDiffMean

If any of the above fields would not exist, the utility will be terminated. So make sure to activate averaging process for them in the fieldAverage function object within controlDict. It is recommended to add all the defined variables in the main solver to the function object.

Feel free to comment

https://dl.dropboxusercontent.com/u/...pleFoam.tar.gz

https://dl.dropboxusercontent.com/u/...postLES.tar.gz

Enjoy.
Syavash


Hi Syavash or anyone else who has an answer!

Where did you find the derivation for the TKE Budget equation you are using? I'm only aware of the equation in Pope's book page 125 \frac{\bar{D}k}{\bar{D}t}+\nabla \cdot T' = P-\epsilon (eq 5.132) which is a physical one. What I don't understand is how this equation is modified to become a resolved-TKE transport equation (that is the field U-UMean), therefore including the SGS tensor terms.

Thanks

Agave
Agavi 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
PEMFC model with FLUENT brahimchoice FLUENT 22 April 19, 2020 16:44
Floating Point Exception Error nyox FLUENT 11 November 30, 2018 13:31
fluent divergence for no reason sufjanst FLUENT 2 March 23, 2016 17:08
Star cd es-ice solver error ernarasimman STAR-CD 2 September 12, 2014 01:01
thobois class engineTopoChangerMesh error Peter_600 OpenFOAM 4 August 2, 2014 10:52


All times are GMT -4. The time now is 21:00.