1 Introduction

Discontinuities, such as the shock wave and contact discontinuity, are an important physical phenomenon which widely exists in compressible flows. To date, the numerical study of discontinuities has become an indispensable part of computational fluid dynamics (CFD). More generally, the numerical methods simulating discontinuities can be divided into two categories: the shock-capturing method and the shock-fitting method.

Since the 1980s, the shock-capturing method, which is based on the same, discretized conservation form of the governing equations at all grid cells, has become the mainstream and played a significant role in numerous engineering applications and academic research. Although this method can automatically compute the most types of flows, a captured discontinuity is characterized by a specific thickness (typically spanning two or three grid cells), which is much larger than the physical thickness of the real discontinuity. On the other hand, in the numerical details of the shock-capturing process, the upstream grid points next to the shock must be computed using some downstream information; otherwise, they will always conserve defined variables of the upstream region, and thus, the shock will never be able to cross over these grid points. Physically, signals cannot be transmitted upstream across a shock, and this is what makes any capturing scheme physically invalid [1].

Furthermore, the accuracy in the downstream region of the captured discontinuities will inevitably decrease. Casper et al. [2] adopted a fourth-order nonlinear ENO scheme and a sixth-order linear finite difference scheme to simulate shock–sound interactions and found that the downstream accuracy is not improved along with the decrease in the shock thickness by using fine grids. Lee et al. [3] presented that there are spurious oscillations in the gradients of vorticity in the steady flow field behind the bow shock; meanwhile, their numerical experiments also indicated that the grid refinement cannot reduce the oscillations but only decrease the wavelength of oscillations, and by roughly aligning the shock with the grid-cell edges, the amplitude of these spurious oscillations can be reduced but not eliminated. In short, shock-capturing schemes often incur some numerical problems that compromise the solution quality [4] so that many additional improvements and modifications are necessary.

In fact, the shock-fitting method, which simply uses the Rankine–Hugoniot (R–H) jump relations to compute shock waves, was widely utilized at the dawn of CFD even earlier than the shock-capturing method [5]. In 1944, Emmons [6] first presented a shock-fitting approach to compute the compressible flow in a hyperbolic channel. Until the early 1980s, using the boundary shock-fitting method to solve supersonic flows over blunt bodies was a common method in aircraft design [7,8,9]. In the early 1970s, Moretti et al. [10] developed a new shock-fitting technique in the structured grid framework, the floating shock-fitting method, to simulate these flow fields with embedded shocks, and then many interesting application studies were successfully carried out [11,12,13]. However, since the shock-fitting method based on structured grids is difficult to be used for simulating complicated flow structures, the shock-capturing method, which is more automatic and convenient than shock-fitting methods, has gradually become popular since the late 1980s.

Recently, in order to break the aforementioned bottlenecks of the shock-capturing method, many scholars have been refocusing on the outmoded shock-fitting method. The latest progress can be seen in the academic monographs by Onofri and Paciorri [14]. For instance, Paciorri and Bonfiglioli [4, 15, 16] have successfully expanded the traditional shock-fitting method to unstructured grids and made a series of significant progress since 2006. Liu et al. have begun to study the shock-fitting method based on the unstructured dynamic grids technique and the cell-centered finite volume method since 2014. Firstly, a novel, unstructured boundary fitting solver (UBFs) [17] was successfully applied to the two-dimensional dynamic separation of fairings, regular and Mach reflection [18], shock–vortex interaction [19], and the interaction between a planar shock and a gas bubble [20]. Then, a more promising unstructured shock-fitting solver, mixed capturing and fitting solver (MCFs) [21], which can flexibly invoke the shock-capturing or shock-fitting codes to deal with the embedded shocks, has been proposed recently. However, to date, there still exist several serious impediments that make the replacement of the shock-capturing technique with the shock-fitting technique unfeasible for general problems [4]. Specifically, the aforementioned techniques often must rely on a preliminary shock-capturing solution to provide the initial location of discontinuities, no matter how simple the topologies of these discontinuities are.

In this paper, the aforementioned MCFs has been further developed to be a new solver, adaptive discontinuity fitting solver (ADFs), by making it capable of dealing with the complicated, multiple discontinuities located inside or at the boundary of computational domains. In Sect. 2, two strategies, direct-fitting and indirect-fitting, have been, respectively, proposed to efficiently compute simple and complex flows. Furthermore, several numerical cases are shown to confirm the potential of this algorithm in Sect. 3. In addition, there is a comparison between the fully-fitting and partially-fitting solutions that are both obtained in the discontinuity interaction region. It is clear that an accurate result can be acquired if all discontinuities in the vicinity of the interaction points are fitted. However, the computational accuracy of expansion waves can indeed significantly affect the downstream discontinuities.

