c----------------------------------------------------------------------- C C USER SPECIFIED ROUTINES: C C - boundary conditions C - initial conditions C - variable properties C - local acceleration for fluid (a) C - forcing function for passive scalar (q) C - general purpose routine for checking errors etc. C c----------------------------------------------------------------------- subroutine uservp (ix,iy,iz,eg) include 'SIZE' include 'TOTAL' include 'NEKUSE' integer e,f,eg c e = gllel(eg) udiff =0. utrans=0. return end c----------------------------------------------------------------------- subroutine userf (ix,iy,iz,eg) include 'SIZE' include 'TOTAL' include 'NEKUSE' integer e,f,eg c e = gllel(eg) c Note: this is an acceleration term, NOT a force! c Thus, ffx will subsequently be multiplied by rho(x,t). ffx = 0.0 ffy = 0.0 ffz = 0.0 return end c----------------------------------------------------------------------- subroutine userq (ix,iy,iz,eg) include 'SIZE' include 'TOTAL' include 'NEKUSE' integer e,f,eg c e = gllel(eg) qvol = 0.0 source = 0.0 return end c----------------------------------------------------------------------- subroutine userchk include 'SIZE' include 'TOTAL' include 'NEKUSE' c write midslice contour call hpts() return end c----------------------------------------------------------------------- subroutine userbc (ix,iy,iz,iside,ieg) include 'SIZE' include 'TOTAL' include 'NEKUSE' xp = x/0.5 yp = (y-1.5)/0.5 zp = z rr = 0. rr1 = 0. rr = xp*xp + yp*yp if (rr.le.1.and.rr.ge.0) then rr1 = rr endif ux = 0.0 uy = 0.0 uz = 1 - rr1 ! Hagen-Poiseiulle flow, pipe diamter = 1. temp= 0.0 return end c----------------------------------------------------------------------- subroutine useric (ix,iy,iz,ieg) include 'SIZE' include 'TOTAL' include 'NEKUSE' open (unit = 34, file = "testdata.txt") xp = x/0.5 yp = (y-1.5)/0.5 zp = z rr = 0. rr1 = 0. rr = xp*xp + yp*yp if (rr.le.1.and.rr.ge.0) then rr1 = rr endif ux = 0.0 uy = 0.0 uz = 1 - rr1 ! Hagen-Poiseiulle flow, pipe diamter = 1. temp= 0.0 c print *, "Just for check!!:",yp,xp,z,rr1 c write(34,123) xp,yp,rr c 123 format (3(2X, F13.6)) close(34) return end c----------------------------------------------------------------------- subroutine usrdat include 'SIZE' include 'TOTAL' c return end c----------------------------------------------------------------------- subroutine usrdat3 include 'SIZE' include 'TOTAL' c return end c----------------------------------------------------------------------- subroutine usrdat2 include 'SIZE' include 'TOTAL' common /ogeom/ ox(lx1,ly1,lz1,lelv) $ , oy(lx1,ly1,lz1,lelv) $ , oz(lx1,ly1,lz1,lelv) diam = 1.0 one = 1. pi = 4.*atan(one) amp = 0.5000 Rcurv = 1.5 z0 = 0. z1 = pi*Rcurv call rescale_x (zm1,z0,z1) rad = diam/2. radm = -rad call rescale_x (xm1,radm,rad) call rescale_x (ym1,radm,rad) n = nx1*ny1*nz1*nelv call copy(ox,xm1,n) call copy(oy,ym1,n) call copy(oz,zm1,n) do i=1,n ! preset offset twist x = xm1(i,1,1,1) y = ym1(i,1,1,1) z = zm1(i,1,1,1) theta = z/Rcurv c = cos(theta) s = sin(theta) zm1(i,1,1,1) = (y + Rcurv)*sin(theta) ym1(i,1,1,1) = (y + Rcurv)*cos(theta) enddo param(59) = 1. ! All elements deformed ifxyo = .true. return end c-----------------------------------------------------------------------