These html pages are based on the PhD thesis "Cluster-Based Parallelization of Simulations on Dynamically Adaptive Grids and Dynamic Resource Management" by Martin Schreiber.
There is also more information and a PDF version available.

2.11 Boundary conditions

So far, we discretized our problem in space by decomposing the domain into non-overlapping cells Ci. The simulation itself can be executed with cell-local computations and computations based on adjacent cells. However, for the domain boundary Ω, particular boundary conditions have to be constructed and applied. Considering our flux computations, we need DoF at the edges shared by both adjacent cells. Our approach is based on the construction of a ghost edge layer based on the data of the cell which is sharing the ghost edge.

2.11.1 Dirichlet & Inflow

We can apply Dirichlet boundary conditions directly by setting the DoF on the edge to the Dirichlet parameters instead of recomputing them based on cell information adjacent to the boundary edge. Those boundary conditions are of particular interest for simulations of analytic benchmarks with changing inflow conditions in each time step (see Section 6.2).

2.11.2 Outflow

One possible way of handling outflow boundary conditions is to set the conserved quantities at the ghost edges to be equal to those from the adjacent cell. However, one severe drawback exists by directly applying this outflow boundary condition. In case of a flow into the domain (e.g., due to a negative momentum), the non-directional dependent conserved quantity such as mass or density would be reconstructed to be of equal quantity. This might lead to possible undesired mass inflow. We circumvent this issue by a combination of Dirichlet and outflow boundary conditions: the non-direction related components are set to Dirichlet values, whereas the direction related components orthogonal to the edge are set to zero.

Combining in- and outflow for conserved quantities in edge space qL of the cell at the boundary, the conserved quantities qR on the right side of the Riemann problem are respectively set to

     (  L      L
 R   |{ qi , if qk > 0  #  Out flow: set to left state
qi = | 0,   elif i = k  # Inflow: Cancel momentum                 (2.18)
     ( qi,  otherwise  #  Inflow: Dirichlet
with k the index of the direction dependent component orthogonal to the edge (e.g. the momentum) and q the Dirichlet conditions. Among others, this boundary condition is used in our Tsunami simulations (see Sec. 6.3).

2.11.3 Bounce back

With bounce back boundaries, we can simulate walls streaming back the flow with components orthogonal to the domain boundary. Let the DoF on an edge in edge space be given by uiL. We can then reconstruct the DoF on the ghost layer boundary with UR := (u1L,,-ukL,,unL) in edge space and uk the direction-dependent component perpendicular to the edge. Among others, this boundary condition is used in our analytic benchmark (see Sec. 6.2).