c----------------------------------------------------------------------- subroutine useric (ix,iy,iz,eg) include 'SIZE' include 'TOTAL' include 'NEKUSE' integer e,eg common /mydomain/ zlength,pipe_radius xr = x/pipe_radius yr = y/pipe_radius rr = xr*xr + yr*yr if (rr.gt.0) rr=sqrt(rr) th = atan2(y,x) zo = 2*pi*z/zlength ux=0.0 uy=0.0 uz=0.0 temp=0 uz=6.*(1-rr**6)/5. c Assign a wiggly shear layer near the wall amp_z = 0.35 ! Fraction of 2pi for z-based phase modification freq_z = 4 ! Number of wiggles in axial- (z-) direction freq_t = 9 ! Frequency of wiggles in azimuthal-direction amp_tht = 5 ! Amplification factor for clipped sine function amp_clip = 0.2 ! Clipped amplitude blt = 0.07 ! Fraction of boundary layer with momentum deficit phase_z = amp_z*(2*pi)*sin(freq_z*zo) arg_tht = freq_t*th + phase_z amp_sin = 5*sin(arg_tht) if (amp_sin.gt. amp_clip) amp_sin = amp_clip if (amp_sin.lt.-amp_clip) amp_sin = -amp_clip if (rr.gt.(1-blt)) uz = uz + amp_sin c Quick P-independent randomizer big = 1.e3*eg + 1.e2*ix + 1.e1*iy + 1.e0*iz rand = sin(big) uz = uz + .01*rand ux = ux + .05*rand*rand uy = uy + .10*rand*rand*rand return end c-----------------------------------------------------------------------