Skip to content

Becker's viscous shock ​

IDGroupMilestoneBackendsFigureRegression
VV-4Dissipative terms (M4)M4 (#65)CPU, FNLyesbecker-shock

Case and scope ​

Becker's (1922) exact profile of a shock resolved by the viscosity, with constant μ and Pr=3/4, in the shock frame. It is an exact steady solution of the compressible Navier–Stokes equations, so, like Couette, the run starts from the exact solution and the departure at the final time is the error of the scheme, with no fit of a shock position.

What the case catches: the strongest nonlinear viscous flux of the suite, with the energy flux carrying both the viscous work and the heat flux. A wrong coefficient, a wrong viscous work or a wrong heat flux moves the profile.

Models and numerics ​

ItemChoiceCode
Equationscompressible Navier–Stokes, γ=1.4, R=1, constant μ, Pr=0.75models
Dissipative fluxesdissipative_order = 4add_dissipative_fluxes_o4, adam_flume_cpu_dissipation_kernels.F90; compute_dissipative_flux, adam_flume_dissipation_library.F90; numerics
Inviscid fluxesWENO5 flux splitting, characteristic variablescompute_residuals_weno, adam_flume_cpu_object.F90
Timerunge-kutta-ssp-54, CFL 0.2adam_rk_object.F90
Initial profileBecker's implicit solution, solved cell by cellbecker_shock, adam_flume_ic_object.F90
Boundariessupersonic inflow upstream, extrapolation elsewhereset_boundary_conditions, adam_flume_cpu_object.F90; boundary conditions
FNL backendthe same kernels on the deviceadd_dissipative_fluxes_o4_dev, adam_flume_fnl_dissipation_kernels.F90

Initial and boundary conditions ​

ItemValue
Domainx∈[−0.25,0.25], the shock at x=0; y and z null
Gridquadtree, 4×4 blocks of N/4×1 cells, N = 64 / 128 / 256 along x
Ranks2
Initial conditionbecker-shock: upstream state ρ1=1, p1=1/γ (so a1=1), u1=M
bc_x_mininflow with the upstream state
Other facesextrapolation
Final timet=0.05
LegMachμCells across the shock at N=256
becker-m2-o420.005about 8
becker-m3-o430.01about 8

At Mach 3 with μ=0.005 the shock spans 4 cells, WENO's nonlinear weights still act, and the measured order was +2.25; the leg therefore takes μ=0.01 at Mach 3.

Input files ​

FileRole
src/tests/flume/verification/viscous/profiles.pymake --case becker writes each input; oracle measures (u−uexact)/(u1−u2)
src/tests/flume/verification/viscous/check.sh --legs vv4runs the two ladders (--np N; FLUME_EXE selects the backend)
src/tests/flume/regression/becker-shock/input.inithe frozen case: Mach 2, 64 cells, t=0.01
make_doc_figures.py (fig_viscous)the figure, from the CPU work directories of viscous/check.sh
bash
cd src/tests/flume/verification/viscous && ./check.sh --legs vv4             # CPU
FLUME_EXE=$PWD/../../../../../exe/adam_flume_fnl ./check.sh --legs vv4       # FNL

Results ​

VV-1 to VV-5: convergence, and Becker's shock against the exact profile

Right panel: (u−u2)/(u1−u2) at 64 and 256 cells against Becker's profile, Mach 2 and 3; the left panel holds the two Becker ladders.

Oracle: order ≥3 on the RMS and on the maximum of (u−uexact)/(u1−u2) (finest pair).

Mach64128256Orders (RMS)
2RMS 1.05⋅10−2, max 6.2⋅10−21.92⋅10−3, 1.15⋅10−21.30⋅10−4, 8.3⋅10−4+2.45, +3.88
3RMS 1.47⋅10−2, max 8.9⋅10−23.09⋅10−3, 1.89⋅10−22.77⋅10−4, 1.7⋅10−3+2.25, +3.48

CPU, 2 ranks. Every leg passes on FNL (2 ranks) with the same numbers to the printed digits.

Related cases: the other exact steady viscous profile is Couette; the backend agreement of these runs, the largest of the suite, is in CPU and FNL agree.

Findings ​

  • The coarse pair converges at about second order and the finest pair above third: the shock width is fixed by μ, so it spans about 2 cells at 64 cells and about 8 at 256. With 4 cells across it the order was still pre-asymptotic (+2.25).
  • The Becker runs hold the largest CPU–FNL differences of the suite (4.3⋅10−13 of the momentum scale), being its steepest gradients.