Skip to content

Boundary conditions ​

Each domain face takes one kind, [bc_x_min] … [bc_z_max] type (input). The kinds fill the ghost cells of the boundary blocks after every ghost exchange. Waves leaving the domain are absorbed by the absorbing layers, which work on top of a face kind.

Face kinds ​

Below, g is a ghost cell and m its mirror about the face (the interior cell at the same distance); n is the face normal, t1,t2 the tangential directions.

typeGhost values
extrapolationevery variable copied from the adjacent interior cell (zeroth-order extrapolation)
Neumannevery variable mirrored, qg=qm (zero normal derivative)
Dirichletevery variable zero; there is no key for a prescribed value
PECmirror with signs: Dn, Bt1, Bt2 even, Dt1, Dt2, Bn odd; φ odd, ψ even
Silver_Mullerfirst-order absorbing condition (below)
periodicthe library's periodicity: the ghost exchange fills the ghosts from the opposite side, across blocks and ranks
  • PEC is a perfect electric conductor: Et=0 and Bn=0 on the face, imposed by odd reflection.
  • periodic is BC_PERIODIC = -1 of the library: the tree builds periodic neighbours, so a periodic face is not a boundary row. The two faces of an axis must be both periodic or neither (fatal otherwise).
  • Edge and corner ghosts get no boundary value: only the face ghost rows are set.
  • PIC models: the boundary ghosts carry no deposited charge or current (J and ρ set to zero there).
  • radiative is refused at load (#57); an unknown spelling is fatal.

Silver–Müller ​

The first-order Silver–Müller condition imposes the impedance relation of an outgoing plane wave, |Et|=c0|Bt|, so a normally incident wave leaves the domain. The tangential ghost components come from the mirror cell with the vacuum admittance Y=ε0c0 (1 non-dimensional), the face sign s=±1 (−1 on a minimum face) and (α,β,γ) the two tangential directions and the normal in cyclic order:

Dαg=sYBβm,Dβg=−sYBαm,Bαg=−sDβm/Y,Bβg=sDαm/Y.

The normal ghost components are then solved, line by line along the normal, so that the discrete divergence of the first $h_s = $ fdv_order/2 interior cells is ρ for D (zero without PIC) and zero for B: the boundary does not create divergence. This needs ngc >= fdv_order/2.

The elliptic boundary map ​

The t0 elliptic solves (numerics) see each face through a second, derived kind: periodic → periodic, Dirichlet → zero ghosts, PEC → Dirichlet for φ and the tangential A and Neumann for the normal A, Neumann and Silver_Muller → the free-space (open) potential. extrapolation has no elliptic counterpart and stops the run at the first t0 solve, not at load: the table and its consequences are in the input hazards.

Particle boundaries ​

The particles' closure at a face follows its field kind: a periodic face wraps the particles, every other kind keeps the legacy closure, where a particle leaving the domain stops the run (PIC).

When adding a face kind, update the three select cases that see it: the field parser (adam_prism_bc_object), the elliptic map (build_elliptic_bc_types) and the FLAIL map (solve_time_zero); and the particle closure (adam_prism_pic_bc_object), whose map is total.