[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
Sun Jun 1 00:48:05 CDT 2014
Hi,Paul:
I modified this part of code in turbChannel.usr:
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.
call planar_average_s(yy ,ym1 ,w1,w2)
icalld = 1
endif
timel = time-0.02 !DT=0.02
dtime = time - timel
atime = atime + dtime
In this way, dtime=DT. I look into the code avg_all and find that it will write several files of avg fields. My question is:
1/ Is the average field file can be read into the solver when turn the 'Restart option' on, how can I accomplish this?
2/ For channel flow, I only need the file along y direction, so I need to dump the statistics into 1_D. If the answer of question is 'Yes', then I will want to output the avg fields(uavg,vavg and wavg). I find that in the avg_all subroutine, output2 and output are called, where are the two subroutine located?
At 2014-06-01 12:31:52, nek5000-users at lists.mcs.anl.gov wrote:
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
来自网易手机号码邮箱了解更多
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/nek5000-users/attachments/20140601/85d005d5/attachment-0001.html>
More information about the Nek5000-users
mailing list