Hi, In order to make a smooth blending coefficient for mesh motion, I made a code below, it works fine for a 2D case in my computer but it does not work as expected for a 3D case (I run 3D case in server with 1024 pocessors). Could you please tell me is there anything wrong? (The error is the volume that i am getting is some wrong values i think) and is it right way to make Dirichlet B.C on boundaries also calling hmholtz function to make a blending velocity gradient? Because I took that part from the NEK example which is 2D. So do i have to change anything to make working in 3D? subroutine my_base_meshv(basev,h1,h2,rhs,msk,tmp) include 'SIZE' include 'TOTAL' real basev(lx1,ly1,lz1,lelt),tmp(lx1,ly1,lz1,lelt) real h1(1),h2(1),rhs(1),msk(1) real m1,denom,volume(nx1*ny1*nz1*nelv) integer e,f n = nx1*ny1*nz1*nelv nxyz = nx1*ny1*nz1 do e=1,n volume(e) = vlsum(bm1(e,1,1,1),nxyz) enddo a=glmax(volume,n) b=glmin(volume,n) do i=1,n denom = 1/a h1(i) = ((1-(b/a))/(denom*volume(i))) enddo do i=1,n open (unit=10,file="h.dat") write (10,7020) h1(i),volume(i),a,b 7020 format(7f20.8) enddo m1 = -1. z0 = 0. nface = 2*ndim do e=1,nelv do f=1,nface c Set Dirichlet for mesh velocity on all boundaries if (cbc(f,e,1).ne.'E ') call facev(msk,e,f,z0,nx1,ny1,nz1) c Inhomogeneous Dirichlet on cylinder only if (cbc(f,e,1).eq.'mv ') then call fcaver(xavg,xm1,e,f) if (xavg.gt.-1.2) call facev(tmp,e,f,m1,nx1,ny1,nz1) endif enddo enddo call axhelm (rhs,tmp,h1,h2,1,1) tol = 1.e-4 imsh = 1 ifield = 1 call hmholtz('mshv',basev,rhs,h1,h2,msk,vmult,imsh,tol,200,1) call sub2(basev,tmp,n) c call outpost(basev,basev,basev,basev,basev,' ') c stop return end
participants (1)
-
nek5000-users@lists.mcs.anl.gov