Hi Nek's.<div><br></div><div>I would like to use the following boundary condition as my outflow condition for the adjoint perturbation mode:</div><div><br></div><div>p = du/dz = dv/dz = 0</div><div>dw/dz = Re * Uz * uz</div>
<div><br></div><div>where Uz is the z-component of the base flow. I would be tempted to do something like:</div><div><br></div><div>subroutine usrchk</div><div><br></div><div>[...]</div><div>common /mygrad/ gradwx(lx1,ly1,lz1,lelt)</div>
<div> $ gradwy(lx1,ly1,lz1,lelt)</div><div> $ gradw(zlx1,ly1,lz1,lelt)</div><div><br></div><div>call gradm1(gradwx,gradwy,gradz,vz)</div><div><br></div><div>[...]</div><div>
<br></div><div>and then in userbc</div><div><br></div><div><span class="Apple-style-span" style="border-collapse: collapse; color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 13px; "> subroutine userbc (ix,iy,iz,iside,eg)<br>
include 'SIZE'<br> include 'TOTAL'<br> include 'NEKUSE'<br><br> common /mygrad/ gradwx(lx1,ly1,lz1,lelt)<br> $ , gradwy(lx1,ly1,lz1,lelt)<br> $ , gradwz(lx1,ly1,lz1,lelt)<br>
<br> integer e,eg<br><br> e = gllel(eg) ! global element number to processor-local el. #<br><br></span></div><div><span class="Apple-style-span" style="border-collapse: collapse; color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 13px; ">c Assuming param(2)<0 in .rea, Re = 1./param(2) since in connect2 or subs1 I do not remember there is first param(2) = -1/param(2)</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse; color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 13px; "><br> uz = (1./param(2)) * vz(ix,iy,iz,ie) * gradwz(ix,iy,iz,e)</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse; color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 13px; "><br></span></div><div><span class="Apple-style-span" style="border-collapse: collapse; color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 13px; ">However I am not sure how to handle the other boundary conditions on u, v and p.</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse; color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 13px; "><br></span></div><div><span class="Apple-style-span" style="border-collapse: collapse; color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 13px; ">Regards,</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse; color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 13px; ">JC</span></div><div><br></div><div>-- <br>Jean-Christophe<br>
</div>