2 Algorithms

In this work, the proposed ADFs can be viewed as an integration of the aforementioned UBFs [18] and MCFs [21]. Specifically, the new solver has no limitation on the locations of discontinuities, whether they are inside or at the boundary of computational domains. Moreover, according to the assigned property of grid nodes, the ADFs is capable of flexibly switching between the shock-capturing codes and the shock-fitting codes, as the MCFs.

The detailed introductions of the shock-capturing algorithm based on both the cell-centered finite volume method and the unstructured dynamic grids technique can be found in Refs. [19, 22].

2.1 Adaptive discontinuity fitting solver

We begin the description by assuming that at time level t the solution is known at all the triangular or tetrahedral grid cells in the entire flow field. The following paragraphs describe all the steps of ADFs in detail.

Step 1 Definition of the property for each grid node.

First and foremost, the property of each grid node in the entire flow field should be defined. Figure 1 shows that all the grid nodes can be marked as two main categories: the Ordinary-Node (O-N) and the Discontinuity-Node (D-N). Note that a D-N can be further marked as the shock node and the contact discontinuity node. Furthermore, at each O-N, there is only one set of state variables computed by the shock-capturing algorithm. By contrast, each D-N stores two sets of variables, corresponding to the upstream and downstream states.

Fig. 1
figure 1

Definition of the property for each grid node

Similarly, each grid facet, the interface between two adjacent grid cells, can be marked as the Ordinary-Facet (O-F) and the Discontinuity-Facet (D-F). Moreover, all the grid nodes on D-F must be D-N; otherwise, the grid facet will be marked as O-F. Note that there will be different treatments for O-F and D-F in the following steps. In short, this step aims to point out the grid nodes and facets that correspond to the discontinuities in the computational domain.

Step 2 Initialization of the state variables of each D-N.

After determining the discontinuity positions, the upstream and downstream state variables (\(\varvec{V} = [\rho , \varvec{u}, P]^{\mathrm {T}}\), where ρ is the density, \(\varvec{u}\) is the velocity vector, and P is the pressure) of each D-N should be initialized on the basis of the variables (\(\varvec{U} = [\rho , \varvec{u}, P]^{\mathrm {T}}\)) of the center of the adjacent grid cells. As shown in Fig. 2, the state variables of each D-N can be computed as follows:

$$\begin{aligned} \varvec{V}_{\mathrm {u},i} = \frac{\sum \nolimits _{k = 1}^{N_1} \alpha _{ik} \varvec{U}_{\mathrm {u}k} }{ \sum \nolimits _{k = 1}^{N_1} {\alpha _{ik}}},\quad \varvec{V}_{\mathrm {d},i} = \frac{\sum \nolimits _{k = 1}^{N_2} {{\alpha _{ik}}{\varvec{U}_{\mathrm {d}k}}} }{\sum \nolimits _{k = 1}^{N_2} {{\alpha _{ik}}} }, \end{aligned}$$
(1)

where N1 and N2 denote the number of adjacent grid cells located in the upstream and downstream regions, respectively; the subscripts u and d mark the upstream and downstream regions; \(\alpha _{ik} = \chi _{k} / |\varvec{R}_{ki}|\) is the weight coefficient of grid cell k; \({\varvec{R}}_{ki}\) is the distance vector from the center of grid cell k to D-N i.

In addition, the parameter χk judges whether D-N i is located in the influence zone of grid cell k:

