<div dir="ltr"><div><div><div>Hi Xianbi,<br><br></div>You are right in defining the Reynolds Stresses. <br><br>However, if you look carefully, this is an example of fully developed turbulent Channel. Hence the statistics is independant of the x direction (streamwise). Also, the statistics is taken independant of z direction (no wall in z). x and z both have periodic BC. Hence before calculating R_uu, R_vv etc, we just do the spatial planar averaging in the xz plane. Since for homogeneous flow, that should equal an ensemble average. <br>
<br>You can modify the turbChannel to a non-homogeneous flow, in which case you can define Reynolds stresses just like you said, and they would spatially varying.<br><br></div>Thanks,<br></div>Tanmoy<br></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Thu, May 29, 2014 at 5:22 AM, <span dir="ltr"><<a href="mailto:nek5000-users@lists.mcs.anl.gov" target="_blank">nek5000-users@lists.mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<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)<div class=""><br><br> dragx_avg = alpha*dragx_avg + beta*0.5*(dragx(1)+dragx(2))<br><br></div> ! 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<div class=""><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></div> 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></div>
<br><pre><div class=""><br>At 2014-05-29 06:54:10, <a href="mailto:nek5000-users@lists.mcs.anl.gov" target="_blank">nek5000-users@lists.mcs.anl.gov</a></div> 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, <a href="mailto:nek5000-users@lists.mcs.anl.gov" target="_blank">nek5000-users@lists.mcs.anl.gov</a> wrote:
>
>> Hi,all:
> I read Paul's reply in this mail <a href="https://lists.mcs.anl.gov/mailman/htdig/nek5000-users/2014-May/002756.html" target="_blank">https://lists.mcs.anl.gov/mailman/htdig/nek5000-users/2014-May/002756.html</a><div>
<div class="h5">
> 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
><a href="mailto:Nek5000-users@lists.mcs.anl.gov" target="_blank">Nek5000-users@lists.mcs.anl.gov</a>
><a href="https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users" target="_blank">https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users</a>
</div></div></pre></div><br><br><span title="neteasefooter"><span><div><div style="border-top:#cccccc 1px solid;padding:10px 5px;font-size:12px;color:#666;line-height:22px">来自网易手机号码邮箱<a href="http://shouji.163.com" style="color:#0000ff" target="_blank">了解更多</a></div>
</div>
</span></span><br>_______________________________________________<br>
Nek5000-users mailing list<br>
<a href="mailto:Nek5000-users@lists.mcs.anl.gov">Nek5000-users@lists.mcs.anl.gov</a><br>
<a href="https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users" target="_blank">https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users</a><br>
<br></blockquote></div><br></div>