[Nek5000-users] test of the time average of turbChannel--what's wrong?

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Sat May 31 22:28:43 CDT 2014


By the way, I output the beta and alpha at time=2*DT,
#time =  4.0000000E-02
#  y     alpha    Umean

  0.000000000E+00  3.333333333E-01  0.000000000E+00
#time =  4.0000000E-02
#  y     beta     R_uu     R_vv     R_ww     R_uv
  0.000000000E+00  6.666666667E-01  0.000000000E+00  0.000000000E+00  0.000000000E+00  0.000000000E+00


Here, alpha=1/3 and beta=2/3, just as I mentioned before.





在 2014-06-01 10:58:25,nek5000-users at lists.mcs.anl.gov 写道:

Hi, all:
    I read about the time average method in the turbChannel.usr/userchk,here is the origin codes:
    if(icalld.eq.0) then
        call rzero(uavg,n)
        call rzero(urms,n)
        call rzero(vrms,n)
        call rzero(wrms,n)
        call rzero(uvms,n)
        atime = 0.
        timel = time
        call planar_average_s(yy     ,ym1 ,w1,w2)
        icalld = 1
      endif

      dtime = time - timel
      atime = atime + dtime

      if (atime.ne.0. .and. dtime.ne.0.) then
        beta      = dtime/atime
        alpha     = 1.-beta
        ifverbose = .false.

        call avg1(uavg,vx   ,alpha,beta,n,'uavg',ifverbose)

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.

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
#time =  2.0000000E-02
#  y     uup_tau    Umean
  0.000000000E+00  2.031155153E-02  0.000000000E+00
  2.565198406E-03  2.031155153E-02  1.285886819E-02
then restart with the field from previous calculation and output the means.dat, this will output the value of time=2*DT's,
#time =  4.0000000E-02
#  y     uup_tau    Umean
  0.000000000E+00  2.072569248E-02  0.000000000E+00
  2.565205097E-03  2.072569248E-02  1.288671376E-02
At last, restart the calculation and run 2 steps to calculate the average of vx(time=DT) and vx(time=2*DT)
#time =  4.0000000E-02
#  y     uup_tau    Umean
  0.000000000E+00  2.061649552E-02  0.000000000E+00
  2.565198406E-03  2.061649552E-02  1.287524390E-02

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?
Can anyone help?

Xianbei






来自网易手机号码邮箱了解更多
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/nek5000-users/attachments/20140601/b7b0b74b/attachment.html>


More information about the Nek5000-users mailing list