CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

total TKE in LES WALE SGS

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 2 Post By LuckyTran
  • 2 Post By LuckyTran

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 3, 2021, 18:20
Default total TKE in LES WALE SGS
  #1
Member
 
Nima
Join Date: May 2014
Location: Ireland
Posts: 51
Rep Power: 12
nima_nz is on a distinguished road
Hi everyone

As in LES the TKE and TDR are not provided I have to calculate them through the CFF for the sampling process.

I can calculate the resolved TKE by: (rmse-x-velocity ^ 2 + rmse-y-velocity ^ 2 + rmse-z-velocity ^ 2) / 2

But how can I calculate the modeled TKE in the WALE SGS model to obtain the total TKE as TKE_tot=TKE_resolved+TKE_modeled

And how about the TDR?

I want these two values for obtaining the Lenght Scale of Turbulence as L=(K^3/2)/epsilon



I would appreciate any help or suggestion.

Thanks
nima_nz is offline   Reply With Quote

Old   July 3, 2021, 21:28
Default
  #2
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
For the subgrid tke: k_{sgs}=(\frac{\mu_t}{L_s})^{2}

The resolved part of the tdr you can compute directly, though you need derivatives/strain-rates

The sgs part of the tdr you get from the relationship that you already knew \epsilon_{sgs}=\frac{{k_{sgs}}^{\frac{3}{2}}}{L_s}
nima_nz and aero_head like this.
LuckyTran is offline   Reply With Quote

Old   July 4, 2021, 06:37
Default
  #3
Member
 
Nima
Join Date: May 2014
Location: Ireland
Posts: 51
Rep Power: 12
nima_nz is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
For the subgrid tke: k_{sgs}=(\frac{\mu_t}{L_s})^{2}

The resolved part of the tdr you can compute directly, though you need derivatives/strain-rates

The sgs part of the tdr you get from the relationship that you already knew \epsilon_{sgs}=\frac{{k_{sgs}}^{\frac{3}{2}}}{L_s}
Thanks a million for your reply. It was really helpful. But how can I get Ls? It is Length Scale of Turbulence and isn’t in the default results of les, is it?
nima_nz is offline   Reply With Quote

Old   July 4, 2021, 10:13
Default
  #4
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,195
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Quote:
Originally Posted by nima_nz View Post
Thanks a million for your reply. It was really helpful. But how can I get Ls? It is Length Scale of Turbulence and isn’t in the default results of les, is it?
Maybe, try with the LES filter width?
sbaffini is offline   Reply With Quote

Old   July 4, 2021, 15:43
Default
  #5
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
I assume you're using Fluent. The subgrid filter length is available in the turbulence category a few names below subgrid turbulent viscosity, just after viscosity ratio.

If you're not using Fluent, the filter length has to be calculated at some point in order to do the WALE. So you have to have it one way or another.
LuckyTran is offline   Reply With Quote

Old   July 4, 2021, 20:50
Default
  #6
Member
 
Nima
Join Date: May 2014
Location: Ireland
Posts: 51
Rep Power: 12
nima_nz is on a distinguished road
Quote:
Originally Posted by sbaffini View Post
Maybe, try with the LES filter width?
Actually that’s a fraction of filter width which is called sub-grid length scale. And in WALE it is 0.325*filter width, if I’m not mistaken.
nima_nz is offline   Reply With Quote

Old   July 4, 2021, 20:54
Default
  #7
Member
 
Nima
Join Date: May 2014
Location: Ireland
Posts: 51
Rep Power: 12
nima_nz is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
I assume you're using Fluent. The subgrid filter length is available in the turbulence category a few names below subgrid turbulent viscosity, just after viscosity ratio.

If you're not using Fluent, the filter length has to be calculated at some point in order to do the WALE. So you have to have it one way or another.
Yes, I’m using FLUENT. So sub-grid filter length is same as sub-grid length scale?
Attached Images
File Type: jpg 18E95253-D021-48C2-87DF-B2C880A8690C.jpg (63.0 KB, 243 views)
nima_nz is offline   Reply With Quote

