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

correlation coefficient calculation

Register Blogs Community New Posts Updated Threads Search

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 18, 2019, 13:14
Default correlation coefficient calculation
  #1
Senior Member
 
luca mirtanini
Join Date: Apr 2018
Posts: 165
Rep Power: 8
lucamirtanini is on a distinguished road
Hi,
I would like to calculate the correlation coefficient of a velocity component of a simulation. I am trying to use the formula:
\rho(s)=\overline{u(t)u(t+s)}/\overline{u^2}
But unfortunately I have some doubts trying to make in practice this theory. Infact, I cannot understand what does it means to make the average of u(t)u(t+s) . Should not these be just a product between two values? How can I make the average?

Thank you in advance
lucamirtanini is offline   Reply With Quote

Old   March 18, 2019, 13:19
Default
  #2
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,773
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by lucamirtanini View Post
Hi,
I would like to calculate the correlation coefficient of a velocity component of a simulation. I am trying to use the formula:
\rho(s)=\overline{u(t)u(t+s)}/\overline{u^2}
But unfortunately I have some doubts trying to make in practice this theory. Infact, I cannot understand what does it means to make the average of u(t)u(t+s) . Should not these be just a product between two values? How can I make the average?

Thank you in advance



See the definition of the overbar operator. You see that the LHS is a function of only s while the RHS has t and s. Therefore the overbar operator must saturate the t variable...
FMDenaro is offline   Reply With Quote

Old   March 19, 2019, 05:20
Default
  #3
Senior Member
 
luca mirtanini
Join Date: Apr 2018
Posts: 165
Rep Power: 8
lucamirtanini is on a distinguished road
Hi,
I have tried to obtain it with excel.

I have done SUMPRODUCT() of the first data set of u(t) (fluctuation component of velocity) and a second dataset u(t+s), then i divided it by the SUMPRODUCT() of the first data set of u(t) and itself. Since the number of data in all these dataset its the same, I avoided to divede each sumproducts by the number of data.

Do you think it is a good approach?

I obtained the attached result. Don't you think that the velocity seems to be uncorrelated very early? Is it anomalous?
Attached Images
File Type: png autocorrelation.PNG (8.7 KB, 30 views)
lucamirtanini is offline   Reply With Quote

Old   March 19, 2019, 08:05
Default
  #4
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,675
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
sumproudct is a good function to use.


How quickly the autocorrelation decays to 0 depends on the time-scale, which is a characteristic of the flow. And since we are talking about flow turbulence, it is related to the turbulent time-scale. If your turbulent time-scale is small, it will decay very fast. If the turbulent time-scale is long, it will decay very slowly.


Without knowing the flow and turbulent time-scale, we cannot say if this is too fast or too slow.
LuckyTran is offline   Reply With Quote

Old   March 21, 2019, 05:25
Default
  #5
Senior Member
 
luca mirtanini
Join Date: Apr 2018
Posts: 165
Rep Power: 8
lucamirtanini is on a distinguished road
Yes, thank you for your comments. You are right.

Which can be a possible explanation if the spatial correlation coefficient, after going to zero, then it grows and after it decreases to 0?

Can it be related to the fact that the turbulence is not homogeneous?

I just would like to know if there are usually logical explanation for this.

Thanks
Attached Images
File Type: png spatial correlation.PNG (16.6 KB, 21 views)
lucamirtanini is offline   Reply With Quote

Old   March 21, 2019, 06:22
Default
  #6
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,773
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by lucamirtanini View Post
Yes, thank you for your comments. You are right.

Which can be a possible explanation if the spatial correlation coefficient, after going to zero, then it grows and after it decreases to 0?

Can it be related to the fact that the turbulence is not homogeneous?

I just would like to know if there are usually logical explanation for this.

Thanks

Actually, your correlation seems not reaching the zero level and, usually, after the zero the correlation becomes negative.
However, the physical intepretation of the zero value is related to the characteristic Taylor microscale. Ideed, one can fit the osculating parabola to get and estimation.

https://en.wikipedia.org/wiki/Taylor_microscale

Do not forget that the Taylor scale is the largest where physical dissipation starts to act, therefore it depends on the flow problem.
Nothing can be said about your curve without details of your problem
lucamirtanini likes this.
FMDenaro is offline   Reply With Quote

Old   March 21, 2019, 08:46
Default
  #7
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,675
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Quote:
Originally Posted by lucamirtanini View Post
Yes, thank you for your comments. You are right.

Which can be a possible explanation if the spatial correlation coefficient, after going to zero, then it grows and after it decreases to 0?

Can it be related to the fact that the turbulence is not homogeneous?

I just would like to know if there are usually logical explanation for this.

Thanks

You earlier plot showing 0 crossing looked more correct. The plot here cannot be correct. You've made some mistake. The autocorrelation starts at 1 no matter what. A signal is always perfectly correlated with itself. Unless you are showing the correlation of u' with v' or something. If you are comparing u' with u', then at 0 separation the correlation is 1.

For random fields (fields that should not be correlated), there will be a zero crossing. The correlation will become negative and can become slightly positive again. But will oscillate around 0.

For fields that are not random correlation does not have to go to 0 and can even become 1 again. Non-random fields can be coherent and this is very physical. Consider for example a sinusoidal oscillation with many waves, e.g. sin(x). Due to periodicity, sin(x) = sin(x + 2pi) = sin(x+2pi). This type of signal will not decay to 0 correlation. However, tubulence tending to be random should not display this property.

You cannot say whether the field is homogeneous or not looking at a autocorrelation at a single location. It is necessary (but not sufficient) to calculate the autocorrelation (at all spatial locations) and compare them to each other and show that the Rij is the same everywhere. That is, show that Rij is a function of separation distance only for any x. Obviously (or maybe it isn't obvious), this is very difficult to prove using any real data. So the concept of homogeneous turbulence is a more of a theory.
lucamirtanini likes this.
LuckyTran is offline   Reply With Quote

Old   March 21, 2019, 09:03
Default
  #8
Senior Member
 
luca mirtanini
Join Date: Apr 2018
Posts: 165
Rep Power: 8
lucamirtanini is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
You earlier plot showing 0 crossing looked more correct. The plot here cannot be correct. You've made some mistake. The autocorrelation starts at 1 no matter what. A signal is always perfectly correlated with itself. Unless you are showing the correlation of u' with v' or something. If you are comparing u' with u', then at 0 separation the correlation is 1.
The spatial correlation, as stated by Tennekes and Lumley's book is not normalized, so I assumed that a value that is not 1 at the start can be correct
lucamirtanini is offline   Reply With Quote

Old   March 21, 2019, 09:10
Default
  #9
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,675
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Quote:
Originally Posted by lucamirtanini View Post
The spatial correlation, as stated by Tenneke is not normalized, so I assumed that a value that is not 1 at the start can be correct

That is indeed true. But then you should have said so that you are now calculating the correlation function and not the correlation coefficient. Why did you post a picture of correlation and ask about correlation coefficient? That's not nice.


Well anyway now you have the explanation why correlation can increase. But you still don't have negative correlation which is still a hint that something is wonky.


As a tutorial, calculate the correlation coefficient for a pseudo-random field.
lucamirtanini likes this.
LuckyTran is offline   Reply With Quote

Old   March 21, 2019, 09:13
Default
  #10
Senior Member
 
luca mirtanini
Join Date: Apr 2018
Posts: 165
Rep Power: 8
lucamirtanini is on a distinguished road
This is true...my mistake
lucamirtanini 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
Thurst and Power coefficient calculation in helicopter johnsherjy STAR-CCM+ 3 November 4, 2019 19:33
Drag Coefficient calculation for flow over a 2D Cylinder at High Reynodls Numbers DanielBarreiro CFX 13 February 26, 2019 09:40
Heat Transfer Coefficient Calculation - Post Processing y_jiang OpenFOAM Post-Processing 0 October 8, 2018 14:57
Manual calculation of Heat Transfer Coefficient TrII4d CFX 20 January 26, 2017 12:40
Calculation of Drag Coefficient manually PRASHANT GHADGE FLUENT 4 December 13, 2012 15:31


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