Two point correlation
I have finished one turbulent flow simulation over a bluff body and now and I am working on its post processing.
I would like to add two-point corretaion contours as part of my analysis but I have not tried or coded two-point correlation so far.
I wanted to know if it is possible to add two point correlation contours to my analysis based on the current avaiable data. (If it needs more simulation to do in-fly averaging, then likely I won't be able to do that because it needs a huge comutational demand).
Right now I have first and second order statistics and the averaged and instantaneous field.
I'd appreciate your guidance and help.
i am not sure exactly what you want, but I'll tell you what I usually do for simple cases.
1) You can gather the flow data at specific "points" in the flow domain ( like inserting probes , experimentally) and the data at the end of the simulation would look like arrays, having time history variation of velocity (all components ) and pressure, and any other quantity you are interested in. The CFD package you are using might have options to set this, before the simulation is run.
2) Once the simulation is done, get the data from the probes. (2 adjacent probes would be a good choice) and import the time history data of the quantity of interest (eg. u-velocity) into any mathematical package, like MATLAB.
3) so now you have 3 arrays - time (t), u-velocity at probe 1 (u1), u-velocity at probe 2 (u2).
In MATLAB, 2 point correlation is very simple and it has an inbuilt function.
So just do
x = xcorr(u1,u2).
the "xcorr" command does auto or cross correlation, depends on what you want.
Thank you very much for your reply. I am not using any package. I am using my own code.
What you said is totally true and working but in my case , the problem was that I did not set up the code to get the time history and I calculated the averages using on-fly method due to the very large amount of each snapshot (instead of saving snapshots). So, I was looking for any possible way that I may approximate the correlation based on averaged velocities (which seemingly does not exist).
but for my next runs, I will set up the probes to get time history as you said.
BTW, thank you very much for your reply.
I can understand that. I think saving the time history data for every few timesteps (instead of every time step, u can choose to save data every few time steps , in which you think the data variation would be significant) would save you from some of the size issues u are facing with large data.
Another advantage of having such a data is that it would help you to do many more postprocessing operations after the simulation is complete, for eg. you could apply a lot of statistical and signal processing techniques on a time history data , which can give you more insight into the flow features.( Fourier transforms, attenuation factors ..etc)
Also, I dont think computing correlations with averaged data is a great idea. Correlations performed on raw data can yield better and meaningful conclusions into the flow features.
|All times are GMT -4. The time now is 18:11.|