$$\begin{aligned} \chi _{k} = \left\{ \begin{array}{ll} 1,&{}\quad M_{k} < 1~~\mathrm {or}~~( M_{k}> 1~~\mathrm {and}~~{\mu _{k}}\mathrm{{ > }}{\varepsilon _{ki}})\\ 0,&{}\quad \mathrm {else} \end{array}, \right. \end{aligned}$$
(2)

where \(M_{k} = {|\varvec{u}_{k}|}/{a_{k}}\) and μk = arcsin(1/Mk) are Mach number and the Mach cone angle, respectively; εki is the angle between the velocity vector \(\varvec{u}_{k}\) and the distance vector \({\varvec{R}}_{ki}\).

Fig. 2
figure 2

Initialization of the state variables of each D-N

Since the jump relations between upstream and downstream variables are established along the normal directions of discontinuity fronts, it is necessary to specify the normal direction \(\varvec{n}_{i}\) for each D-N:

$$\begin{aligned} \varvec{n}_{i} = \frac{\sum \nolimits _{k = 1}^{M} {{\alpha '_{ik}}\varvec{n}_{k}} }{\sum \nolimits _{k = 1}^{M} {\alpha '_{ik}} }, \end{aligned}$$
(3)

where \(\varvec{n}_{k}\) is the normal vector (from the upstream region to the downstream region) of D-F k that is adjacent to D-N i; αik is the weight coefficient of D-F k as the aforementioned αik.

Step 3 Computation of the state variables of each D-N.

Fig. 3
figure 3

Computation of the state variables of each D-N

In this step, the R–H jump relations and the Riemann invariants (J1, J2, and J3) are utilized to modify the state variables of the two sides of each D-N. As shown in Fig. 3, different treatments are required for shock waves and contact discontinuities. As for shock waves, the upstream state variables (\(\varvec{V}_{\mathrm {u}}\)) are assumed to be accurate because they cannot be affected by the downstream information in supersonic flows. However, the downstream state variables (\(\varvec{V}_{\mathrm {d}}\)) must be modified by the R–H jump relations. By contrast, as for contact discontinuities, the state variables of both sides ought to be updated on the basis of the Riemann invariants along with the different kinds of characteristic lines. The specific processes have been described in the previous work [19]. Finally, the modified variables \(\varvec{V}'_{\mathrm {u}},\varvec{V}'_{\mathrm {d}}\) and the motion velocity vector \(\varvec{\omega }\) of each D-N can be obtained.

Step 4 Computation of the motion velocity vectors of the interaction points (if necessary).

As for these flow fields with discontinuity interactions, the motion velocity \(\varvec{\omega }_{\mathrm {IP}}\) of each interaction point requires the special handling. Specifically, \(\varvec{\omega }_{\mathrm {IP}}\) can be computed by the combination of several discontinuity velocities obtained at the interaction point in step 3. Note that the combination will vary according to different interaction structures.

Fig. 4
figure 4

Sketches of the motion of the interaction points for five typical discontinuity interactions

Figure 4 shows five typical discontinuity interactions in 2D flow fields, and simultaneously, (4) indicates the corresponding computations of \(\varvec{\omega }_{\mathrm {IP}}\) in detail. It should be underlined that these combinations mainly make a modification on the basis of the incident shock speed \(\varvec{\omega }_{\mathrm {S1}}\) computed at the interaction point. Moreover, the motion velocity vectors of some other shocks and contact discontinuities computed at the interaction point are projected onto the tangential direction \(\varvec{\tau }_{1}\) of the incident shock and then added to \(\varvec{\omega }_{\mathrm {S1}}\). Various numerical experiments indicate that these treatments are capable of making the interaction point convergent to the accurate position.

$$\begin{aligned} \varvec{\omega }_\mathrm{T}= & {} \varvec{\omega }_\mathrm{S1} + ((\varvec{\omega }_\mathrm{S2}+\varvec{\omega }_\mathrm{S3}) \cdot \varvec{\tau }_{1}) \cdot \varvec{\tau }_{1}, \end{aligned}$$
(4a)
$$\begin{aligned} \varvec{\omega }_\mathrm{Q}= & {} \varvec{\omega }_\mathrm{S1} + ((\varvec{\omega }_\mathrm{S2} + \varvec{\omega }_\mathrm{S3} + \varvec{\omega }_\mathrm{S4}) \cdot \varvec{\tau }_{1}) \cdot \varvec{\tau }_{1}, \end{aligned}$$
(4b)
$$\begin{aligned} \varvec{\omega }_\mathrm{D}= & {} \varvec{\omega }_\mathrm{S1} + (\varvec{\omega }_\mathrm{CD2} \cdot \varvec{\tau }_{1}) \cdot \varvec{\tau }_{1}, \end{aligned}$$
(4c)
$$\begin{aligned} \varvec{\omega }_\mathrm{F}= & {} \varvec{\omega }_\mathrm{S1} + ((\varvec{\omega }_\mathrm{CD2}+\varvec{\omega }_\mathrm{S3}) \cdot \varvec{\tau }_{1}) \cdot \varvec{\tau }_{1}, \end{aligned}$$
(4d)
$$\begin{aligned} \varvec{\omega }_\mathrm{E}= & {} \varvec{\omega }_\mathrm{S1} + ((\varvec{\omega }_\mathrm{S2}+\varvec{\omega }_\mathrm{S3}) \cdot \varvec{\tau }_{1}) \cdot \varvec{\tau }_{1}. \end{aligned}$$
(4e)

Step 5 Mesh movement or re-meshing.

After determining the motion velocity \(\varvec{\omega }\) of any D-N, the displacement vector of each D-N can be computed as \(\varvec{\omega } \cdot \varDelta t\), as shown in Fig. 5. Then, the inner grid nodes will move to the new positions according to the unstructured dynamic grids technique. In other words, the computational mesh at time level \(t+\varDelta t\) is obtained. It is worth noticing that, in the steady flow problems, \(\varvec{\omega }\) will approach a zero vector when the discontinuity approaches its steady-state location.

Fig. 5
figure 5

Motion and deformation of the grids near discontinuities (dashed line: grids at time level t; solid line: grids at time level t + Δt)

On the other hand, a re-meshing technique is utilized to solve the moving boundary problems with large displacements, as described in Ref. [19]. During the movement of discontinuities, the re-meshing codes will be executed automatically if the quality coefficient of a certain grid cell located near the discontinuity is significantly low (below a certain threshold). However, at present, the distribution of the grid points along the discontinuities cannot be accomplished automatically, and this re-meshing process should be realized manually by the mesh generation software for CFD (e.g., POINTWISE), if necessary. After that, the number and distribution of D-Ns will be slightly changed to make the discontinuity fronts smoother.

Fig. 6
figure 6

Schematic of direct-fitting strategy and indirect-fitting strategy

Step 6 Computation of the flux across each grid facet.

Computing the flux across each grid facet is an indispensable part in the finite volume method. The flux across each O-F can be computed by various popular flux splitting schemes, such as the Roe scheme, the van Leer scheme, the AUSM-family scheme, and the HLLC scheme. As for D-F, the flux can be directly written as follows:

$$\begin{aligned} {\varvec{F}_\mathrm{D}} = {\left[ \begin{array}{c} {\varphi _1}\\ {\varphi _1}\varvec{u} + P\varvec{n}\\ {\varphi _1}E + P{\varphi _2} \end{array} \right] _\mathrm{u}}, \end{aligned}$$
(5)

where

$$\begin{aligned} {\varphi _1}= & {} \rho (\varvec{u} - \varvec{\omega }) \cdot \varvec{n},\quad \varvec{u} = [u, v, w]^\mathrm {T}, \quad \varvec{n} = [n_{x}, n_{y}, n_{z}]^\mathrm {T},\\ E= & {} {\varvec{u}^2}/2 + \frac{P}{{\rho \left( {\gamma - 1} \right) }},\quad {\varphi _2} = \varvec{\omega } \cdot \varvec{n}, \end{aligned}$$

\(\varvec{n}\) and \(\varvec{\omega }\) are the normal direction vector and the motion velocity vector of D-F, respectively. Note that φ1 = 0 if D-F denotes the contact discontinuity. Since the state variables on the two sides of D-F satisfy the conservation relations described in step 3, the fluxes can be equally computed from either upstream or downstream variables.

Step 7 Solution update using the shock-capturing code.

After executing the previous steps, the solution of the entire computational domain can be obtained at time level \(t+\varDelta t\) using the shock-capturing algorithm. Specifically, the temporal discretization scheme, such as the Runge–Kutta scheme, the LU-SGS scheme, the implicit dual time-stepping scheme, and so on, can be used in this step. Then, ADFs will repeat steps 1–7 until the termination condition is satisfied.

In order to efficiently simulate the simple and complex flows with discontinuities, two strategies, direct-fitting and indirect-fitting, are outlined in Fig. 6 and described in detail along with the corresponding numerical examples below.

2.2 Direct-fitting strategy

In many compressible flow fields, there merely exist some individual shock waves without interactions, such as the detached bow shock, attached oblique shock, and single normal shock. While dealing with these kinds of relatively simple shock structures, ADFs is able to directly fit them on the basis of the approximate initial shock front that has the same topology as the real shock. Note that it is unnecessary to determine the position of shocks on the basis of shock-capturing solutions. Indeed, an adaptive criterion, which can significantly reduce the influence resulting from the inaccuracy of initial shock position on the final fitting solution, is utilized in the ADFs to make this direct-fitting strategy reality. Specifically, each grid node located at shock fronts can be converted between O-N and D-N according to the upstream Mach number relative to the shock front:

$$\begin{aligned} M_\mathrm{u,ref} = \frac{( \varvec{u}_\mathrm{u} - \varvec{\omega } ) \cdot \varvec{n}}{a_\mathrm{u}}, \end{aligned}$$

where au denotes the sound speed in the upstream region.

Fig. 7
figure 7

Circular cylinder flow: computational domain, boundary conditions, and initial shock location

In order to clearly illustrate the feature of this algorithm, a hypersonic blunt-body problem is described below. A detached bow shock occurs while a uniform hypersonic flow (M = 20) passes through a semicircular cylinder. Although the topology of the shock is simple, the flexibility of ADFs can be shown by means of presetting the initial shock front that is only 2–4 layers of grid cells away from the cylinder wall and asymmetrically distributed as the boundary of the flow field, as shown in Fig. 7.

Fig. 8
figure 8

Circular cylinder flow: the convergence process of the fitted shock front

Fig. 9
figure 9

Circular cylinder flow: Mach iso-contours, density iso-contours, and the grids of the final solution

Fig. 10
figure 10

Circular cylinder flow: the comparison of shock-wall distance ds and non-dimensional pressure P/P distribution with Ref. [23]

Initially, all grid nodes are identified as O-N, and the preset shock front is regarded as the hypersonic inflow boundary. Then, the node on this boundary can be converted into D-N once its Mu, ref is greater than the threshold Mach number 1.01, slightly above 1.0 considering numerical errors. In other words, these conversions indicate that the real shock arrives at these nodes in the convergence process of the flow field. Afterward, these D-Ns will begin to move according to the shock speed computed by the fitting algorithms. Figure 8 shows that the bow shock first arrives at the location of upper preset shock nodes, and then this part of the shock is fitted. Since the lower preset shock nodes are farther away from the cylinder wall, the lower part of shock is not fitted in the beginning, as shown by the fitted shock curves (a) and (b) in Fig. 8. As the computation continues, all the preset nodes are sequentially converted into D-N, and the bow shock front finally becomes symmetrical and smooth.

Recently, Zhang et al. [24,25,26] have found that shock-capturing computation using various upwind flux schemes or limiters may produce zigzag-shaped shock waves and spurious oscillations even on high-quality grids. By contrast, Figs. 9 and 10 show that the iso-contours computed by the ADFs are free of oscillations and the shock front position is accurate even on the coarse unstructured grids.

2.3 Indirect-fitting strategy

For a long time, fitting the discontinuities of which topological structures are complicated is a very difficult problem to solve. Therefore, a basic understanding of flow fields should be first gained on the basis of shock-capturing solutions. In addition, it may become much more essential to determine relatively accurate locations of initial discontinuities while running fitting solvers; otherwise, the oscillations may easily cause calculations to fail. In this section, another strategy is presented to fit relatively complicated discontinuity structures.

Fig. 11
figure 11

Flow configuration of cylinder with a hemispherical nose and a conical flare

As shown in Fig. 11, a supersonic stream (M = 4.04, angle of attack α = 20∘) passes through an axisymmetric hemisphere–cylinder–cone model. Although the detached bow shock can be computed by the direct-fitting strategy, the topological structure of interaction between the bow shock and embedded shock induced by the cone is difficult to determine. Therefore, a novel, discontinuity surface extraction method, point-rays technique (PRT) [27], has been proposed recently to improve ADFs’s capability of dealing with complicated discontinuity structures. Firstly, a set of discrete points, corresponding to shocks or contact discontinuities, is detected according to the state variable gradients computed by the shock-capturing method. Then, this large-scale point cloud is divided into many segments (small-scale point cloud) which can be easily fitted into the corresponding lines in 2D problems or triangles in 3D problems, respectively. Finally, the target surfaces are generated by integrating these lines or triangles. By considering these target surfaces to be the initial discontinuity fronts, the shock-fitting solution can be obtained efficiently. The detailed description about how to extract discontinuity surfaces using PRT in this 3D case is as follows.

Fig. 12
figure 12

Combinatorial body: non-dimensional pressure iso-contours computed by the shock-capturing method

Fig. 13
figure 13

Combinatorial body: the shock point cloud identified from the shock-capturing solution

Fig. 14
figure 14

Schematic of 3D PRT

As shown in Fig. 12, the shock-capturing solution is first obtained merely on the basis of coarse grids and the first-order spatial discretization scheme. Then, a shock point cloud in Fig. 13 is identified from the capturing solution according to the pressure gradient of each grid node (|∇p|n ≥ |∇p|thr). Considering that directly fitting surfaces from a space point cloud with thickness is difficult, a series of adjacent triangular facets is first obtained by introducing a unit sphere (Fig. 14a) inside the combinatorial body. Moreover, the center of the sphere is regarded as a light source, which emits three rays li, lj, and lk, respectively, passing through three vertices Ai, Aj, and Ak of each triangular facet on the sphere. Thus, a series of spatial subregions Sp (p = 1, 2, …, m) is formed by rays, and these adjacent subregions satisfy the following formula:

$$\begin{aligned} {S_{p}}\bigcap \limits _{{p \ne q}} {{S_{q}}} = {\varvec{0}}. \end{aligned}$$
(6)

Then, once the number of discrete shock points in the subregion Sp is more than three, a new triangular facet can be fitted by these points. As shown in Fig. 14b, this facet, respectively, intersects the three rays at three points Bi, p, Bj, p, and Bk, p. After dealing with all subregions, the feature points Bi, Bj, and Bk can be acquired by averaging intersection points on each ray, and then the target triangular facet (Fig. 14c) in each subregion Sp can be obtained. Finally, the whole target surface (Fig. 14d) can be generated by integrating all these small facets together. The grid used in the shock-fitting solver can be regenerated on the basis of this target surface which is regarded as the initial shock front.

Fig. 15
figure 15

Combinatorial body: sketch of the motion of interaction points

Indeed, the major challenge of fitting this 3D shock interaction is how to deal with the interaction points. In order to ensure the motion of grid points free from mistakes, the motion velocity of the interaction point is illustrated in Fig. 15 and computed as follows:

$$\begin{aligned} \varvec{\omega }_{i}= & {} \varvec{\omega }_{\mathrm {B},i} + ((\varvec{\omega }_{\mathrm {E},i}+\varvec{\omega }_{\mathrm {R},i}) \cdot \varvec{\tau }_{\mathrm {B},i}) \cdot \varvec{\tau }_{\mathrm {B},i} / |\varvec{\tau }_{\mathrm {B},i}|^2,\\ \varvec{\tau }_{\mathrm {B},i}= & {} \varvec{n}_{ij} \times \varvec{n}_{\mathrm {B},i} + \varvec{n}_{\mathrm {B},i} \times \varvec{n}_{ik}, \end{aligned}$$

where \(\varvec{\omega }_{\mathrm {B},i}, \varvec{\omega }_{\mathrm {E},i}\), and \(\varvec{\omega }_{\mathrm {R},i}\) denote the motion velocity vectors obtained at the interaction point i, each corresponding to the bow shock, embedded shock, and reflected shock; \(\varvec{\tau }_{\mathrm {B},i}\) is the tangential direction of the bow shock front near the point i. Moreover, \(\varvec{\tau }_{\mathrm {B},i}\) is computed by the normal direction \(\varvec{n}_{\mathrm {B},i}\) of the point i and the direction vectors \(\varvec{n}_{ij}, \varvec{n}_{ik}\) between the point i and its adjacent interaction points j and k.

Fig. 16
figure 16

Combinatorial body: the non-dimensional pressure iso-contours computed by ADFs

On the other hand, by means of fitting the detached bow shock as the field boundary, the number of grid cells can be significantly reduced. Figure 16 shows that the bow shock, embedded shock, and interaction points are fully fitted. However, the contact discontinuity is not fitted in the present work, which probably decreases the solution accuracy of the downstream region.

3 Applications

In this section, three numerical test cases are discussed to assess performance of the ADFs and give some considerations about the fitting solution. Moreover, the AUSM+-up scheme [28] is used to compute smooth regions because of its excellent performance over a wide range of speeds.

3.1 Mach reflection

A Mach reflection occurs when a uniform supersonic flow (M = 5) passes through a wedge with the angle θw = 30∘ and then impinges on a straight wall. Figure 17 shows the computational domain including four subdomains partitioned by an incident shock (IS), a reflected shock (RS), a Mach stem (MS), and a slip line (SL). In addition, all these discontinuities meet at the triple point (TP). The fitting solution can be easily obtained by the ADFs using the indirect-fitting strategy; however, there is still something worthwhile to discuss in detail.

Fig. 17
figure 17

Mach reflection: computational domain, boundary conditions, flow field sketch, and local grids

Fig. 18
figure 18

Mach reflection: four kinds of shock-fitting solutions

First of all, it is easy to identify and fit the IS and MS on the basis of the upstream flow field solved by the shock-capturing method, as shown in Fig. 18a, but these two shocks become distorted in the vicinity of the TP. Next, the IS becomes straight and spurious oscillations disappear after fitting the RS; however, the MS becomes significantly wrinkled and it becomes difficult for the discontinuity structures to reach the desired positions, as shown in Fig. 18b. By contrast, after fitting the SL but capturing the RS, Fig. 18c shows that only the segment of the MS adjacent to the TP has a slight wrinkle. Finally, with all the discontinuities fitted, a non-oscillatory, accurate flow field is shown in Fig. 18d. In this case, the motion velocity of the triple point is computed as described in step 4 of Sect. 2.1:

$$\begin{aligned} \varvec{\omega }_\mathrm{TP} = \varvec{\omega }_\mathrm{IS} + ((\varvec{\omega }_\mathrm{RS}+\varvec{\omega }_\mathrm{MS}) \cdot \varvec{\tau }_\mathrm{IS}) \cdot \varvec{\tau }_\mathrm{IS}, \end{aligned}$$

where \(\varvec{\omega }_{\mathrm {RS}} = \varvec{0}\) if the reflected shock is captured as shown in Fig. 18a, c.

Fig. 19
figure 19

Mach reflection: lines of discontinuity from four solutions

Moreover, Fig. 19 compares the positions of four discontinuities and Table 1 gives the coordinates of TP between these four shock-fitting solutions above and a shock-capturing solution based on fine grids. It is clearly indicated that the SL has much more influence on the accuracy of the flow field than the RS; in other words, there may exist more errors without fitting contact discontinuities in the interaction region.

Table 1 Coordinates of TP computed by the shock-fitting and shock-capturing methods

In conclusion, merely fitting part of discontinuities near the interaction points may deteriorate flow fields. Therefore, it is necessary to develop the fully-fitting algorithm to deal with all discontinuities in the interaction regions.

3.2 Shock–contact discontinuity interaction

In practice, apart from the shock–shock interactions, there are some complicated structures induced by the interaction between shocks and contact discontinuities. As shown in Fig. 20, an incident slip line (SL1) is first formed by two horizontal, uniform supersonic jet streams with the same pressure but with different densities and Mach numbers (M1 = 3, M2 = 8). When the lower jet stream impinges on a wedge with the angle θw = 20∘, an attached oblique shock (S1) is induced. Then, once the SL1 intersects with the S1, the transmitted shock (S2) and slip line (SL2) are generated. Moreover, in order to match the pressures in the downstream regions of S1 and SL2, an expansion wave (EW) is induced.

Fig. 20
figure 20

Shock–contact discontinuity interaction: computational domain, boundary conditions, flow field sketch, and local grids

Figure 21a shows the fully-fitting flow field, of which all the shocks and slip lines are fitted. In this case, the theoretical solution of each region can be obtained by computing R–H jump relations and Prandtl–Meyer flow relations. In Fig. 22, the S2 and SL2 (marked as the blue solid line) have a clear deviation from the theoretical result (marked as the green dashed line), and the parts of S2 and SL2 that are farther away from the interaction point have a larger deviation. This is because the spatial discretization accuracy of the interior of EW is relatively low, merely second-order accuracy, in the frame of the finite volume method. Thus, the pressure in the downstream regions of EW is obviously less than the theoretical solution due to the intense numerical dissipation. Furthermore, numerical experiments indicate that these deviations cannot be significantly reduced even though the grids near the EW are refined.

Fig. 21
figure 21

Shock–contact discontinuity interaction: two shock-fitting solutions

Fig. 22
figure 22

Shock–contact discontinuity interaction: the discontinuity lines from the two shock-fitting solutions and the theoretical solution

On the other hand, the head and tail of the expansion fan can be handled using the similar shock-fitting approach, but the expansion transition zone is still computed on the basis of the shock-capturing method. Note that state variables of these nodes on two fitted boundaries are directly given theoretical solutions rather than computed, and the fitted boundaries are directly located at the theoretical positions rather than moved to the right positions as fitted discontinuities. Under such condition, the so-called fitted expansion wave is shown in Fig. 21b. After eliminating the influence of EW on the downstream regions, it is clear that S2 and SL2, marked as red solid lines in Fig. 22, can finally converge to the theoretical positions. Moreover, Table 2 compares the positions of the discontinuities S2 and SL2, computed by these two numerical methods, with their theoretical positions, and the deviation of inclination angles is about 5% while capturing EW on unstructured grids at this scale (the average mesh spacing ΔL = 0.005 m).

Table 2 Shock–contact discontinuity interaction: the direction angles of S2 and SL2

This case indicates that the low numerical accuracy of the expansion wave causes a significant position and intensity deviation to the downstream discontinuities. In fact, it is very challenging to determine the accurate positions and state variables of the boundaries of expansion waves for complex flow structures. Therefore, how to improve the numerical accuracy of capturing expansion waves based on unstructured grids is the key to obtaining the high-accuracy solutions for entire flow fields.

3.3 Type IV shock–shock interaction

In 1968, according to various experiments, Edney [29] defined six types of shock–shock interactions by changing the incident position of an oblique shock, which is induced by a wedge and then impinges on the detached bow shock. In order to evaluate the capability of ADFs to fit complex discontinuity structures, a numerical simulation for the most complex type, type IV interaction, is carried out. The computational condition comes from the experiment by Duquesne et al. [30].

Fig. 23
figure 23

Type IV shock–shock interaction: computational domain, boundary conditions, and flow field sketch

Fig. 24
figure 24

Type IV shock–shock interaction: the non-dimensional density iso-contours computed by the shock-capturing method

As shown in Fig. 23, a typical type IV interaction arises when a weak oblique shock intersects with a bow shock in front of the circular cylinder. In this case, Mach number of the free stream is M1 = 5.05, and the angle of wedge is σ = 13∘. The incident shock passes through the point P on the inflow boundary at ( − 2.1R, −0.3R), where R is the cylinder radius.

In this flow field, there exist two triple points and a subsequent shock–contact discontinuity interaction point. Specifically, the triple points are connected by an oblique shock, and a supersonic jet flow is formed in the downstream region of this oblique shock. Given the complexity of discontinuity structures in this case, the indirect-fitting strategy mentioned in Sect. 2.3 is utilized to first obtain the locations of discontinuities based on the shock-capturing solution (Fig. 24) and then run the fitting codes.

Fig. 25
figure 25

Type IV shock–shock interaction: All shocks, contact discontinuities, two triple points, and one point intersected between shock and contact discontinuity are fitted

As discussed in Sect. 3.1, partially-fitting discontinuities in interaction regions may not obtain the convergent and accurate solution. Thus, all shock waves, contact discontinuities, and three interaction points are fitted, as shown in Fig. 25. Note that two contact discontinuities are merely fitted up to a certain distance away from the cylinder wall. Comparing Figs. 24 with 25b, a remarkable improvement in the solution quality is achieved with the fully-fitting strategy.

4 Conclusions

An adaptive discontinuity fitting solver (ADFs) on unstructured grids has been proposed in this paper by further developing the fitting solver, MCFs [21]. In order to efficiently fit various discontinuities and their interaction points that widely exist in the steady, compressible, and inviscid flow fields, two fitting strategies of ADFs have been presented and successfully applied to several numerical cases.

Specifically, as for such flow fields with simple discontinuities of which the topologies are clearly known, the direct-fitting strategy is a preferable and flexible option to directly run the fitting solver after presetting the approximate discontinuity fronts. On the other hand, for the flow fields with complex discontinuities, especially for those with interactions, the indirect-fitting strategy can be utilized to first extract discontinuity lines or surfaces from the shock-capturing solutions and then fit discontinuities on the grids regenerated on the basis of the extraction lines or surfaces. Several numerical applications show that this fitting solver can deal with many issues that presently plague shock-capturing solutions.

Furthermore, several numerical experiments indicate that partially-fitting discontinuities in the interaction regions may deteriorate the overall accuracy of the solution. Therefore, it is essential to develop advanced fitting algorithms that are able to deal with various discontinuities and interaction points in the interaction regions, especially for the three-dimensional flow fields.

In the recent application to the hypersonic projectile-launching process [31], this unstructured shock-fitting solver, ADFs, has shown huge potential benefits with respect to the shock-capturing method. Expanding this solver into the unsteady flows characterized by changing shock topologies will be a main task in the future.