[Nek5000-users] Stream function
nek5000-users at lists.mcs.anl.gov
nek5000-users at lists.mcs.anl.gov
Tue Jun 26 13:22:23 CDT 2018
Hi,
To correctly compute the stream function, the rhs of the Poisson
equation needs to be the (negative) vorticity. Therefore, the line
call col2(rhs,bm1,n)
is wrong, and should be something like
call col3(rhs, vorticity, bm1, n)
where vorticity should be the computed vorticity using comp_vort.
I guess your calculation of delta* only works for parallel boundary layers.
Philipp
On 2018-06-26 18:35, nek5000-users at lists.mcs.anl.gov wrote:
> Hi Phillip,
>
> I am using the “Blasius” example test outputting the streamfunction as a
> scalar.
>
> I included my code below. I am not sure what I am doing wrong.
>
> In userchk, I added “compute streamfunction from vorticity” from the
> psi_omega example, but it does not compute the psi properly… (max_psi =
> min_psi = 0 in every step)
>
> c-----------------------------------------------------------------------
>
> subroutine userchk
>
> include 'SIZE'
>
> include 'TOTAL'
>
> common /myblas/ ub(lx1,ly1,lz1,lelt),vb(lx1,ly1,lz1,lelt)
>
> common /blasiusr/ u(lx1,ly1,lz1,lelv),v(lx1,ly1,lz1,lelv)
>
> common /blasiusg/ bin(lx1,ly1,lz1,lelv)
>
> common /scrns/ dum(lx1*ly1*lz1*lelv)
>
> common /xtream/ psi(lx1*ly1*lz1*lelt)
>
> $ , rhs(lx1*ly1*lz1*lelt)
>
> $ , h1 (lx1*ly1*lz1*lelt)
>
> $ , h2 (lx1*ly1*lz1*lelt)
>
> integer bin
>
> real normu(50),normv(50)
>
> real xmax,xmin,dx
>
> save xmax,xmin,dx
>
> n = nx1*ny1*nz1*nelv
>
> c. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
>
> c Compute streamfunction from vorticity
>
> call col2(rhs,bm1,n)
>
> call rone (h1 ,n)
>
> call rzero(h2 ,n)
>
> tol = param(22)
>
> imsh = 1
>
> call hmholtz('psi ',psi,rhs,h1,h2,v1mask,vmult,imsh,tol,200,1)
>
> c. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
>
> if (istep.eq.0) call outpost(vx,vy,vz,pr,psi,' ')
>
> c Compute delta*
>
> do i=1,n
>
> dum(i) = 1.-vx(i,1,1,1)
>
> enddo
>
> tot_deficit = glsc2(dum,bm1,n)
>
> xmin = glmin(xm1,n)
>
> xmax = glmax(xm1,n)
>
> delta_star = tot_deficit/(xmax-xmin)
>
> psimin = glmin(psi,n)
>
> psimax = glmax(psi,n)
>
> if (nid.eq.0) write(6,1) istep,time,delta_star,psimin,psimax
>
> 1 format(i8,1p4e13.5,' blasius: delta*')
>
> return
>
> end
>
>
>
> _______________________________________________
> Nek5000-users mailing list
> Nek5000-users at lists.mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>
More information about the Nek5000-users
mailing list