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

Confusion in calculation of u', the velocity flucation

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree3Likes
  • 1 Post By LuckyTran
  • 2 Post By FMDenaro

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 16, 2022, 12:12
Default Confusion in calculation of u', the velocity flucation
  #1
New Member
 
CPark
Join Date: Apr 2021
Posts: 11
Rep Power: 3
ckpark is on a distinguished road
Dear all,


I have a simple dataset with just the 3 components of velocity, u, v and w, and I am trying to compute the turbulence kinetic energy, k, in which the velocity fluctuations need to be computed.
The velocity fluctuation u' is simply, u' = u - \overline{u}, where \overline{u} is the time average of u.

The confusion is, say the dataset exists from time t=0 to t=T with a finite number time steps and i would like to compute k for each timestep. So for example for t=t_{1} where 0<t_{1}<T, I need to compute the u' at this specific time. Then, is \overline{u} the time average between 0 and T or is it between 0 and t_{1}?

It is a simple base theory for CFD but I just ran into this confusion while trying to calculate k by myself instead of relying on programs.
ckpark is offline   Reply With Quote

Old   March 16, 2022, 14:15
Default
  #2
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,022
Rep Power: 60
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
You should average all times. There is only one average.

Technically the answer is neither. What you are looking for is the population quantity in statistics. What you can obtain is a sample estimate of the population quantity. The real time average is from time going from negative infinity to positive infinity.
ckpark likes this.
LuckyTran is offline   Reply With Quote

Old   March 16, 2022, 14:15
Default
  #3
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,152
Rep Power: 66
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by ckpark View Post
Dear all,


I have a simple dataset with just the 3 components of velocity, u, v and w, and I am trying to compute the turbulence kinetic energy, k, in which the velocity fluctuations need to be computed.
The velocity fluctuation u' is simply, u' = u - \overline{u}, where \overline{u} is the time average of u.

The confusion is, say the dataset exists from time t=0 to t=T with a finite number time steps and i would like to compute k for each timestep. So for example for t=t_{1} where 0<t_{1}<T, I need to compute the u' at this specific time. Then, is \overline{u} the time average between 0 and T or is it between 0 and t_{1}?

It is a simple base theory for CFD but I just ran into this confusion while trying to calculate k by myself instead of relying on programs.





The time averaging must be theoretically extended up to T->Infinite. Therefore, in practice you have to compute from 0 to T, but T must be enough large.
ckpark and loesung like this.
FMDenaro is offline   Reply With Quote

Old   March 17, 2022, 06:50
Default
  #4
New Member
 
CPark
Join Date: Apr 2021
Posts: 11
Rep Power: 3
ckpark is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
You should average all times. There is only one average.

Technically the answer is neither. What you are looking for is the population quantity in statistics. What you can obtain is a sample estimate of the population quantity. The real time average is from time going from negative infinity to positive infinity.
Thank you Lucky and Filippo for your answers.


This leads me to another question. Since k is a time varying parameter and involves the mean of the squared u' (UPrime2mean as OpenFoam calls it), does it mean that this mean is not computed as poulation average but instead just the average up until the specific time t that I am computing k for?
ckpark is offline   Reply With Quote

Old   March 17, 2022, 07:16
Default
  #5
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,152
Rep Power: 66
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by ckpark View Post
Thank you Lucky and Filippo for your answers.


This leads me to another question. Since k is a time varying parameter and involves the mean of the squared u' (UPrime2mean as OpenFoam calls it), does it mean that this mean is not computed as poulation average but instead just the average up until the specific time t that I am computing k for?
But in a real RANS computations you have no resolved fluctuations, you never compute the (uu)_bar term
FMDenaro is offline   Reply With Quote

Old   March 17, 2022, 07:23
Default
  #6
New Member
 
