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

PIV data analysis

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By LuckyTran

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 1, 2018, 07:46
Default PIV data analysis
  #1
New Member
 
aaa
Join Date: Feb 2018
Posts: 1
Rep Power: 0
Shrey is on a distinguished road
Please help me how to calculate two point velocity correlation in matlab . I have 16440 points with u and v velocity . these are for 350 time frames . I calculated
fluctation velocity component for all the point . But facing some problem in implementing correlation formula in matlab . Also I need to calculate integral length scale from the above correlation . Please help me . If someone has code can you please post it or explain me .
Shrey is offline   Reply With Quote

Old   March 7, 2018, 18:38
Default
  #2
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,674
Rep Power: 65
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
The formula is nothing special and you shouldn't have any issues. If you have u(nx,ny,ntime) and v(nx,ny,ntime) then you just do something like

Code:
for i=1:ntime
temp(i) = (u(:,:,i).*v(:,:,i))
end
Ruv = sum(temp,3)
This example is zero-shift example. Then you just repeatedly shift one of the matrices. Don't forget zero-padding. Finally you normalize it to get either the cross-covariance or cross-correlation depending on your needs.

But this brute force method is really slow and it is much faster to use the built-in matlab xcorr or conv which uses the fft ifft approach. I would still recommend to use the time-domain formula since 350 images is not many, you probably have tons of memory left, and its straightforward and will give you less headaches.

There's several ways to get the integral length scale. One is to just integrate the auto-correlation.

Both these are good exercises and I encourage you to discover the method to getting them on your own. You can ask specific questions but I would not give up and just ask for someone to give you the code (at least I won't). I think space & time-resolved techniques like PIV/LES/DNS are great tools but the user needs to be worthy of them.
loesung likes this.
LuckyTran 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
UDF value to large for defined data type Anna73 Fluent UDF and Scheme Programming 9 September 30, 2018 22:18
Data Analysis Using Wavelets harsha_kulkarni OpenFOAM Post-Processing 0 August 31, 2017 08:04
Importing terrain data for wind flow analysis lint STAR-CCM+ 3 March 19, 2014 14:31
Problem in running ICEM grid in Openfoam Tarak OpenFOAM 6 September 9, 2011 17:51
Writing profile data at transient heat transfer analysis Ama FLUENT 0 July 5, 2009 07:35


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