1. Introduction
Compressible flows simulation presents a significant challenge due to the existence of discontinuities in the fluid flow, including shocks, contact waves, and a wide range of continuous flow scales. To address these challenges, various high-resolution methods have been developed to accurately resolve smooth flow scales while simultaneously capturing discontinuities. All numerical methods can be categorized into direct numerical simulation (DNS) [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17], large eddy simulation (LES) [
18,
19], and Reynolds-averaged Navier–Stokes simulation (RANS) [
20,
21,
22]. The method proposed in this paper belongs to the class of DNS methods.
Notable examples include the artificial viscosity method [
1,
2], the total variation diminishing (TVD) method [
3], the essentially non-oscillatory (ENO) scheme [
4], and the weighted essentially non-oscillatory (WENO) scheme [
5]. Harten et al. developed the ENO scheme [
4,
6,
7,
8], the first successful high-order method to allow the spatial discretization of hyperbolic conservation laws. This property is very useful for the numerical simulation of hyperbolic conservation laws because high-order numerical methods often cause false vibrations, especially near shocks or other interruptions. The spatial discretization of finite volumes of ENO has been studied [
4], where it has been shown that it is uniformly accurate in the capturing of the location of any discontinuity in the flow. Subsequently, Shu and Osher [
9,
10] developed a finite difference ENO scheme. The main idea of the ENO scheme is to select the interpolation point stencil that suppresses the oscillations, i.e., to choose the best solution varying stencil, to approximate the cell boundary flow, and to avoid large false oscillations caused by interpolating data between discontinuities.
WENO schemes have been studied [
5,
11,
12] to deal with potential numerical instability when selecting ENO stencils. The WENO method applies to a convex combination of all ENO stencils, which obtains higher precision in smooth regions than the ENO method while maintaining the ENO property at discontinuities.
The abovementioned methods belong to the class of Euler-type methods. These methods [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13] exhibit numerical viscosity in the presence of shocks. Additionally, methods exist [
14,
15,
16,
17] that incorporate exact Riemann solutions while still being classified as Euler-type methods, which also exhibit numerical viscosity for shocks. Godunov et al. [
14] proposed mitigating this issue by using moving grids; however, this approach significantly complicates the problem, particularly in multi-dimensional cases.
For highly rarefied gases, in particular, the direct simulation Monte Carlo (DSMC) method is applied, in the numerical scheme of which the fact of instantaneous change in flow parameters on shock waves is used [
23].
In [
24], we proposed a Lagrangian Godunov-type method that eliminates the numerical viscosity for shocks and provided a detailed description of the wall conditions. The method utilizes a fixed homogeneous grid. This paper presents a modified method that involves altering the formula for the density calculation in rarefaction waves. It was found that this formula allows obtaining good results for all types of test problems solved in [
24]. While in work [
24], two different formulas were used to obtain successful results: the linear law of the distribution of flow parameters in a rarefaction wave for the Shu and Osher shock tube problem [
25] and the nonlinear law for the remaining problems of consideration. In addition, the following innovation is proposed here, which consists of considering an additional condition on the direction of the shock wave at the stage of calculating the acoustic substep. Moreover, this innovation, introduced into the scheme of the method, does not affect the results of the test problems already considered in [
24], but manifests itself only in the numerical solution of the two last test cases of the interaction of two Riemann problems presented in this work.
2. Materials and Methods
In the case of the one-dimensional scalar hyperbolic conservation law [
13], the equations are given as follows:
Here, u is the convective velocity of flow, is the density, is the pressure, is the internal specific energy, x is the direction, and t is the time.
The pressure is determined using the equation of state
where
is the ratio of specific heat coefficients at constant pressure and volume. For air,
.
Godunov et al. [
14] proposed an iterative exact Riemann solver, which was implemented in a finite-difference scheme. Later, other researchers adopted a control volume method instead, while we employed the Lagrangian approach.
In this paper, as well as in a previous paper [
24], the following method is proposed: The convection and acoustic stages are considered separately and are classified as distinct physical processes because the local acoustic velocity (i.e., sound speed) can vary significantly from the flow convection velocity. Therefore, we solve the following system during the acoustic stage:
and Equation (2). The system (3) is derived from (1) by discarding the convective terms and can be expressed in a matrix form as follows:
where
is the Jacobian matrix:
The matrix
can be expressed as
where
is the diagonal matrix of eigenvalues of the matrix
.
Here
is the sound velocity, which is determined as follows:
A corresponding left-eigenvector matrix
, determined as
and a corresponding right eigenvectors matrix
, defined as
Since
where
is a diagonal identity matrix, multiplying Equation (4) from the left by
and applying (11) results in the following:
If
, from (12) we can obtain the characteristic form:
where
Here, an asterisk represents constant values. Equation (13) describes the motion of two waves with velocities and . The waves transfer the values and as given in (14), respectively.
The proposed Lagrangian approach can be used to solve the system of Equation (13). However, as in the previous paper [
24], we use the Godunov exact solver to solve the full nonlinear systems (1) and (2). We then subtract the convective velocity from the solution to obtain the solution of Equation (3). For more details, see below.
We accept the time step
at the acoustic stage in accordance with the Courant criterion:
where
is the shock acoustic velocity and
is integer. For example, if
, then the shock spreads through three grid cells during the acoustic stage.
During the convection stage, only the system with convective terms is solved:
as well as Equation (13).
The time step during the convection stage is taken to be similar to that of (15):
where
is the shock convective velocity and
is integer. For example, if
, then the shock spreads through two grid cells at the convection stage. If
, then the marching time steps
is chosen so that
where
and
are integers.
2.1. A Methodological Scheme During the Acoustics Stage
During the acoustics stage, the system of Equation (3) is solved. Although the wave equation system (13) cannot be derived for a nonlinear problem, the fundamental properties of the linear system (13) are retained in the nonlinear system (3). The topologies of the nonlinear and linear systems are identical. This phenomenon corresponds to either a shock wave or a rarefaction wave [
14]. Unfortunately, the variables
and
for the nonlinear system (3) are unknown. However, the exact solution of the Riemann problem for the nonlinear systems (1) and (2) can be determined using the Godunov method [
14]. This solution is represented using the large variables:
and
for density,
for speed,
and
for internal specific energy,
for pressure,
and
for the propagation velocity frequency of shock or rarefaction waves. The subscripts
and
denote the left and right cells adjacent to the edge between them.
In the proposed method, and (14) are replaced by and , which are each transported by the local acoustic velocities and .
First, we must solve the Riemann problem using the Godunov method [
14] for each pair of cells (
and
) with the corresponding data (
and
), respectively. Therefore, the values of the large variables
are obtained and assigned to the grid cells as follows:
which causes the vector
of the wave to spread to the left, along the negative direction of the x-axis; and
which causes the vector
of the wave to spread to the right, along the positive direction of the x-axis. In the case of a rarefaction wave, the variable D represents the wave velocity of the slower characteristic. For instance, for the right rarefaction wave, D
R is determined as
where
is the sound velocity for
grid cell, which is determined according to the Formula (8). For the left rarefaction wave
is given as follows:
Examine a wave spreading in the positive x-direction (toward the right). The grid cells are examined in pairs. The coordinates of the cells after transfer during the acoustic stage for the right wave
are determined as follows:
The solution to the problem is expressed in the following form:
- (1)
If the conditions
are met, then for all grid cells satisfying condition
, the solution at the next time step k is trivial and can be expressed as
- (2)
If the co nditions
are satisfied, a weak shock occurs, which does not overtake the solution from the preceding cell. Therefore, the solution is given as follows:
- (3)
- (A)
if
then we have the shock.
- -
- -
if
then
The modification of the method proposed in this article, compared to work [
24], consists of introducing the conditions (30) and (33). Instead of checking these conditions, in [
24] Formulas (31) and (32) were calculated, and Formulas (34) and (35) were not.
- (B)
If
then a rarefaction wave occurs, and the solution for
is determined from the Riemann invariants of the hyperbolic conservation law as
It will be shown below that using Formula (39) instead of the formula from [
24] allows us to obtain a universal scheme of the method, with good results being obtained for all test problems considered in this work. In this case, parasitic sawtooth oscillations do not arise in the case of using Formula (39) when solving the Shu and Osher problem, as well as test examples about the interaction of two Riemann problems. The algorithm for the acoustic stage is presented as a flowchart in
Figure 1.
Under conditions (1)–(3), if the solution has already been assigned to the grid cell at the given substep, it is replaced with a new solution obtained using the exact Riemann solver. In this instance, the solution already assigned will be denoted with the subscript R, while the next solution applied to this cell will be denoted with the subscript L. The resulting new solution is obtained from the result of the Riemann problem with subscript R. Furthermore, when assigning a solution to the grid cell, the condition is checked to ensure that the spreading of these solutions with a local acoustic velocity does not overwrite the solution of the forward shock, if such a shock wave exists.
For the wave spreading in the negative x-direction (toward the left), and with transfer values , the conditions and expressions are derived in a similar manner.
After simulating wave spreading in both the left and right directions, each grid cell contains sets of transfer values,
and
, respectively, along with the solution from the previous time substep
(see
Figure 2). The Riemann problem for these values is solved three times using the Godunov exact solver. The first instance of solving the problem uses
as the left-state data and
as the right-state data (see
Figure 3), the resulting right solution is saved for the later calculations. The second instance of solving the problem uses
as the left-state data and
as the right-state data (see
Figure 4). The resulting left solution is then assigned as the right-state data for the third problem (see
Figure 5). The previously saved solution is assigned to the data of the third problem on the left (see
Figure 5). Finally, in the third instance, the problem is solved using the previously mentioned data (see
Figure 5), resulting in the values of the large variables
once again.
Since the pressure and convective velocity are identical on both the left and right sides, their values after the acoustic stage are given as
The density and energy values are determined as follows:
The solution at the acoustics stage is .
2.2. A Methodological Scheme During the Convection Stage
During the convection stage, the system of Equations (2) and (16) is solved. In the proposed method, the value
is transported using the local convective (advection) velocity
; see Formulas (41) and (42). In this approach, the results obtained from the acoustic stage serve as the initial input for the convection stage. Moreover, the grid cells were examined in pairs at the convection stage. The coordinates of the cells after transfer during the convection stage were determined as follows:
The variables here refer to the convection stage and further we omit subscript u.
The solution during the convection stage is expressed in the following form:
- (1)
If the conditions
are met, then for all grid cells satisfying condition
, the solution at the next time moment
is trivial and can be expressed as
When applying solution (45) to the grid cells, the separate condition is verified to ensure that its spreading with the convection velocity does not overwrite the solution of the forward shock, if such a shock wave exists. At the start of the convection stage, the positions of the shock boundaries at the next time step are determined.
- (2)
If the conditions
are satisfied, then we have the shock.
- (A)
If
then the solution is defined as follows:
- (a)
if
then the discontinuity boundary is first determined as
and the solution is applied to cell
to the left of the discontinuity boundary
and in cell
to the right of the discontinuity boundary, the following values are applied:
- (b)
if
then the solution is expressed as follows:
- (3)
If
then the rarefaction wave occurs, and the solution for
is determined from the Riemann invariants of the hyperbolic conservation law as
It will be shown below that Formula (61) using instead of the formula from [
24] allows us to obtain a universal scheme of the method, with good results being obtained for all test problems considered in this work. In this case, parasitic sawtooth oscillations do not arise in the case of using Formula (61) when solving the Shu and Osher problem, as well as test examples about the interaction of two Riemann problems. The algorithm for the convection stage is shown as a flowchart in
Figure 6.
Under conditions (1)–(3), if the solution has already been applied to the grid cell at the given substep, it is replaced with a new one when the pressure of the new solution is greater than the pressure of the solution already in the grid cell.
2.3. Wall Boundary Conditions
The main concept behind the choice of the following boundary conditions is to study the waves reflection mechanism from the wall. At the acoustics stage, when conditions (1)–(3) are met, the wave
spreads to the right with velocity
. Upon reaching the wall, it is reflected and transforms into a wave
, which then spreads to the left of the wall with velocity
. In this scenario, when the wave
is distributed across the grid cells, the dam-break problem is solved using the Godunov method. In this algorithm, the variables on the left correspond to the data already applied to the cell, while the variables on the right represent
. As a result, new values of the large variables
are obtained and applied to the grid cells as
For the wave
, which transforms into the wave
after encountering a wall
During the convection stage, a wave reverses direction upon encountering the wall. Under conditions (1)–(3) of this stage, the wave spreads to the right with velocity . Upon reaching the wall, it is reflected and transforms into a wave that moves to the left with velocity . In this scenario, when the wave is distributed across the grid cells, the dam-break problem is solved using the Godunov method. In this algorithm, the variables on the left correspond to the data already applied to the cell, while the variables on the right represent . As a result, new values of the large variables are obtained and applied to the grid cells as shown in (63). If the wave spreads to the left, a similar line of reasoning yields the result expressed in Formula (64).
3. Results
Seven Riemann problems are selected to evaluate the performance of the proposed method. These tests also serve to illustrate typical wave patterns arising from the solutions of the Riemann problems. The exact solutions for the test cases below were obtained using the formulas and methods described in [
26].
3.1. Sod’s Standard Shock-Tube Problem
The first example is the standard shock-tube problem of Sod [
27], with the following initial conditions:
The modeling region was defined as . The grid consisted of 100 cells, with a grid spacing of . The time step for the acoustics stage was determined based on the Courant criterion (15), with and , meaning that the shock spreads through a single grid cell with during this stage. Similarly, the time step for the convection stage was determined based on Equation (17), with and , indicating that the shock spreads through two grid cells with . The marching time step was therefore set to . The acoustics stage was executed over six time steps (i.e., ), followed by the convection stage, which was carried out after ten time steps (i.e., ).
The results after 110 marching time steps are presented in
Figure 7,
Figure 8 and
Figure 9, where they are compared with the exact solution and the data obtained using the previous author’s method [
24].
Figure 7,
Figure 8 and
Figure 9 show the agreement between the results for the previous and modified methods and demonstrate that the numerical viscosity is not present in the shock. However, due to the accumulation of positional round-off errors, the shock is delayed by one grid cell at the observed time.
A comparison of CPU time consumption between the new method and Harten’s ULT1C method [
3] for the Sod problem is presented in
Table 1. The results show that, for identical grids, the proposed method incurs a higher computational cost than the ULT1C scheme. However, we advise caution before drawing conclusions. A more detailed discussion of computational cost will be provided in
Section 3.7.
3.2. Lax’s Riemann Problem
The second example is the Riemann problem of Lax [
28], with the following initial conditions:
The modeling region was defined as . The grid consisted of 140 cells, with a grid spacing of h = 0.1. The time step for the acoustics stage was determined based on the Courant criterion (15), with and , meaning the shock spreads through two grid cells with during this stage. The time step for the convection stage was determined based on Equation (17), with and , indicating that the shock spreads through three grid cells with during this stage. The marching time step was set to . The acoustics and convection stages were executed during each marching time step, i.e., .
The results are presented in
Figure 10,
Figure 11 and
Figure 12, where they are compared with the exact solution and the data obtained using the previous author’s method [
24] at the time
.
Figure 10,
Figure 11 and
Figure 12 show the agreement between the results for the previous and modified methods and demonstrate that the numerical viscosity is not present in the shock. However, due to the accumulation of positional round-off errors, the shock is delayed by one grid cell at the observed time (see
Figure 10,
Figure 11 and
Figure 12), and the rarefaction wave propagates faster than that of the exact solution (see
Figure 11 and
Figure 12).
We repeated the calculation of the same problem using a different marching time step to demonstrate that the faster propagation of the rarefaction wave observed in the numerical solution is due to position rounding error. The time step for the acoustics stage was determined based on the Courant criterion (15), with and , implying that the second characteristic of the rarefaction wave spreads across four grid cells with a time step of . The time step for the convection stage was determined according to Equation (17), with and , indicating that the second characteristic of the rarefaction wave spreads across two grid cells with a time step of . The overall marching time step was set to . During each marching time step, both the acoustics and convection stages were executed, using .
The results are presented in
Figure 13,
Figure 14 and
Figure 15, where they are compared with the exact solution at time t = 2.032. These figures show improved agreement between the modified method and the exact solution for the rarefaction wave and illustrate that the shock is delayed by more than one grid cell at the observed time due to position round-off errors. Unfortunately, in this problem, it is not possible to eliminate the delay for both the shock wave and the rarefaction wave simultaneously.
3.3. The Shu–Osher Shock Tube Problem
The third example is the Shu–Osher shock-tube problem.
The Shu–Osher problem [
25] simulates the propagation of a normal shock front within a one-dimensional inviscid flow, incorporating artificial density fluctuations. The simulation is initialized with the following conditions:
The modeling region was defined as . Three types of grids were utilized: a coarse grid with 192 points, a fine grid with 384 points, and a finer grid with 1000 points. The time step for the acoustics stage was determined based on the Courant criterion (15), with and , meaning that the shock spreads across two grid cells during this stage for all grid resolutions. The corresponding time steps are for the coarse grid, for the fine grid, and for the finer grid. Similarly, the time step for the convection stage was determined based on Equation (17), with and , indicating that the shock spreads across five grid cells during this stage for all grids, and for the coarse grid, for the fine grid, and for the finer grid. The marching time step was set to for the coarse grid, for the fine grid, and for the finer grid. For each marching time step, both the acoustic and convection stages were executed, ensuring that .
The results are presented in
Figure 16,
Figure 17 and
Figure 18, where they are compared with the “exact” solution [
25] at t = 0.178. The results indicate that the fine and finer grids provide greater accuracy compared to the coarse grid. The proposed method has greater accuracy than the previous one [
24], as shown in
Figure 17. However, due to the accumulation of round-off errors in position calculations, the shock is delayed by several grid cells in the coarse grid results at the observed time.
3.4. The Double Expansion Wave Problem
The fourth example is the double expansion wave problem [
29], with initial conditions specified as follows:
The modeling region was defined as . Two types of grids were utilized: a coarse grid with 100 points, and a finer grid with 1000 points; the grid step was and , respectively. The time step for the acoustics stage was determined based on the Courant criterion (15), with , meaning the shock spreads through seven grid cells during this stage—for all grids. The time step for the convection stage was determined based on Equation (17), with , indicating that the shock spreads through two grid cells during this stage—for all grids. The marching time step was set to for the coarse grid, and for the finer grid. The acoustics and convection stages were executed during each marching time step, i.e., .
The results after 4 marching time steps for the coarse grid and after 40 marching time steps for the finer grid (t = 0.0008) are presented in
Figure 19,
Figure 20,
Figure 21,
Figure 22,
Figure 23 and
Figure 24, where they are compared with the exact solution.
Figure 19,
Figure 20 and
Figure 21 demonstrate a strong correlation between the exact and numerical solutions for the double expansion wave problem, while
Figure 20,
Figure 21 and
Figure 22 exhibit an even higher degree of agreement. The maximum relative differences in density (
), velocity (
), and pressure (
) between the present method and the previous method [
24], as depicted in
Figure 19,
Figure 20 and
Figure 21, are reported in
Table 2. Additionally,
Table 2 presents both the maximum and average relative errors between the present method and the exact solution, corresponding to
Figure 19,
Figure 20,
Figure 21,
Figure 22,
Figure 23 and
Figure 24. The relatively large maximum error in velocity is attributed to locations where the velocity approaches zero, leading to relative errors of up to 100% at those points. Nevertheless, the average relative errors between the present method and the exact solution do not exceed 4% on either grid, which is considered acceptable for engineering applications.
3.5. Fifth Test Problem
The fifth example presents a one-dimensional problem defined by specific initial conditions
In this case, at time
, a thin wall was lowered at the channel section
.
The modeling region was defined as . The grid consisted of 100 cells, with a grid spacing of . The time step for the acoustics stage was determined based on the Courant criterion (15), with , meaning the shock spreads through two grid cells during this stage. The time step for the convection stage was determined based on Equation (17), with , indicating that the shock spreads through five grid cells during this stage. The marching time step was set to . The acoustics and convection stages were executed during each marching time step, i.e., .
The results, compared with the exact solution at
, are presented in
Figure 25,
Figure 26 and
Figure 27.
Figure 25,
Figure 26 and
Figure 27 show the same results for the previous [
24] and modified methods. In this case, the shock does not induce any delay, nor is there any numerical viscosity associated with it.
3.6. Sixth Test Problem
Furthermore, we consider two (sixth and seventh) test examples of the interaction of two Riemann problems with different initial conditions. The initial conditions for the sixth example for the simulation are
This is a more complicated problem proposed by Sod [
27] (second and third lines of the formula), to which another discontinuity decay was added (using the first line of the Formula (70)).
The modeling region was defined as . The grid consisted of 400 cells, with a grid spacing of . The time step for the acoustics stage was determined based on the Courant criterion (15), with , meaning the shock spreads through two grid cells during this stage. The time step for the convection stage was determined based on Equation (17), with , indicating that the shock spreads through two grid cells during this stage. The marching time step was set to . The acoustics and convection stages were executed during each marching time step, i.e., .
The results are presented in
Figure 28,
Figure 29,
Figure 30,
Figure 31,
Figure 32 and
Figure 33, comparing the proposed method with the previous approach [
24] and the data obtained by Harten [
3] using the ULT1C scheme at
. It is important to note that more advanced numerical schemes, such as WENO [
30,
31], exhibit even higher numerical viscosity for shocks. Consequently, the ULT1C scheme was selected for comparison.
Figure 28,
Figure 29,
Figure 30,
Figure 31,
Figure 32 and
Figure 33 illustrate the absence of numerical viscosity for the shock, in contrast to Harten’s method. The proposed scheme allows us to obtain more universal and accurate results than the previous method [
24], and it has no sawtooth oscillations (dashed blue line).
3.7. Seventh Test Problem
The seventh example is the interaction of two Riemann problems with the initial conditions given by (71).
Also, this is a more complicated problem proposed by Sod [
27] (second and third lines of the formula), to which another discontinuity decay (stronger than in (70)) was added (using the first line of the Formula (71)).
The modeling region was defined as . The grid consisted of 400 cells, with a grid spacing of . The time step for the acoustics stage was determined based on the Courant criterion (15), with , meaning the shock spreads through three grid cells during this stage. The time step for the convection stage was determined based on Equation (17), with , indicating that the shock spreads through eleven grid cells during this stage. The marching time step was set to . The acoustics and convection stages were executed during each marching time step, i.e., .
The results are presented in
Figure 34,
Figure 35,
Figure 36,
Figure 37,
Figure 38 and
Figure 39, comparing the proposed method with the previous approach [
24] and the data obtained by Harten [
3] using the ULT1C scheme at
. The proposed scheme allows us to obtain more universal and accurate results than the previous method [
24] and it has no sawtooth oscillations (dashed blue line), while the TVD scheme shows strong numerical viscosity of the solution at the shock wave.
A comparison of CPU time consumption between the new method and Harten’s ULT1C method [
3] for the seventh problem is presented in
Table 3. The results show that, for the grid with 40,000 points, the proposed method incurs significantly higher computational costs compared to the ULT1C scheme. However, as illustrated in
Figure 46,
Figure 47 and
Figure 48, the results obtained with the proposed method on a grid with only 400 points are comparable to those obtained with the ULT1C method on a grid with 40,000 points, and moreover, the proposed method exhibits no numerical viscosity at the shock. Additionally, the computational cost of the proposed method for the grid with 400 points is substantially lower than that of the ULT1C scheme for the grid with 40,000 points. Thus, the proposed method enables faster solution times by employing a much coarser grid compared to the ULT1C method.