[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
Mon Jun 23 09:35:22 CDT 2014


I think at the end of 'userchk' the 'timel = time' just needed to come  
after the 'endif' rather than before. Otherwise things seems to be  
fine, I guess.

Thanks
Azad


________________________________________
Thanks Azad --

so is it currently messed up?  Or was it messed up before?

(i.e., do I need to undo my recent change?)

Thanks!

Paul

________________________________________
From: nek5000-users-bounces at lists.mcs.anl.gov  
[nek5000-users-bounces at lists.mcs.anl.gov] on behalf of  
nek5000-users at lists.mcs.anl.gov [nek5000-users at lists.mcs.anl.gov]
Sent: Monday, June 23, 2014 8:20 AM
To: nek5000-users at lists.mcs.anl.gov
Subject: Re: [Nek5000-users] test of the time average of  
turbChannel--what's    wrong?

Hi Paul,

I just wanted to come back to this point as it seems the correction
regarding the turbchannel case in the new version of nek is quite sound;
though, the command "timel = time" seems to sit in a wrong position. To
what I understand it must appear after the 'if' statement with regards
the 'write' block to make sure the timel is saved correctly per
timestep.

Cheers
Azad

________________________________
Hi Xianbei,

You are correct that dtime should be equal to DT.   If you look at
avg_all() in navier5.f
in the main nek source directory, this is what happens because timel is
updated after
the averaging.  In the turbchannel case, this was not done - so I've now
modified the
.usr file to reflect this.  I would suggest to simply use the avg_all
code to do the
time averaging and then to use those average fields to generate
profiles.

Thanks for pointing out the problem with the turbChannel example.

Paul

________________________________
From: nek5000-users-bounces at lists.mcs.anl.gov [nek5000-users-bounces
at lists.mcs.anl.gov] on behalf of nek5000-users at lists.mcs.anl.gov
[nek5000-users at lists.mcs.anl.gov]
Sent: Saturday, May 31, 2014 10:38 PM
To: nek5000-users at lists.mcs.anl.gov
Subject: Re: [Nek5000-users] test of the time average of
turbChannel--what's wrong?


Hi Xianbei,

The usr files are meant to be modified by the users, so you can adjust
it to
suit your needs.

Paul

________________________________
From: nek5000-users-bounces at lists.mcs.anl.gov [nek5000-users-bounces
at lists.mcs.anl.gov] on behalf of nek5000-users at lists.mcs.anl.gov
[nek5000-users at lists.mcs.anl.gov]
Sent: Saturday, May 31, 2014 9:58 PM
To: Nek5000
Subject: [Nek5000-users] test of the time average of turbChannel--what's
wrong?

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


More information about the Nek5000-users mailing list