Hi,
I made a small sketch to discuss the way how boundary conditions are implemented in the Finite Volume Methods. On the left had side I defined a simple inflow boundary (red line).
The sketch shows 3 possible control volumes that belong to the boundary (BCV 1, BCV 2, BCV 3). I've plotted also two different ways how the segments for the inflow might be defined and the outward normal vector. First I thought that the inflow is separated into two boundary segments to handle cases such as BCV 2 and BCV3. But I couldn't find this in the code.
I hope that the control volumes at the boundary are drawn correctly?
If I look in the HLLC solver (I think it is not different in the other FVM schemes), the boundary flux is computed in a subroutine called CDL_HLLC. The length of a boundary segment (VNL) is defined via the unit outward components of a boundary node.
! NON NORMALIZED NORMAL
VNX=XNEBOR(K+NPTFR)
VNY=YNEBOR(K+NPTFR)
! Segment length
VNL=SQRT(VNX**2+VNY**2)
The fluxes are computed via the HLLC solver and the result is then multiplied by VNL
Looking at the two possibilities how the segment length might be defined, there can occur different problems. For case A, the segment length must not be identical with the segment length that I expect for the BCV 1, so the computed inflow will be wrong. For case B, the length will be correct.
However, both cases can not resolve BCV 3. Case B might be able to work for BCV 2.
I'm not sure if I made a mistake in my sketch?
With best regards,
Leo