Old   July 5, 2021, 01:17
Default
  #8
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
31.4 Alphabetical Listing of Field Variables and Their Definitions


Subgrid filter length is Ls
nima_nz and roi247 like this.
LuckyTran is offline   Reply With Quote

Old   July 5, 2021, 03:44
Default
  #9
Member
 
Nima
Join Date: May 2014
Location: Ireland
Posts: 51
Rep Power: 12
nima_nz is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
Thank you so much for your patience and help
nima_nz is offline   Reply With Quote

Old   December 22, 2022, 14:09
Default
  #10
Member
 
Rui
Join Date: Apr 2015
Location: Montreal. CA
Posts: 49
Rep Power: 11
roi247 is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
For the subgrid tke: k_{sgs}=(\frac{\mu_t}{L_s})^{2}

The resolved part of the tdr you can compute directly, though you need derivatives/strain-rates

The sgs part of the tdr you get from the relationship that you already knew \epsilon_{sgs}=\frac{{k_{sgs}}^{\frac{3}{2}}}{L_s}
Great!!
but We need to be careful about the unit, the \mu in the above formula should be \nu
if, in the end, we want to obtain the unit of m^2/s^2 for KSGS

as shown in the page, search subgrid kinetic energy
https://www.afs.enea.it/project/nept...ug/node984.htm
roi247 is offline   Reply With Quote

Old   December 22, 2022, 23:26
Default
  #11
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Quote:
Originally Posted by roi247 View Post
Great!!
but We need to be careful about the unit, the \mu in the above formula should be \nu
if, in the end, we want to obtain the unit of m^2/s^2 for KSGS

as shown in the page, search subgrid kinetic energy
https://www.afs.enea.it/project/nept...ug/node984.htm

That is true but note that m^2/s^2 does not have units of kinetic energy! Since for 99% of people they differ by only a constant density factor, it is much more important that you have the same units for the resolved tke and subgrid kinetic energy. The formula isn't wrong if you are actually trying to calculate ksgs and not your wrong version of tke. But you should use consistent units for both at least!
LuckyTran is offline   Reply With Quote

Old   December 23, 2022, 16:07
Unhappy Lost in the calculation
  #12
Member
 
Rui
Join Date: Apr 2015
Location: Montreal. CA
Posts: 49
Rep Power: 11
roi247 is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
That is true but note that m^2/s^2 does not have units of kinetic energy! Since for 99% of people they differ by only a constant density factor, it is much more important that you have the same units for the resolved tke and subgrid kinetic energy. The formula isn't wrong if you are actually trying to calculate ksgs and not your wrong version of tke. But you should use consistent units for both at least!
Hello LuckyTran,
Thank you for the previous posts in this thread. However, I ran into more problems since yesterday.
I wanted to calculate LES_IQ = k/tot=k/(k+ksgs) because some researchers say that this index will show if the grid is suitable. If this ratio is > 80%, it means it is suitable (Gousseau et al. 2013).
After reading posts at CFD online, I have tried it on my results.

I have three parallel runs, they differ only in SGS models (DSM, WALE, DKE). I chose one single point in the water of an open channel, where the streamwise velocity is about 0.5 m/s.
Using both CFD-post and FLUENT {term name from CFD-post is written inside "{}"}, I found the following:
For DKE,
sgs-filter-length {Subgrid Filter Length}=3.81E-3 [m]
sgs-viscosity-turb {Eddy Viscosity Subgrid} = 3.70E-3 [Pa.s]
Fluent did not give a unit when I export from the point; CFD-post table uses Pa.s just like the dynamic viscosity
viscosity-lam (Water dynamic viscosity or molecular viscosity) = 1.00E-3 [Pa.s]
so we can calculate Subgrid Effective Viscosity (summing up) and Eddy Viscosity Ratio Subgrid (ratio)

