[Nek5000-users] Problem with passive scalar fields - subroutine outfld

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Thu Mar 27 09:34:33 CDT 2014


Dear users and developers,

 

I'm simulating a 3D conjugate heat transfer case, considering
temperature as a passive scalar.

When I simulate only one temperature field everything is ok. 

If I add more passive scalar fields (each one identical to the first
one), after the subroutine prepost.f/outfld is called, then some of
these fields are not good.

I ran up to 8 additional fields, and results are the followings ("- -"
means that the field is not good):

ldimt     T              PS1         PS2         PS3         PS4
PS5         PS6         PS7         PS8

                1              ok

                2              ok           --

                3              ok           --             ok

                4              ok           --             ok
ok

                5              ok           --             --
--             ok

                6              ok           --             --
--             ok           ok

                7              ok           --             --
--             ok           ok           ok

                8              ok           --             --
--             ok           ok           ok           ok

                9              ok           --             --
--             ok           ok           ok           ok           ok

 

I'm using PN-PN.

Nothing changes with the number of mesh points or the number of steps or
the spatial polynomial order.

 

I saw differences with Visit, with mean temperature profiles, and with
average temperature in fluid and solid domain.

Differences are noticeable also in logfile. Consider the following
example, in which the first field file is dumped at step 250; at step
251 the changes are noticeable in the number of iterations per field
only for PS1, PS2 and PS3.

 

::

Step    250, t= 3.1936627E+00, DT= 1.0935650E-02, C=  0.571 7.8515E+01
2.6463E-01

             Solving for heat

        250    Hmholtz TEMP:     17   9.2949E-04   4.5939E-03
1.0000E-03

        250    Hmholtz PS 1:     17   9.2949E-04   4.5939E-03
1.0000E-03

        250    Hmholtz PS 2:     17   9.2949E-04   4.5939E-03
1.0000E-03

        250    Hmholtz PS 3:     17   9.2949E-04   4.5939E-03
1.0000E-03

        250    Hmholtz PS 4:     17   9.2949E-04   4.5939E-03
1.0000E-03

        250    Hmholtz PS 5:     17   9.2949E-04   4.5939E-03
1.0000E-03

        250    Hmholtz PS 6:     17   9.2949E-04   4.5939E-03
1.0000E-03

        250    Hmholtz PS 7:     17   9.2949E-04   4.5939E-03
1.0000E-03

        250    Hmholtz PS 8:     17   9.2949E-04   4.5939E-03
1.0000E-03

        250   3.1937E+00  2.0457E-01 Heat done

             Solving for fluid

::

call outfld: ifpsco: T

      250  3.1937E+00 Write checkpoint:

       0     250 OPEN: cjh_tc0.f00001

      250  3.1937E+00 done :: Write checkpoint

                              file size =      5.6    MB

                              avg data-throughput =   367.7MB/s

                              io-nodes =     1

Step    251, t= 3.2045983E+00, DT= 1.0935650E-02, C=  0.566 7.8809E+01
2.9378E-01

             Solving for heat

        251    Hmholtz TEMP:     17   8.3175E-04   4.6145E-03
1.0000E-03

        251    Hmholtz PS 1:     74   9.1166E-04   1.1888E+02
1.0000E-03

        251    Hmholtz PS 2:     85   9.4452E-04   9.1977E+02
1.0000E-03

        251    Hmholtz PS 3:     91   8.5561E-04   2.3562E+03
1.0000E-03

        251    Hmholtz PS 4:     17   8.3175E-04   4.6145E-03
1.0000E-03

        251    Hmholtz PS 5:     17   8.3175E-04   4.6145E-03
1.0000E-03

        251    Hmholtz PS 6:     17   8.3175E-04   4.6145E-03
1.0000E-03

        251    Hmholtz PS 7:     17   8.3175E-04   4.6145E-03
1.0000E-03

        251    Hmholtz PS 8:     17   8.3175E-04   4.6145E-03
1.0000E-03

        251   3.2046E+00  3.6832E-01 Heat done

::

 

Looking to the outfld subroutine I wasn't able to figure out the reason
for that.

Does anyone know how to solve this problem?

 

Thanks in advance.

 

Relevant parts of logfile, SIZE, .usr, .box and .rea files are attached
at the end of the mail.

 

Best Regards,

Donato

 

 

________________________________________________________________________
________

SIZE file

 

      parameter (ldimt= 9)                       ! passive scalars + T

 

 

________________________________________________________________________
________

*.box file

 

base.rea

3                      spatial dimension  ( < 0 --> generate .rea/.re2
pair)

10                     number of fields

#======

Box

-10   14   -5
nelx,nely,nelz for Box

0.  6. 1.                                                  x0,x1,gain

