Skip to content

Non-reflecting boundary ​

The open boundaries of #121: the non-reflecting outflow (S2, legs nr) and the shock generator (S3, legs sg).

[bc_*] type = non-reflecting (#121 S2) is a characteristic outflow and far-field boundary. It extrapolates the outgoing waves, relaxes the incoming acoustic wave toward a target pressure (Rudy & Strikwerda 1980, Poinsot & Lele 1992), and takes the target's entropy and tangential velocity where flow enters (boundary conditions). The legs measure what it does against the kinds it would replace, extrapolation and inflow. Script: src/tests/flume/verification/boundary/check.sh.

Setup
box, cells[0,2]×[0,0.0625]2, 256×8×8 (64×8×8 for nr3), 8 blocks, periodic y and z
gasEuler, γ=1.4, ρ=1, p∞=1/γ (c=1), free stream u along x
packetsine-wave acoustic, wavelength 0.2, amplitude 10−3, Gaussian envelope of width 0.1 at x=1
boundarynon-reflecting with the free stream as target, L = 2 (nr_length), σ = 0.28 unless stated
schemeWENO-U-5 characteristic, SSP-54, CFL 0.5, 2 ranks
LegCaseOracleMeasured (CPU; FNL the same to the digits shown)
nr1σ=0 at a Mach 0.5 outflow; σ=0.28 at a Mach 1.5 outflow (left face inflow)equal to extrapolation bit for bit0 of 64 datasets differ, both
nr2the packet leaving through x=2 at rest, t = 1.5the largest |p−p∞| left, over γp∞A: below 4e-3 at σ = 0.28, 1.1e-3 at 0.07, their ratio in [3, 5]2.86e-3, 7.56e-4, ratio 3.78; extrapolation 1.15e-4
nr3a uniform 2 % overpressure at Mach 0.5, both x faces non-reflecting, t = 20the box-mean overpressure left, over the initial: below 0.15; with extrapolation, above 0.950.099; 1.000
nr4a left-running packet leaving through the subsonic inflow face x=0 (Mach 0.5), t = 3what is left: below 6e-34.28e-3; inflow 1.41e-5

The non-reflecting boundary: reflection and pressure anchor

Left: what is left in the box once the packet of nr2 has gone, against x. Right: the box-mean overpressure of nr3 against time, from the box integrals; dotted, e−Kt.

What it shows.

  • It anchors the pressure; extrapolation does not. The overpressure falls to 0.099 of itself in 10 acoustic crossings, close to e−Kt with K=σ(1−M2)c/L. Extrapolation keeps it at 1.000: a subsonic outflow with extrapolation has no pressure of its own.
  • It is not less reflecting than the kinds it would replace. In this characteristic-upwind scheme extrapolation already makes the incoming characteristic jumps zero, and inflow makes them the free stream's: both let linear waves out (1.2e-4, 1.4e-5 left behind). The relaxation that holds the pressure reflects in proportion to σ (2.9e-3 at 0.28, 7.6e-4 at 0.07, ratio 3.8 for a ratio of 4), as σc/(ωL) predicts.
  • Its limits are exact: at σ=0, and at a supersonic outflow, it is extrapolation bit for bit.

Use it where a subsonic outflow or a far-field face must hold a pressure, with σ as small as the transient allows. A supersonic outflow or a far field that needs no pressure is served as well by extrapolation.

Shock generator ​

[bc_y_max] type = shock-generator (#121 S3, boundary conditions) brings an oblique shock in through the top face. The legs measure the shock it makes against the oblique-shock relations (shockgen_oracle.py, which solves them on its own).

Setup
box, cells[0,2]×[0,1]×[0,0.25], 64×32×8, 8 blocks, periodic z
gasEuler, γ=1.4, ρ=1, p=1/γ (c=1), Mach 2 along x
boundaryinflow at x=0; extrapolation at x=2 and y=0; shock-generator at y=1, deflection 10∘ from shock_x = 0.5 (β=39.314∘, p2/p1=1.70658, ρ2/ρ1=1.45843)
schemeWENO-U-5 characteristic, SSP-54, CFL 0.5, 2 ranks, to t=2.5 (steady)
LegCaseOracleMeasured (CPU; FNL the same to the digits shown)
sg1the shock by its deflectionthe uniform region behind it (16 cells off the shock, 4 below the streamline from its foot, above y=0.2): p and ρ within 3e-3 of Rankine–Hugoniot, the flow angle within 0.05∘; the shock angle fitted from where p crosses (p1+p2)/2 along the rows within 0.3∘p 1.47e-3, ρ 1.22e-3, angle 0.026∘; β 39.322∘, the foot at x=0.496
sg2the same shock by its angle (shock_angle 39.313932)as sg1the same digits
sg3a shock entering beyond the box (shock_x 3)equal to an extrapolated top bit for bit0 of 64 datasets differ

The shock generator at Mach 2

Left: p/p1 in the x-y plane of leg sg1; dashed, the shock of the theory from its foot; dotted, the streamline from the foot. Right: p/p1 and ρ/ρ1 along the row y=0.484 against the step of Rankine–Hugoniot at the theory's shock.

What it shows.

  • The shock is where the relations put it. Its angle is within 0.01∘ of β, and it meets the top within a cell of shock_x; behind it the state is Rankine–Hugoniot's within 1.5⋅10−3.
  • What the oracle leaves out, and why. The captured shock leaves oscillations of a few 10−3 that decay over 16 cells behind it (the staircase of an oblique shock on a Cartesian grid). The jump of the ghost state at shock_x leaves an entropy streak along the streamline from the foot (ρ 7e-3 off, the pressure continuous). Where the shock leaves through the extrapolated bottom, the corner downstream sits up to 4 % high: an extrapolated face crossed by an oblique shock is not clean. In a shock–boundary-layer interaction the shock meets the wall instead.