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

How to calculate the Reynolds Stress using massive velocity-position data

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 17, 2018, 07:25
Default How to calculate the Reynolds Stress using massive velocity-position data
  #1
New Member
 
Matthew
Join Date: Aug 2017
Posts: 28
Rep Power: 8
zhangxc0223 is on a distinguished road
Hi, all. I am pretty new for this, so sorry for this stupid simple question.

Now I would like to plot the Reynolds stress (u'v’) for my jet flow on a certain cross section. I have totally 36000 groups of data that sampled from the cross section based on 100 time steps multiplied 360 radial lines, each group have the u, v, w velocity of 200 points on the radial line, i.e. totally I have a 200×36000 mat in MATLAB.

So my question is that how can I get the figure of Reynolds stress versus radial locations (u'v' versus r/D), as well as the turbulence intensity (u'u', v'v', w'w' versus r/D).

Really thanks for any suggestion.
zhangxc0223 is offline   Reply With Quote

Old   May 17, 2018, 07:38
Default
  #2
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,764
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by zhangxc0223 View Post
Hi, all. I am pretty new for this, so sorry for this stupid simple question.

Now I would like to plot the Reynolds stress (u'v’) for my jet flow on a certain cross section. I have totally 36000 groups of data that sampled from the cross section based on 100 time steps multiplied 360 radial lines, each group have the u, v, w velocity of 200 points on the radial line, i.e. totally I have a 200×36000 mat in MATLAB.

So my question is that how can I get the figure of Reynolds stress versus radial locations (u'v' versus r/D), as well as the turbulence intensity (u'u', v'v', w'w' versus r/D).

Really thanks for any suggestion.



First, you should compute the fluctuations. If you have data sampled along a sufficient time interval, you can first compute the time-averaged fields. Then use this field to compute the fluctuations at each time you have the sample. This way, you get the vector field v'(x,t) and then you can compute the Reynolds tensor. Usually, supplementary spatial averaging are used (for example in azimuthal direction) along with the time averaging.
FMDenaro is offline   Reply With Quote

Old   May 17, 2018, 18:05
Default
  #3
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,668
Rep Power: 65
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
You have u(x,y,z,t) v(x,y,z,t) and w(x,y,z,t) where (x,y,z) are coordinates or u(x,t), v(x,t), w(x,t) if you consider x the position vector.

Ok so for every x,y,z / x you average in time to get the mean velocities at each location. So you should have 360*200x3 average velocities. Since you have a 200x3600 matrix in matlab, you can probably accomplish this using
Code:
uMean = mean(u,1)
Now you need to get the u',v',w'. So at each of the (360*200) locations, you take u'(x,t)=u(x,t) - uMean(x). Of course in matlab the dimension of uMean is 1 less than u so it will throw a bug. You can fix it easily by say
Code:
uPrime = u - uMean(ones(200,1),:);
Then multiply the components and average in time to get the Reynolds sterss, which can be done in one line like so:

Code:
uu = mean(uPrime.*uPrime,1);
uv = mean(uPrime.*vPrime,1);
Note in matlab you need to give the . for element by element operations, otherwise it does the full matrix multiplication.

It really is as simple as these few lines of code. And then happy plotting.
LuckyTran is offline   Reply With Quote

Old   May 17, 2018, 23:18
Default
  #4
New Member
 
Matthew
Join Date: Aug 2017
Posts: 28
Rep Power: 8
zhangxc0223 is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
First, you should compute the fluctuations. If you have data sampled along a sufficient time interval, you can first compute the time-averaged fields. Then use this field to compute the fluctuations at each time you have the sample. This way, you get the vector field v'(x,t) and then you can compute the Reynolds tensor. Usually, supplementary spatial averaging are used (for example in azimuthal direction) along with the time averaging.
Quote:
Originally Posted by LuckyTran View Post
You have u(x,y,z,t) v(x,y,z,t) and w(x,y,z,t) where (x,y,z) are coordinates or u(x,t), v(x,t), w(x,t) if you consider x the position vector.
...
It really is as simple as these few lines of code. And then happy plotting.
Really thank you for your responses. but I am still struggling for plotting it. some more simple questions please.

1. The correct plots of u'u'_vs_x/D and u'v'_vs_x/D, and my plot are attached. It seems that my results are far away from the correct one. First issue is the y axis value, my value is normalized by Uc, the centre line axial velocity of the cross section of the jet. Is that correct?

2. For the plot of u'v'_vs_x/D, is the u'v' come from simply uPrime multiplying by vPrime? If so, how can the y axis value u'v'=0 at x=0, because both my uPrime and vPrime at x=0 are not 0.

Thanks again for your patient reply.
Attached Images
File Type: jpg ????_20180518123018.jpg (49.3 KB, 42 views)
File Type: jpg 12.jpg (30.7 KB, 34 views)
zhangxc0223 is offline   Reply With Quote

Old   May 18, 2018, 00:08
Default
  #5
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,668
Rep Power: 65
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
2. You still have to take the average in time.
LuckyTran is offline   Reply With Quote

Old   May 18, 2018, 00:43
Default
  #6
New Member
 
Matthew
Join Date: Aug 2017
Posts: 28
Rep Power: 8
zhangxc0223 is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
2. You still have to take the average in time.
Actually I have average the data both on time (100 timesteps) and space (360 radial lines). So is that means the time is not long enough for the data? Now the 100 time steps are extracted from 0.5 second for the flowing.

Cheers.
zhangxc0223 is offline   Reply With Quote

Old   May 18, 2018, 02:43
Default
  #7
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,764
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by zhangxc0223 View Post
Actually I have average the data both on time (100 timesteps) and space (360 radial lines). So is that means the time is not long enough for the data? Now the 100 time steps are extracted from 0.5 second for the flowing.

Cheers.



The time-averaging must be performed over a large interval. Considering the non-dimensional time unit using a characteristic integral time scale. you need to average over 20-30 time units.
I suggest to plot the time averaged velocity profiles
FMDenaro is offline   Reply With Quote

Old   February 10, 2020, 04:18
Default
  #8
New Member
 
ike
Join Date: Feb 2020
Posts: 4
Rep Power: 6
khattak is on a distinguished road
Hello, I am realitively new to matlab and couldnt figure out a script for my Reynolds Normal stresses. Can you please help me write the whole script.
khattak is offline   Reply With Quote

Old   February 10, 2020, 04:20
Default
  #9
New Member
 
ike
Join Date: Feb 2020
Posts: 4
Rep Power: 6
khattak is on a distinguished road
We are only given velocities in the x and y direction.
khattak is offline   Reply With Quote

Old   February 10, 2020, 13:23
Default
  #10
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,668
Rep Power: 65
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Quote:
Originally Posted by khattak View Post
Hello, I am realitively new to matlab and couldnt figure out a script for my Reynolds Normal stresses. Can you please help me write the whole script.

Did you check out post #3? You only need to add two lines, one for vMean and vPrime and maybe change the 1 to either a 2 (or 3) depending on what format your data actually is in.
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
[OpenFOAM] How to get the coordinates of velocity data at all cells and at all times vidyadhar ParaView 9 May 20, 2020 20:06
"Error in subroutine GETCORE": simulation of an turbine and reynolds stress models nikn CFX 8 October 30, 2019 15:32
Run OpenFoam in 2 nodes of a cluster WhiteW OpenFOAM Running, Solving & CFD 16 December 20, 2016 00:51
Help with UDF to calculate the bubble velocity for 2 phase gas enass massoud Fluent UDF and Scheme Programming 0 October 18, 2016 06:11
Combustion Convergence problems Art Stretton Phoenics 5 April 2, 2002 05:59


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