-1.00 -0.98 -0.94 -0.86 -0.70 -0.50 -0.25 -0.00 0.25

0.50 0.70 0.86 0.94 0.98 1.00                             y0,y1,...,yn

0.  3. 1.                                                  z0,z1,gain

P  ,P  ,W  ,W  ,P  ,P                                      vel BCs  

P  ,P  ,E  ,E  ,P  ,P                                      temp BCs  

P  ,P  ,E  ,E  ,P  ,P                                      PS1 BCs  

P  ,P  ,E  ,E  ,P  ,P                                      PS2 BCs  

P  ,P  ,E  ,E  ,P  ,P                                      PS3 BCs  

P  ,P  ,E  ,E  ,P  ,P                                      PS4 BCs  

P  ,P  ,E  ,E  ,P  ,P                                      PS5 BCs  

P  ,P  ,E  ,E  ,P  ,P                                      PS6 BCs  

P  ,P  ,E  ,E  ,P  ,P                                      PS7 BCs  

P  ,P  ,E  ,E  ,P  ,P                                      PS8 BCs  

Box_up

-10   7  -5
nelx,nely,nelz for Box_up

0.  6. 1.                                                  x0,x1,gain

1.00 1.02 1.06 1.14 1.30 1.50 1.75 2.00                    y0,y1,...,yn

0.  3. 1.                                                  z0,z1,gain

   ,   ,   ,   ,   ,                                       vel BCs  

P  ,P  ,I  ,E  ,P  ,P                                      temp  BCs 

P  ,P  ,I  ,E  ,P  ,P                                      PS1 BCs  

P  ,P  ,I  ,E  ,P  ,P                                      PS2 BCs  

P  ,P  ,I  ,E  ,P  ,P                                      PS3 BCs  

P  ,P  ,I  ,E  ,P  ,P                                      PS4 BCs  

P  ,P  ,I  ,E  ,P  ,P                                      PS5 BCs  

P  ,P  ,I  ,E  ,P  ,P                                      PS6 BCs  

P  ,P  ,I  ,E  ,P  ,P                                      PS7 BCs  

P  ,P  ,I  ,E  ,P  ,P                                      PS8 BCs  

Box_down

-10   7  -5
nelx,nely,nelz for Box_down

0.  6. 1.                                                  x0,x1,gain

-2.00 -1.75 -1.50 -1.30 -1.14 -1.06 -1.02 -1.00            y0,y1,...,yn

0.  3. 1.                                                  z0,z1,gain

   ,   ,   ,   ,   ,                                       vel BCs  

P  ,P  ,E  ,I  ,P  ,P                                      temp  BCs 

P  ,P  ,E  ,I  ,P  ,P                                      PS1 BCs  

P  ,P  ,E  ,I  ,P  ,P                                      PS2 BCs  

P  ,P  ,E  ,I  ,P  ,P                                      PS3 BCs  

P  ,P  ,E  ,I  ,P  ,P                                      PS4 BCs  

P  ,P  ,E  ,I  ,P  ,P                                      PS5 BCs  

P  ,P  ,E  ,I  ,P  ,P                                      PS6 BCs  

P  ,P  ,E  ,I  ,P  ,P                                      PS7 BCs  

P  ,P  ,E  ,I  ,P  ,P                                      PS8 BCs

 

 

________________________________________________________________________
________

logfile

 

103   Parameters

   1      1.00000         p1    DENSITY

   2     -2812.94         p2    Re_b

   7      1.00000         p7    RHOCP

   8      1.00000         p8    CONDUCT

  11      500.           p11   NSTEPS

  12      0.05            p12   DT

  15      250.           p15   IOSTEP

  21      1.000000E-06    p21   DIVERGENCE

  22      1.000000E-03    p22   HELMHOLTZ

  23     8              p23 NPSCAL

  24      0.100000E-01    p24   TOLREL

  25      0.100000E-01    p25   TOLABS

  26      0.50000         p26   TARGET COURANT NUMBER

  27      3.00000         p27   TORDER

  28      0.000000E+00    p28

  30      1.000000E+00    p30   1: user-def props via USERVP subr.

  52      1.              p52   if >1, history point dump frequency (in
steps)

  54      1.000000E+00    p54   direction of flow rate -- 1-X, 2-Y, 3-Z

  55      3.000E+00       p55   volumetric flow rate

  65      1.00000         p65

  66      0.00000         p66   write format

  67      0.00000         p67   read format

  68      1.              p68   iostep for avg_all (if ^= 0, else =
iostep)

  93      20.000          p93   if>0, # res-proj (adjust MXPREF in SIZEu
accordingly)

  94      5.00000         p94   if>0, start proj vel and p.s. after P094
steps

  95      5.00000         p95   if>0, start proj pressure after p095
steps

  99      4.000000E+00    p99   dealiasing

102      1.00000         p102  dump out divergence at each time step

  

 IFTRAN   = T

IFFLOW   = T

IFHEAT   = T

IFSPLIT  = T

IFLOMACH = F

IFUSERVP = T

IFUSERMV = F

IFSTRS   = F

IFCHAR   = F

IFCYCLIC = F

IFAXIS   = F

IFMVBD   = F

IFMELT   = F

IFMODEL  = F

IFKEPS   = F

IFMOAB   = F

IFNEKNEK = F

IFSYNC   = T

   

 IFVCOR   = T

IFINTQ   = F

IFCWUZ   = F

IFSWALL  = F

IFGEOM   = F

IFSURT   = F

IFWCNO   = F

   

 IFTMSH for field           1    =  F

IFADVC for field           1    =  T

IFNONL for field           1    =  F

   

 IFTMSH for field           2    =  T

IFADVC for field           2    =  T

IFNONL for field           2    =  F

   

 IFTMSH for field           3    =  T

IFADVC for field           3    =  T

IFNONL for field           3    =  F

   

 IFTMSH for field           4    =  T

IFADVC for field           4    =  T

IFNONL for field           4    =  F

   

 IFTMSH for field           5    =  T

IFADVC for field           5    =  T

IFNONL for field           5    =  F

   

 IFTMSH for field           6    =  T

IFADVC for field           6    =  T

IFNONL for field           6    =  F

   

 IFTMSH for field           7    =  T

IFADVC for field           7    =  T

IFNONL for field           7    =  F

   

 IFTMSH for field           8    =  T

IFADVC for field           8    =  T

IFNONL for field           8    =  F

   

 IFTMSH for field           9    =  T

IFADVC for field           9    =  T

IFNONL for field           9    =  F

   

 IFTMSH for field          10    =  T

IFADVC for field          10    =  T

IFNONL for field          10    =  F

   

 Dealiasing enabled, lxd=           6

 

 

 

________________________________________________________________________
________

*.rea file

 

  ***** OUTPUT FIELD SPECIFICATION *****

           5 SPECIFICATIONS FOLLOW

  T      COORDINATES

  T      VELOCITY

  T      PRESSURE

  T      TEMPERATURE

  F      TEMPERATURE GRADIENT

            8      PASSIVE SCALARS

  T PS 1

  T PS 2

  T PS 3

  T PS 4

  T PS 5

  T PS 6

  T PS 7

  T PS 8

 

 

 

________________________________________________________________________
________

*.usr file

 

      subroutine uservp (ix,iy,iz,ieg)

      include 'SIZE'

      include 'TOTAL'

      include 'NEKUSE'

 

      if (ifield.eq.1) then

 

         udiff  = param(2)         ! fluid kinematic viscosity

         utrans = param(1)         ! fluid density

 

         if (ieg .gt. nelgv) then  ! properties in the solid

            utrans  = param(1)     ! solid density

         endif

 

      else

 

         utrans  = param(7)        ! fluid rhocp

         udiff   = param(8)        ! fluid conductivity

 

         if (ieg .gt. nelgv) then  ! properties in the solid

            udiff   = param(8)     ! solid conductivity

            utrans  = param(7)     ! solid rhocp

         endif

 

      endif

 

      return

      end

c------------------------------------------

      subroutine userq  (ix,iy,iz,ieg)

      include 'SIZE'

      include 'TOTAL'

      include 'NEKUSE'

 

      qvol   = 1.

      if (ieg.gt.nelgv) qvol = -1.

 

      return

      end

c------------------------------------------

      subroutine userbc (ix,iy,iz,iside,ieg)

      include 'SIZE'

      include 'TOTAL'

      include 'NEKUSE'

 

      ux=0.0

      uy=0.0

      uz=0.0

 

      temp=0.0

 

      return

      end

c------------------------------------------

      subroutine useric (ix,iy,iz,ieg)

      include 'SIZE'

      include 'TOTAL'

      include 'NEKUSE'

 

      one  = 1.

      pi   = 4.*atan(one)

 

      ux = (9.*(1.-y**8))/8.-0.6283185307179586*Cos(x)*Sin(Pi*y)*Sin(z)

 

      uy = 0.1*(1. + Cos(Pi*y))*Sin(x)*Sin(z)

 

      uz = 0.3141592653589793*Cos(z)*Sin(x)*Sin(Pi*y)

 

      temp = 0.d0

 

      return

      end


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/nek5000-users/attachments/20140327/ef8583fb/attachment-0001.html>


More information about the Nek5000-users mailing list