<div dir="ltr">Hi <span style="font-size:12.8px">Sudhakar,</span><div><span style="font-size:12.8px">thank you for your reply. </span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">It seems to me that subroutine BCNEUSC is in charge of reading the "HC" value for all element faces withstanding  the "c  " boundary condition.</span></div><div><span style="font-size:12.8px">Nevertheless there is no info about how to Robin boundary condition is effectively implemented within the solver.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">May I ask you to give me some more suggestions, in order to implement such BC on a velocity component?</span></div><div><br></div><div><span style="font-size:12.8px">Best regards,</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Francesco</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-04-22 12:36 GMT+02:00  <span dir="ltr"><<a href="mailto:nek5000-users-request@lists.mcs.anl.gov" target="_blank">nek5000-users-request@lists.mcs.anl.gov</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send Nek5000-users mailing list submissions to<br>
        <a href="mailto:nek5000-users@lists.mcs.anl.gov">nek5000-users@lists.mcs.anl.<wbr>gov</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users" rel="noreferrer" target="_blank">https://lists.mcs.anl.gov/<wbr>mailman/listinfo/nek5000-users</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:nek5000-users-request@lists.mcs.anl.gov">nek5000-users-request@lists.<wbr>mcs.anl.gov</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:nek5000-users-owner@lists.mcs.anl.gov">nek5000-users-owner@lists.mcs.<wbr>anl.gov</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Nek5000-users digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. Robin boundary condition on velocity<br>
      (<a href="mailto:nek5000-users@lists.mcs.anl.gov">nek5000-users@lists.mcs.anl.<wbr>gov</a>)<br>
   2. Re: Robin boundary condition on velocity<br>
      (<a href="mailto:nek5000-users@lists.mcs.anl.gov">nek5000-users@lists.mcs.anl.<wbr>gov</a>)<br>
<br>
<br>
------------------------------<wbr>------------------------------<wbr>----------<br>
<br>
Message: 1<br>
Date: Fri, 21 Apr 2017 20:35:23 +0200<br>
From: <a href="mailto:nek5000-users@lists.mcs.anl.gov">nek5000-users@lists.mcs.anl.<wbr>gov</a><br>
To: <a href="mailto:nek5000-users@lists.mcs.anl.gov">nek5000-users@lists.mcs.anl.<wbr>gov</a><br>
Subject: [Nek5000-users] Robin boundary condition on velocity<br>
Message-ID:<br>
        <<a href="mailto:mailman.5414.1492799726.2967.nek5000-users@lists.mcs.anl.gov">mailman.5414.1492799726.2967.<wbr>nek5000-users@lists.mcs.anl.<wbr>gov</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hi Neks<br>
I'm trying to implement a slip-length (Robin) as boundary condition for a<br>
plane channel flow, namely:<br>
(u+du/dy)_{wall}=0<br>
where x and y are the streamwise and wall normal directions respectively.<br>
<br>
Following the latter post:<br>
<a href="http://lists.mcs.anl.gov/pipermail/nek5000-users/2011-April/001313.html" rel="noreferrer" target="_blank">http://lists.mcs.anl.gov/<wbr>pipermail/nek5000-users/2011-<wbr>April/001313.html</a><br>
<br>
here there's what I came up with:<br>
<br>
c-----------------------------<wbr>------------------------------<wbr>------------<br>
      subroutine userchk<br>
      include 'SIZE'<br>
      include 'TOTAL'<br>
      common /my_DEBUG/ rmodulate<br>
      common /my_ROBIN/ ROBIN_mask(lx1,ly1,lz1,lelt)<br>
     $                ,      work1(lx1,ly1,lz1,lelt)<br>
     $                ,      work2(lx1,ly1,lz1,lelt)<br>
     $                ,     graduy(lx1,ly1,lz1,lelt)<br>
      n = nx1*ny1*nz1*nelv<br>
!!!Build Up MASKS!<br>
      if (istep.eq.0) then<br>
        do i=1,n<br>
          x=xm1(i,1,1,1)<br>
          y=ym1(i,1,1,1)<br>
          if(x.gt.3.and.x.lt.4)then<br>
            ROBIN_mask(i,1,1,1)=1.0<br>
          else<br>
            ROBIN_mask(i,1,1,1)=0.0<br>
          endif<br>
        enddo<br>
      endif<br>
