Dear All,
I am computing the velocity gradient tensor on the fly, followed by a volume average. However, the components of the velocity gradient are all turning out to be zero, despite the flow being developed. Could you please advise on what I might be doing incorrectly? I have included the relevant code below.
I am using the subroutine lambda2(l2) in ./core/postpro.f as a reference.
Thank you in advance for your help.
Regards,
Bhargav
-------------------------------------------
subroutine userchk()
include 'SIZE'
include 'TOTAL'
parameter (lxyz=lx1*ly1*lz1)
real gije(lxyz,ldim,ldim)
real visc_dsp_l(lxyz,nelv)
real visc_dsp
nxyz = lx1*ly1*lz1
do e=1,nelv
!compute velocity gradient tensor
call comp_gije(gije(1,1,1),vx(1,1,1,e),vy(1,1,1,e),vz(1,1,1,e),e)
do i = 1,nxyz
visc_dsp_l(i,e) = 2.0*gije(i,1,1)**2 + 2.0*gije(i,2,2)**2
& + 2.0*gije(i,3,3)**2
& + (gije(i,1,2) + gije(i,2,1))*2
& + (gije(i,1,3) + gije(i,3,1))*2
& + (gije(i,2,3) + gije(i,3,2))*2
enddo
enddo
visc_dsp = glsc2(visc_dsp_l,bm1,n)
visc_dsp = visc_dsp/volvm1
return
end