Hej Neks!
I had until now only used the standard outflow with zero pressure. Now I want to apply the dong outflow condition to my case (in the perturbation run, baseflow is steady and not computed). Naively porting the code from the example I realized that userbc is not called for the 'o ' boundaries (checked with a write statement in userbc). I check in userchk that the mesh has 'o ' boundaries (iterating through the cbc-array).
Does someone have an idea why those points are skipped? The dirichlet boundaries are set correctly. Could it have to do with the perturbation mode?
See below for exerpts from the usr-file.
Thanks for your help!
c-----------------------------------------------------------------------
subroutine userbc (ix,iy,iz,iside,ieg) ! set up boundary conditions
c
c NOTE ::: This subroutine MAY NOT be called by every process
c
implicit none
c
integer ix,iy,iz,iside,ieg
c
include 'SIZE'
include 'TOTAL'
include 'NEKUSE'
integer ie
real U0, delta
c function
real dongOutflow
ie = gllel(ieg)
pa = 0.0
if (jp.ne.0) then
c perturbations
if (cbu.eq.'o ') then ! DONG
write(6,*) 'CHK DONG'
U0 = 1.0 ! characteristic velocity
delta = 0.1 ! small positive constant
pa = dongOutflow(ix,iy,iz,ie,iside,U0,delta)
elseif (cbu.eq.'v ') then ! DIRICHLET
UX = 0.0
UY = 0.0
UZ = 0.0
temp = 0.0
endif
endif
return
end
-------------------------- from userchk ---------------------------------
do e=1,nelv
do f=1,nface
write(6,*) 'CHKUSR',e,f,cbc(f,e,1)
enddo
enddo