INTRODUCTION

In the last few years, there has been an increase in the number of works devoted to the problems of propagation of detonation waves in inhomogeneous gas mixtures. Such problems are of interest not only from the point of view of the fundamental foundations of the theory of detonation but also from a practical point of view. One specific application is to prevent accidental detonation in mines where an explosive mixture can accumulate in isolated parts. In such a mixture, for various reasons, the formation of a fuel concentration gradient is possible, which, in turn, will affect the ignition mechanism of the mixture, as well as the transition of combustion to detonation and its subsequent propagation. However, the main reason for active research into the features of detonation processes in inhomogeneous gas mixtures is the development of engines based on continuous rotating detonation [14]. In such engines, the oxidizer and fuel are injected into the unit separately, which leads to the propagation of detonation through a highly inhomogeneous mixture.

To describe the complex process that occurs in real installations, studies of model formulations are carried out, when considering which the mechanisms of detonation propagation in inhomogeneous media are clarified. The following groups of works can be distinguished in which the propagation of detonation in a flat channel is studied:

• in a medium with a variable longitudinal [5, 6] and transverse [79] fuel concentration gradient;

• in a medium with a variable mixture density [10, 11];

• along [12, 13] or across an [14] inert gas layer;

• within analogous equations [15].

Of particular note is the recent work [16], in which the ratios of the contributions of the following two components to the final nonlinear dynamics of the process of propagation of a detonation wave in an inhomogeneous medium are studied: the first component is related to the pulsating nature of the detonation wave as such, which also manifests itself in a homogeneous medium; and the second component is due to a periodic change in the parameters ahead of the front of the leading shock wave (LSW). It has been found that, depending on the parameters of the problem, both the amplification of parameter fluctuations behind the detonation wave front and, conversely, their stabilization in comparison with the case of a homogeneous medium, can occur.

In our previous work [17, 18], computational algorithms were constructed to simulate detonation in the shock-attached frame (SAF), in the one- [17] and two-stage [18] models of the kinetics of chemical reactions. Let us briefly summarize the main advantages and disadvantages of detonation calculations in a SAF [18]. In such a setting, on the one hand, a transition to a noninertial coordinate system is carried out, since the speed of the shock-attached frame depends on time. This leads to a transformation of the usual Euler equations that form the base of the mathematical model: the a priori unknown velocity of the shock-attached frame begins to appear, to find which it is necessary to use certain additional considerations [1921]. The noninertiality of the coordinate system and the need to consider additional equations for the wave velocity determine the greater complexity of this approach from the point of view of its software implementation compared to the numerical solution of the Euler equations in a fixed, laboratory coordinate system. On the other hand, considering the problem in the SAF has three main advantages.

First, this approach requires significantly less computational costs than the traditional consideration of the problem of detonation initiation and propagation in the laboratory coordinate system (see, for example, [22]). Here, the computational domain physically corresponds to a partial or full-length channel in which the propagation of a detonation wave is considered, and always to some domain directly behind the LSW front.

Second, this approach makes it possible to accurately fix the parameters directly behind the LSW front. The shock wave (SW) is a fixed boundary of the computational domain and does not experience numerical smearing, which inevitably occurs in the shock-capturing methods.

Third, the SAF is much more suitable for the characteristic analysis of the flow field behind the detonation wave front [23]. Characteristic analysis, in contrast to the analysis of only pressure fields, density, mass fraction of the reactant, and gas velocity, which is usually carried out to illustrate the dynamics of detonation propagation, is able to explain the observed flow modes. In the work [19] such an analysis made it possible to generalize the notion of a sound point from the Chapman–Jouguet theory for the case of a nonstationary pulsating detonation wave. Moreover, the realized pulsating flow modes can also be explained from a quantitative point of view by analyzing the behavior of the characteristics, as was done in [18, 23].

