[Nek5000-users] Impose localized noise

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Tue Dec 7 04:05:02 CST 2010


There are two basic approaches:

1)  put the function directly into userf(), e.g.,

     ffx = your_function_x(x,y,z,time)
     ffy = your_function_y(x,y,z,time)
     ffz = your_function_z(x,y,z,time)

2)  Fill arrays  your_ffx, your_ffy, your_ffz in userchk and then
     dereference the arrays in userf(ix,iy,iz,eg) via:

       include 'SIZE'
       include 'TOTAL'
       common /your_arrays/ your_ffx(lx1,ly1,lz1,lelt)
      $                   , your_ffy(lx1,ly1,lz1,lelt)
      $                   , your_ffz(lx1,ly1,lz1,lelt)
       integer e,eg
       :
       :

       e = gllel(eg)
       ffx = your_ffx(ix,iy,iz,e)
       ffy = your_ffy(ix,iy,iz,e)
       ffz = your_ffz(ix,iy,iz,e)
       :
       return
       end

The latter is preferable if evaluation of ffx,ffy,ffz involves
nonlocal (i.e., non-pointwise) function evaluations such as
derivatives, etc.

NOTE:  Despite their names, ffx, ffy, and ffz are really
        _accelerations_  --- not forces.  They are later multiplied
        by rho.   (I always use rho=1, so this is not an issue...
        but beware, and verify...)

--Paul



On Tue, 7 Dec 2010, nek5000-users at lists.mcs.anl.gov wrote:

> Well, I would like to impose random noise in the whole domain (which I then
> localize in the present calculation through the use of a gaussian) at least
> for one time step. The aim is just to trigger transition from a steady state
> to another state.
>
> So it is indeed a function of space, and it may be a function of time also
> if I want zero mean noise but this is not necessary as I'd like to impose it
> just for a very few time steps.
>



More information about the Nek5000-users mailing list