[Nek5000-users] Separate temperature perturbation field

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Wed May 9 15:15:11 CDT 2018


Hello,

I'm working with teh effects of a local temperature perturbation in a
natural convection problem. To define the perturbations I intend to create
a separate field that will be added to the regular temperature field when
calculating the buoyancy force (ffz=Pr*(temp+temp_perturb)), but I'm having
troubles initializating and setting the values.

To build the field I added a common block in usric(), usrchk() and usrf()

    common /perturb/ temp_perturb(lx1,ly1,lz1,lelt,ldimt)

To initialize I tried to use rzero() as is used in avg_all():

      subroutine useric(ix,iy,iz,eg)

      integer ix,iy,iz,eg,eltot

      include 'SIZE'
      include 'TOTAL'
      include 'NEKUSE'

      common /perturb/ temp_perturb(lx1,ly1,lz1,lelt,ldimt)

      ux   = 0.0
      uy   = 0.0
      uz   = 0.0
      t    = 0.0

      eltot = lx1*ly1*lz1*nelt

      do i = 1,ldimt
          call rzero(temp_perturb(1,1,1,1,i),eltot)
      enddo

      return
      end

To generate the files, in usrchk()

      subroutine userchk()

      include 'SIZE'
      include 'TOTAL'

      integer e,eg

      common /perturb/ temp_perturb(lx1,ly1,lz1,lelt,ldimt)

      call outpost(vx,vy,vz,pr,temp_perturb,'pt1')
      call outpost2(vx,vy,vz,pr,temp_perturb,ldimt,'pt2')

      return
      end

But after running the simulation the temperature perturbation field is a
mess of NaNs and numbers of order 1e+38. Also, there's no other operation
with 'temp_perturb' in the .usr file.

Thanks in advance,

*Nicolás Andrés Órdenes Leiva*

Estudiante de Ingeniería Civil Mecánica
Universidad Técnica Federico Santa María
Tel: +56 9 7619 2857
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/nek5000-users/attachments/20180509/45a4a10d/attachment.html>


More information about the Nek5000-users mailing list