!Compute velocity gradient<br>
      call rzero(graduy,n)<br>
      call gradm1(work1,graduy,work2,vx)<br>
      call dsavg(graduy)<br>
!      call outpost(work1,graduy,work2,pr,<wbr>t,'GRD')<br>
!Da aggiungere l'eventualit? del 3D...<br>
       rmodulate = 0.5*(tanh(0.25*time-10)+1)<br>
      if (nid.eq.0) write(6,*)"MODULATE", rmodulate,time<br>
      return<br>
      end<br>
c-----------------------------<wbr>------------------------------<wbr>------------<br>
c-----------------------------<wbr>------------------------------<wbr>------------<br>
      subroutine userbc (ix,iy,iz,iside,eg)<br>
c     NOTE ::: This subroutine MAY NOT be called by every process<br>
      include 'SIZE'<br>
      include 'TOTAL'<br>
      include 'NEKUSE'<br>
      integer e, eg<br>
!Imposing Fancy Boundary Conditions...<br>
![Nek5000-users] Robin boundary conditions for the velocity<br>
      common /my_ROBIN/ ROBIN_mask(lx1,ly1,lz1,lelt)<br>
     $                ,      work1(lx1,ly1,lz1,lelt)<br>
     $                ,      work2(lx1,ly1,lz1,lelt)<br>
     $                ,     graduy(lx1,ly1,lz1,lelt)<br>
      common /my_DEBUG/ rmodulate<br>
      e=gllel(eg) ! global element number to processor-local el. #<br>
      ux=1*graduy(ix,iy,iz,e)*<wbr>rmodulate<br>
      uy=0.0<br>
      uz=0.0<br>
      return<br>
      end<br>
c-----------------------------<wbr>------------------------------<wbr>------------<br>
      subroutine useric (ix,iy,iz,ieg)<br>
      include 'SIZE'<br>
      include 'TOTAL'<br>
      include 'NEKUSE'<br>
      ux=1.0*y**2<br>
      uy=0.0<br>
      uz=0.0<br>
      temp=0<br>
      return<br>
      end<br>
c-----------------------------<wbr>------------------------------<wbr>------------<br>
<br>
The code becomes unstable in the gradient computation due to some<br>
point-to-point oscillations.<br>
As you can see I've also tried to use a ramp function in order to make the<br>
onset of Robin condition more gentle,<br>
but at a given "slip-length amplitude" oscillations deteriorates the<br>
solution.<br>
I use ROBIN_mask in order to chose where to have such BC, but it seems that<br>
I'm still missing something in computing the velocity gradient GRD.<br>
<br>
By the way, this is my box.BOX file:<br>
<br>
base.rea<br>
2                      spatial dimension  ( < 0 --> generate .rea/.re2 pair)<br>
1                      number of fields<br>
#=============================<wbr>==============================<wbr>============<br>
#<br>
#    Example of .box file for channel flow<br>
#<br>
#    If nelx (y or z) < 0, then genbox automatically generates the<br>
#                          grid spacing in the x (y or z) direction<br>
#                          with a geometric ratio given by "ratio".<br>
#                          ( ratio=1 implies uniform spacing )<br>
#<br>
#    Note that the character bcs _must_ have 3 spaces.<br>
#<br>
#=============================<wbr>==============================<wbr>============<br>
#<br>
Box<br>
-32  -16                                          nelx,nely,nelz for Box<br>
0  6.2832 1.                                       x0,x1,gain<br>
-1  1        1.                                       y0,y1,gain<br>
P  ,P  ,v  ,v  ,   ,                                bc's  (3 chars each!)<br>
<br>
<br>
I was wondering if you might be able to give me some advice.<br>
<br>
Best regards,<br>
<br>
Francesco<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.mcs.anl.gov/pipermail/nek5000-users/attachments/20170421/fcdeceb5/attachment-0001.html" rel="noreferrer" target="_blank">http://lists.mcs.anl.gov/<wbr>pipermail/nek5000-users/<wbr>attachments/20170421/fcdeceb5/<wbr>attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Sat, 22 Apr 2017 12:35:45 +0200<br>
From: <a href="mailto:nek5000-users@lists.mcs.anl.gov">nek5000-users@lists.mcs.anl.<wbr>gov</a><br>
To: <a href="mailto:nek5000-users@lists.mcs.anl.gov">nek5000-users@lists.mcs.anl.<wbr>gov</a><br>
Subject: Re: [Nek5000-users] Robin boundary condition on velocity<br>
Message-ID:<br>
        <<a href="mailto:mailman.5458.1492857360.2967.nek5000-users@lists.mcs.anl.gov">mailman.5458.1492857360.2967.<wbr>nek5000-users@lists.mcs.anl.<wbr>gov</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hi Francesco,<br>
