Next Article in Journal
Conceptual Model of Predictive Safety Management Methodology in Aviation
Next Article in Special Issue
Uncertainty Quantification of Compressor Map Using the Monte Carlo Approach Accelerated by an Adjoint-Based Nonlinear Method
Previous Article in Journal
Kriging-Based Framework Applied to a Multi-Point, Multi-Objective Engine Air-Intake Duct Aerodynamic Optimization Problem
Previous Article in Special Issue
A Review of Solution Stabilization Techniques for RANS CFD Solvers
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Shock Equations and Jump Conditions for the 2D Adjoint Euler Equations

Computational Aerodynamics Group, National Institute of Aerospace Technology (INTA), Carretera de Ajalvir, km 4, 28850 Torrejón de Ardoz, Spain
*
Author to whom correspondence should be addressed.
Aerospace 2023, 10(3), 267; https://doi.org/10.3390/aerospace10030267
Submission received: 13 February 2023 / Revised: 6 March 2023 / Accepted: 8 March 2023 / Published: 10 March 2023
(This article belongs to the Special Issue Adjoint Method for Aerodynamic Design and Other Applications in CFD)

Abstract

:
This paper considers the formulation of the adjoint problem in two dimensions when there are shocks in the flow solution. For typical cost functions, the adjoint variables are continuous at shocks, wherein they have to obey an internal boundary condition, but their derivatives may be discontinuous. The derivation of the adjoint shock equations is reviewed and detailed predictions for the behavior of the gradients of the adjoint variables at shocks are obtained as jump conditions for the normal adjoint gradients in terms of the tangent gradients. Several numerical computations on a very fine mesh are used to illustrate the behavior of numerical adjoint solutions at shocks.

1. Introduction

This work deals with some technical details of inviscid adjoint equations in the presence of shocks. Understanding how inviscid adjoint solutions behave at shocks is relevant for transonic and supersonic design and control applications [1], with potential applications ranging from drag or sonic boom reduction to fluid-structure and flutter control, but also for error analysis and correction [2]. To understand the adjoint approach for shocked flows, three major points need to be addressed.
  • The correct formulation of the inviscid adjoint equations at shocks must be addressed, which has to consider linearized perturbations to the shock location. This analysis was carried out in [3,4] for the quasi-1D adjoint Euler equations and in [5,6] for the 2D adjoint Euler equations. In both cases, it was shown that, for typical cost functions, the adjoint variables are continuous at shocks where they have to obey an adjoint boundary condition. The correct formulation and approximation of adjoint equations in flows with shocks has also been addressed in [7,8,9].
  • The accuracy of discretized adjoint approximations with shocks must also be considered. For numerical computation, the adjoint shock boundary condition is usually not explicitly enforced, but the discretized adjoint equations (either continuous or discrete) yield the correct solution as long as adequate levels of smoothing are applied, in such a way that the shock is spread over an increasing number of grid points as the mesh spacing is reduced [10,11,12]
  • The last point to address is the assessment of the impact of the shock equations on practical applications such as aerodynamic design or error estimation, among others. In numerical implementation, especially in 2D, such shock conditions and increased smoothing are usually ignored under the assumption that they have little impact on both the adjoint solution and the sensitivities. However, results in [6] show that explicitly accounting for the adjoint shock condition can have a significant impact on both the sensitivities and the optimization procedure. For adjoint-based error correction with shocks, it was shown in [2] with 1D examples that the key to obtaining meaningful results is the use of discrete solutions with a well-resolved viscous shock.
The focus of the present work will be on point 1. While in quasi-1D the behavior of the adjoint variables and their derivatives can be completely established from the shock and adjoint equations [3,4,13], a similar analysis for the 2D case is not yet fully available. It was argued in [5] that the adjoint variables, relative to an output function consisting of the integral of a function of the pressure along the airfoil surface, are continuous across shocks and that an adjoint boundary condition is required along the length of the shock. It was also claimed that gradients of adjoint variables are discontinuous, but no proof or conclusive numerical result was offered. A complete analysis of the 2D case involved was presented in [6], which showed that, for typical costs functions (aerodynamic lift and drag, for example), the adjoint variables are continuous across shocks and that the adjoint variables obey a differential equation along the shock. The former statement is cost-function dependent. For example, entropy variables are adjoint states relative to a cost function measuring the net entropy flux across the domain boundaries (including the shock surface) [14] and are discontinuous across shocks.
Concerning the behavior of the gradients of adjoint variables at shocks, no further analysis was conducted in [6]. A first step in that direction was taken in [13], which presented the jump conditions for the gradients of the adjoint variables at shocks. It was not possible to derive closed-form results for all the derivatives, not even for normal shocks, but it was claimed, based on preliminary analysis and numerical computations, that the results were compatible with the derivatives of the adjoint variables along the shock normal direction being continuous and mostly vanishing, at least for normal shocks. However, normal shocks are difficult to realize in practice and none of the shocks presented in [13] were normal, so the conclusions offered were somewhat misleading. In [15], a series of detailed numerical experiments on very fine meshes confirmed that adjoint derivatives are indeed generally discontinuous across generic (oblique) shocks.
Here, we would like to complement the results of [13,15] in two directions. First, after reviewing the derivation of the adjoint shock equations in the 2D case, we will expand the analysis of the jump conditions of the adjoint gradients to put it on firmer grounds. Second, we will examine several numerical solutions containing oblique and normal shocks to illustrate the differences between both cases in the light of the derived shock conditions.

2. Adjoint Equations for Shocked Flows

