|
[Sponsors] |
March 18, 2019, 13:14 |
correlation coefficient calculation
|
#1 |
Senior Member
luca mirtanini
Join Date: Apr 2018
Posts: 165
Rep Power: 8 |
Hi,
I would like to calculate the correlation coefficient of a velocity component of a simulation. I am trying to use the formula: =/ 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 |
|
March 18, 2019, 13:19 |
|
#2 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,773
Rep Power: 71 |
Quote:
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... |
|
March 19, 2019, 05:20 |
|
#3 |
Senior Member
luca mirtanini
Join Date: Apr 2018
Posts: 165
Rep Power: 8 |
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? |
|
March 19, 2019, 08:05 |
|
#4 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,675
Rep Power: 66 |
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. |
|
March 21, 2019, 05:25 |
|
#5 |
Senior Member
luca mirtanini
Join Date: Apr 2018
Posts: 165
Rep Power: 8 |
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 |
|
March 21, 2019, 06:22 |
|
#6 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,773
Rep Power: 71 |
Quote:
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 |
||
March 21, 2019, 08:46 |
|
#7 | |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,675
Rep Power: 66 |
Quote:
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. |
||
March 21, 2019, 09:03 |
|
#8 | |
Senior Member
luca mirtanini
Join Date: Apr 2018
Posts: 165
Rep Power: 8 |
Quote:
|
||
March 21, 2019, 09:10 |
|
#9 | |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,675
Rep Power: 66 |
Quote:
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. |
||
March 21, 2019, 09:13 |
|
#10 |
Senior Member
luca mirtanini
Join Date: Apr 2018
Posts: 165
Rep Power: 8 |
This is true...my mistake
|
|
|
|
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 |