[Nek5000-users] Separate temperature perturbation field

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Wed May 9 16:44:43 CDT 2018


Dear Nicolas,


It looks like you need to declare eltot to be an integer -


Paul


________________________________
From: Nek5000-users <nek5000-users-bounces at lists.mcs.anl.gov> on behalf of nek5000-users at lists.mcs.anl.gov <nek5000-users at lists.mcs.anl.gov>
Sent: Wednesday, May 9, 2018 3:15:11 PM
To: nek5000-users at lists.mcs.anl.gov
Subject: [Nek5000-users] Separate temperature perturbation field

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/ce53f16a/attachment.html>


More information about the Nek5000-users mailing list