[Nek5000-users] Compute the derivatives

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Wed Jun 2 10:57:41 CDT 2010


Hi JC,

To dump the computed derivatives into separate field files you can use in 
userchk

        ifxyo = .true.  ! for cooordinates
        ifpo  = .false. ! turn off pressure output
        ifto  = .false. ! turn off pressure output
        call outpost(vxx,vxy,vxz,pr,t,'dvx')
        call outpost(vyx,vyy,vyz,pr,t,'dvy')
...

Best,
Aleks



On Wed, 2 Jun 2010, nek5000-users at lists.mcs.anl.gov wrote:

>
> dudxyz is somewhat dated and slow...
>
> I recommend somthing like:
>
>      parameter (lt=lx1*ly1*lz1*lelv)
>      common /mygrad/ vxx(lt),vxy(lt),vxz(lt)
>     $              , vyx(lt),vyy(lt),vyz(lt)
>     $              , vzx(lt),vzy(lt),vzz(lt)
>
>      call gradm1(vxx,vxy,vxz,vx)
>      call gradm1(vyx,vyy,vyz,vy)
>      call gradm1(vzx,vzy,vzz,vz)
>
> Note that putting these arrays into a common block, as
> shown, is a good idea for several reasons, one of which
> is that it guarantees that the data will be byte-aligned with the cache line. 
> On some machines (e.g., BG/P) this
> is crucial for proper functionality - for this reason we
> don't mix variable types in a given common block.
>
> If you subsequently wish to access elements of vxx etc.
> on an element-by-element basis you can of course do something
> like
>
>      parameter (lt=lx1*ly1*lz1)
>      common /mygrad/ vxx(lt,lelt),vxy(lt,lelt),vxz(lt,lelt)
>      :
>      :
>
> Paul
>
> On Wed, 2 Jun 2010, nek5000-users at lists.mcs.anl.gov wrote:
>
>> Hi Nek's,
>> 
>> I have a home-made global stability code, but in order to use it I first 
>> need to compute the derivatives of my base flow: dUdX, dUdY, dVdX, dVdY.
>> How could one compute these derivatives using Nek 5k and drop them along 
>> with X Y U V in the blah.f**** file (or perhaps another .f**** file) ? I 
>> assume I have to make use of the subroutine *dudxyz 
>> (du,u,rm1,sm1,tm1,jm1,imsh,isd)*, but I'm not sure what to put as inputs.
>> 
>> Regards,
>> JC
>> 
> _______________________________________________
> Nek5000-users mailing list
> Nek5000-users at lists.mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>



More information about the Nek5000-users mailing list