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

Two point correlation

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

Like Tree4Likes
  • 1 Post By saeedi
  • 3 Post By atmcfd

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 7, 2012, 17:07
Default Two point correlation
  #1
Member
 
Mike
Join Date: Apr 2011
Location: Canada
Posts: 83
Rep Power: 14
saeedi is on a distinguished road
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.
Luttappy likes this.
saeedi is offline   Reply With Quote

Old   November 16, 2012, 20:34
Default
  #2
Senior Member
 
atmcfd's Avatar
 
ATM
Join Date: May 2009
Location: United States
Posts: 104
Rep Power: 16
atmcfd is on a distinguished road
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.
Luttappy, Aaron_L and em17 like this.
atmcfd is offline   Reply With Quote

Old   November 16, 2012, 23:01
Default
  #3
Member
 
Mike
Join Date: Apr 2011
Location: Canada
Posts: 83
Rep Power: 14
saeedi is on a distinguished road
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.
saeedi is offline   Reply With Quote

Old   November 16, 2012, 23:48
Default
  #4
Senior Member
 
atmcfd's Avatar
 
ATM
Join Date: May 2009
Location: United States
Posts: 104
Rep Power: 16
atmcfd is on a distinguished road
Quote:
Originally Posted by saeedi View Post
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.
atmcfd is offline   Reply With Quote

Reply

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
problem in toposet Ahmed Khattab OpenFOAM Pre-Processing 27 March 3, 2023 21:12
[blockMesh] error EOF in blockMesh Ahmed Khattab OpenFOAM Meshing & Mesh Conversion 7 May 17, 2012 00:37
block-structured mesh for t-junction Robert@cfd ANSYS Meshing & Geometry 20 November 11, 2011 04:59
[Gmsh] Gmsh and samplesurface touf OpenFOAM Meshing & Mesh Conversion 2 December 10, 2007 02:27
CFX4.3 -build analysis form Chie Min CFX 5 July 12, 2001 23:19


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