Hello everyone,
I have a question about the treatment of lateral boundary for tracers (also for k-epsilon). I found in the test with a tidal current imposed at downstream boundary, the boundary value of tracer uses the value from previous time step when this open boundary has inflow, so the tracer concentration does not change in this period. When the tidal current reverses and this boundary has outflow, the tracer values are changing again (can be seen here).
In the subroutine cvdf3d.f, there is a section for dealing with lateral boundary conditions for tracers:
! FOR TRACERS (=NOT VELOCITY) : DIRICHLET VALUES ARE NOT RESPECTED IF EXIT
! THERE IS NO NEED TO TEST KENTU OR KADH FOR TRACERS
!
IF(NPTFR3.GT.0.AND.NFRLIQ.GT.0.AND..NOT.VELOCITY) THEN
DO IPTFR=1,NPTFR3
IF(LIFBOL%I(IPTFR).EQ.KENT) THEN
! EXITS ARE TREATED AS FREE BOUNDARIES
IP=NBOR3%I(IPTFR)
IF(FLUEXTPAR%R(IP).GT.0.D0) LIFBOL%I(IPTFR)=KSORT
ELSEIF(LIFBOL%I(IPTFR).EQ.KSORT) THEN
IP=NBOR3%I(IPTFR)
IF(FLUEXTPAR%R(IP).LT.0.D0) THEN
LIFBOL%I(IPTFR)=KENT
FBORL%R(IPTFR)=FN%R(IP)
ENDIF
ENDIF
ENDDO
ENDIF
I guess this is the code that is responsible for the strange behaviour happening for the tracer at the open boundary.
It seems that this could add some artifacts to the solution if the boundary is not far away from the domain? Is there anyway to improve it?
Regards,
Qilong