[Nek5000-users] Robin boundary conditions for the velocity
nek5000-users at lists.mcs.anl.gov
nek5000-users at lists.mcs.anl.gov
Thu Apr 21 13:36:39 CDT 2011
Hi Jean-Christophe,
Sorry for the delay with the reply to your emails -- we are looking into them and will give a detailed answer next week.
Thanks,
Aleks
----- Original Message -----
From: nek5000-users at lists.mcs.anl.gov
To: "Nek 5000" <nek5000-users at lists.mcs.anl.gov>
Sent: Wednesday, April 20, 2011 9:03:03 AM
Subject: Re: [Nek5000-users] Robin boundary conditions for the velocity
I actually miswrote my boundary conditions. What I want to impose is:
(U.n) u + (p * IdentityMatrix + inv(Re) * grad(u)) . n = 0
that is, if n = (0,0,1)^T = ez:
p = 0
dux/dz = Re * W * ux
duy/dz = Re * W * uy
duz/dz = Re * W * uz
Concerning the velocity bc, I assume once again that the following code would do the trick:
subroutine usrchk
[...]
common /mygrad/ gradux(lx1,ly1,lz1,lelt), ... , gradwz(lx1,ly1,lz1,lelt)
call gradm1(graduv,graduy,graduz,vx)
call gradm1(gradvx,gradvy,gradvz,vy)
call gradm1(gradwx,gradwy,gradz,vz)
[...]
and then in userbc
subroutine userbc (ix,iy,iz,iside,eg)
include 'SIZE'
include 'TOTAL'
include 'NEKUSE'
common /mygrad/ ...
integer e,eg
e = gllel(eg) ! global element number to processor-local el. #
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)
ux = (1./param(2)) * vz(ix,iy,iz,ie) * graduz(ix,iy,iz,ie)
uy = (1./param(2)) * vz(ix,iy,iz,ie) * gradvz(ix,iy,iz,ie)
uz = (1./param(2)) * vz(ix,iy,iz,ie) * gradwz(ix,iy,iz,ie)
However, how do I make the code take this into account along with keeping the p = 0 imposed at the outflow? I presume I should use the 'o' bc character instead of 'O' in my .rea boundary conditions definition section. Is that correct?
Best regards,
JC
On 19 April 2011 19:34, Jean-Christophe Loiseau < loiseau.jc at gmail.com > wrote:
Hi Nek's.
I would like to use the following boundary condition as my outflow condition for the adjoint perturbation mode:
p = du/dz = dv/dz = 0
dw/dz = Re * Uz * uz
where Uz is the z-component of the base flow. I would be tempted to do something like:
subroutine usrchk
[...]
common /mygrad/ gradwx(lx1,ly1,lz1,lelt)
$ gradwy(lx1,ly1,lz1,lelt)
$ gradw(zlx1,ly1,lz1,lelt)
call gradm1(gradwx,gradwy,gradz,vz)
[...]
and then in userbc
subroutine userbc (ix,iy,iz,iside,eg)
include 'SIZE'
include 'TOTAL'
include 'NEKUSE'
common /mygrad/ gradwx(lx1,ly1,lz1,lelt)
$ , gradwy(lx1,ly1,lz1,lelt)
$ , gradwz(lx1,ly1,lz1,lelt)
integer e,eg
e = gllel(eg) ! global element number to processor-local el. #
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)
uz = (1./param(2)) * vz(ix,iy,iz,ie) * gradwz(ix,iy,iz,e)
However I am not sure how to handle the other boundary conditions on u, v and p.
Regards,
JC
--
Jean-Christophe
--
Jean-Christophe
_______________________________________________
Nek5000-users mailing list
Nek5000-users at lists.mcs.anl.gov
https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
More information about the Nek5000-users
mailing list