<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div><br data-mce-bogus="1"></div><div>Hi,<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div> 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?<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div> subroutine my_base_meshv(basev,h1,h2,rhs,msk,tmp)<br> include 'SIZE'<br> include 'TOTAL'<br> real basev(lx1,ly1,lz1,lelt),tmp(lx1,ly1,lz1,lelt)<br> real h1(1),h2(1),rhs(1),msk(1)<br> real m1,denom,volume(nx1*ny1*nz1*nelv)<br> integer e,f<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div> n = nx1*ny1*nz1*nelv<br> nxyz = nx1*ny1*nz1<br> <br> <br> do e=1,n<br> volume(e) = vlsum(bm1(e,1,1,1),nxyz)<br> enddo<br> a=glmax(volume,n)<br> b=glmin(volume,n) <br><br><br> <br> do i=1,n <br> denom = 1/a<br> h1(i) = ((1-(b/a))/(denom*volume(i)))<br> enddo<br> <br> <br> do i=1,n<br> open (unit=10,file="h.dat")<br> write (10,7020) h1(i),volume(i),a,b<br>7020 format(7f20.8)<br> enddo<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div> m1 = -1.<br> z0 = 0.<br> <br> nface = 2*ndim<br> do e=1,nelv<br> do f=1,nface<br><br>c Set Dirichlet for mesh velocity on all boundaries<br><br> if (cbc(f,e,1).ne.'E ') call facev(msk,e,f,z0,nx1,ny1,nz1)<br><br>c Inhomogeneous Dirichlet on cylinder only <br><br> if (cbc(f,e,1).eq.'mv ') then<br> call fcaver(xavg,xm1,e,f)<br> if (xavg.gt.-1.2) call facev(tmp,e,f,m1,nx1,ny1,nz1)<br> endif<br> enddo<br> enddo<br> call axhelm (rhs,tmp,h1,h2,1,1)<br><br> tol = 1.e-4<br> imsh = 1<br> ifield = 1<br> call hmholtz('mshv',basev,rhs,h1,h2,msk,vmult,imsh,tol,200,1)<br> call sub2(basev,tmp,n)<br><br>c call outpost(basev,basev,basev,basev,basev,' ')<br>c stop</div><div><br> return<br> end<br data-mce-bogus="1"></div></div></body></html>