CPark
Join Date: Apr 2021
Posts: 11
Rep Power: 3
ckpark is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
But in a real RANS computations you have no resolved fluctuations, you never compute the (uu)_bar term
I am currently handling an LES dataset that merely has velocity data so I am trying to compute its turbulence kinetic energy.
So is the (u'u')_bar term a time varying parameter?
ckpark is offline   Reply With Quote

Old   March 17, 2022, 08:04
Default
  #7
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,152
Rep Power: 66
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by ckpark View Post
I am currently handling an LES dataset that merely has velocity data so I am trying to compute its turbulence kinetic energy.
So is the (u'u')_bar term a time varying parameter?
No, the statistical average is exactly the time averaging that produces a steady mean. Conversely, in LES the overbar is a filtering and all filtered variables are time dependent. Thus

[f_fil(x,t)]_bar = F(x)
FMDenaro is offline   Reply With Quote

Old   March 17, 2022, 08:28
Default
  #8
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,022
Rep Power: 60
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
UMean and UPrime2Mean are averages from 0 to T and both of these are sample estimates for population statistics. There are infinite number of possible such estimators. You only really care about the best estimator that you get in the very last time dir because it is averaged over the longest time duration. Getting the population value is not possible unless you have the entire population ensemble, which means running your simulation until T=>infinity.

Hence, it's nearly impossible to directly calculate the time-varying u' and time-varying k at runtime because you don't know (and can never know) the population statistics. You must calculate it until T=>infinity, save U at all the times you care about, and then post-process it a posteriori. If you waned to do this manually you would run your simulation with fieldAverage option set. Go to the very last time dir and find UMean. Copy (and overwrite) this latest UMean into all previous time dirs. Then do something like:
Code:
foamCalc addSubtract U subtract -field UMean -resultName UPrime

And then calculate k.
LuckyTran is offline   Reply With Quote

Old   March 17, 2022, 09:08
Default
  #9
New Member
 
CPark
Join Date: Apr 2021
Posts: 11
Rep Power: 3
ckpark is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
UMean and UPrime2Mean are averages from 0 to T and both of these are sample estimates for population statistics. There are infinite number of possible such estimators. You only really care about the best estimator that you get in the very last time dir because it is averaged over the longest time duration. Getting the population value is not possible unless you have the entire population ensemble, which means running your simulation until T=>infinity.

Hence, it's nearly impossible to directly calculate the time-varying u' and time-varying k at runtime because you don't know (and can never know) the population statistics. You must calculate it until T=>infinity, save U at all the times you care about, and then post-process it a posteriori. If you waned to do this manually you would run your simulation with fieldAverage option set. Go to the very last time dir and find UMean. Copy (and overwrite) this latest UMean into all previous time dirs. Then do something like:
Code:
foamCalc addSubtract U subtract -field UMean -resultName UPrime

And then calculate k.
Yes so I understand that both the UMean and UPrime2Mean are the population statistis that require a large T.
However, I am not sure how k can be time varying when it only depends on the 3 directional components of UPrime2Mean which are not time varying. What am I missing?
ckpark is offline   Reply With Quote

Old   March 17, 2022, 09:20
Default
  #10
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,152
Rep Power: 66
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by ckpark View Post
Yes so I understand that both the UMean and UPrime2Mean are the population statistis that require a large T.
However, I am not sure how k can be time varying when it only depends on the 3 directional components of UPrime2Mean which are not time varying. What am I missing?
But are you considering RANS, URANS or LES for k ??
FMDenaro is offline   Reply With Quote

Old   March 17, 2022, 09:33
Default
  #11
New Member
 
CPark
Join Date: Apr 2021
Posts: 11
Rep Power: 3
ckpark is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
But are you considering RANS, URANS or LES for k ??
I am currently considering LES for k, the resolved k to be precise.
Apologies, I did not really get what you meant by "[f_fil(x,t)]_bar = F(x)" but thanks for helping me recall that in LES it is a filtering operation instead of averaging. I completely missed that.



