<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<div><br>
</div>
Hi Xianbei,
<div><br>
</div>
<div>You are correct that dtime should be equal to DT.   If you look at avg_all() in navier5.f </div>
<div>in the main nek source directory, this is what happens because timel is updated after</div>
<div>the averaging.  In the turbchannel case, this was not done - so I've now modified the</div>
<div>.usr file to reflect this.  I would suggest to simply use the avg_all code to do the </div>
<div>time averaging and then to use those average fields to generate profiles.</div>
<div><br>
</div>
<div>Thanks for pointing out the problem with the turbChannel example.</div>
<div><br>
</div>
<div>Paul</div>
<div><br>
</div>
<div>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div id="divRpF486616" style="direction: ltr;"><font face="Tahoma" size="2" color="#000000"><b>From:</b> nek5000-users-bounces@lists.mcs.anl.gov [nek5000-users-bounces@lists.mcs.anl.gov] on behalf of nek5000-users@lists.mcs.anl.gov [nek5000-users@lists.mcs.anl.gov]<br>
<b>Sent:</b> Saturday, May 31, 2014 10:38 PM<br>
<b>To:</b> nek5000-users@lists.mcs.anl.gov<br>
<b>Subject:</b> Re: [Nek5000-users] test of the time average of turbChannel--what's wrong?<br>
</font><br>
</div>
<div></div>
<div>
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">
<div><br>
</div>
Hi Xianbei,
<div><br>
</div>
<div>The usr files are meant to be modified by the users, so you can adjust it to </div>
<div>suit your needs.</div>
<div><br>
</div>
<div>Paul</div>
<div><br>
<div style="font-family:Times New Roman; color:#000000; font-size:16px">
<hr tabindex="-1">
<div id="divRpF746544" style="direction:ltr"><font face="Tahoma" size="2" color="#000000"><b>From:</b> nek5000-users-bounces@lists.mcs.anl.gov [nek5000-users-bounces@lists.mcs.anl.gov] on behalf of nek5000-users@lists.mcs.anl.gov [nek5000-users@lists.mcs.anl.gov]<br>
<b>Sent:</b> Saturday, May 31, 2014 9:58 PM<br>
<b>To:</b> Nek5000<br>
<b>Subject:</b> [Nek5000-users] test of the time average of turbChannel--what's wrong?<br>
</font><br>
</div>
<div></div>
<div>
<div style="line-height:1.7; color:#000000; font-size:14px; font-family:Arial">
<div>Hi, all:<br>
    I read about the time average method in the turbChannel.usr/userchk,here is the origin codes:<br>
    if(icalld.eq.0) then<br>
        call rzero(uavg,n)<br>
        call rzero(urms,n)<br>
        call rzero(vrms,n)<br>
        call rzero(wrms,n)<br>
        call rzero(uvms,n)<br>
        atime = 0.<br>
        timel = time<br>
        call planar_average_s(yy     ,ym1 ,w1,w2)<br>
        icalld = 1<br>
      endif<br>
<br>
      dtime = time - timel<br>
      atime = atime + dtime<br>
<br>
      if (atime.ne.0. .and. dtime.ne.0.) then<br>
        beta      = dtime/atime<br>
        alpha     = 1.-beta<br>
        ifverbose = .false.<br>
<br>
        call avg1(uavg,vx   ,alpha,beta,n,'uavg',ifverbose)<br>
<br>
As seen , atime and timel is initialized by 0 and time, so when time=time+DT, dtime=DT, atime=DT, so the first average value is vx(t=DT), when time=time+2*DT, dtime=2*DT(timel is not changed, just equal to the initial value ),atime=3*DT, here question comes:
 this will lead to vxmean(t=2*DT)=2/3*vx(t=DT)+1/3*vx(t=2*DT), this is not what we respect. The right one is make sure that dtime=DT all the time.<br>
<br>
Also, I do a test to verify this.In order to be more reliable, the velocity isn't nomorlized by u_tau. First, calculate by 1 step and output the means.dat, so the value equal to the time=DT's<br>
#time =  2.0000000E-02<br>
#  y     uup_tau    Umean<br>
  0.000000000E+00  2.031155153E-02  0.000000000E+00<br>
  2.565198406E-03  2.031155153E-02  1.285886819E-02<br>
then restart with the field from previous calculation and output the means.dat, this will output the value of time=2*DT's,
<br>
#time =  4.0000000E-02<br>
#  y     uup_tau    Umean<br>
  0.000000000E+00  2.072569248E-02  0.000000000E+00<br>
  2.565205097E-03  2.072569248E-02  1.288671376E-02<br>
At last, restart the calculation and run 2 steps to calculate the average of vx(time=DT) and vx(time=2*DT)<br>
#time =  4.0000000E-02<br>
#  y     uup_tau    Umean<br>
  0.000000000E+00  2.061649552E-02  0.000000000E+00<br>
  2.565198406E-03  2.061649552E-02  1.287524390E-02<br>
<br>
As can be seen, the 2 step average is almost equal to the average of step 1 and step 2. So what's wrong with my understanding? Is timel alway updated to the previous time and make sure that dtime=constant? How?<br>
Can anyone help?<br>
<br>
Xianbei<br>
<br>
<br>
</div>
</div>
<br>
<br>
<span title="neteasefooter"><span id="netease_mail_footer">
<div id="netease_mail_footer">
<div style="border-top:#CCCCCC 1px solid; padding:10px 5px; font-size:12px; color:#666; line-height:22px">
来自网易手机号码邮箱<a id="mobile_set" href="http://shouji.163.com" style="color:#0000FF" target="_blank">了解更多</a></div>
</div>
</span></span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>