LES best practice: resolved and modelled turbulence kinetic energy
Hello,
I am running an LES simulations with the WALE subgrid-scale model and am looking for some clarification on turbulence properties. To help validate my mesh, I would like to know how much of the turbulence kinetic energy is directly resolved and how much is modelled with the subgrid-scale model. Could anyone tell me how this can be done directly in OpenFOAM? I.e. what calculations I need to perform? Reading through the forums, some people have said that R gives the modelled Reynolds stress tensor and that Uprime2Mean gives the resolved Reynolds stress tensor. Is this correct? If that's the case, does that mean the total Reynolds stress tensor is simply given by R + Uprime2Mean? Then I can simply find the percentage of resolved k as Uprime2Mean/(R + Uprime2Mean)? Please correct me if I am wrong. Since looking into this, it has raised further questions regarding the run time output of the turbulence kinetic energy, k. Is this the total, resolved or modelled turbulence kinetic energy? Thank you, Em |
Quote:
Quote:
Quote:
https://www.openfoam.com/documentati...E.html#details And to dig more into detail into the WALE files itself: https://www.openfoam.com/documentati...8H_source.html https://www.openfoam.com/documentati...8C_source.html |
Thank you for your detailed reply - you've really helped to clarify this!
|
I know this thread is from a few months ago but recently I have modified pimpleFoam to calculate the resolved turbulent kinetic energy and dissipation rate at run-time.
The solver is also calculating the ratio of k_res/(k_res+k_sgs) at run-time. You can download it from this repository. I have tested it in a channel flow at Re_t=395 and is working fine, but any feedback is welcome. |
Quote:
Could you tell for what version of OF was this orignally created? I am having some issues compiling it. I am using OF5.x. EDIT: Got it to work in OF5.x. I think it was written using OpenFOAM-dev. Did your setup of Channel ReTau=395 was having the LESResIndex~0.8? |
I have actually written in for OF-6, but it's good to know that is working now!
I have created a new mesh from scratch for my channel flow simulation at Re_t=395 so you cannot directly compare your Resolution Index with mine. Andrea |
Quote:
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! |
|
Quote:
|
Quote:
|
Hi Arijit, this is a self-contained solver. You can compile and then use it instead of pimpleFoam. It is essentially as pimpleFoam but it also calculate some useful statistics for LES.
Simply clone the repository and execute wmake to compile the solver. I have developed this in OpenFOAM 6.0 so it should work without any issues on that version, not 100% sure about other versions. |
Quote:
|
Copy the files from the repository in a suitable folder in your machine. Usually this is $WM_PROJECT_USER_DIR/applications/solvers but it can be any folder you can write into
Within the folder where you copied the source code execute wmake If this is successful you should now have a pimpleTKEBudgetFoam executable that you can run as you would run the standard pimpleFoam solver |
5 Attachment(s)
I ve been trying is method as following:-
1. I made a seperate folder consisting of solvers and channel365(as I m trying to simulate that LES flow). 2. In the solvers folder I had taken the pimpleFoam and the pimpleTKEBudgetFoam(the one which is your modified one). 3. Then I started the terminal and initiated with sudo bash. 4. Then I typed wmake but there are some some errors which is popping up. And with this post I m also attaching the pics which will help you to better understand my problem. |
I don't see any obvious issue with what you did. Maybe this is related to the fact that I have developed the solver for OpenFOAM 6.0 and you are using 7.0?
|
Yes it is OpenFoam7 and what is the solution to that?
|
Yaa after lot of trial it is finally done. I have kept the folders similar to pimpleFoam solver where it was showing error. But I didnt found any PimpleTKEBudgetFoam executable file. Even I have modified the solver from pimpleFoam to PimpleTKEBudgetFoam in controlDict but when I m writing the PimpleTKEBudgetFoam in terminal it is showing command not found and it is running properly( as usual) with pimpleFoam.
|
Quote:
You can write out the modelled (subgrid) Reynolds stress tensor during run time by including the following in your controlDict functions { #includeFunc R { You will also need to copy the file 'R' to your system directory, which can be copied from $FOAM_ETC/caseDicts/postProcessing/fields/R (the location may be slightly different depending on which version of OpenFOAM you use). This will write out the modelled Reynolds stress tensor in your time directories, just like U and p. Once you have this and the resolved Reynolds stresses (UPrime2Mean) you can follow what Ano replied earlier in the thread to calculate how much of the field is modelled/resolved. |
Thanks Emi for the reply. I have figured out the way to find R and Uprime2mean and then I can do the calculation in excel spreadsheet right?
In this formula 1/2tr(Uprime2Mean))/(1/2tr(R + Uprime2Mean) what does this tr denotes? |
I'd recommend opening the simulation in paraview and then you can use the calculator function - which is very straightforward.
tr(...) means the trace of the tensor. Both R and UPrime2Mean are 3x3 tensors, so you can calculate the trace by summing the three diagonal elements. |
All times are GMT -4. The time now is 19:04. |