These factors stimulate the calculations of the propagation of a detonation wave in an inhomogeneous gas mixture in the coordinate system of the front of the shock-attached frame. When constructing such an algorithm, it is necessary to develop appropriate computational algorithms for calculating the propagation of an SW in an inhomogeneous medium.

The objectives of this work are as follows:

• development of a computational algorithm for modeling SW propagation in a medium with a density disturbance in the SAF;

• carrying out, using the developed algorithm, the characteristic analysis of the dynamics of SW propagation in a medium with a linear density distribution (the problem considered in the works of Chisnell and Whitham [24, 25]) and sinusoidal density distribution (the Shu–Osher problem [26]).

MATHEMATICAL MODEL AND PROBLEM STATEMENT

The mathematical model is based on the Euler equations, supplemented by the ideal gas equation of state and written in vector form in the \(\left( {x,t} \right),\) coordinate system related to the LSW front:

$$\begin{gathered} \frac{{\partial {\mathbf{u}}}}{{\partial t}} + \frac{\partial }{{\partial x}}\left( {{\mathbf{f}} - D{\mathbf{u}}} \right) = 0,\,\,\,\,x = {{x}^{l}} - \int\limits_0^t {D\left( \tau \right)d\tau } ,\,\,\,\,{\mathbf{u}} = \left[ {\begin{array}{*{20}{c}} \rho \\ {\rho v} \\ e \end{array}} \right],~ \\ {\mathbf{f}} = \left[ {\begin{array}{*{20}{c}} {\rho v} \\ {\rho {{v}^{2}} + p} \\ {\left( {p + e} \right)v} \end{array}} \right],\,\,\,\,e = \rho \varepsilon + \frac{1}{2}\rho {{v}^{2}},~\,\,\,\,\varepsilon = \frac{p}{{\rho \left( {\gamma - 1} \right)}}. \\ \end{gathered} $$
(1)

Here \(\rho \) is the density of the gas, \(v\) is the gas velocity in the laboratory coordinate system \(\left( {{{x}^{l}},t} \right),\) \(D\) is velocity of the SW, \(p\) is the gas pressure, \(e\) is the total energy of the gas per unit volume, \(\varepsilon \) is the specific internal energy of the gas, and \(\gamma \) is a fixed value of the adiabatic index, which was taken equal to 1.4 in all calculations. The effects of viscosity, molecular diffusion, and thermal conductivity are neglected. Note that the gas velocity \(v\) in the system of equations (1) is related to the speed of the LSW through the following equation:

$$v = u + D,$$

where \(u\) is the gas velocity in the SAF. The second of the system of equations (1), the momentum equation written in terms of the velocity \(u,\) will look like this:

$$\frac{{\partial u}}{{\partial t}} + \frac{{\partial D}}{{\partial t}} + u\frac{{\partial u}}{{\partial x}} + \frac{1}{\rho }\frac{{\partial p}}{{\partial x}} = 0,$$
(2)

which coincides with the classical result from [27]. Equation (2) differs from the usual Euler equation by adding the inertia force \({{\partial D} \mathord{\left/ {\vphantom {{\partial D} {\partial t}}} \right. \kern-0em} {\partial t}}.\)

To determine the SW velocity in the SAF, the defining system of equations (1) is written in characteristic form along the \({{C}_{ + }}\)-characteristics:

