[Nek5000-users] conjugate heat transfer with variable material properties

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Thu Oct 6 10:41:19 CDT 2016


Hey NEKS
I am trying to run the conj HT example with variable properties where the
density(param(1)), viscosity(param(2)), Cp(param(7)) and thermal
conductivity(param(8)) are all functions of temperature.
I have made functions for all of these in the .usr file. However, the
program blows up.
I am putting parts from the .usr file. please help

      subroutine uservp (ix,iy,iz,ieg)
      include 'SIZE'
      include 'TOTAL'
      include 'NEKUSE'

      if (ifield.eq.1) then
         param(1) = 298+(0.833/temp)
         param(2) = (-15.837*temp*temp)+(167.47*temp)+159.626
         utrans   = param(1)
         udiff    = param(2)

      else

         param(7) = param(1)*((1.61*temp*temp)+(0.973*temp)+29.176)
         param(8) = (-0.00177*temp*temp)+(0.0279*temp)+0.02479
         utrans   = param(7)        ! thermal properties
         udiff    = param(8)

         if (ieg .gt. nelgv) then  ! properties in the solid
            udiff   = 0.1*param(8) ! conductivity
            utrans  = 1.0
         endif

      endif

      return
      end
c-----------------------------------------------------------------------
      subroutine userf  (ix,iy,iz,ieg)
      include 'SIZE'
      include 'TOTAL'
      include 'NEKUSE'

      ffx = 0.0
      ffy = 0.0
      ffz = 0.0

      return
      end
c-----------------------------------------------------------------------
      subroutine userq  (ix,iy,iz,ieg)
      include 'SIZE'
      include 'TOTAL'
      include 'NEKUSE'

      qvol = 0.0
      if (ieg.gt.nelgv) qvol = 1.0

      return
      end
c-----------------------------------------------------------------------
      subroutine userbc (ix,iy,iz,iside,ieg)
c     NOTE ::: This subroutine MAY NOT be called by every process

C     Set boundary conditions

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

      ux   = 4.0
      uy   = 0.0
      uz   = 0.0
      TINF = 298.0
      temp = 1.0

      return
      end
c-----------------------------------------------------------------------
      subroutine useric (ix,iy,iz,ieg)

C     Set initial conditions

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

      ux   = 0.0
      uy   = 0.0
      uz   = 0.0
      temp = 0.0

      return
      end

Apoorva Vinayak Rudra
Graduate Research Assistant
Department of Chemical Engineering
City College of New York (CCNY)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/nek5000-users/attachments/20161006/596b1686/attachment.html>


More information about the Nek5000-users mailing list