Now, based on the post here we can estimate
ksgs = (Eddy Viscosity Subgrid/Density/Subgrid Filter Length)^2= 9.411E-7 (J/Kg==m^2/s^2)
Density is about 998.2 kg/m3 for water;
this is very different from the results of DKE model
sgs-kinetic-energy = 2.14 E-4 (J/Kg==m^2/s^2) directly from the FLUENT.
The above seems to be instantaneous results at one single timestep.

On the other hand, I did data sampling for 1000 timesteps to determine tke beforehand
I should not mix the ensemble average and instantaneous value for real calculations, but let us just take a look at the magnitude for now.
tke=0.5*(Rmse X Velocity^2+Rmse Y Velocity^2+Rmse Z Velocity^2)= 1.439e-03 [J kg^-1]
If we use the manually calculated ksgs
LES_IQ=1.493e-3/(1.493e-3+9.411e-7) very close to 99.93%
If we use the sgs-kinetic-energy from the fluent DKE model
LES_IQ=1.493e-3/(1.493e-3+2.14e-4)=87.04%
the latter makes sense to me

I do not have the ksgs from fluent directly using the other two models as they do not solve the third transport eq.
For DSM
I have
TKE= 5.306e-04 [J kg^-1] 1000 ensembles
ksgs= 1.447e-08 [J kg^-1] instantaneous based on the definition involves rhou water
LES_IQ=1
For WALE
I have
TKE= 1.654e-03 [J kg^-1]
ksgs= 6.178e-09 [J kg^-1]
LES_IQ=1


Not only for one point, but I also tried to apply the above calculations to the entire plane to draw a contour. Almost everywhere gives LESIQ=1 if I used the formula to calculate Ksgs myself. Am I really only having less than 1% ksgs......
Also, I tried to calculate ksgs at different timesteps the magnitude is still too small for me.

I guess there must be something wrong in my understanding of the above formula in this post, but I checked again and again I successfully changed pa.s-->m^2/s^2 by using the water density. Maybe it was my understanding here that is wrong.

Could you please give me a hint
roi247 is offline   Reply With Quote

Old   December 24, 2022, 01:23
Default
  #13
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
You do need some ensemble averaging since you need a mean to calculate rmse fluctuations, that's why this method is not as straightforward as the theory might suggest.

You don't need the molecular viscosity. You are comparing the subgrid kinetic energy to the sum of the subgrid k and resolved k, you need only the turbulent viscosity, not the effective viscosity.


Once you plot it on a plane, it should be easy to digest where are the resolved and unresolved areas if you keep in mind what your mesh sizes where and how thick the boundary layers are.
LuckyTran is offline   Reply With Quote

Old   December 24, 2022, 02:10
Default
  #14
Member
 
Rui
Join Date: Apr 2015
Location: Montreal. CA
Posts: 49
Rep Power: 11
roi247 is on a distinguished road
Hello LuckyTran, Thank you for the reply.
Point1:
For kresolved , I did ensemble averaging by turning on data sampling for 1000 timesteps. The sampling time was proved to be long enough for the specific simulation. I do have the rmse uj velocity to calculate the correct resolved tke. What I was trying to say in #12 is that ksgs (given in DKE), subgrid filter length, eddy viscosity subgrid, these three terms change from time to time. In the calculation of #12, for these three terms, I only used results at the last time step. I was just trying to check on the feasibility of the formula in #2. Right now, I am rerunning the simulation. So far, I observed subgrid filter length is a constant for the specific cell; eddy viscosity subgrid and ksgs (given directly in DKE) changed every timestep.

Point 2
I did not use molecular viscosity for the aforementioned formula in #2. I was just trying to say combining molecular viscosity and eddy viscosity can give us a viscosity ratio and effective viscosity. These were not used in the formula purposed in #2. My writing in #12 is probably very misleading.

Point 3
My concern in #12 is that the SGS-kinetic-energy obtained from DKE model directly is different from what I calculated using the formula in #2 and I could not find out the reason for it.
If I use subgrid kinetic energy directly from DKE, I plotted LES_IQ = kresolved/tot=kresolved/(kresolved+ksgs) on a plane and I will obtain the following,

