# Two point correlation

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

 November 7, 2012, 18:07 Two point correlation #1 Member   Mohammad Saeedi Join Date: Apr 2011 Location: Canada Posts: 81 Rep Power: 7 Hi there, 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.

 November 16, 2012, 21:34 #2 Senior Member     ATM Join Date: May 2009 Location: United States Posts: 104 Rep Power: 9 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.

 November 17, 2012, 00:01 #3 Member   Mohammad Saeedi Join Date: Apr 2011 Location: Canada Posts: 81 Rep Power: 7 Hi there, 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.

November 17, 2012, 00:48
#4
Senior Member

ATM
Join Date: May 2009
Location: United States
Posts: 104
Rep Power: 9
Quote:
 Originally Posted by saeedi Hi there, 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.

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Ahmed Khattab OpenFOAM Pre-Processing 11 October 29, 2015 09:26 Ahmed Khattab OpenFOAM Meshing & Mesh Conversion 7 May 17, 2012 00:37 Robert@cfd ANSYS Meshing & Geometry 20 November 11, 2011 05:59 touf Open Source Meshers: Gmsh, Netgen, CGNS, ... 2 December 10, 2007 03:27 Chie Min CFX 5 July 12, 2001 23:19

All times are GMT -4. The time now is 06:44.