Skip to content

Boundary Conditions

Boundary Conditions

Boundary conditions in GUERNICA are configured through [components] boundaries together with one or more [boundary:<name>] sections. These sections define how specific mesh boundary attributes are treated by the wall boundary condition operator. Periodic boundaries are handled implicitly by the mesh itself and are not listed in boundaries (more details on how periodicity is represented are given in Mesh). A boundary attribute that is not assigned to any [boundary:<name>] section is treated as absorbing.

GUERNICA builds a WallBCOperator from the input file and attaches it to the advection operator. Boundary conditions therefore enter through the advection face terms (as an upwind ghost state for incoming velocities) rather than as separate standalone operators. For every boundary GLL point and every incoming velocity (\(\mathbf v\cdot\mathbf n < 0\)), the ghost state is

\[ f_{\mathrm{ghost}}(\mathbf v) = c_{\mathrm{spec}}\, f_n(\mathbf v_{\mathrm{refl}}) + \alpha\, M_w(\mathbf v), \]

where \(c_{\mathrm{spec}}\) is specular_coeff, \(\mathbf v_{\mathrm{refl}}\) is the specularly reflected velocity, \(\alpha\) is the wall emission amplitude, and \(M_w\) is the wall Maxwellian

\[ M_w(\mathbf v) = \frac{1}{(2\pi T)^{d/2}} \exp\!\left( -\frac{|\mathbf v-\mathbf u|^2}{2T} \right), \]

with wall temperature \(T\), drift \(\mathbf u = (u_x,u_y,u_z)\), and \(d = 3\) (or \(d = 2\) when [vz] num = 1). The boundary types differ only in how \(c_{\mathrm{spec}}\) and \(\alpha\) are set.

A typical setup in the input file looks like:

[components]
species = n
boundaries = left_wall, right_wall

[boundary:left_wall]
attrs = 1
type = maxwellian_channel
alpha = wall_alpha
temperature = wall_temperature
specular_coeff = 0.2

[boundary:right_wall]
attrs = 2
type = absorbing

[profile:wall_alpha]
type = constant
value = 1.0

[profile:wall_temperature]
type = constant
value = 1.0

Here, boundaries in [components] lists the named boundary condition blocks that will be used in the simulation. Each [boundary:<name>] section then applies a boundary condition to one or more mesh boundary attributes through the attrs entry. In other words, the mesh determines where a boundary condition applies, and the [boundary:<name>] section determines what happens there. Omitted ux, uy, uz default to zero.

The supported boundary condition types are:

  • absorbing
  • specular
  • maxwellian_channel
  • ion_recycling

Absorbing

An absorbing boundary removes outgoing neutrals and injects nothing (\(c_{\mathrm{spec}} = 0\), \(\alpha = 0\)). A minimal absorbing setup is

[components]
boundaries = outlet

[boundary:outlet]
attrs = 2
type = absorbing

This is the simplest wall model and is appropriate when neutrals reaching the wall should be fully lost.

Specular

A specular boundary reflects particles at the wall with coefficient specular_coeff and emits nothing (\(\alpha = 0\)). Because specular_coeff defaults to 0, a fully reflecting wall must set it explicitly:

[components]
boundaries = mirror_wall

[boundary:mirror_wall]
attrs = 1
type = specular
specular_coeff = 1.0

Reflection flips the velocity component normal to the wall while preserving the tangential motion. For walls aligned with the \(x\) or \(y\) axis, the reflected velocity is itself a grid point and the reflection is exact. For oblique walls, the reflected value is interpolated from the velocity grid. A small correction is then added so that the reflected particle flux, in-plane momentum flux, and energy flux match the incident ones. A fully specular wall therefore loses no particles.

Maxwellian Channel

A maxwellian_channel boundary prescribes an incoming wall Maxwellian with amplitude alpha, optionally combined with specular reflection. Since \(M_w\) is normalized to unit density, alpha is the density of the emitted half-Maxwellian population.

[components]
boundaries = source_wall

[boundary:source_wall]
attrs = 1
type = maxwellian_channel
alpha = wall_alpha
temperature = wall_temperature
ux = wall_ux
uy = wall_uy
uz = wall_uz
specular_coeff = 0.0

In practice:

  • alpha sets the strength of the wall Maxwellian channel,
  • temperature sets the wall temperature,
  • ux, uy, and uz set the wall drift velocity,
  • specular_coeff adds a specularly reflected fraction on the same attribute.

alpha, temperature, ux, uy, and uz may be any profile type. Constant profiles give a uniform wall. Spatial profiles (for example cosine_bump for a localized puff) are evaluated at every boundary GLL point, so the emission can vary along the wall. Wall data tabulated per boundary face can be read with the boundary-only file_boundary_linear_2d profile type (see Inputs Reference).

Ion Recycling

An ion_recycling boundary emits neutrals in proportion to the ion flux reaching the wall. On each boundary face, \(\alpha\) is chosen so that the face-integrated emitted neutral flux equals

\[ \Gamma_{n,\mathrm{emit}} = R \int_{\mathrm{face}} n_i\,\max(\mathbf u_i\cdot\mathbf n,\ 0)\, ds, \]

where \(R\) is recycling_coeff and \(n_i\), \(\mathbf u_i\) come from the prescribed ion background ([i:init]). The emitted distribution is the wall Maxwellian given by temperature, ux, uy, uz, which must be constant. specular_coeff can be combined with recycling.

[components]
species = n, i
boundaries = target

[boundary:target]
attrs = 3
type = ion_recycling
recycling_coeff = 1.0
temperature = wall_temperature

[profile:wall_temperature]
type = constant
value = 3.0

This type requires the ion species i.

Plasma-vacuum interface leakage

The [plasma_interface] section is not a wall condition, but it acts on faces in the same way. When the mesh separates the domain into element attribute regions, it injects neutrals across the interior faces between a plasma region and a vacuum region:

[plasma_interface]
plasma_attrs = 1
vacuum_attrs = 2
leakage_fraction = 0.01

At each GLL point on such a face, a Maxwellian at the local ion temperature and drift is emitted into the vacuum element. Its outward flux is normalized to

\[ \Gamma_{\mathrm{leak}} = \texttt{leakage\_fraction}\; n_i \sqrt{T_e + T_i}, \]

which is a fraction of the ion sound-speed flux, evaluated on the plasma side. It requires both i and e species. The number of interface faces and the integrated leakage rate are printed in run.log at startup. The leakage is included in the global particle and energy budget in balance.dat.

Wall flux diagnostics

At the end of a run, the incident, reflected, and emitted particle and energy fluxes at every boundary GLL point are written to diag/wall_flux.dat. See Post Processing.