https://ibb.co/9NBBdvV

However, if I use #2 formula, I got

https://ibb.co/kyRLrTz

red color means close to 1 and blue means close to 0.6

To me, the first figure makes more sense and I need the formula in #2 to work for WALE or DSM (dynamic smagorinsky). Based on figure 2, I did not expect ksgs to be that small compared to kresolved
roi247 is offline   Reply With Quote

Old   December 24, 2022, 05:15
Default
  #15
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
tke is also an instantaneous quantity that has a mean statistic. The one you calculate using the rmse is the mean turbulent kinetic energy. If you are arguing about semantics then yes we can be more specific but often it is clear from the context (same goes for velocity). You can plot the instantaneous tke or the mean tke and you can plot the instantaneous ksgs or mean ksgs. And you can therefore also plot the instantaneous resolved % or the average.


Be careful that you also divide ksgs by density the same way you do using the other formula, otherwise your units are already off. At worse, you should only be off by a factor of the wale constant using whatever method you choose, not orders of magnitude.
LuckyTran is offline   Reply With Quote

Old   December 24, 2022, 20:21
Default
  #16
Member
 
Rui
Join Date: Apr 2015
Location: Montreal. CA
Posts: 49
Rep Power: 11
roi247 is on a distinguished road
The second comment is important to me and the results seem to make more sense if I include the coefficient.
For DSM it is 0-0.22
For WALE it is 0.35
For DKE, it is said to be dynamically solved.
For Standard Smagorinsky it is 0.1.
https://ibb.co/FDVrtvR
The formula above is for DKE in the FLUENT theory guide.

When I export the subgrid-filter-length for the first three models, it all gave the same value for one specific point, which means they did not consider the coefficient beforehand in the term "subgrid-filter-length". (I am using a point far from the walls kappa d, which is bigger than V^1/3)
If we use DSM as an example, assuming C=0.1 (essentially changing dynamically) it will make the calculated ksgs 2 orders bigger. This makes my plot more realistic.
Even C = 0.35, it should still help. As the square of it gave about 0.1...




In my mind, the k was just k total= kresolved+ ksubgrid.

However, when I follow the steps of previous researchers. It turns out
https://ibb.co/Drfd7kH
They say there is a contribution of numerical dissipation.
Gousseau, P., Blocken, B., & Van Heijst, G. J. F. (2013). Quality assessment of Large-Eddy Simulation of wind flow around a high-rise building: Validation and solution verification. Computers & Fluids, 79, 120-133.

It becomes more complicated now...I will try to run another mesh and follow their purposed formula......to see what will happen......

Thank you for your help and comments in this post
roi247 is offline   Reply With Quote

Old   December 25, 2022, 05:08
Default
  #17
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
I think you are overthinking it, and you should really confirm that your units match when you calculate k using each approach.

The purpose of calculating the % resolved k is simply to quickly gauge the quality of the LES. It is not the end-all-be-all parameter than actually provides any insight into turbulence.

Regarding numerical dissipation, the solution that you get when you do any LES and the k resolved that you calculate is the resolved k according to the subgrid model that you was used. It is not the "true resolved k" because you don't know what the true solution is. If you run two different simulations, you get two resolved tke's, neither of which are necessarily the real one because both come from a turbulence model. You don't really need to go down this rabbit hole just to figure out if your grid is too coarse or not.
LuckyTran 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
Class refrence errors in implementing a new LES SGS model FaroukH OpenFOAM Programming & Development 15 October 28, 2022 11:57
Implementation of WALE LES model in OpenFOAM 16.12 L_W OpenFOAM Running, Solving & CFD 0 October 29, 2018 12:18
LES and total turbulent kinetic energy Boerge FLUENT 1 September 8, 2012 12:41
Subgrid TKE in LES saqure FLUENT 0 February 12, 2011 22:42
How to calculation TKE in LES lizzy0zhou Main CFD Forum 4 February 11, 2011 14:05


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