[Nek5000-users] Output of temperature gradient, scalar dissipation rate and convective flux

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Fri Sep 28 08:06:12 CDT 2012


Hi Paul,

seems to work:

      if ((mod(istep,iostep).eq.0).and.(istep.ge.iostep)) then
!-----Temperature gradient
        call gradm1(dtdx,dtdy,dtdz,t)

        do i=1,n

!-----Convective current
          velu=vz(i,1,1,1)
          uzt(i) = t(i,1,1,1,1)*velu

!-----Thermal dissipation epsT=(grad T)**2/sqrt(RaPr)
          gradt2=dtdx(i)**2+dtdy(i)**2+dtdz(i)**2
          epst(i)=gradt2*rapr

        enddo

!-------No pressure field, no scalar output
        ifpo=.false.
        ifto=.false.

        call outpost2(dtdx,dtdy,dtdz,pr,t,0,'gdt')
        call outpost2(   t, uzt,epsT,pr,t,0,'uzt')

        ifpo=.true.
        ifto=.true.

      endif

Best regards, Joerg.





> Hi Joerg,
> 
> You can set ifpo=.false. just before the call to outpost.  
> You can then turn it back on.
> 
> You can also output multiple passive scalars.  For this, however, you
> need to call outpost2(), which has a slightly different interface.
> Have a look at the source and hopefully it will be clear how to proceed
> if you wish to dump additional scalar fields in that way. 
> 
> For myself, I tend to just use outpost() and then insert whatever I need
> in the vx-vy-vz slots, coupled with different prefixes, as in the example
> below.
> 
> Paul
> 
> 
> ----- Original Message -----
> From: nek5000-users at lists.mcs.anl.gov
> To: nek5000-users at lists.mcs.anl.gov
> Sent: Friday, September 28, 2012 10:22:27 AM
> Subject: [Nek5000-users] Output of temperature gradient,	scalar
> dissipation rate and convective flux
> 
> Hi,
> 
> thanks for the following suggestion concerning our post processing
> where we need temperature gradients, scalar dissipation rate and
> convective heat fluxes:
> 
>      subroutine userchk
>         :
>      parameter (lt=lx1*ly1*lz1*lelt)
>      common /mygrad/ tx(lt),ty(lt),tz(lt)
>         :
>      if (mod(istep,iostep).eq.0) then ! , say,
>         call gradm1(tx,ty,tz,t)
>         call outpost(tx,ty,tz,pr,t,'gdt') ! write to gdtblah.f000...
>      endif
>         :
>      return
>      end
> 
> It has however one shortcoming, namely the unnecessary additional
> output of the pressure field which we don't need
> for this analysis.
> 
> As far as I can see when going down from the routine outpost -->
> outpost2 --> prepost  this is a fixed
> structure and the pressure field cannot be simply substituted by
> another scalar field (e.g. the scalar dissipation rate)
> since it might have a different dimension (e.g. in case of spaces
> Pn-Pn-2 which we are using).
> 
> --- Can this problem be solved without editing the routines prepost?  
> --- Is prepost_map inside prepost still necessary? 
> 
> Thanks, Joerg.
> _______________________________________________
> Nek5000-users mailing list
> Nek5000-users at lists.mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
> _______________________________________________
> 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