[Nek5000-users] Heat flux boundary condition

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Fri Nov 30 07:33:01 CST 2018


You need to have the discontinuous heat flux be  prescribed in a
discontinuous way.
This can be done by having element boundaries at precisely the start and
stop points
of the top hat region and then using a check to see if the element in
question is
within that region.

Below is a sample userbc routine that should work if the top hat region is
on (0,4)
and that you have prescribed "f  " BCs for temperature along the walls (or
a mixture
of "f   " and "I   ").    Note that "f   " with zero flux behaves the same
as "I  " (insulated).

hth, Paul

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

      subroutine userbc(i,j,k,f,eg) ! set up boundary conditions

c     NOTE:  This subroutine is not guaranteed to be called by each rank.

      include 'SIZE'

      include 'TOTAL'

      include 'NEKUSE'

      integer e,f,eg


      ux   = 0.0

      uy   = 0.0

      uz   = 1-4*(x*x+y*y)             ! Parabolic inflow for radius=0.5

      temp = 1.0                       ! Temperature at inlet


      e  = gllel(eg)

      zi = zm1(1,1,2,e)                ! Interior z location


      flux = 0.0                       ! Zero flux

      if (0.lt.zi.and.zi.lt.4) flux=1  ! Flux only on interior region


      return

      end

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



On Fri, Nov 30, 2018 at 7:04 AM nek5000-users--- via Nek5000-users <
nek5000-users at lists.mcs.anl.gov> wrote:

> Hi Neks,
>
>
> i am calculating a laminar pipe flow. The temperature boundary conditions
> are a fixed fluid temperature at the entrance and a constant wall heat flux
> over a short section in the middle oft the pipe. The remaining pipe wall is
> adiabatic. For the velocity field I assume periodic BCs.
>
> Because the given heat flux contour over the axial coordinate should be an
> ideal hat-function, I expected the temperature gradient to have the same
> contour.
>
> But when calculating the temperature gradient at the wall, the resulting
> temperature gradient contour doesn´t represent an ideal hat-function but a
> more rounded down contour.
>
> Now I am wondering, if Nek can not implement the given heat flux BC
> correctly. Did anybody have similar experiences?
>
>
> Thank you!
>
> Theresa
>
>
> _______________________________________________
> Nek5000-users mailing list
> Nek5000-users at lists.mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/nek5000-users/attachments/20181130/637fc82a/attachment.html>


More information about the Nek5000-users mailing list