<br>
Robin boundary condition is implemented already for the passive scalar, in the form of Newton cooling boundary condition. You can see how this is implemented in subroutine BCNEUSC. In your case ITYPE=-1 and CB=?c  ' in the subroutine, and you need to only set ?HC? accordingly. We tested this and even our turbulent simulations are stable with Robin BC.<br>
<br>
Best regards,<br>
Sudhakar.<br>
<br>
> On 21 Apr 2017, at 20:35, <a href="mailto:nek5000-users@lists.mcs.anl.gov">nek5000-users@lists.mcs.anl.<wbr>gov</a> wrote:<br>
><br>
> Hi Neks<br>
> I'm trying to implement a slip-length (Robin) as boundary condition for a plane channel flow, namely:<br>
> (u+du/dy)_{wall}=0<br>
> where x and y are the streamwise and wall normal directions respectively.<br>
><br>
> Following the latter post:<br>
> <a href="http://lists.mcs.anl.gov/pipermail/nek5000-users/2011-April/001313.html" rel="noreferrer" target="_blank">http://lists.mcs.anl.gov/<wbr>pipermail/nek5000-users/2011-<wbr>April/001313.html</a> <<a href="http://lists.mcs.anl.gov/pipermail/nek5000-users/2011-April/001313.html" rel="noreferrer" target="_blank">http://lists.mcs.anl.gov/<wbr>pipermail/nek5000-users/2011-<wbr>April/001313.html</a>><br>
><br>
> here there's what I came up with:<br>
><br>
> c-----------------------------<wbr>------------------------------<wbr>------------<br>
>       subroutine userchk<br>
>       include 'SIZE'<br>
>       include 'TOTAL'<br>
>       common /my_DEBUG/ rmodulate<br>
>       common /my_ROBIN/ ROBIN_mask(lx1,ly1,lz1,lelt)<br>
>      $                ,      work1(lx1,ly1,lz1,lelt)<br>
>      $                ,      work2(lx1,ly1,lz1,lelt)<br>
>      $                ,     graduy(lx1,ly1,lz1,lelt)<br>
>       n = nx1*ny1*nz1*nelv<br>
> !!!Build Up MASKS!<br>
>       if (istep.eq.0) then<br>
>         do i=1,n<br>
>           x=xm1(i,1,1,1)<br>
>           y=ym1(i,1,1,1)<br>
>           if(x.gt.3.and.x.lt.4)then<br>
>             ROBIN_mask(i,1,1,1)=1.0<br>
>           else<br>
>             ROBIN_mask(i,1,1,1)=0.0<br>
>           endif<br>
>         enddo<br>
>       endif<br>
> !Compute velocity gradient<br>
>       call rzero(graduy,n)<br>
>       call gradm1(work1,graduy,work2,vx)<br>
>       call dsavg(graduy)<br>
> !      call outpost(work1,graduy,work2,pr,<wbr>t,'GRD')<br>
> !Da aggiungere l'eventualit? del 3D...<br>
>        rmodulate = 0.5*(tanh(0.25*time-10)+1)<br>
>       if (nid.eq.0) write(6,*)"MODULATE", rmodulate,time<br>
>       return<br>
>       end<br>
> c-----------------------------<wbr>------------------------------<wbr>------------<br>
> c-----------------------------<wbr>------------------------------<wbr>------------<br>
>       subroutine userbc (ix,iy,iz,iside,eg)<br>
> c     NOTE ::: This subroutine MAY NOT be called by every process<br>
>       include 'SIZE'<br>
>       include 'TOTAL'<br>
>       include 'NEKUSE'<br>
>       integer e, eg<br>
> !Imposing Fancy Boundary Conditions...<br>
> ![Nek5000-users] Robin boundary conditions for the velocity<br>
>       common /my_ROBIN/ ROBIN_mask(lx1,ly1,lz1,lelt)<br>
>      $                ,      work1(lx1,ly1,lz1,lelt)<br>
>      $                ,      work2(lx1,ly1,lz1,lelt)<br>
>      $                ,     graduy(lx1,ly1,lz1,lelt)<br>
>       common /my_DEBUG/ rmodulate<br>
>       e=gllel(eg) ! global element number to processor-local el. #<br>
>       ux=1*graduy(ix,iy,iz,e)*<wbr>rmodulate<br>
>       uy=0.0<br>
>       uz=0.0<br>
>       return<br>
>       end<br>
> c-----------------------------<wbr>------------------------------<wbr>------------<br>
>       subroutine useric (ix,iy,iz,ieg)<br>
>       include 'SIZE'<br>
>       include 'TOTAL'<br>
>       include 'NEKUSE'<br>
>       ux=1.0*y**2<br>
>       uy=0.0<br>
>       uz=0.0<br>
>       temp=0<br>
>       return<br>
>       end<br>
> c-----------------------------<wbr>------------------------------<wbr>------------<br>
><br>
> The code becomes unstable in the gradient computation due to some point-to-point oscillations.<br>
> As you can see I've also tried to use a ramp function in order to make the onset of Robin condition more gentle,<br>
> but at a given "slip-length amplitude" oscillations deteriorates the solution.<br>
> I use ROBIN_mask in order to chose where to have such BC, but it seems that I'm still missing something in computing the velocity gradient GRD.<br>
><br>
> By the way, this is my box.BOX file:<br>
><br>
> base.rea<br>
> 2                      spatial dimension  ( < 0 --> generate .rea/.re2 pair)<br>
> 1                      number of fields<br>
> #=============================<wbr>==============================<wbr>============<br>
> #<br>
> #    Example of .box file for channel flow<br>
> #<br>
> #    If nelx (y or z) < 0, then genbox automatically generates the<br>
> #                          grid spacing in the x (y or z) direction<br>
> #                          with a geometric ratio given by "ratio".<br>
> #                          ( ratio=1 implies uniform spacing )<br>
> #<br>
> #    Note that the character bcs _must_ have 3 spaces.<br>
> #<br>
> #=============================<wbr>==============================<wbr>============<br>
> #<br>
> Box<br>
> -32  -16                                          nelx,nely,nelz for Box<br>
> 0  6.2832 1.                                       x0,x1,gain<br>
> -1  1        1.                                       y0,y1,gain<br>
> P  ,P  ,v  ,v  ,   ,                                bc's  (3 chars each!)<br>
><br>
><br>
> I was wondering if you might be able to give me some advice.<br>
><br>
> Best regards,<br>
><br>
> Francesco<br>
> ______________________________<wbr>_________________<br>
> Nek5000-users mailing list<br>
> <a href="mailto:Nek5000-users@lists.mcs.anl.gov">Nek5000-users@lists.mcs.anl.<wbr>gov</a><br>
> <a href="https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users" rel="noreferrer" target="_blank">https://lists.mcs.anl.gov/<wbr>mailman/listinfo/nek5000-users</a><br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.mcs.anl.gov/pipermail/nek5000-users/attachments/20170422/42c96cbe/attachment.html" rel="noreferrer" target="_blank">http://lists.mcs.anl.gov/<wbr>pipermail/nek5000-users/<wbr>attachments/20170422/42c96cbe/<wbr>attachment.html</a>><br>
<br>
------------------------------<br>
<br>
______________________________<wbr>_________________<br>
Nek5000-users mailing list<br>
<a href="mailto:Nek5000-users@lists.mcs.anl.gov">Nek5000-users@lists.mcs.anl.<wbr>gov</a><br>
<a href="https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users" rel="noreferrer" target="_blank">https://lists.mcs.anl.gov/<wbr>mailman/listinfo/nek5000-users</a><br>
<br>
<br>
End of Nek5000-users Digest, Vol 98, Issue 10<br>
******************************<wbr>***************<br>
</blockquote></div><br></div>