$$\left\{ {\begin{array}{*{20}{l}} {\frac{{dp}}{{dt}} + \rho c\frac{{dv}}{{dt}} = 0,} \\ {\frac{{dx}}{{dt}} = v + c - D,} \\ {{{\rho }_{0}} = {{\rho }_{0}}\left( t \right),\,\,\,\,{{p}_{0}} = {{p}_{0}}\left( t \right),\,\,\,\,{{v}_{0}} = {{v}_{0}}\left( t \right),} \end{array}} \right.$$
(3)

where, in the first equation of the system, the material derivative along the \({{C}_{ + }}\)-characteristic is denoted through d/dt; and the speed of sound, through \(c\). Subscript 0 denotes the parameters ahead of the LSW front. In the laboratory coordinate system, these are known functions of the spatial coordinate, and in the SAF formulation under consideration, these are known functions of time. In this study

$${{\rho }_{0}} = {{\rho }_{0}}\left( {{{x}_{0}} + \int\limits_0^t {D\left( \tau \right)d\tau } } \right),\,\,\,{{p}_{0}} = {\text{const}},\,\,\,{{v}_{0}} = {\text{const}}.$$
(4)

The initial SW coordinate is indicated through \({{x}_{0}}\).

The possibility of determining the LSW velocity when considering system (3) is due to the results of [19], in which the dynamics of detonation wave propagation were studied in a homogeneous medium, i.e., when \({{\rho }_{0}} = {\text{const}}.\) A specific difference implementation leading to an expression for the current LSW velocity is given below in the section with the computational algorithm.

The defining system of equations is solved on a fixed interval \(\left[ { - H;0} \right].\) The right boundary corresponds to the LSW front. The boundary conditions determined by the Rankine–Hugoniot relations on a jump moving at the current velocity \(D,\) which is found as a result of solving the system of equations (3) and (4) (see the next section), are set on it. The length of the computational area \(H\) was chosen sufficiently large so that, for the problems under consideration, the left boundary of the region did not affect the dynamics of the LSW front. Formally, the left boundary of the region was considered free and zero-order extrapolation boundary conditions were used.

As the initial conditions in the entire computational domain, the same parameters are set behind the front of the SW with the Mach number \(M,\) which at the initial moment of time begins to interact with the spatial inhomogeneity of the density on the path of its propagation:

$$\begin{gathered} {{p}_{s}} = {{p}_{0}} + {{p}_{0}}\frac{{2\gamma \left( {{{M}^{2}} - 1} \right)}}{{\left( {\gamma + 1} \right)}},\,\,\,\,{{\rho }_{s}} = \frac{{{{\rho }_{0}}\left( {{{x}_{0}}} \right)\left( {\gamma + 1} \right){{M}^{2}}}}{{\left( {\gamma - 1} \right){{M}^{2}} + 2}}, \\ {{v}_{s}} = \frac{{2\left( {{{M}^{2}} - 1} \right)}}{{\left( {\gamma + 1} \right)M}}{{\left( {\frac{{\gamma {{p}_{0}}}}{{{{\rho }_{0}}\left( {{{x}_{0}}} \right)}}} \right)}^{{{1 \mathord{\left/ {\vphantom {1 2}} \right. \kern-0em} 2}}}}. \\ \end{gathered} $$
(5)

COMPUTATIONAL ALGORITHM

The computational area is covered by a uniform computational mesh. The computational cells are numbered from 1 to \(N.\) For the numerical integration of the system of equations (1), the finite-volume discretization of the convective part and the explicit Euler time integration scheme are used. The parameters on the cell faces are determined as a result of a piecewise linear reconstruction of the vector of conservative variables using the minmod limiter. The time integration step is selected dynamically to ensure stability on the selected mesh. The numerical flux, which is calculated by the grid-characteristic version of the Courant–Isaacson–Rees scheme [28] takes into account the SW velocity implicitly. In this part of solving the equations of gas dynamics without taking into account the occurrence of chemical reactions, the algorithm does not differ from the technique described in detail in [17, 18].

The main difference from previous works in terms of the computational algorithm is related to the method of integrating the equations for finding the LSW velocity, since the parameters of the medium in front of the SW are now inhomogeneous. The discretization of the system of equations (3) and (4) is as follows [19]:

$$\left\{ {\begin{array}{*{20}{l}} {p_{s}^{{n + 1}} - p_{{\text{*}}}^{n} + \frac{1}{2}\left( {\left( {\rho c} \right)_{{\text{*}}}^{n} + \left( {\rho c} \right)_{s}^{{n + 1}}} \right)\left( {v_{s}^{{n + 1}} - v_{{\text{*}}}^{n}} \right) = 0,} \\ { - x_{{\text{*}}}^{n} = \left( {c_{{\text{*}}}^{n} + v_{{\text{*}}}^{n} - {{D}^{n}}} \right)\Delta {{t}^{n}},} \\ {\rho _{0}^{{n + 1}} = {{\rho }_{0}}\left[ {{{x}_{0}} + {{L}^{n}} + {{{\left( {\frac{{\gamma p_{0}^{{n + 1}}}}{{\rho _{0}^{{n + 1}}}}} \right)}}^{{{1 \mathord{\left/ {\vphantom {1 2}} \right. \kern-0em} 2}}}}{{M}^{{n + 1}}}\Delta {{t}^{n}}} \right].} \end{array}} \right.$$
(6)

Subscript s denotes the parameters on the jump at \({{x}_{s}} = 0,\) index *, the parameters at the point of intersection of the \({{C}_{ + }}\)-characteristic with the x axis (see Fig. 1). The path traveled by the LSW at the moment of time \({{t}^{n}}\) is indicated through Ln.

$${{L}^{n}} = \sum\limits_{j = 0}^n {{{D}^{j}}\Delta {{t}^{j}}} .$$
Fig. 1.
figure 1

Mesh template of the difference scheme for calculating the velocity of the LSW.

Parameters with index * are found using linear interpolation from the known parameters at points \({{x}_{N}} = - \Delta x{\text{/}}2\) (the center of the last cell in the computational domain) and \({{x}_{s}} = 0\) and have the form

$$\begin{array}{*{20}{c}} {p_{{\text{*}}}^{n} = p_{s}^{n} + \frac{{x_{{\text{*}}}^{n}}}{{\Delta x{\text{/}}2}}\left( {p_{s}^{n} - p_{N}^{n}} \right){\text{,}}\,\,\,v_{{\text{*}}}^{n} = v_{s}^{n} + \frac{{x_{{\text{*}}}^{n}}}{{\Delta x{\text{/}}2}}\left( {v_{s}^{n} - v_{N}^{n}} \right),} \\ {\rho _{{\text{*}}}^{n} = \rho _{s}^{n} + \frac{{x_{{\text{*}}}^{n}}}{{\Delta x{\text{/}}2}}\left( {\rho _{s}^{n} - \rho _{N}^{n}} \right),\,\,\,\,c_{{\text{*}}}^{n} = {{{\left( {\gamma \frac{{p_{{\text{*}}}^{n}}}{{\rho _{{\text{*}}}^{n}}}} \right)}}^{{{1 \mathord{\left/ {\vphantom {1 2}} \right. \kern-0em} 2}}}}.} \end{array}$$
(7)

The expression for the coordinate of the intersection point of the C+-characteristic with the x axis follows from the second equation of system (6):

$$x_{*}^{n} = - \frac{{\left( {c_{s}^{n} + {v}_{s}^{n} - {{D}^{n}}} \right)\Delta {{t}^{n}}}}{{1 + \frac{{2\Delta {{t}^{n}}}}{{\Delta x}}\left( {c_{s}^{n} - c_{N}^{n} + {v}_{s}^{n} - {v}_{N}^{n}} \right)}}.$$
(8)

The parameters of point \({{x}_{s}} = 0\) at time \(t = {{t}^{{n + 1}}}\) are determined from the Rankine–Hugoniot relations analogous to parameters (5) as

$$\begin{gathered} p_{s}^{{n + 1}} = {{p}_{0}}\left( {1 + \frac{{2\gamma \left( {{{{\left( {{{M}^{{n + 1}}}} \right)}}^{2}} - 1} \right)}}{{\gamma + 1}}} \right);{{\;}} \\ \rho _{s}^{{n + 1}} = \rho _{0}^{{n + 1}}\frac{{\left( {\gamma + 1} \right){{{\left( {{{M}^{{n + 1}}}} \right)}}^{2}}}}{{\left( {\gamma - 1} \right){{{\left( {{{M}^{{n + 1}}}} \right)}}^{2}} + 2}}, \\ v_{s}^{{n + 1}} = c_{s}^{{n + 1}}\frac{{2\left( {{{{\left( {{{M}^{{n + 1}}}} \right)}}^{2}} - 1} \right)}}{{\left( {\gamma + 1} \right){{{\left( {{{M}^{{n + 1}}}} \right)}}^{2}}}};{{\;}}c_{s}^{{n + 1}} = \sqrt {\gamma \frac{{p_{s}^{{n + 1}}}}{{\rho _{s}^{{n + 1}}}}} . \\ \end{gathered} $$
(9)

Substituting expressions (7)–(9) into (6) leads to a system of two nonlinear algebraic equations for unknown parameters \({{M}^{{n + 1}}}\) and \(\rho _{0}^{{n + 1}},\) which is solved numerically by Newton’s method. The boundary conditions are implemented by setting the parameters in fictitious cells. To calculate the fluxes through the left and right faces of the computational domain, fictitious cells with indices \(m = - 1\) and \(m = N\) are introduced. Zero-order extrapolation is applied on the left boundary of the computational domain:

$${\mathbf{u}}_{{ - 1}}^{n} = {\mathbf{u}}_{0}^{n}.$$

On the right boundary, the parameters in the fictitious cell are equal to the current parameters behind the LSW front:

$$\rho _{N}^{n} = \rho _{s}^{n},\,\,\,\,v_{N}^{n} = v_{s}^{n},\,\,\,\,p_{N}^{n} = p_{s}^{n}.$$

PROPAGATION OF A SHOCK WAVE IN A MEDIUM WITH A LINEAR DENSITY GRADIENT

Before considering the problem of SW propagation in a medium with a sinusoidal density distribution, let us first consider a simpler problem, when the density in front of the SW changes linearly: it increases or decreases. First, there are analytical estimates for the solution for this problem. Second, a clear qualitative analogy can be drawn between the smooth sinusoidal density profile and the piecewise linear profile with alternating areas of increasing and decreasing density.

The problem of SW propagation in a medium with a linear density gradient has been studied by many authors. Similar to the problem of the SW interaction with a single contact discontinuity [29], when the SW interacts with the density gradient, contact discontinuities and rarefaction or compression waves (depending on the sign of the gradient) are formed. Rarefaction or compression waves interact with contact discontinuities with the formation of rereflected waves, which also affect the dynamics of the LSW motion. In the work [30], using numerical analysis, the influence of rereflected waves on the LSW front was studied depending on various factors, such as the Mach number of the wave, the absolute value and sign of the density gradient, and the type of density profile (linear change or power law). The conclusions were based on a comparison of the numerical results with the analytical solution of Chisnell–Whitham [24, 25] (see Appendix A). One of the main assumptions in constructing the analytical Chisnell–Whitham solution is the absence of the effect of rereflected waves on the LSW front. Note that analytical estimates of the flow parameters in shock-wave problems are also of independent interest, for example, in problems of SW propagation in two-phase media [3133] and in channels of a complex shape [34].

The computational domain is the segment [–10;0]. The values of the initial density, velocity, and pressure in the entire computational domain correspond to the parameters behind the SW with the number \(M = 3.0.\) In front of the LSW front, there is a gas at rest at a pressure of \({{p}_{0}} = 1.0.\) In the section of finite length of 1.0, the gas density changes according to a linear law:

$${{\rho }_{0}}\left( t \right) = \left\{ {\begin{array}{*{20}{c}} {a\int\limits_0^t {D\left( \tau \right)d\tau } + b,\,\,{\text{if}}\,\,\int\limits_0^t {D\left( \tau \right)d\tau } < 1.0,~} \\ {a + b,\,\,{\text{otherwise}}{\text{.}}} \end{array}} \right.$$
(10)

For the case of a linearly growing gas density ahead of the LSW front \(a = 7.0\) and \(b = 1.0.\) For the case of linearly decreasing density \(a = - 7.0\) and \(b = 8.0.\) Numerical setting parameters are taken from [30] (law of density change (10) and specific values \(a\) and \(b\)) and [26] (SW intensity). Hereinafter, all parameters are given in a dimensionless form. The calculations were carried out on a mesh with the number of cells \(N = 2000.\)

We first consider the case of a linearly growing density gradient. The SW overcomes the area with inhomogeneous density in time \({{t}_{A}} \approx 0.43\) (see Figs. 2, 3). The procedure for constructing characteristics is described in Appendix B. During this period of time, compression waves and contact discontinuities are generated behind the LSW front. In this case, the velocity of the LSW decreases and the Mach number increases. Both before and after the moment in time \({{t}_{A}}\), the analytical solution of Chisnell–Whitham (curve 4 in Fig. 3), which does not take into account the effect of the rereflected waves on the LSW, differs greatly from the numerical solution (curve 2 in Fig. 3). Note that in [35] a modification of the analytical theory of Chisnell–Whitham is presented for the possibility of taking into account the effect of rereflected waves on the LSW.

Fig. 2.
figure 2

A family of characteristics in the problem of SW propagation over a section of a medium of finite length with a linearly increasing density gradient.

Fig. 3.
figure 3

Dynamics of change of velocity (curve 1) and the Mach number of the LSW (curve 2) in the problem of SW propagation over a section of a medium of finite length with a linearly increasing density gradient (curve 3, density ahead of the LSW front). Dashed-dotted curve 4 is the analytical Chisnell–Whitham solution. Dashed-dotted line 5 is an asymptotic solution.

After the density in front of the wave becomes constant, the wave velocity and Mach number decrease under the influence of the waves reflected from the contact discontinuities behind the wave and that are catching up with the LSW. The main changes continue until the wave reflected from the contact discontinuity following along the \({{C}_{0}}\)-characteristic, released at the initial moment of time, catches up with the LSW when \({{t}_{B}} \approx 1.\) At this point in time, the LSW Mach number reaches a value close to the asymptotic value (straight line 5 in Fig. 3). This asymptotic behavior is determined by the solution of the Riemann problem. The parameters on one side of the discontinuity in this Riemann problem are the parameters behind the SW front with a Mach number of 3.0, corresponding to the initial time when the density value in front of the SW is 1.0. The parameters on the right are the final parameters before the SW, corresponding to the point in time when the density stops changing and its value becomes 8.0.

Figure 2 shows that the \({{C}_{ - }}\)-characteristic, along which the compression waves reflected from the LSW follow, gradually merge into the characteristic following from the origin of coordinates. For this reason, the length of the compression wave decreases as it propagates. For example, at the time \({{t}_{B}} \approx 1\) in Figs. 2 and 4, its boundaries are indicated by dots K and G. The contact discontinuities formed during the passage of the LSW in the region of variable density move at a constant speed. The boundary of the area of contact discontinuities is indicated in Figs. 2 and 4 by dots E and F. The pressure and velocity in the region between the LSW and the tail of the compression wave in the time interval from \({{t}_{A}}\) to \({{t}_{B}}\) (for example, for the moment in time \({{t}_{B}}\), this is the area \(\left[ {{{x}_{{\text{G}}}};0} \right]\) in Fig. 4) are not constant due to the effect of the characteristics from the reflected characteristic triangle, IAB, in Fig. 2. The time during which the rereflected waves continue to affect the LSW, despite the fact that the density in front of the SW is constant, is correlated to the time it takes for the wave reflected from point A to move to point I; and also for the wave rereflected from point I to move to point B.

Fig. 4.
figure 4

Calculated spatial distribution profiles behind the LSW front in the problem of SW propagation over a medium section of finite length with a linearly increasing density gradient at the time instant t = 1.0. Curve 1, the density distribution; 2, velocity distribution; 3, pressure distribution.

A similar study was carried out for the case of a density decreasing ahead of the LSW front. In this case, the SW overcomes the area with the density gradient in the time ≈0.66. Instead of compression waves, rarefaction waves are generated behind the LSW front. In this case, in contrast to the case with increasing density in front of the LSW, the LSW velocity increases and the Mach number decreases. Also, the analytical solution of Chisnell–Whitham, which does not take into account the effect of rereflected waves on the LSW, practically does not differ from the numerical one until the time t = 0.66, when the analytical solution reaches the stationary level. According to the assumption made in [30], this indicates that the rereflected waves have almost no effect on the final solution in this region. This assumption is supported by the characteristic analysis carried out. Characteristics \({{C}_{ + }},\) deviating from the LSW at first, reach the right boundary of the computational domain much later, and, accordingly, their influence on the LSW also begins later. Characteristics \({{C}_{ - }},\) along which the rarefied waves reflected from the LSW follow, gradually diverge, and the distance between them increases.

After the density in front of the wave becomes constant, its velocity and Mach number increase under the influence of waves reflected from the contact discontinuities behind the wave and that are catching up with the LSW. This continues until the last rereflected wave catches up with the LSW at time \(t \approx 3.69.\) By this time, the Mach number reaches the asymptotic level.

PROPAGATION OF A SHOCK WAVE IN A MEDIUM WITH A SINUSOIDAL DENSITY DISTRIBUTION

The problem of SW interaction with a sinusoidal density disturbance was considered in the article [26] (hence its name, the Shu–Osher problem) as an example illustrating the properties of high-order ENO schemes. Over time, this problem has become a common and rather tough test for checking the implementation and properties of shock-capturing methods for solving the Euler equations, since the solution to the problem is a flow whose field contains both smooth structures and moving discontinuities. For the same reason, the Shu–Osher problem is often used to test methods for calculating flows with detonation waves (see, for example, [36, 37]), since the structure of the detonation wave front includes both the LSW and the region of smooth parameter variation behind it, which should be very well resolved. The resolution of smooth flow regions is possible using schemes of a higher order of accuracy, which, at the same time, must be sufficiently stable and not lead to the appearance of nonphysical oscillations in the vicinity of gas-dynamic discontinuities. The Shu–Osher problem does not have an exact solution, and the solution from [26], obtained on a mesh with a resolution of 6.25 × 10–3 by the shock-capturing method of the third order of accuracy is considered as the standard.

Note the works [35, 38, 39], in which to study SW propagation in a medium with a nonuniform density distribution, including in model formulations close to the Shu–Oscher problem, methods were used that track the LSW front. These methods, in a sense close to the algorithm proposed in this paper, were based on the apparatus of moving meshes or were varieties of the immersed boundary method.

The computational domain is the segment [–20;0]. The values of the initial density, velocity, and pressure in the entire computational domain correspond to the parameters behind the SW with the number \(M = 3.0.\) In front of the LSW front, there is a gas at rest at a pressure of \({{p}_{0}} = 1.0,\) whose density varies according to the law

$${{\rho }_{0}}\left( t \right) = 1 + \varepsilon \sin \left( {a\int\limits_0^t {D\left( \tau \right)d\tau } } \right),$$

where \(\varepsilon = 0.2\) and \(a = 5.0.\) The calculations were carried out on a mesh with \(N = 4000\) cells.

At the initial moment of time and up to the moment \(t \approx 0.154\), the density in front of the SW increases according to the sinusoidal law. As in the problem with a linearly growing density ahead of the LSW front, this is accompanied by the formation of compression waves and contact discontinuities (see Fig. 5). In this case, the Mach number of the LSW increases, while its speed decreases. Waves reflected from the LSW and following along the characteristics \({{C}_{ - }},\) gradually merge into one characteristic, catching up with each other. The compression wave front becomes steeper with time. As a result, this process leads to the formation of internal SWs. At the point in time \(t \approx 0.154\) the density in front of the LSW begins to decrease, and, similarly to the case of a decreasing linear density gradient described earlier, now rarefaction waves follow along the characteristics \({{C}_{ - }}\); and the LSW starts accelerating, and its Mach number decreases. Further, the process is repeated cyclically as the SW moves through the medium with variable density.

Fig. 5.
figure 5

Family of characteristics in the Shu–Osher problem. Dashed horizontal straight lines denote the time moments corresponding to the maximum values of the density in front of the LSW, and the dashed-dotted lines are the minimum values.

Figure 6 shows the image of the gas density profile behind the LSW at time \(t = 1.8\) in comparison with the profile from the work [26]. At \( - 1.69 < x < 0\) the density graph has the form of an oscillating curve, which is related to the propagation to the left of the contact discontinuities reflected from the LSW, as well as the influence on this region of characteristics \({{C}_{ + }}\) and \({{C}_{ - }},\) rereflected inside the zone of the contact discontinuities. We can see a good agreement between the result obtained in the calculation using the proposed algorithm and the reference result [26].

Fig. 6.
figure 6

Spatial profiles of the gas density behind the LSW front in the Shu–Osher problem at the instant of time t = 1.8. The solid line is the calculation of the authors and the dots are the calculation from [26].

Some inaccuracy in the phase of the peaks in the region of contact discontinuities is related to errors in the digitization of the results [26], the incomplete identity of the time points for comparing the results, and the need to match the graphs relative to the current position of the LSW front for direct comparison of the results. The differences in the amplitudes of the peaks located at a distance from the LSW front are important. As shown, for example, in [40], the underestimation of the peak amplitude is related to the insufficiently high order of accuracy of the numerical method. When using methods of the third and higher orders of accuracy, the correspondence to the data [26] in this part will be better. The specifics of solving the problem in the SAF may also require the use of a more accurate algorithm for determining the speed of the LSW. In the work [17], for these purposes, we used a locally quadratic approximation of the characteristic \({{C}_{ + }}\) in the vicinity of the LSW.

CONCLUSIONS

1. This paper proposes an algorithm for calculating the propagation of an SW in a medium with a variable density in the shock-attached frame. Using the works [17, 18], the described algorithm can be generalized to the case of chemically reacting media in the one- and two-stage kinetic models and applied to study the mechanisms of detonation wave propagation in inhomogeneous media.

2. The operability of the computational algorithm is demonstrated for two types of inhomogeneities in front of the SW: a segment of finite length with a linear density gradient and a sinusoidal density distribution. For the case of a linear gradient, the obtained results are compared with the analytical Chisnell–Whitham theory, which does not take into account the effect of rereflected waves on the LSW. Good agreement was obtained for the case of decreasing density in front of the SW and discrepancy between the results for the case of increasing density, which is due to the different degrees of influence of rereflected waves on the leading shock. The solution of the problem of the interaction of an SW with a sinusoidal density distribution (the Shu–Osher problem) was compared with the solution presented in [26]. Good agreement is obtained, except for the amplitudes of some peaks in the zone of contact discontinuities. At the level of characteristics, it is shown that the solution of the Shu–Osher problem cyclically combines elements of the solution of the problem of decreasing and increasing linear density gradients in front of the wave.

3. The problems considered in this article serve not only to validate the computational algorithm, they also demonstrate the main idea of the study in the shock-attached frame. Such a mathematical apparatus makes it possible to carry out qualitative and quantitative studies of flows with shock and detonation waves in terms of the behavior of the characteristics that reveal the mechanics of gas-dynamic processes.