why the temp doen't update in the userf(ix,iy,iz,eg) function.

14 views
Skip to first unread message

Technical Forex

unread,
Jul 7, 2025, 12:28:11 AMJul 7
to Nek5000
      subroutine userf(ix,iy,iz,eg) ! set acceleration term
c     Note: this is an acceleration term, NOT a force!
c     Thus, ffx will subsequently be multiplied by rho(x,t).
      implicit none
      include 'SIZE'
      include 'TOTAL'
      include 'NEKUSE'
      integer ix,iy,iz,eg,e
      real T0,beta,g,Prr,Gr,bettaa
      real*8:: rho,dnu

c     rho=1.0 g(1-beta(T-T0))
      e = gllel(eg)
      rho    = param(1)
      dnu    = param(2)
      T0    = uparam(1)
      beta  = uparam(2)

      g     =  uparam(3)
      Prr    =  uparam(4)
      Gr    =  uparam(5)
      bettaa=Gr/(abs(g)/(dnu*dnu))
      ffx = 0.0
      ffy = g*(1.0-bettaa*(temp)-T0))
      ffz = 0.0
c      write(*,*) bettaa,Gr,ffy,temp,t(ix,iy,iz,e,1)
      return
      end
I am setting up a natural convection proglem, but i hfound that . the temp and ,t(ix,iy,iz,e,1) are different. the value temp doens't change with the iteration. 
could you please help me out.

Reply all
Reply to author
Forward
0 new messages