Anyhow, according to Sagaut's book on LES for incompressible flow, the resolved turbulence kinetic energy is simply half of the squared of filtered velocity (page 51). Since the velocity data I have is for the given grid, the filtered velocity in my case is simply this velocity data.
Does this sound like a valid statement?
ckpark is offline   Reply With Quote

Old   March 17, 2022, 10:31
Default
  #12
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,152
Rep Power: 66
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by ckpark View Post
I am currently considering LES for k, the resolved k to be precise.
Apologies, I did not really get what you meant by "[f_fil(x,t)]_bar = F(x)" but thanks for helping me recall that in LES it is a filtering operation instead of averaging. I completely missed that.



Anyhow, according to Sagaut's book on LES for incompressible flow, the resolved turbulence kinetic energy is simply half of the squared of filtered velocity (page 51). Since the velocity data I have is for the given grid, the filtered velocity in my case is simply this velocity data.
Does this sound like a valid statement?

Your LES database provided for sure the filtered velocity. From that you can deduce the k (unsteady) but also the approximation for the RANS (steady) velocity and the fluctuations.
My previous notation means you can apply the time averaging to the filtered variable and the result is a steady field.
FMDenaro is offline   Reply With Quote

Old   March 17, 2022, 12:28
Default
  #13
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,022
Rep Power: 60
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
The instantaneous k depends on the three direction components of u', not uPrime2Mean. UPrime2Mean is the root mean square of u', it is a statistic like UMean. k inherits the temporal characteristics of u'.

You can get the time-averaged k from UPrime2Mean, but not the instantaneous k.

\overline{k}=\frac{1}{2}(\overline{u'u'}+\overline{v'v'}+\overline{w'w'})

k(t)=\frac{1}{2}(u'u'+v'v'+w'w')

And
u'=u(t)-\overline{u}

UPrime2Mean is
\overline{u'u'},\overline{u'v'},\overline{u'w'},\overline{v'v'} etc.
LuckyTran is offline   Reply With Quote

Old   March 21, 2022, 07:40
Default
  #14
New Member
 
CPark
Join Date: Apr 2021
Posts: 11
Rep Power: 3
ckpark is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
The instantaneous k depends on the three direction components of u', not uPrime2Mean. UPrime2Mean is the root mean square of u', it is a statistic like UMean. k inherits the temporal characteristics of u'.

You can get the time-averaged k from UPrime2Mean, but not the instantaneous k.

\overline{k}=\frac{1}{2}(\overline{u'u'}+\overline{v'v'}+\overline{w'w'})

k(t)=\frac{1}{2}(u'u'+v'v'+w'w')

And
u'=u(t)-\overline{u}

UPrime2Mean is
\overline{u'u'},\overline{u'v'},\overline{u'w'},\overline{v'v'} etc.
Quote:
Originally Posted by FMDenaro View Post
Your LES database provided for sure the filtered velocity. From that you can deduce the k (unsteady) but also the approximation for the RANS (steady) velocity and the fluctuations.
My previous notation means you can apply the time averaging to the filtered variable and the result is a steady field.

Thank you FMDenaro and LuckyTran for your kind replied. I have eventually figured it out with your help and managed to calculate the TKE of my dataset.
ckpark is offline   Reply With Quote

Reply

Tags
turbulence kinetic energy, velocity component, velocity fluctuation

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Panel-Method, velocity calculation mrbm Main CFD Forum 17 August 5, 2022 11:03
fluctuation component of velocity (Urms) calculation from RANS simulation results atul1018 Main CFD Forum 5 February 4, 2021 10:09
Calculation of tangential velocity lxlylzl.123 FLUENT 4 November 18, 2020 14:13
Time dependent angular velocity calculation UDF shashankmechguy Fluent UDF and Scheme Programming 1 July 26, 2018 02:23
The problem for velocity calculation using turbulent model in openfoam. mscheng OpenFOAM Running, Solving & CFD 6 September 10, 2013 08:35


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