[Nek5000-users] Turbulent kinetic energy in TurbInflow example
nek5000-users at lists.mcs.anl.gov
nek5000-users at lists.mcs.anl.gov
Mon Jul 16 20:12:04 CDT 2018
Dear Neks,
In TurbInflow example there is a usr file for postprocessing where TKE is
calculated.
It says:
ccc avg all the avgturbInflow0.f0* files
call auto_averager(fname1)
ccc copy uk=vx**2, vk=vy**2, wk=vz**2
call col3(uk,vx,vx,lt)
call col3(vk,vy,vy,lt)
call col3(wk,vz,vz,lt)
ccc avg all the rmsturbInflow0.f0* files
call auto_averager(fname2)
ccc u'^2,v'^2,w'^2 = rms - avg**2
call sub2(vx,uk,lt)
call sub2(vy,vk,lt)
call sub2(vz,wk,lt)
ccc Average in thex direction
call my_x_avg(uk,vx,gs_avg_hndl,nelx,nely,nelz,ifld,rcmask)
call my_x_avg(vk,vy,gs_avg_hndl,nelx,nely,nelz,ifld,rcmask)
call my_x_avg(wk,vz,gs_avg_hndl,nelx,nely,nelz,ifld,rcmask)
ccc TKE = 0.5*(u'^2+v'^2+w'^2)
call add4(tk,uk,vk,wk,lt)
call cmult(tk,0.5,lt)
ccc sqrt uk,vk,wk to get urms, vrms and wrms
call vsqrt(uk,lt)
call vsqrt(vk,lt)
call vsqrt(wk,lt)
ccc output urms,vrms and wrms along with the TKE
ccc TKE is in temperature field
ifto = .true.
call outpost(uk,vk,wk,pr,tk,'avx')
As far as I know, the sub2 subroutine works like
sub2(A,B,lt)
A=A+B
That means, it saves the sum in the first argument.
The code says:
call sub2(vx,uk,lt)
call sub2(vy,vk,lt)
call sub2(vz,wk,lt)
Meaning that u'^2,v'^2,w'^2 is being stored in vx, vy, and vz.
So should the code say:.. ?
call add4(tk,vx,vy,vz,lt)
instead of
call add4(tk,uk,vk,wk,lt)
Or there is something I'm missing?
Thank you all.
Juan Pablo.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/nek5000-users/attachments/20180716/716c8e9b/attachment.html>
More information about the Nek5000-users
mailing list