Skip to content

Boundary conditions ​

Each of the six faces of the domain takes a boundary condition from its section [bc_x_min], [bc_x_max], [bc_y_min], [bc_y_max], [bc_z_min], [bc_z_max]. The condition fills the ghost cells of the blocks that touch the face before every residual evaluation; interior block faces, inter-realm seams and AMR coarse–fine faces are filled by the exchange machinery instead (below).

Input ​

There are six sections, [bc_x_min], [bc_x_max], [bc_y_min], [bc_y_max], [bc_z_min] and [bc_z_max], which are faces 1–6. Each section requires type. CRLF files are accepted (FiNeR drops the carriage return). Eleven values are accepted, and matching is case-sensitive:

typeidMeaningper-face keys
extrapolationBC_EXTRAPOLATION = 1zeroth-order extrapolation (outflow)none
inflowBC_INFLOW = 2prescribed stater, u, v, w, p (+ bx, by, bz for MHD), all required
inflow-digital-filterBC_INFLOW_DF = 7turbulent boundary-layer inflow: a mean profile table plus digital-filter fluctuations (turbulence)r, u, p, df_profile, df_delta, df_spacing, df_wall_axis, df_length_* (required), df_seed; Euler only, one face per realm (input, #119)
inflow-recyclingBC_INFLOW_RR = 10turbulent boundary-layer inflow: the table's mean plus the layer's own fluctuations, recycled from a downstream station and rescaled (turbulence)r, u, p, rr_profile, rr_delta, rr_wall_axis, rr_spacing, rr_x, rr_delta_ratio, rr_beta; rr_shift optional
wall-inviscidBC_WALL_INVISCID = 3slip wallnone
wall-modelledBC_WALL_INVISCID = 3 + wall-model flagisothermal wall whose face flux comes from a wall model; ghosts mirrored as wall-inviscid (turbulence)wall_temperature (required, >0), wall_model, wall_model_height, wall_model_damping, wall_model_filter, wall_model_eddy_viscosity, wall_model_pressure_gradient, wall_model_pressure_gradient_filter, wall_model_edge_velocity, wall_model_edge_temperature (input, #119)
wall-noslipBC_WALL_NOSLIP = 4no-slip adiabatic wallwall_u, wall_v, wall_w (optional, default 0; the normal one must be 0); refused with [eos] isothermal or barotropic
wall-isothermalBC_WALL_ISOTHERMAL = 5no-slip wall at a set temperaturewall_temperature (required, >0), wall_u, wall_v, wall_w as above; refused with [eos] isothermal or barotropic
periodiclibrary BC_PERIODIC = -1periodic pair of facesnone
hydrostaticBC_HYDROSTATIC = 6hydrostatic ghosts under gravity, mirrored velocitynone (reads [gravity]); refused with [eos] isothermal or barotropic
non-reflectingBC_NONREFLECTING = 8characteristic outflow and far fieldthe target r, u, v, w, p (required), nr_length L (required, >0), nr_sigma σ (default 0.28); Euler only (#121 S2)
shock-generatorBC_SHOCK_GENERATOR = 9oblique shock entering through a y facethe upstream r, u, v, w, p, one of shock_deflection and shock_angle (degrees), shock_x, shock_x_end (optional); bc_y_min and bc_y_max only, Euler only (#121 S3)

Validation:

  • an unknown value stops the run and the message lists the accepted spellings;
  • a missing inflow key, or a missing or non-positive wall_temperature, is fatal;
  • a non-zero normal wall velocity is fatal (the wall does not move through the domain);
  • periodicity must be paired: [bc_x_min] and [bc_x_max] must both be periodic or neither, and the same for y and z;
  • a physical model other than Euler or MHD is fatal.

How the ghost cells are filled ​

Before every residual evaluation the ghosts are filled in the order of a Runge–Kutta stage: the copies between the blocks of the realm (with the 2:1 coarse–fine interpolation), the MPI exchange, then the boundary conditions, crown by crown from the innermost ghost layer outwards. The inter-realm seams are filled by the forest. The sections below give the rule of each kind; the crown maps, the edge and corner passes and the seam buffers are documented on the developer page FLUME ghost fill.

extrapolation: zeroth order (constant) ​

qghost(i,j,k)=q(i−δi,j−δj,k−δk)

Each ghost copies its inward neighbour. The crowns are filled innermost first, so every ghost column ends up equal to the first interior cell: q(1−g)=q(1) for g=1..ngc. This is order-0 extrapolation, a zero-gradient outflow. All nv variables are copied, including ψ.

inflow: prescribed state (Dirichlet on the full conservative vector) ​

qghost=qinflow(f)on every crown

qinflow(f) is converted once from the primitive keys. For MHD with GLM this sets ψ=0 in the inflow ghosts.

wall-inviscid: slip wall by mirroring with a sign vector ​

qghost(i,j,k)=Sd⊙q(im,jm,km),d=⌈f/2⌉

The mirror index reflects the ghost across the face:

facemirror
xminim=1−i
xmaxim=2ni+1−i
yminjm=1−j
ymaxjm=2nj+1−j
zminkm=1−k
zmaxkm=2nk+1−k

So ghost 1−g mirrors interior cell g, for example q(0)←Sq(1) and q(−1)←Sq(2).

The sign vector Sd is:

variableEulerMHD / MHD-GLM
ρ, E+1 (even)+1
ρun (the normal momentum of direction d)−1 (odd)−1
ρut (tangential momenta)+1+1
Bn (the normal field of direction d)—−1 (odd), a perfectly conducting reflecting wall (#41)
Bt—+1
ψ—+1 (even)

E is unchanged by the sign flips because it depends only on squares of the flipped components. The ghost state is therefore the exact mirror image. As a result, un=0 and Bn=0 at the wall face in the sense of the symmetric average, and ∂nψ=0 there.

wall-noslip and wall-isothermal: no-slip walls ​

The two no-slip walls (#65) mirror the cell like wall-inviscid and reflect the whole velocity about the wall velocity uw (tangential, wall_u, wall_v, wall_w):

ug=2uw−um,pg=pm,

so the mean of the ghost and its mirror cell is the wall velocity (no slip, no penetration). The pressure is mirrored.

  • wall-noslip (adiabatic) mirrors the temperature, so ρg=ρm and ∂nT=0 at the wall in the sense of the symmetric difference.
  • wall-isothermal sets the ghost temperature to the geometric mirror, Tg=Tw2/Tm, so the geometric mean of the ghost and its mirror cell is the wall temperature, and the density from the mirrored pressure, ρg=pm/(RTg), with T=p/(ρR). The ghost is admissible for any admissible cell, which the linear mirror Tg=2Tw−Tm is not beside gas hotter than twice the wall. For Tm=Tw+δ the two mirrors differ by δ2/Tw, so both are second-order at the wall.

The total energy is rebuilt from the ghost state, Eg=pg/(γ−1)+12ρg|ug|2+emag, where the magnetic energy emag (and ψ2/2 under EGLM) is unchanged by the mirror. The field follows the wall-inviscid rule (normal component odd, a perfectly conducting wall); ψ is even. On a resting adiabatic wall the rule reduces to a sign vector with every momentum component odd. Both walls are second-order accurate at the wall, by construction of the mirror.

The rule is model-agnostic: the field components are those present in the state vector (none for Euler). The ghost probe GP checks it on every face and edge, moving and resting walls, Euler and MHD with EGLM (verification).

The walls are boundary conditions of the ideal solver too: they take effect on any run. Their physical test is the compressible Couette flow between an isothermal wall and a moving adiabatic one, against its exact profiles (VV-3): the moving-wall mirror is exact for its linear velocity and symmetric temperature, the isothermal mirror Tw2/T is second-order, so the run converges at order 2.

hydrostatic: an atmosphere under gravity ​

Added for the gravity of #73. The ghost density and pressure continue the isothermal hydrostatic equilibrium of the first interior cell along the normal, ρg=ρ1exp⁡(gds/T1), pg=ρgT1, with T1=p1/ρ1 and s the signed distance from that cell to the ghost along the axis d: an isothermal atmosphere has exact ghosts. The velocity is mirrored as at wall-inviscid (no mass flux); the magnetic field and ψ are mirrored even. Without gravity along the normal it is a slip wall that copies the first interior cell's thermodynamic state (Zingale et al. 2002).

non-reflecting: a characteristic outflow and far field ​

Added for the STREAmS cases of #121. The ghosts are the first interior cell plus the jumps of the characteristic variables, linearised about it (outward normal velocity un, sound speed c):

  • Outgoing waves (speed >0): no jump, extrapolated.
  • The incoming acoustic wave, w1=p−ρcun with speed un−c<0: its gradient along the normal is set by the relaxation of Rudy & Strikwerda (1980) and Poinsot & Lele (1992), ∂w1/∂n=K(p−pt)/(un−c), K=σ(1−M2)c/L. Ghost m lies m cells off the interior cell, and w5=p+ρcun is unchanged.
  • Flow into the domain (un<0): the entropy ρ−p/c2 and the tangential velocity of the target; un+c≤0 (supersonic inflow) the whole target.

A supersonic outflow, or σ=0 at an outflow, is extrapolation bit for bit. The edge and corner rows beyond the face are extrapolated.

When to use it. In this characteristic-upwind scheme extrapolation (outflow) and inflow (a prescribed state) already let linear waves out: they make the incoming characteristic jumps zero, or the free stream's. What they cannot do is hold a mean pressure at a subsonic outflow, and extrapolation keeps whatever pressure the box has. non-reflecting pulls it to pt on the time scale 1/K. The price is a reflection of order σc/(ωL) of a wave of frequency ω passing through. Measured in the verification:

non-reflectingthe alternative
a 2 % overpressure at Mach 0.5, left after t=20=10L/c0.099extrapolation: 1.000
a packet leaving at rest (λ=0.2, L=2), left behind2.9e-3 (σ=0.28), 7.6e-4 (σ=0.07)extrapolation: 1.2e-4
a packet leaving through a subsonic inflow face, left behind4.3e-3inflow: 1.4e-5

shock-generator: an oblique shock through a y face ​

Added for the STREAmS cases of #121. The face of a shock–boundary-layer interaction that brings the incident shock in (the top of the box). The ghosts with shock_x ≤x< shock_x_end take the state behind an oblique shock in the upstream state r, u, v, w, p; the others are extrapolated, as are the edge and corner rows beyond the face. The shock is given by its deflection θ (shock_deflection, the weak solution of the θ–β–M relation) or by its angle β from the upstream velocity (shock_angle), and turns the flow toward the opposite face. The post-shock state follows from the normal Mach number Msin⁡β, with M of the velocity in the x-y plane (Rankine–Hugoniot; Anderson, Modern Compressible Flow, ch. 4); w, tangent to the shock, is unchanged. The run prints the shock angle, the deflection and p2/p1.

  • Refused: a flow that is not supersonic in the x-y plane, an angle outside (μ,90∘], a deflection beyond detachment, a face other than y, a model other than Euler (no dual energy, no passive scalars).
  • The rest of the face is extrapolation: upstream of shock_x the free stream leaves or enters at its own state, as at an extrapolated top. A reflected shock that reaches the face beyond shock_x_end leaves through it.

Measured in the verification: at Mach 2 and 10∘ the shock angle within 0.01∘ of 39.314∘, the state behind it within 1.5⋅10−3 of Rankine–Hugoniot; reflected off a wall-inviscid face, the reflected shock within 0.06∘ of the exact regular reflection and the state behind it within 2⋅10−3.

wall-modelled ​

A slip-wall mirror for the ghosts, with the flux through the wall face replaced by the stress and the heat flux of a wall model sampled off the wall: an isothermal wall for wall-modelled large-eddy simulation. The model, its keys and its limits are on the turbulence page.

inflow-digital-filter ​

A turbulent boundary layer entering through the face: the mean of a profile table plus digital-filter fluctuations with its Reynolds stresses. The method is on the turbulence page.

inflow-recycling ​

A turbulent boundary layer entering through the face: the mean of the same profile table plus the fluctuations of the layer itself at a station downstream, rescaled to the face. The method is on the turbulence page.

periodic ​

periodic is the library periodicity: the tree builds true periodic neighbours, and the block exchange fills the ghosts across blocks and ranks, with any number of blocks along the axis, one included (#103). The only constraint is the pairing rule of the validation list above.

Edges and corners ​

An edge ghost lies outside its block along two axes, a corner ghost along three. The WENO stencils never read them, but the tangential derivatives of the viscous stress or of the current at a face do. They are filled so that the ghost layer continues the face ghosts: beyond one realm face the face's kind applies along its normal; beyond two or three realm faces the kind of one physical face applies (inflow first), so two walls compose to a double mirror. The ghost probe GP holds every face and edge ghost to a linear field on every path (verification). The donor rules and the pass ordering are on the developer page.

Inter-realm seam ​

A face glued to another realm by the forest manifest still needs a type, but the seam overrides it: the forest fills the seam ghosts by injection from the peer realm, at every Runge–Kutta stage or once per step (coupling_cadence). The written field files hold the ghosts the stencils read, except the step-0 file, whose seam ghosts are unfilled (developer page).

2:1 AMR coarse-fine ghosts ​

These ghosts are library behaviour, selected by [amr] seam_ghost_fill = injection | restriction-compatible | tricubic (default tricubic; an unknown value is fatal; library input). FLUME bounds the fill and blends inadmissible ghosts (numerics).

Immersed solids ​

Immersed solids are not a [bc_*] kind. They enter through a level set and the cut spacing of the flux difference (numerics).

Examples ​

Walls on x, extrapolation elsewhere, from src/tests/flume/verification/sod/sod-wall-x.ini:

ini
[bc_x_min]
type = wall-inviscid
[bc_x_max]
type = wall-inviscid
[bc_y_min]
type = extrapolation
[bc_y_max]
type = extrapolation
[bc_z_min]
type = extrapolation
[bc_z_max]
type = extrapolation

Euler inflow, from src/tests/flume/verification/shock-cylinder/shock-cylinder.ini:

ini
[bc_x_min]
type = inflow
r    = 3.7333333333333334
u    = 1.25
v    = 0.0
w    = 0.0
p    = 4.5
[bc_x_max]
type = extrapolation
[bc_y_min]
type = wall-inviscid
[bc_y_max]
type = wall-inviscid
[bc_z_min]
type = extrapolation
[bc_z_max]
type = extrapolation

MHD inflow, from src/tests/flume/verification/mhd/plumbing/mhd-uniform-glm.ini:

ini
[bc_z_min]
type = inflow
r    = 1.0
u    = 0.3
v    = -0.2
w    = 0.1
p    = 1.0
bx   = 0.8
by   = 0.5
bz   = -0.3

Periodic faces are written the same way, type = periodic, and must be set on both faces of an axis.