<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>Hi,Paul:<br>     I'm confused about part of the subroutine userchk in turbChannel.usr<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>        call avg2(urms,vx   ,alpha,beta,n,'urms',ifverbose)<br>        call avg2(vrms,vy   ,alpha,beta,n,'vrms',ifverbose)<br>        call avg2(wrms,vz   ,alpha,beta,n,'wrms',ifverbose)<br>        call avg3(uvms,vx,vy,alpha,beta,n,'uvmm',ifverbose)<br><br>        dragx_avg = alpha*dragx_avg + beta*0.5*(dragx(1)+dragx(2))<br><br>        ! averaging over statistical homogeneous directions (r-t)<br>        call planar_average_s(uavg_pl,uavg,w1,w2)<br>        call planar_average_s(urms_pl,urms,w1,w2)<br>        call planar_average_s(vrms_pl,vrms,w1,w2)<br>        call planar_average_s(wrms_pl,wrms,w1,w2)<br>        call planar_average_s(uvms_pl,uvms,w1,w2)<br><br>        ! average over half the channel height<br>        m = ny1*nely<br>        do i=1,ny1*nely/2<br>           uavg_pl(i) = 0.5 * (uavg_pl(i) + uavg_pl(m-i+1))<br>           urms_pl(i) = 0.5 * (urms_pl(i) + urms_pl(m-i+1))<br>           vrms_pl(i) = 0.5 * (vrms_pl(i) + vrms_pl(m-i+1))<br>           wrms_pl(i) = 0.5 * (wrms_pl(i) + wrms_pl(m-i+1))<br>        enddo<br>      endif<br><br>      tw     = dragx_avg/A_w + 1.e-50<br>      u_tau  = sqrt(tw/rho)<br>      Re_tau = u_tau*delta/dnu<br><br>      diff   = (tw-ffx_new)/tw<br>      if(nid.eq.0) write(6,1) istep,time,e2,ffx_new,diff<br>    1              format(i6,1p4e17.9,' err2')<br><br>      ! write statistics to file<br>      iostep_avg = param(68)<br>      if(nid.eq.0 .and. istep.gt.0 .and. <br>     &   mod(istep,iostep_avg).eq.0) then<br>            write(6,*) 'Dumping statistics ...'<br>            open(unit=56,file='reystresses.dat')<br>            write(56,'(A,1pe14.7)') '#time = ', time<br>            write(56,'(A)')<br>     &      '#  y     y+     R_uu     R_vv     R_ww     R_uv'<br>            open(unit=57,file='means.dat')<br>            write(57,'(A,1pe14.7)') '#time = ', time<br>            write(57,'(A)')<br>     &      '#  y     y+    Umean'<br><br>            m = ny1*nely/2<br>            do i=1,m<br>                write(56,3) yy(i)+1<br>     &                     ,(yy(i)+1)*Re_tau <br>     &                     , (urms_pl(i)-(uavg_pl(i))**2)/u_tau**2<br>     &                     , vrms_pl(i)/u_tau**2<br>     &                     , wrms_pl(i)/u_tau**2<br>     &                     , uvms_pl(i)/u_tau**2<br>                write(57,3)  yy(i) + 1.<br>     &                     , (yy(i)+1.)*Re_tau <br>     &                     , uavg_pl(i)/u_tau<br>    3           format(1p15e17.9)<br>            enddo<br><br>            close(56)<br>            close(57)<br>      endif<br><br>      return<br>      end<br><br>I look into the code of navier5.f and find that avg1, avg2 returns the time average of vx and vx**2 in this example, so if we want to calculate the Reynolds stress, the formulation should be :<br>     R_uu=urms-uavg**2<br>also, if normalized,<br>     R_uu=(urms-uavg**2)/u_tau**2<br>so are the other components<br>I think this is the right way instead of that in the example<br></div><br><br><br><br><div></div><div id="divNeteaseMailCard"></div><br><pre><br>At 2014-05-29 06:54:10, nek5000-users@lists.mcs.anl.gov wrote:
>
>Hi Xianbei,
>
>You can define more objects by picking your
>own surface discriminators (which will 
>be dependent on your particular application).
>
>If you need more than 4 objects, you can increase maxobj
>in SIZE.
>
>Typically, dragx(0) would be the sum of the drag on all
>the objects --- this is sometimes useful.
>
>If you have (say) a 4-sided channel, you can just define
>one object instead of 4, and set it to be the collection
>of all faces for which cbc(f,e,1)='W  '.
>
>Paul
>
>
>
>On Thu, 29 May 2014, nek5000-users@lists.mcs.anl.gov wrote:
>
>> Hi,all:
>     I read Paul's reply in this mail https://lists.mcs.anl.gov/mailman/htdig/nek5000-users/2014-May/002756.html
>     And got to know something about objects. As you say, the object is a collection of faces, here , I have a question about the iboj, how could I know which face it represent with iboj? As in turbChannel.usr,
>      dragx_avg = alpha*dragx_avg + beta*0.5*(dragx(1)+dragx(2))
>      I think it means to do the time-average of the average dragx on planey1 and planey2, as
>      0.5*(dragx(1)+dragx(2))
>  indicates, while how to calculate the dragx on the planex1, planex2, planez1 and planez2? for the maxobj in this example is only 4 and dragx is defined as
>      dragx(0:maxobj)
>
>Thank you
>Xianbei
>_______________________________________________
>Nek5000-users mailing list
>Nek5000-users@lists.mcs.anl.gov
>https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
</pre></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" sys="1" log=1 logid="free_sms_20120504" href="http://shouji.163.com" target="_blank" style="color:#0000FF">了解更多</a></div></div>
</span></span>