Hi,
I had a quick question. Do the cyclic boundary conditions, as implemented right now in Nek5000, also work for a completely arbitrary rotation in 3D, or only in 2D (i.e. around an axis)? We got confused because the main routine, rotate_cyc in navier1.f:
02648 nface = 2*ndim 02649 do e=1,nelfld(ifield) 02650 do f=1,nface 02651 02652 if(cbc(f,e,ifield) .eq. 'P '.or.cbc(f,e,ifield).eq.'p ')then 02653 02654 call facind2 (js1,jf1,jskip1,js2,jf2,jskip2,f) 02655 if (idir.eq.1) then 02656 k=0 02657 do j2=js2,jf2,jskip2 02658 do j1=js1,jf1,jskip1 02659 k=k+1 02660 02661 dotprod = unx(k,1,f,e)*ym1(j1,j2,1,e) 02662 $ -uny(k,1,f,e)*xm1(j1,j2,1,e) 02663 ifxy = .false. 02664 if (abs(unz(k,1,f,e)).lt.0.0001) ifxy = .true. 02665 02666 cost = unx(k,1,f,e) 02667 sint = uny(k,1,f,e) 02668 rnor = ( r1(j1,j2,1,e)*cost + r2(j1,j2,1,e)*sint ) 02669 rtn1 = (-r1(j1,j2,1,e)*sint + r2(j1,j2,1,e)*cost ) 02670 02671 if (ifxy.and.dotprod .ge. 0.0) then 02672 r1(j1,j2,1,e) = rnor 02673 r2(j1,j2,1,e) = rtn1 02674 elseif (ifxy) then 02675 r1(j1,j2,1,e) =-rnor 02676 r2(j1,j2,1,e) =-rtn1 02677 endif 02678 enddo 02679 enddo
seems to only do a 2D rotation. Or am I missing something? Essentially, we would like to map two completely arbitrary planes with each other.
Thanks,
philipp
Thanks Paul. Actually, the latest version of Nek has a slightly updated rotate_cyc routine, which always does the 2D rotation, but permits a potential error in z (I think). Let me think a bit more about our helical pipes then :-)
Best regards,
Philipp