This section contains a review of some known technical details of 2D adjoint equations in the presence of shocks originally derived in [6] (see also [13]). We consider steady transonic inviscid flow past a body of surface S such that the flow contains a shock attached to S with profile Σ extending from x b (shock foot) to x e n d (shock tip).
We define the following cost function:
J ( S ) = S \ x b h ( p ) ( n S d ) d S ,
where p is the pressure and n S is the unit normal vector to S (see Figure 1). When h ( p ) = p , Equation (1) corresponds to the force exerted by the fluid on S measured along a direction d . The flow is governed by nonlinear (steady) flow equations:
F ( U ) = 0 U = ( ρ , ρ u , ρ v , ρ E ) T
and shock equations (the Rankine–Hugoniot conditions), which for a steady shock can be written as:
[ F n Σ ] Σ = 0 { [ ρ v n ] Σ [ ρ v n 2 + p ] Σ [ v t ] Σ [ H ] Σ = = = = 0 0 0 0 .
In Equations (2) and (3), F = ( ρ v , ρ v u + p x ^ , ρ v v + p y ^ , ρ v H ) T is the flux vector, ρ , v = u x ^ + v y ^ , p , E ,   H are the fluid’s density, velocity, pressure, total energy and enthalpy, respectively, [   ] Σ = ( ) | d o w n s t r e a m ( ) | u p s t r e a m denotes the jump across the shock and v n = v n Σ and v t = v t Σ are the velocity components in the local shock frame [16] (see Figure 1). For normal shocks, v t = 0 on either side and thus the 3rd equation in Equation (3) is trivially verified.
Let us now consider the problem of computing the sensitivity derivatives of J(S) given by Equation (1) with respect to, say, changes in the shape of S. A deformation of S along the local normal direction x S x S + δ S   n S gives rise to a fluid perturbation δ U that affects both the cost function and the shock. In the perturbed flow, the new shock shape can be described in terms of a local normal deformation x Σ x Σ + δ   Σ   n Σ (Figure 2).
As a result of the perturbation, the cost function changes as well, and the corresponding linearized perturbation is constrained by the following linearized flow equation:
( F U δ U ) = 0 ,
where F U = F / U is the flux Jacobian, and the linearized Rankine–Hugoniot conditions:
[ F U δ U ] Σ n Σ + [ F δ n Σ ] Σ + [ δ   Σ n Σ F n Σ ] Σ = 0 .
The adjoint approach for this problem uses two adjoint fields: a bulk adjoint ψ = ( ψ 1 , ψ 2 , ψ 3 , ψ 4 ) T (the Lagrange multiplier for the Euler Equation (2)) defined in Ω \ Σ , where Ω denotes the fluid domain, and the shock adjoint ψ s , the Lagrange multiplier for the RH Conditions (3), which is defined along Σ . With the aid of the adjoint fields, the cost function is reformulated as follows:
J ( S ) = S \ x b h ( p ) ( n S d ) d s Ω \ Σ ψ T F d Ω Σ ψ s T [ F n Σ ] Σ d Σ .
Linearizing Equation (6) using Equations (4) and (5) yields [6]:
δ J ( S ) = S \ x b δ S d h ( p ) d s + S \ x b ( n S d ) p h ( p ) δ p d s + ( ( n S n Σ ) δ S δ Σ ( n S t Σ ) ) x b [ h ( p ) ] x b ( n S d ) Ω \ Σ ψ T ( F U δ U ) d Ω Σ ψ s T [ F U δ U ] Σ n Σ d Σ Σ ψ s T [ F δ n Σ ] Σ d Σ Σ ψ s T [ δ   Σ n Σ F n Σ ] Σ d Σ
where   n Σ = n Σ is the normal derivative along the shock [16], δ n Σ = t g ( δ Σ ) t Σ , where t g = t Σ is the tangent derivative along the shock, and [   ] x b is the jump across the shock at the shock foot. In Equation (7), the third term on the first line includes the effect of a linearized displacement δ x b = ( ( n S n Σ ) δ S δ Σ ) / ( n S t Σ ) in the shock foot location (see Figure 3 and the appendix of [6] for a detailed derivation of this term).
Integrating by parts the domain term in Equation (7) yields:
Ω \ Σ ψ T ( F U δ U ) d Ω = Ω \ Σ ψ T F U δ U d Ω + S \ x b ψ T ( F U n S ) δ U d s + S ψ T ( F U n S ) δ U d s + Σ [ ψ T ( F U n Σ ) δ U ] Σ d Σ = Ω \ Σ ψ T F U δ U d Ω + S \ x b ( φ n S ) δ p d s + S \ x b ρ δ v n S ( ψ 1 + φ v + ψ 4 H ) d s + S ψ T ( F U n S ) δ U d s + Σ [ ψ T ( F U n Σ ) δ U ] Σ d Σ
where the identity ψ T ( F U n S ) δ U = ( φ n S ) δ p + ρ δ v n S ( ψ 1 + φ v + ψ 4 H ) , with φ = ( ψ 2 , ψ 3 ) , has been used to rewrite the wall integral, and S denotes the far-field boundary. Inserting Equation (8) into Equation (7) and rearranging yields:
δ J ( S ) = S \ x b δ S d h ( p ) d s + ( ( n S n Σ ) δ S δ Σ ( n S t Σ ) ) x b [ h ( p ) ] x b ( n S d ) + S \ x b ρ ( δ S n S v n S + v δ n S ) ( ψ 1 + φ v + ψ 4 H ) d s + Σ ψ s T [ F t Σ ] Σ t g δ Σ d Σ Σ ψ s T [ δ   Σ n Σ F n Σ ] Σ d Σ + Ω \ Σ ψ T F U δ U d Ω + S \ x b ( ( n S d ) p h ( p ) ( φ n S ) ) δ p d s S ψ T ( F U n S ) δ U d s Σ [ ( ψ T + ψ s T ) ( F U n Σ ) δ U ] Σ d Σ ,
where the linearized wall boundary condition δ ( v n S ) = δ v n S + δ S n S v n S + v δ n S = 0 has been used to rewrite the third term in Equation (9). The final step is to integrate by parts Σ ψ s T [ F t Σ ] Σ t g δ Σ d Σ along Σ :
Σ ψ s T [ F t Σ ] Σ t g δ Σ d Σ = ψ s T [ F t Σ ] Σ δ Σ | x e n d ψ s T [ F t Σ ] Σ δ Σ | x b Σ t g ψ s T [ F t Σ ] Σ δ Σ d Σ Σ ψ s T [ t g F t Σ ] Σ δ Σ d Σ Σ ψ s T [ F t g t Σ ] Σ δ Σ d Σ
Now, [ F t Σ ] x e n d = 0 , [ F t g t Σ ] Σ = κ Σ [ F n Σ ] Σ = 0 ( κ Σ is the local curvature of the shock profile) and t g F t Σ = F n Σ F n Σ along Σ . Hence, we can write Equation (10) as follows:
Σ ψ s T [ F t Σ ] Σ t g δ Σ d Σ = ψ s T [ F t Σ ] Σ δ Σ | x b Σ t g ψ s T [ F t Σ ] Σ δ Σ d Σ Σ ψ s T [ F ] Σ δ Σ d Σ + Σ ψ s T [ n Σ F n Σ ] Σ δ Σ d Σ = ψ s T [ F t Σ ] Σ δ Σ | x b Σ t g ψ s T [ F t Σ ] Σ δ Σ d Σ + Σ ψ s T [ n Σ F n Σ ] Σ δ Σ d Σ ,
where we have used that [ F ] Σ = 0 since F = 0 on both sides of the shock. Gathering Equations (9) and (11) and rearranging yields:
δ J ( S ) = S \ x b δ S d h ( p ) d s + ( ( n S n Σ ) δ S ( n S t Σ ) ) x b [ h ( p ) ] x b ( n S d ) + S \ x b ρ ( δ S n S v n S + v δ n S ) ( ψ 1 + φ v + ψ 4 H ) d s ( δ Σ ( n S t Σ ) ) x b [ h ( p ) ] x b ( n S d ) ψ s T [ F t Σ ] Σ δ Σ | x b Σ t g ψ s T [ F t Σ ] Σ δ Σ d Σ + Ω \ Σ ψ T F U δ U d Ω + S \ x b ( ( n S d ) p h ( p ) ( φ n S ) ) δ p d s S ψ T ( F U n S ) δ U d s Σ [ ( ψ T + ψ s T ) ( F U n Σ ) δ U ] Σ d Σ .
The whole point of the adjoint approach is to define the adjoint variables in such a way that δ J ( S ) can be computed independently of δ U and δ Σ . This can be achieved if the bulk adjoint state obeys the adjoint equation:
F U T ψ = 0
in   Ω \ Σ , with the following wall and far-field boundary conditions:
φ n S = p h ( p ) ( n S d )     on   S \ x b ψ T ( F U n S ) δ U = 0           on   S .
Along the shock, the adjoint variables obey the following equations:
[ ( ψ T + ψ s T ) ( F U n Σ ) δ U ] Σ = 0       on   t g ψ s T [ F t Σ ] Σ = 0       on   [ h ( p ) ] x b ( n S d ) ( n S t Σ ) + ψ s T [ F t Σ ] Σ = 0       at   x b ,
In Equation (15), det ( F U n Σ ) is proportional to 1 M n 2 , where M n is the normal Mach number. Shocks only exist for upstream normal Mach numbers strictly greater than one, M n > 1 . (Correspondingly, M n < 1 downstream of the shock.) Therefore, det ( F U n Σ ) is generically non-zero on either side of a shock, so the only way the first equation in (15) can hold for arbitrary values of δ U that are also independent on either side of the shock is if:
ψ | Σ u p = ψ s = ψ | Σ d o w n .
Hence, ψ is continuous across the shock and, in consequence, so is the tangent derivative t g ψ . The second equation in (15) then becomes an ordinary differential equation for the bulk adjoint ψ along the shock:
t g ψ T [ F t Σ ] Σ = [ ρ ] Σ v t ( t g ψ 1 + H t g ψ 4 ) + ( [ p ] Σ + [ ρ ] Σ v t 2 ) t Σ t g φ = 0 ,
where t Σ t g φ = t Σ x   t g ψ 2 + t Σ y   t g ψ 3 . Finally, the last equation in (15) gives an initial condition for Equation (17) at the shock foot x b :
ψ T ( x b ) [ F t Σ ] x b = [ ρ ] Σ v t ( ψ 1 + H ψ 4 ) + ( [ p ] Σ + [ ρ ] Σ v t 2 ) t Σ φ = [ h ( p ) ] x b ( n S d ) ( n S t Σ ) x b .
Detached shocks
For sufficiently high incoming Mach number, the flow past blunt bodies contains detached (bow) shocks ahead of the body. The shock is normal directly in front of the body and extends around it as a curved oblique shock. At a sufficient distance from the body, the shock reduces to a Mach wave at points x a and x b . In this case, the adjoint problem is essentially unchanged. Along the bow shock, the adjoint state is continuous and obeys the differential Equation (17), but the matching Condition (18) is now missing, being replaced by a boundary condition δ Σ ψ T [ F t Σ ] Σ | x a x b = 0 that is trivially satisfied.
Extension to 3D
The extension to three dimensions poses no significant complications. In the shocked case, the shock is now a surface which, for the sake of the analysis, will be taken to be a single sheet attached to the wing surface along a curve σ S and with an additional boundary curve σ o along which the shock merges with the remaining smooth flow.
It can be shown that the adjoint state is still continuous across the shock, where it obeys the following shock equations:
t g Σ ψ T [ F ] Σ = 0
on the shock surface, and
ψ T [ F n ^ σ S ] σ S = [ h ( p ) ] σ S ( n S d ) | n Σ × n S | σ S
along the shock foot σ S . Here, [   ] σ S is the jump across the shock at the shock foot, t g Σ is the tangent gradient (the covariant derivative on the shock surface), and n ^ σ S is the normal vector to the shock boundary curve σ S but otherwise tangent to the shock surface.

3. Jump Conditions for the Adjoint Gradient across a Shock

The values of the adjoint variables and their derivatives at a shock are constrained by the shock Equations (17) and (18), as well as the adjoint equations on either side of the shock, which we write in shock-oriented coordinates [16] as:
( A t ± ) T t g ψ + ( A n ± ) T n ψ ± = 0 ,
where A t ± = F U ± t Σ   and   A n ± = F U ± n Σ and the superscripts ± are used to distinguish upstream and downstream quantities. Taking differences across the shock yields:
[ A t T t g ψ + A n T n ψ ] Σ = 0 .
These equations, along with (17), were analyzed and tested on a numerical solution in [13], but the meshes employed were relatively coarse. A much more thorough numerical assessment on very fine meshes was carried out later on in [15]. The following equations:
[ v n n ψ 1 ] Σ H [ v n n ψ 4 ] Σ = 0 ( γ 1 ) [ n Σ x n ψ 2 + n Σ y n ψ 3 ] Σ + γ [ v n n ψ 4 ] Σ = 0 [ v n ( n Σ y n ψ 2 + n Σ x n ψ 3 + v t n ψ 4 ) ] Σ + [ v n ] Σ [ n Σ x t g ψ 2 + n Σ y t g ψ 3 ] Σ = 0 [ n ψ 1 ] Σ + [ ( u + v n n Σ x ) n ψ 2 + ( v + v n n Σ y ) n ψ 3 + ( H + v n 2 ) n ψ 4 ] Σ + [ v n ] Σ v t t g ψ 4 = 0
that follow from Equation (22) by elementary manipulations, were shown to be obeyed to a high degree of accuracy. Here, we would like to take a step forward and try to constrain as much as possible the values of the jumps of the adjoint derivatives across the shock. The resulting equations are exact, and numerical testing should be seen more as a test on the extent to which numerical solutions obey them than as a test of the equations themselves.
It was argued above that the determinant det ( A n ± ) 0 at generic points of 2D shocks, so Equation (21) can be used to solve for the normal adjoint derivatives in terms of the tangent adjoint derivatives:
n ψ ± = ( A n ± ) T ( A t ± ) T t g ψ ± .
Taking differences across the shock in Equation (24) gives equations for the jumps [ n ψ ] Σ of the normal derivatives that, using the RH conditions and the adjoint shock Equation (17), can be written as follows:
[ n ψ ] Σ = [ ( A n ) T ( A t ) T ] Σ t g ψ = [ v n 1 ] Σ ( γ 1 ) H + v t 2 ( v t ( v t 2 t g ψ 1 ( γ 1 ) H 2 t g ψ 4 ) ( H ( γ 1 ) v t 2 ) ( t g ψ 1 + H t g ψ 4 ) t Σ x ( H ( γ 1 ) v t 2 ) ( t g ψ 1 + H t g ψ 4 ) t Σ y v t ( v t 2 t g ψ 4 ( γ 1 ) t g ψ 1 ) ) .
Similarly, multiplying Equation (24) by v n and taking differences across the shock yields:
[ v n n ψ 1 ] Σ = 0 = [ v n n ψ 4 ] Σ .
The manipulations required to tackle Equations (24)–(26) are carried out with the aid of a symbolic manipulation software. From Equation (25), it is possible to obtain two additional properties for the jumps:
[ n Σ x n ψ 2 + n Σ y n ψ 3 ] Σ = 0 [ n ψ 1 ] Σ + H [ n ψ 4 ] Σ + v t [ t Σ x n ψ 2 + t Σ y n ψ 3 ] Σ = 0 .
Notice that, according to Equation (25), the jumps in the normal adjoint derivatives are generally not zero, but they are zero if the adjoint solution is constant along the shock. This is in agreement with the fact that, for example, there is no discontinuity of the adjoint variables or their gradients across the fish-tail shocks in supersonic cases, since the adjoint variables are constant (actually zero) on either side of the shock (see Section 4.1).
Finally, for cost functions that depend only on pressure (lift and drag, for example), we have ψ 1 = H ψ 4 [5] and, thus, using Equation (17) we get:
H 1 t g ψ 1 = t g ψ 4 = ( [ p ] Σ + [ ρ ] Σ v t 2 ) 2 [ ρ ] Σ v t H ( t Σ t g φ )
(where it has been assumed here that the flow is homenthalpic) and:
[ n ψ ] Σ = ( v t 2 H ( γ 1 ) ) [ v n 1 ] Σ γ + 1 ( 1 2 v t t Σ x 2 v t t Σ y 1 H ) ( t Σ t g φ ) .
It is clear from Equation (29) that the adjoint derivatives are discontinuous iff t Σ t g φ = 0 .
Normal shocks
When v t = 0 , we have a normal shock. Examples of normal shocks in 2D include the tip of a bow shock, as well as the detached shock in front of a sufficiently wide wedge. Normal shocks are also present in most supersonic inlets. On the other hand, the shock forming over an airfoil in transonic flow is generally not normal. If flow separation after the shock is not considered, such shocks are then normal at their feet, but staying normal to some distance above the surface (a so-called normal shock with normal extension [17]) is only possible for one very specific upstream wall Mach number, which is equal to M 1.662 for γ = 1.4 .
For a normal shock, the shock Equation (17) reduces to:
t g ψ T [ F t Σ ] Σ = [ p ] Σ ( t Σ x   t g ψ 2 + t Σ y   t g ψ 3 ) = 0
and, thus:
t Σ x   t g ψ 2 + t Σ y   t g ψ 3 = 0 ,
while the Condition (18) yields (recall that in this case n S = t Σ according to our conventions in Figure 1):
ψ T ( x b ) [ F t Σ ] x b = [ p ] Σ ( t Σ φ ) =   [ p ] Σ ( n S φ ) = [ h ( p ) ] x b ( n S d ) ,
which, for h ( p ) = p , is simply the adjoint wall b.c. n S φ = n S d .
As for the remaining conditions on the normal derivatives, we get from Equation (25) (setting v t = 0 ) the following jump conditions:
[   n ψ 1 ] Σ = 0 [ n ψ 2 ] Σ =   [ v n 1 ] Σ ( t g ψ 1 + H   t g ψ 4 ) t Σ x [ n ψ 3 ] Σ =   [ v n 1 ] Σ (   t g ψ 1 + H t g ψ 4 ) t Σ y [ n ψ 4 ] Σ = 0 .
We can actually derive stronger conditions for the normal derivatives themselves by going back to the adjoint Equation (21), setting v t = 0 , and solving for the normal adjoint derivatives in terms of the tangent adjoint derivatives also using Equation (31), which yields:
n ψ ± = ( 0 t g ψ 3 t Σ x ( t g ψ 1 + H   t g ψ 4 ) / v n ± t g ψ 2 t Σ y ( t g ψ 1 + H   t g ψ 4 ) / v n ± 0 ) ,
from which we get:
n ψ 1 ± = 0 n Σ x n ψ 2 ± + n Σ y n ψ 3 ± = 0 n ψ 4 ± = 0 .

4. Numerical Tests

We will now present several test cases in order to illustrate the behavior of typical numerical adjoint solutions at shocks. We do not attempt to investigate the conditions under which the numerical solutions converge to the analytic solution, nor do we attempt to compare different numerical schemes as regards the behavior of the computed adjoint solutions, but rather we would like to show how a typical, finite-volume adjoint solver behaves at shocks without enforcing any shock condition.
We will be using the unstructured, open source SU2 code [18] for numerical testing. The computations are carried out on a very fine unstructured mesh obtained from the basic triangular Euler mesh (Figure 4), available at the SU2 Tutorial Collection [19], with five rounds of uniform refinement. At each round, every edge is bisected and the resulting nodes are joined to form new triangles. In order to preserve the surface of the airfoil, a Bézier-spline surface reconstruction on the basis of the previous mesh has been performed at each stage. The final mesh has 6400 nodes on the airfoil profile and 5.2 × 106 nodes and 10.4 × 106 triangular elements throughout the flowfield. The near-wall distance is around 10−5 chord lengths, which should be more than adequate to resolve the Euler flow and adjoint fields. Notice that this compares well to the current state of the art on these types of mesh-converged Euler computations [15,20]. The flow and drag-based adjoint solutions are computed with the SU2 direct and continuous adjoint solvers using a central scheme with JST artificial dissipation.

4.1. Supersonic Flow

Our first test case is supersonic flow past a NACA0012 airfoil. Flow conditions are M = 1.5 and angle of attack α = 0°, which result in a detached bow shock ahead of the leading edge and two inclined fish-tail shocks emanating from the sharp trailing edge (Figure 5).
Plots of the adjoint variables are shown in Figure 6. Here, and in what follows, the adjoint variables are non-dimensional. Dimensions can be restored by multiplying the variables by the appropriate powers of ρ and | v | , viz. ψ 1 = ψ ¯ 1 / ( ρ | v | ) , ψ 2 , 3 = ψ ¯ 2 , 3 / ( ρ | v | 2 ) , and ψ 4 = ψ ¯ 4 / ( ρ | v | 3 ) (bars denote non-dimensional variables). Notice that the adjoint solution is constant (actually zero) downstream of the two supersonic characteristics that emanate from the trailing edge. In consequence, the adjoint solution is constant (and its gradient, continuous) across the fish-tail shocks.
The solution is continuous across the bow shock as well, but a zoom of the adjoint solution near the shock (Figure 7) shows that the adjoint derivatives are actually discontinuous (notice the abrupt change of direction of the adjoint contour lines of the y-momentum adjoint variable ψ 3 ).
We now examine the behavior of the adjoint derivatives along a line crossing the bow shock as indicated in Figure 5 and Figure 7. The line is perpendicular to the shock, which is oblique at this location. The tip of the bow shock is a normal shock, which could be used to test the adjoint properties across such shocks, but the adjoint solution is contaminated by the presence of the adjoint singularity along the incoming streamline stagnation (the supersonic adjoint solution shows singularities along all three characteristics impinging the tip of the bow shock).
Figure 8 shows that the adjoint variables are clearly continuous across the shock, but their gradients are not. A clear kink in the y-momentum adjoint variable ψ 3 is visible at the location of the shock. The discontinuity in the normal adjoint gradients is most clearly seen in Figure 9, which plots the adjoint normal derivatives along the line (left panel). The largest jump is found for ψ 3 , and the relative sizes of the jumps are in agreement with Equation (29). Figure 9 also checks on the right panel some of the properties of the jumps of the adjoint gradients presented in Equations (26) and (27), as well as the adjoint shock Equation (17). Bear in mind that what is being plotted is actually the following:
v n n ψ 1 v n n ψ 4 n Σ n ϕ = n Σ x n ψ 2 + n Σ y n ψ 3 ρ v t ( t g ψ 1 + H t g ψ 4 ) + ( p + ρ v t 2 ) t Σ t g φ .
The plotted functions (36) are continuous across the shock, which indicates that the corresponding jumps are zero as required by Equations (17), (26) and (27).

4.2. Transonic Flow

The second test case corresponds to transonic flow past a NACA0012 airfoil with flow conditions M = 0.8, α = 1.25°. Under these conditions, the flow has a fairly strong shock on the upper side at x/c ≈ 0.64 and a weaker shock on the lower side (Figure 10).
Contour plots of the adjoint variables are shown in Figure 11 and Figure 12. Notice that the adjoint solution is singular along the incoming stagnation streamline [5,21], the wall [21], and also along a delta-like structure formed by the supersonic characteristic emanating from the shock foot and its reflection off the sonic line [22], but it is continuous across the shock and the sonic line. A zoom of the adjoint solution near the upper shock (Figure 12) shows that the adjoint derivatives are actually discontinuous (notice the abrupt change of direction of the adjoint contour lines of the y-momentum adjoint variable ψ 3 ).
We now examine the behavior of the adjoint derivatives along a line crossing the upper shock at right angles as indicated in Figure 10 and Figure 12. As explained above, this shock is not normal (the tangent velocity, though small, is definitely not zero, as can be seen in Figure 13). Figure 13 shows that the adjoint variables are clearly continuous across the shock, but their gradients are not (see the kink in the y-momentum adjoint variable ψ 3 at the location of the shock). The discontinuity in the normal adjoint gradients is most clearly seen in Figure 14, which plots the adjoint normal derivatives along the line (left panel). The largest jump is found for ψ 3 , while the jumps in the other normal derivatives cannot be appreciated at this level of resolution (and could very well be nearly zero; for ψ 2 this is reasonable since, from Equation (29), [ n ψ 2 ] Σ t Σ x = 0 , while for ψ 1 and ψ 4 , it could be related to the fact that H n ψ 4 n ψ 1 v t n ψ 3 / 2 and v t is relatively small). The right panel of Figure 14 checks the properties of the jumps of the adjoint gradients given in Equations (17), (26) and (27). The plotted functions are continuous across the shock, which indicates that the corresponding jumps are zero.

4.3. Normal Shock with Normal Extension

For the angle of attack used in the previous case, the upstream wall Mach number M 1 < M 1 and, thus, the resulting shock is only normal at its foot. We will now consider a special incidence angle α M 1 for which M 1 = M 1 , which should result in a normal shock to some distance above the surface. The value of α M 1 is not known a priori and was obtained in [17] through an iterative process by varying the angle of attack while holding M constant. The final value was, however, not disclosed, so after some numerical experiments, we have found that α ≈ 5.794° results in M 1 M 1 as illustrated in Figure 15.
At y = 1 (in airfoil chord-length units), the shock is still normal, with a fairly low value of v t / | v | 10 3 (Figure 16). The adjoint variables are still continuous at the shock, but a clear discontinuity in the gradient of ψ 3 can be observed in Figure 16 and confirmed by the plot of the normal derivatives in Figure 17. In the present case, t Σ = ( 0 , 1 ) , n Σ = ( 1 , 0 ) , and t g ψ T = ( 0.29 , 0.37 , 8 × 10 5 , 0.07 ) , which yields, from Equation (34), the prediction:
n ψ ± = ( 0 0 t g ψ 2 ( t g ψ 1 + H   t g ψ 4 ) / v n ± 0 ) .
We see in Figure 17 that Equation (37) is reasonably obeyed by the numerical solution, as is the other shock relation in Equation (35), n Σ x n ψ 2 ± + n Σ y n ψ 3 ± = n ψ 2 ± = 0 , and the shock Equation (31), t Σ x   t g ψ 2 + t Σ y   t g ψ 3 = t g ψ 3 = 0 .

5. Conclusions

In 2D, the adjoint variables of typical cost functions are continuous at shocks and obey a differential equation along the length of the shock. In this work, we have focused on determining the behavior of the gradients of the adjoint variables across shocks. It had been anticipated in [5], by studying the behavior of Green’s functions of the linearized Euler equations, that there is a discontinuity in the gradient of the adjoint variables at the location of the shock, which was clearly visible in the numerical results of [15].
In order to analyze the behavior of the adjoint gradients at the shock, it proves convenient to use a frame of reference locally aligned with the shock curve, relative to which it is possible to decompose the adjoint gradients on either side of the shock into (locally) normal and tangent components. Since the adjoint variables are continuous at the shock, the tangent adjoint gradients are continuous as well, but the normal components need not be. Combining the shock equation and the adjoint equations, which hold on either side of the shock, it is possible to obtain detailed predictions for the behavior of the gradients of the adjoint variables across the shock. These equations relate the discontinuity (jump) of the normal component of the adjoint gradients to their tangent component, but do not completely fix the value of the jumps. In fact, the equations allow continuous normal gradients provided that the tangent gradients vanish, as occurs, for example, across the fish-tail shocks in supersonic flows. In 2D, the equations imply that, for normal shocks, three linear combinations of normal adjoint gradients are identically zero at the shock, while a fourth combination has a jump proportional to the discontinuity in the inverse normal component of the velocity [ v n 1 ] Σ .
Several numerical tests have been carried out to get a flavor of how numerical adjoint solutions behave at shocks. The computed solutions are continuous at the shock and present discontinuities in the gradient of the adjoint variables at the location of the shock. The solutions follow the shock relations to a reasonable degree, in agreement with the results presented in [15].
A separate question that we have not addressed here is that of the consistency of the adjoint solution for shocked flows in the limit of infinite grid resolution. In numerical computations, the internal boundary condition (the differential equation along the shock) is not explicitly enforced, which means that there could be errors in the numerical adjoint solution like the ones reported in [10] in 1D cases. The numerical results presented in this work and in [15] do not seem to support this concern, but a detailed grid convergence study would need to be performed to verify this assertion. Results in 1D indicate that for numerical adjoint results to converge to the analytical solution as the mesh is refined, there must be consistency between the flow and adjoint calculations regarding the level of numerical smoothing (i.e., that one actually uses the same scheme with the same dissipation levels in both cases) and, more critically, that the level of dissipation increases with mesh refinement in such a way that the number of points across the shock increases while at the same time the overall width of the shock decreases. This is relatively simple to achieve in 1D, but the extension to 2D needs to be addressed with care. We hope to come back to these issues in the future.

Author Contributions

Both authors have contributed equally to the paper. All authors have read and agreed to the published version of the manuscript.

Funding

The research described in this paper has been supported by INTA and the Ministry of Defence of Spain under the grants Termofluidodinámica (IGB99001) and IDATEC (IGB21001).

Data Availability Statement

The data presented in this study are available on request from the corresponding author.

Acknowledgments

The numerical computations reported in the paper have been carried out with the SU2 code, an open-source platform developed and maintained by the SU2 Foundation.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Bardos, C.; Pironneau, O. Control of Shocks in CFD. In Computational Fluid Dynamics 2004; Groth, C., Zingg, D.W., Eds.; Springer: Berlin/Heidelberg, Germany, 2006; pp. 27–39. [Google Scholar] [CrossRef]
  2. Giles, M.; Pierce, N.; Süli, E. Progress in adjoint error correction for integral functionals. Comput. Vis. Sci. 2004, 6, 113–121. [Google Scholar] [CrossRef] [Green Version]
  3. Giles, M.; Pierce, N.A. On the Properties of Solutions of the Adjoint Euler Equations. In Numerical Methods for Fluid Dynamics VI; Baines, M., Ed.; IFCD: Oxford, UK, 1998; pp. 1–16. [Google Scholar]
  4. Giles, M.; Pierce, N. Analytic adjoint solutions for the quasi-one-dimensional Euler equations. J. Fluid Mech. 2001, 426, 327–345. [Google Scholar] [CrossRef] [Green Version]
  5. Giles, M.; Pierce, N. Adjoint Equations in CFD: Duality, Boundary Conditions and Solution Behavior, AIAA Paper 97–1850. In Proceedings of the 13th AIAA Computational Fluid Dynamics Conference, Snowmass Village, CO, USA, 29 June–2 July 1997. [Google Scholar]
  6. Baeza, A.; Castro, C.; Palacios, F.; Zuazua, E. 2-D Euler Shape Design on Nonregular Flows Using Adjoint Rankine-Hugoniot Relations. AIAA J. 2009, 47, 552–562. [Google Scholar] [CrossRef]
  7. Bardos, C.; Pironneau, O. A Formalism for the Differentiation of Conservation Laws, C.R. Acad. Sci. Paris Série I 2002, 335, 839–845. [Google Scholar] [CrossRef]
  8. Bardos, C.; Pironneau, O. Derivatives and Control in the Presence of Shocks. Comput. Fluid Dyn. J. 2003, 11, 383–392. [Google Scholar]
  9. Alauzet, F.; Pironneau, O. Continuous and discrete adjoints to the Euler equations for fluids. Int. J. Numer. Meth. Fluids 2012, 70, 135–157. [Google Scholar] [CrossRef] [Green Version]
  10. Giles, M. Discrete adjoint approximations with shocks. In Hyperbolic Problems: Theory, Numerics, Applications; Hou, T.Y., Tadmor, E., Eds.; Springer: Berlin/Heidelberg, Germany, 2003; pp. 185–194. [Google Scholar] [CrossRef]
  11. Giles, M.; Ulbrich, S. Convergence of linearized and adjoint approximations for discontinuous solutions of conservation laws. Part 1: Linearized approximations and linearized output functionals. SIAM J. Numer. Anal. 2010, 48, 882–904. [Google Scholar] [CrossRef] [Green Version]
  12. Giles, M.; Ulbrich, S. Convergence of linearized and adjoint approximations for discontinuous solutions of conservation laws. Part 2: Adjoint approximations and extensions. SIAM J. Numer. Anal. 2010, 48, 905–921. [Google Scholar] [CrossRef] [Green Version]
  13. Lozano, C. Singular and Discontinuous Solutions of the Adjoint Euler Equations. AIAA J. 2018, 56, 4437–4452. [Google Scholar] [CrossRef]
  14. Lozano, C. Entropy and Adjoint Methods. J. Sci. Comput. 2019, 81, 2447–2483. [Google Scholar] [CrossRef]
  15. Peter, J.; Renac, F.; Labbé, C. Analysis of finite-volume discrete adjoint fields for two-dimensional compressible Euler flows. J. Comput. Phys. 2022, 449, 110811. [Google Scholar] [CrossRef]
  16. Emanuel, G. Analytical Fluid Dynamics (Chapter 6, Chapter 19.3 and Appendix H); CRC Press: Boca Raton, FL, USA, 2000. [Google Scholar]
  17. Koren, B.; van der Maarel, E. On steady, inviscid shock waves at continuously curved, convex surfaces. Theor. Comput. Fluid Dyn. 1993, 4, 177–195. [Google Scholar] [CrossRef] [Green Version]
  18. Economon, T.; Palacios, F.; Copeland, S.; Lukaczyk, T.; Alonso, J. SU2: An Open-Source Suite for Multiphysics Simulation and Design. AIAA J. 2016, 54, 828–846. [Google Scholar] [CrossRef]
  19. Unconstrained Shape Design of a Transonic Inviscid Airfoil at a Cte. AoA. In the SU2 Tutorial Collection. Available online: https://su2code.github.io/tutorials/Inviscid_2D_Unconstrained_NACA0012/ (accessed on 27 February 2023).
  20. Vassberg, J.; Jameson, A. In Pursuit of Grid Convergence for Two-Dimensional Euler Solutions. J. Aircr. 2010, 47, 1152–1166. [Google Scholar] [CrossRef] [Green Version]
  21. Lozano, C.; Ponsin, J. Analytic Adjoint Solutions for the 2D Incompressible Euler Equations Using the Green’s Function Approach. J. Fluid Mech. 2022, 943, A22. [Google Scholar] [CrossRef]
  22. Sartor, F.; Mettot, C.; Sipp, D. Stability, Receptivity, and Sensitivity Analyses of Buffeting Transonic Flow over a Profile. AIAA J. 2015, 53, 1980–1993. [Google Scholar] [CrossRef]
Figure 1. Scheme of shock location and conventions.
Figure 1. Scheme of shock location and conventions.
Aerospace 10 00267 g001
Figure 2. Scheme of shock perturbation.
Figure 2. Scheme of shock perturbation.
Aerospace 10 00267 g002
Figure 3. Details of shock perturbation and computation of the shock displacement term.
Figure 3. Details of shock perturbation and computation of the shock displacement term.
Aerospace 10 00267 g003
Figure 4. Close-up of the baseline NACA0012 mesh.
Figure 4. Close-up of the baseline NACA0012 mesh.
Aerospace 10 00267 g004
Figure 5. Mach contours and cutting line for flow past a NACA0012 airfoil at M = 1.5 and α = 0°.
Figure 5. Mach contours and cutting line for flow past a NACA0012 airfoil at M = 1.5 and α = 0°.
Aerospace 10 00267 g005
Figure 6. Flow past a NACA0012 airfoil at M = 1.5 and α = 0°. Contour lines for the adjoint x−momentum variable ψ2 (a) and y−momentum variable ψ3 (b). The bow and fish-tail shocks are indicated for reference.
Figure 6. Flow past a NACA0012 airfoil at M = 1.5 and α = 0°. Contour lines for the adjoint x−momentum variable ψ2 (a) and y−momentum variable ψ3 (b). The bow and fish-tail shocks are indicated for reference.
Aerospace 10 00267 g006
Figure 7. Flow past a NACA0012 airfoil at M = 1.5 and α = 0°. Contour plot for the adjoint y−momentum variable ψ3 near the bow shock. The bow shock and the cutting line are indicated for reference.
Figure 7. Flow past a NACA0012 airfoil at M = 1.5 and α = 0°. Contour plot for the adjoint y−momentum variable ψ3 near the bow shock. The bow shock and the cutting line are indicated for reference.
Aerospace 10 00267 g007
Figure 8. Flow past a NACA0012 airfoil at M = 1.5 and α = 0°. Adjoint variables along the cutting line indicated in Figure 7. Mach number and tangential velocity are also shown for reference.
Figure 8. Flow past a NACA0012 airfoil at M = 1.5 and α = 0°. Adjoint variables along the cutting line indicated in Figure 7. Mach number and tangential velocity are also shown for reference.
Aerospace 10 00267 g008
Figure 9. Flow past a NACA0012 airfoil at M = 1.5 and α = 0°. Adjoint normal derivatives and shock relations across the bow shock.
Figure 9. Flow past a NACA0012 airfoil at M = 1.5 and α = 0°. Adjoint normal derivatives and shock relations across the bow shock.
Aerospace 10 00267 g009
Figure 10. Mach contours and cutting line for flow past a NACA0012 airfoil at M = 0.8 and α = 1.25°.
Figure 10. Mach contours and cutting line for flow past a NACA0012 airfoil at M = 0.8 and α = 1.25°.
Aerospace 10 00267 g010
Figure 11. Flow past a NACA0012 airfoil at M = 0.8 and α = 1.25°. Contour lines for the x−momentum variable ψ2 (a) and y−momentum variable ψ3 (b). The shock position is indicated for reference.
Figure 11. Flow past a NACA0012 airfoil at M = 0.8 and α = 1.25°. Contour lines for the x−momentum variable ψ2 (a) and y−momentum variable ψ3 (b). The shock position is indicated for reference.
Aerospace 10 00267 g011
Figure 12. Flow past a NACA0012 airfoil at M = 0.8 and α = 1.25°. Contour plot for the adjoint y−momentum variable ψ3 near the shock. The shock and the cutting line are indicated for reference.
Figure 12. Flow past a NACA0012 airfoil at M = 0.8 and α = 1.25°. Contour plot for the adjoint y−momentum variable ψ3 near the shock. The shock and the cutting line are indicated for reference.
Aerospace 10 00267 g012
Figure 13. Adjoint variables along the cutting line indicated in Figure 12. Mach number and tangential velocity are also shown for reference.
Figure 13. Adjoint variables along the cutting line indicated in Figure 12. Mach number and tangential velocity are also shown for reference.
Aerospace 10 00267 g013
Figure 14. Flow past a NACA0012 airfoil at M = 0.8 and α = 1.25°. Adjoint normal derivatives and shock relations across the shock.
Figure 14. Flow past a NACA0012 airfoil at M = 0.8 and α = 1.25°. Adjoint normal derivatives and shock relations across the shock.
Aerospace 10 00267 g014
Figure 15. (a) Mach contours and cutting line and (b) surface Mach distribution for flow past a NACA0012 airfoil at M = 0.8 and α = 5.794°.
Figure 15. (a) Mach contours and cutting line and (b) surface Mach distribution for flow past a NACA0012 airfoil at M = 0.8 and α = 5.794°.
Aerospace 10 00267 g015
Figure 16. Adjoint variables along the cutting line indicated in Figure 15. Mach number and tangential velocity are also shown for reference.
Figure 16. Adjoint variables along the cutting line indicated in Figure 15. Mach number and tangential velocity are also shown for reference.
Aerospace 10 00267 g016
Figure 17. Flow past a NACA0012 airfoil at M = 0.8 and α = 5.794°. Adjoint normal derivatives across the shock.
Figure 17. Flow past a NACA0012 airfoil at M = 0.8 and α = 5.794°. Adjoint normal derivatives across the shock.
Aerospace 10 00267 g017
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Lozano, C.; Ponsin, J. Shock Equations and Jump Conditions for the 2D Adjoint Euler Equations. Aerospace 2023, 10, 267. https://doi.org/10.3390/aerospace10030267

AMA Style

Lozano C, Ponsin J. Shock Equations and Jump Conditions for the 2D Adjoint Euler Equations. Aerospace. 2023; 10(3):267. https://doi.org/10.3390/aerospace10030267

Chicago/Turabian Style

Lozano, Carlos, and Jorge Ponsin. 2023. "Shock Equations and Jump Conditions for the 2D Adjoint Euler Equations" Aerospace 10, no. 3: 267. https://doi.org/10.3390/aerospace10030267

APA Style

Lozano, C., & Ponsin, J. (2023). Shock Equations and Jump Conditions for the 2D Adjoint Euler Equations. Aerospace, 10(3), 267. https://doi.org/10.3390/aerospace10030267

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop