Adjoint Complement to the Universal Momentum Law of the Wall

The paper is devoted to an adjoint complement to the universal Law of the Wall (LoW) for fluid dynamic momentum boundary layers. The latter typically follows from a strongly simplified, unidirectional shear flow under a constant stress assumption. We first derive the adjoint companion of the simplified momentum equation, while distinguishing between two strategies. Using mixing-length arguments, we demonstrate that the frozen turbulence strategy and a LoW-consistent (differentiated) approach provide virtually the same adjoint momentum equations, that differ only in a single scalar coefficient controlling the inclination in the logarithmic region. Moreover, it is seen that an adjoint LoW can be derived which resembles its primal counterpart in many aspects. The strategy is also compatible with wall-function assumptions for prominent RANS-type two-equation turbulence models, which ground on the mixing-length hypothesis. As a direct consequence of the frequently employed assumption that all primal flow properties algebraically scale with the friction velocity, it is demonstrated that a simple algebraic expression provides a consistent closure of the adjoint momentum equation in the logarithmic layer. This algebraic adjoint closure might also serve as an approximation for more general adjoint flow optimization studies using standard one- or two-equation Boussinesq-viscosity models for the primal flow. Results obtained from the suggested algebraic closure are verified against the primal/adjoint LoW formulations for both, low- and high-Re settings. Applications included in this paper refer to two- and three-dimensional shape optimizations of internal and external engineering flows. Related results indicate that the proposed adjoint algebraic turbulence closure accelerates the optimization process and provides improved optima in comparison to the frozen turbulence approach.


Introduction
This paper is concerned with the formulation of an adjoint law of the wall (LoW) serving the formulation of momentum boundary conditions in an adjoint analysis and a related algebraic treatment of turbulence in the adjoint framework. In the context of local fluid dynamic optimization, the adjoint analysis aims at the efficient computation of derivative information for an integral objective functional with respect to (w.r.t) a general control function [4,5,25,11,9]. In continuous space, the dual or adjoint flow state can be interpreted as a co-state and always follows from the underlying primal Partial Differential Equation (PDE) governed model that describes the flow physics. However, the appropriate formulation of boundary conditions is often not intuitively clear in a PDE-based, continuous adjoint framework and the development of numerical strategies clearly lags behind the primal progress [31,23,43,35,24].
Modelling equations for the turbulent closure appear comparatively complex already on the primal side. The latter is underlined by an unfavourable algorithmic complexity that contains possibly non-differentiable expressions making it unhandy for a continuous adjoint approach which has motivated the neglect of adjoint turbulence models in line with the frozen turbulence approach [32,23,3]. However, the influence of the variation of the turbulence parameters is an open discussion [19,3] which is why discrete adjoint approaches using automatic differentiation have been derived that aim at a synchronization of the primal and dual turbulent development states, cf. [22,21,20]. The discrete approach passes over the adjoint PDE and directly bridges the discrete linearized primal flow into a consistent discrete dual approach, cf. [4,5] or [37,38]. Despite the various merits and drawbacks of the discrete vs. the continuous adjoint method, the latter is unique for its invaluable contribution to a physical understanding. The development of the continuous adjoint method with respect to adjoint turbulence modelling initially started with the derivation of adjoint one equation closures [42,2,1] followed by the complete linearization of prominent statistical closures, e.g. an adjoint k − ε [26,43] and k − ω [10,6,17,18] model.
All previously mentioned contributions share the idea of deriving adjoint turbulence modelling equations. Optimizations of complex engineering flows using fully consistent, differentiated turbulence transport models are however rare. Primal turbulence transport models inhere multiple non-linearities and inter-parameter couplings, that significantly hamper the robustness and the efficiency of a consistent adjoint framework and hinder their utilization in engineering applications. On the other hand, the continuous adjoint framework gives access to dedicated adjoint turbulence modelling at a lower level of adjoint consistency. Thus, one research question of the present effort is to investigate the potential of an algebraic adjoint turbulence treatment that offers the algorithmic benefits of a frozen turbulence approach.
In contrast to former studies, our study originates from analysing the adjoint complement to a simple unidirectional turbulent shear flow, which is the foundation of virtually all wall function based turbulent boundary conditions using the mixing-length hypothesis [28,27]. We distinguish between two adjoint turbulence formulations, i.e. an algebraic, mixinglength based approach and a simple frozen turbulence approach. With reference to the adjoint LoW, both formulations differ only in a single scalar coefficient in the logarithmic region and a simple scaling with the ratio of the friction velocities. The analysis suggests a surprisingly simple algebraic approximation for an adjoint turbulence treatment. Results obtained by this strategy are deemed consistent to LoW physics and indicate improvements over the frozen turbulence assumption when applied to more general flows without solving an adjoint turbulence transport model. The remainder of the paper is organised as follows: Section 2 and 3 are concerned with the derivation of the adjoint unidirectional shear flow equations for a frozen as well as a consistently linearized turbulent viscosity contribution. The subsequent section 4 derives an adjoint complement to the primal LoW. In section 5 we discuss our findings w.r.t. more sophisticated two-equation turbulence models. Verification studies are presented in the 6th section. Section 7 scrutinizes the performance of the suggested algebraic model for several internal and external shape optimization examples of engineering relevance. The final section 8 provides conclusions and outlines future research. Within the publication, Einstein's summation convention is used for lower-case Latin subscripts and vectors as well as tensors are defined with reference to Cartesian coordinates.
We start with a brief discussion of a simple -yet commonly used-incompressible primal flow description. The discussion is confined to plane wall flows, using a local orthogonal coordinate system as illustrated in Fig. 1, where y denotes the wall normal coordinate or distance and x refers to the wall tangential direction. The flow field is usually considered to be fully developed and assumed as uni-directional, i.e. u(y) in the vicinity of the wall. Extensions to more general curved near wall flows have been published in [43,16] but are not considered here to save space. A key element of the concept -which is crucial for the formulation of boundary conditions for turbulent wall flows -is the constant shear stress hypothesis. The latter assumes τ eff = const. for the inner region of a wall boundary layer y/∆ << 1 where y = ∆ denotes the outer edge of the boundary layer. The simple relation substitutes the momentum equation above the wall and supports the derivation of both the primal and the adjoint LoW, viz.
The validity of (1) is restricted to approximately the inner 20% of the boundary layer and widens with increasing boundarylayer thickness, cf. [27,39]. An isotropic Boussinesq-viscosity model (BVM) is frequently employed in the majority of Reynolds-averaged Navier-Stokes (RANS) or large-eddy simulation (LES) frameworks to supplement the laminar, molecular stress τ l = µ du/dy by a companion turbulent stress τ t = µ t du/dy and close the formulation. Mind that despite the particular turbulence model employed to determine µ t , e.g. the k − , k − ω or ν t formulation [39,33], their values usually comply with the mixing length hypothesis in the logarithmic layer, i.e. µ t = ρ (κ y) 2 du/dy, where (κy) denotes the mixing length and κ is the von-Karman constant.

Adjoint Unidirectional Shear Flow
The adjoint system studied herein should provide gradient information for a boundary-based objective j Γ w.r.t a general control parameter, e.g. the shape of the wall (δ y j Γ ). A widely used exemplary objective refers to the flow induced shear force j Γ = µ eff [du/dy] along the wall. We would like to point out that there are different adjoint answers to the same question, e.g.
regarding fluid flow-induced forces [15,14]. If attention is given to a boundary layer, e.g. the lower half of a channel outlined in Fig. 1, the constraint optimization problem is transformed into an unconstrained formulation based on a Lagrangian L where the index (·) w denotes to a wall value. Equation (2) inheres a Lagrangian multiplierû which is frequently labeled as the dual or adjoint velocity. Its dimension depends on the underlying objective, e.g.
represents the units of the boundary-based objective. The total variation of the Lagrangian leads to the adjoint equation.
Using ρν = µ together with a constant density ρ, we obtain The frozen turbulence assumption neglects the variation of the turbulent viscosity, i.e. δν eff = 0. An isolation of δu allows the formulation of first order optimality conditions, viz.
Here y = ∆ marks the position of the outer boundary. The adjoint equation to (1) follows from the integral expression in (4) and readsRû The asterisk (F) indicates the adjoint equation based on the frozen turbulence assumption that resembles its primal counterpart in a self-adjoint manner. The boundary conditions along the wall as well as the outer boundary follow from the remaining terms, viz.
A consistent approach also considers the variation of the turbulent viscosity. Thanks to the employed mixing length hypothesis, the turbulent viscosity exclusively depends on the tangential mean velocity and the related variation reads δν eff = (κy) 2 (d(δu)/dy). The latter augments (4) towards a consistent total variation Interestingly, (8) resembles (4) by doubling the turbulent contribution. Hence, the consistent (C) adjoint to (1) readŝ The asterisk (C) serves to separate the adjoint formulation based on the consistent algebraic turbulence model from the frozen turbulence framework. Necessary boundary conditions follow again from the boundary parts in (8) and agree with Eqns. (6)- (7).
A sensitivity rule of the objective w.r.t. a general control variable depends on the definition as well as on the nature of the control. E.g. the relation δu = 0 (cf. Eqn. (7)) along the channel wall holds as long as the wall is not subjected to control. However, if the wall is examined for its optimisation potential, further variational contributions follow from a general shape calculus and are available based on a linear development of the local flow w.r.t. a perturbation in wall normal direction δu = −(du/dy)δy. The latter yields a shape sensitivity derivative expression y = 0 : δ y L · δy = δ y j Γ · δy + ν eff dû dy du dy δy along the controlled part of the channel boundary and we refer to [32,31,23,15] for a detailed discussion. The coefficient accounts for a frozen [consistent] algebraic formulation.

Law of the Wall
The primal flow description (1) refers to a unidirectional shear flow and assumes a constant near wall stress. According to its units, the constant stress τ eff is anticipated to be proportional to the square of a friction velocity U τ , viz. τ eff := ρ U 2 τ . The two-layer model assumes a vanishing turbulent stress in the immediate vicinity of the turbulence damping wall (µ t /µ → 0), frequently labeled as viscous sub-layer, and the opposite behavior beyond a certain wall-normal distance, i.e. inside the logarithmic-layer, where µ/µ t → 0. Using ν = µ/ρ and ν t = µ t /ρ, Eqn. (1) is usually integrated separately for both limit cases y <ỹ : y ≥ỹ : whereỹ represents the (theoretical) intersection of the sub-and the logarithmic-layer solution. The use of a no-slip condition along the wall, i.e. at y = 0, returns u w = C 1 = 0. The integration constant C 2 is chosen such that the desired transition point is realized and thereby hinges on the choice of κ. Using non-dimensional parameters based on inner scaling, i.e.
where the former constant C 2 is turned into a non-dimensional constant B. Frequently used parameter combinations refer to κ = 0.4 and B = 5 to matchỹ + ≈ 11. In reality the transition from the near-wall to the logarithmic-layer solution spreads over a small region labeled as buffer-layer.
The adjoint complement to the LoW (13) also follows the two-layer ansatz. In line with (1), we first assume an adjoint unidirectional shear flow and a constant adjoint shear stress Equation (14) utilizes a coefficient β to switch between the frozen (F; β = 1) and the consistent (C; β = 2) algebraic approach. Along the route of the primal flow, the adjoint stressτ eff is assumed to be proportional to the square of an adjoint friction velocityÛ τ . The two-layer model inherited from the primal flow restricts the effective viscosity of the viscous layer (µ t /µ → 0) and the log-layer (µ/µ t → 0). Analogue to the primal derivation, Eqn. (14) is integrated separately for both cases y ≤ỹ : Note that the primal velocity gradient in the logarithmic regime du/dy was replaced by U τ /(κy) to solve for the adjoint tangential velocity. Applying a similar velocity normalization, i.e.û + :=û/Û τ , yields a compact form of the adjoint LoW similar to (13), viz.û Despite a possible shift due to non-intuitive boundary conditions, the adjoint LoW resembles the primal counterpart scaled by the friction velocity ratio (Û τ /U τ ) and employs half the logarithmic inclination by the parameter β for the consistent approach.
Since the adjoint field quantities are mathematically motivated, their adjoint boundary conditions enter the integration constants in Eqn. (15)- (16). Depending on the objective under investigation, the adjoint velocity potentially experiences a non-zero boundary condition along no-slip walls, henceĈ 1 =û w , e.g.Ĉ 1 = −1 if the shear stress objective from Sec. 2 is considered. The piece-wise continuous transition from the sub-towards the logarithmic-layer is ensured by an appropriate value ofĈ 2 . The latter is reformulated intoB as an adjoint counterpart of the primal B. Using we conclude that the adjointB follows from the primal B, where the latter is augmented by a constant shift in line with the prescribed boundary condition for the adjoint velocity, viz.

Adjoint Two-Equation Wall Functions
This section tries to convey the notion that the simple manipulation of adjoint turbulence viscosity also supports more general BVM. We refer to the frequently used baseline k − ε model [8] as an exemplary turbulence closure of the primal flow equations. The employed wall boundary conditions are of significance. They refer to standard approaches, used by most engineering finite volume methods, and employ a prescribed shear stress τ w = τ eff as well as pressure load on the wall face of the wall adjacent elements to close the primal momentum equations. Zero wall-normal gradients for the turbulent kinetic energy (TKE) k and a prescribed near wall value of the energy dissipation ε, including the assurance of the local turbulence equilibrium P k = ε in the wall adjacent node / cell / element, serve to close the primal turbulence model equations [39].
The study resembles the investigation already performed in Sec. 2 by directly imposing either the primal low-Re or high-Re formulation.
The algorithmic structure for the low-and the high-Re situation is identical. The only difference refers to assigned specific values for the wall shear in line with either of the two solutions (13), and the near wall value of which accommodates to the low-( = 2νk/y 2 ) or the high-Re situation ( = u 3 τ /(κy) = ( √ c µ k) 3/2 /(κy)). As regards the adjoint approach, we only consider the adjoint momentum. The wall valueû w does -of course -not differ for the low-and the high-Re situation. However, when attention is given to high-Re simulations, the resolution ofû in the very near-wall region is deemed computationally expensive and it is more convenient to follow the same implementation strategy as for the primal flow.
In the following, our exemplary objective again refers to the fluid flow induced shear force.
Employing a low-Re approach, one frequently imposes for the turbulent quantities in the very near-wall regime. This allows for the construction of a Lagrangian, viz.
The variation of (21)reads and can be rearranged to apply first order optimality conditions, viz.
The adjoint low-Re formulation follows from the integral in (23) and yieldŝ and agrees with the observations already documented in the frozen turbulence part of Sec. 2, cf. Eqn. (5). Mind that (23) is also fulfilled if ∂k/∂y is employed, hence ∂(δk)/∂y = 0 → ∂k/∂y = 0. The boundary conditions for the low-Re formulation follow from the remaining terms in (23) that can be collected in a compact form and subsequently eliminated, viz.
This again confirms the findings of Sec. 2 and Eqns. (6)-(7). Eqn. (26) is fulfilled if either holds that allows for a low-Re (LR) shape derivative expression (cf. Eqn. (10)) if a linear development of the local flow w.r.t.
a perturbation in wall normal direction is applied.
Employing a high-Re k − formulation, one frequently imposes Hence, a possible Lagrangian, that is valid within the logarithmic layer [or in the first node / cell / element] from a continuous [discrete] perspective, reads Substituting = U 3 τ /(κy) = (k √ c µ ) 3/2 /(κy) as well as (κy)du/dy = U τ = (k C µ ) 1/2 we end up with A subsequent total variation reads The variations of primal velocity and the TKE are isolated to Rewriting (32) by expressing everything in terms of the primal friction velocity U τ yields δL = (δU τ )(κy) du dy Ensuring a vanishing Lagrangian for all possible variations finally yields the adjoint wall functions, viz.
Interestingly, the adjoint dissipation rate is identical zero whereas the adjoint TKE remains as a passive scalar that enters the adjoint shear to form the same expression as in Eqn. (8) in line with Eqn. (10) resulting from the fully continuous derivation in Sec. 2. Similar to the low-Re formulation, Eqn. (36) is again fulfilled if either holds that allows for a high-Re (HR) shape derivative expression based on twice the turbulent viscosity (cf. Eqn. (10)). We thus use stress conditions and prescribeτ w =τ eff andp instead of a simple Dirichlet conditionû(y = 0) =û w , which helps to match with the wall function (17). Mind that, due to the employed objective function, the adjoint flow often features moving walls [15].
We conclude that there is no need for further adjoint turbulent equations in the range of validity of the adjoint LoW if the above presented wall function based two-equation closure is employed, except a volumetric objective is considered that explicitly depends on the turbulent quantities. The reason for this is the algebraic scaling of all mean flow and turbulence parameters with the friction velocity U τ within the logarithmic-layer.

Verifications
The verfication study refers to a 2D turbulent channel flow at Reynolds-numbers between 10 6 ≤ Re H = U H/ν ≤ 10 8 based on the channel height H, the bulk velocity U and the kinematic fluid viscosity ν, cf. Fig. 1.
where S ik = 1/2(∂v i /∂x k + ∂v k /∂x i ) and δ ik represent the symmetric strain rate tensor as well as the Kronecker delta respectively. Mind that we switch the notation compared to the unidirectional setting, viz. u := v 1 andû :=v 1 from now on.
Corresponding boundary conditions are given in [35,11,15,14]. As already mentioned, wall function expressions often involve singularities at the wall and/or high-order polynomial behaviour beyond the capabilities of the numerical discretization. Thus -rather than using wall values -wall function expressions often replace the governing equations in the wall adjacent discrete node / cell / element. The verification involves two turbulence closures for the primal flow. The low-Re study aims to verify the predictive agreement with the adjoint LoW (17) and therefore employs a mixing-length model supplemented by a van-Driest [36] damping function f vD = 1 − exp(−y + /A + ), i.e. ν t = (κ y w f vD ) 2 (du/dy). Here y w represents the normal distance to the nearest wall and A + was assigned to A + = 27. A standard k − model [8] serves as a closure for the high-Re study. In the absence of volume based objective functional, the adjoint equations to (38)-(39) read: A boundary based objective functional is considered that accounts for the fluid flow induced force J F , viz.
Hence, the local objective reads j F Γ = (pδ ik − 2µ eff S ik )n k r i which in turn enters the adjoint boundary conditions and we refer to [35,15] for a detailed overview. The force objective coincides with the pure shear objective (cf. Sec. 2) augmented by a pressure contribution projected into a certain spatial direction r i . After a successfully approximation of the primal and adjoint field equations, a shape sensitivity can be derived along the controlled design wall [35,15,13] Eqns. (38)- (41) are approximated using the Finite-Volume procedure FreSCo+ [29]. Analogue to the use of integrationby-parts in deriving the continuous adjoint equations, summation-by-parts is employed to derive the building blocks of the discrete (dual) adjoint expressions. A detailed derivation of this hybrid adjoint approach can be found in [35,11,13].
The segregated algorithm uses a cell-centered, collocated storage arrangement for all transport properties. The implicit numerical approximation is second order accurate and supports polyhedral cells. Both, the primal and adjoint pressurevelocity coupling is based on a SIMPLE method and possible parallelization is realized by means of a domain decomposition approach [40,41]. In terms of the node-based shape optimisation approaches herein, the computational grid is adjusted using a Laplace-Beltrami [34,12] [Steklov-Poincaré [30,13] (13) and (17). All results feature a narrow buffer-layer region triggered by the employed van-Driest term. Figure 4 depicts the results obtained for the high-Re simulations. It is seen, that the log-layer branch of the two solutions (13) and (17) is again matched fairly accurate in combination with a k − BVM and we conclude, that the adjoint LoW for momentum is compatible with the above suggested approach. These results encourage us to scrutinize the performance of the simple adjoint algebraic turbulence closure for more complex cases beyond the limits of unidirectional attached shear flows in the following section.

Applications
The application part of the manuscript reports the predictive performance of the algebraic LoW-consistent closure in more relevant engineering-type flows. Examples included exclusively refer to k −ε primal flow turbulence modelling in combination with high-Re wall functions. Hence, the wall normal resolutions reach down to y + ≈ 50 for all considered studies. The focal points of interest are (a) a comparison of initial shape sensitivities predicted by the adjoint frozen (F) and the LoWconsistent (C) adjoint turbulence closure, and (b) their respective influence on complete, gradient (steepest descent) based shape optimizations using CAD-free optimization framework. Initial applications refer to two-dimensional investigations ranging from external to internal flows. The final application refers to the optimization of a three-dimensional ducted geometry.

2D External: Pointed Oval
The first test case examines a two dimensional elliptic, pointed oval geometry of length [height] L [L/2] under a Reynoldsnumber of Re L = U L/ν = 10 6 where U and ν refer to the bulk velocity and kinematic viscosity respectively, cf. Fig. 5 (a) and 6 (left). The investigated oval employs a height h to length ratio of h/L = 1/2. The structured numerical grid consists of 11 600 control volumes and the obstacle is discretized with 200 surface elements as depicted in Fig. 5 (b). A homogeneous velocity is imposed along the inlet, a zero pressure value is prescribed at the outlet and slip-walls are employed along the [-] Re H = 10 8 Figure 4: Comparison of predicted primal and adjoint velocity profiles using the frozen turbulence (F) as well as the LoWconsistent (C) approach for a turbulent channel flow at Reynolds-numbers between 10 6 ≤ Re H ≤ 10 8 increasing from left to right (high-Reynolds formulation).
x 1 Figure 5: Illustration of the considered geometry (a) and computational grid (b) for the flow around a pointed oval (Re L = 10 6 . Red lines indicate the design region ). The initial shape sensitivities along the upper side resulting from both employed adjoint formulations (F vs. C) are shown in Fig. 6 (center). Notable quantitative differences are observed in the maximum absolute sensitivity. Moreover, qualitative differences occur due to the deviating signs in the vicinity of the leading and trailing edge. While the former should primarily result in an accelerated optimization, the latter points to possibly different optimal solutions. For this reason, two optimizations were performed, i.e. one for a convex problem, that should exclusively reveal convergence speed differences, and one for a non-convex problem.
The first study uses an identical step size in combination with a Laplace-Beltrami surface metric, which extracts the inherently smooth shape gradient out of the possibly rough shape derivative, viz. g − h 2 ∆ Γ g = s where g and ∆ Γ = ∂ 2 /∂x 2 k − ∂ 2 /∂n 2 represent the shape gradient as well as the Laplace-Beltrami operator respectively [34,12]. The utilized step size was chosen to ensure a maximum first displacement d of d/L = 1/1000 for the consistent optimization. The mathematically convex problem should physically converge to a flat plate boundary layer flow. The convergence of the drag objective is documented in Fig. 6 (right) where both strategies yield almost the same optimal value that drops by approximately 85%. However, the LoW-consistent approach converges approximately 30% faster compared to the frozen turbulence approach. The optimized shapes are depicted in Fig. 6 (left) and the deviation of their optimal drag value is below 2% w.r.t. the non-dimensional drag coefficient of a turbulent flat plate boundary layer, e.g. c d ≈ 0.074 Re cf. [7].
Subsequently, an additional optimization study was carried out, whereby the sensitivity is modified in such that the flow displacement of the initial shape is conserved using a projection method, viz. s → s − s i n i dΓ/ 1dΓ. Analogous to the previous optimization, the same constant step size was specified for both optimizations, which was chosen to ensure a maximum first displacement of d/L = 1/1000 for the consistent optimization. The convergence of the objective function is documented in the right graph of Fig. 7. Again, the LoW-consistent approach converges almost 30% faster, while absolute [relative] improvements of ≈3% [≈10%] are observed for the resistance reduction compared to the frozen turbulence approach. The profit follows mainly from the slightly more bulbous [slimmer] front [rear] region (cf. Fig. 7).
An interesting aspect follows from a comparison of the optimal resistance reduction observed with different adjoint algebraic turbulence models. Lifting the ratio between the primal and the adjoint eddy-viscosity from the LoW-consistent value of 2 to similar values -e.g. 3, 4 or 5 -inside the field does marginally change the computed optimum and the related behaviour is equivocal. More drastic changes are detrimental to the accuracy and robustness. Hence, we would recommend to retain the LoW-consistent value.

2D T-Junction Flow
The second test case examines a two-dimensional T-junction at a bulk Reynolds-number of Re D = U D/ν = 5 · 10 4 where U , D and ν refer to the bulk velocity, inlet diameter as well as the kinematic viscosity respectively, cf. Fig. 8 (a). The structured numerical grid models half of the geometry and consists of 10 000 control volumes. The upper/flat [inner/curved] boundary is free for design and discretized with 105 [210] surface elements as depicted in Fig. 8 (b). The grid is refined towards the transition between fixed and designed wall. Along the inlet, a homogeneous velocity is imposed together with turbulent quantities that follow from the empirical relation Tu U 0.07D C 3/4 µ k and Tu = 0.16 Re A zero pressure value is prescribed at the outlet. The ducted geometry is optimized w.r.t. the total power loss J P which yields j P Γ = −n k v k (p + ρ 2 v 2 i ). In line with the habitat of the objective (45), the adjoint pressure is prescribed to ensurê pn i = ρv k n kvi + µ eff (∂v i /∂x k )n k − 0.5ρv 2 k n i − ρv k n k v i along the outlet whereas the adjoint velocity is defined asv i = v i at the inlet, cf. [35].
The initial flow field is depicted in Fig. 10 (left) where the re-circulation zone is deemed to be responsible for a large portion of the total power loss. The resulting initial shape sensitivity along the upper/flat [inner/curved] boundary is depicted in Fig. 9  affine to each other but a noticeable increase in the sensitivity magnitude arises along the curved design region. The latter is pronounced in the direction of the narrowed region ((x 1 − x 2 )/D ≈ 4) immediately after the bend. Its influence on a gradient based optimization process is documented in Fig. 9 (right). Assuming an equal step size for both optimizations -which follows from the LoW-consistent approach with an initial maximum displacement of d/D = 1/1000-the consistent approach finds a minimum that is absolutely [relatively] ≈3.3% [≈22.2%] smaller compared to the optimal shape w.r.t. the frozen turbulence approach. The optimal shape of the consistent approach is depicted in Fig. 10 (center) and (right). In line with the absolute sensitivity values, cf. Fig. 9, the modification of the initially flat part appears to be pronounced, which finally returns a visible reduction of the re-circulation.

3D Double Bent Pipe Flow
The final test case examines a three-dimensional double-bent pipe at a bulk Reynolds-number of Re D = U D/ν = 10 5 , where U , D and ν refer to the bulk velocity, inlet diameter as well as the kinematic viscosity respectively, cf. Fig. 11. A structured numerical grid of 820 000 control volumes was used to mesh the internal flow field. Three diameters downstream of the inlet, the curved area is free for design in a CAD-free optimisation environment and discretized with 16 000 surface elements as depicted in Fig. 12. The grid is refined towards the transition between fixed and designed wall. Along the inlet, a homogeneous velocity is imposed together with turbulent quantities that follow from the empirical relations (44). A zero pressure value is prescribed at the outlet. The ducted geometry is optimized w.r.t. the total power loss J P outlined in Eqn.
(45). Hence, the adjoint boundary conditions coincide with those from the two-dimensional study in Sec. 7.2.
As illustrated by Fig. 13, the LoW-consistent framework (C) provides better convergence to an improved optimum when compared to the frozen turbulence approach (F). The respective differences are both significant and approximately amount to 22 % improvements. The right graph documents the convergence of objective functional over the optimization cycles.
initial opt. C opt. F Figure 10: Comparison of streamlines for the initial (left) and optimized T-junction geometry which was returned by the LoW-consistent (C) approach (center; Re D = 5·10 4 ). The (right) graph displays a detailed comparison of the design changes.
x 2 Figure 11: Divers views on the initial geometry of the turbulent double bent pipe case at Re D = 10 6 . Red areas indicate the design region.   Figure 13: Perspective view on the consistently optimized turbulent double bent pipe (Re D = 10 6 ) (a) as well as the evolution of the power loss objective for the frozen turbulence (F) and the LoW-consistent (C) optimization framework. Red [green] areas indicate the initial [optimized] shape.

Conclusions
The paper discussed the adjoint complement to the universal Law of the Wall (LoW) for fluid dynamic momentum boundary layers. The latter typically follows from a strongly simplified, unidirectional shear flow. We first derived the adjoint companion of the simplified shear flow while distinguishing between two frequently used adjoint formulations. It is seen that both, the frozen turbulence strategy as well as a (differentiated) approach consistent to a mixing length model provide nearly the same adjoint equations. Moreover, the adjoint Law of the Wall essentially resembles the primal LoW, and the differences refer to a simple scaling with the ratio between the primal and the adjoint friction velocity and the inclination in the logarithmic region, which reduces for the LoW-consistent approach. The analysis displays that the LoW-consistent approach is compatible with prominent RANS-type two-equation turbulence models, which ground on the mixing-length hypothesis. Hence, an algebraic adjoint momentum closure can be formulated for the LoW which hooks up to any primal Boussinesq viscosity model due to the assumed universal scaling of primal mean flow and turbulence quantities with the friction velocity. The latter motivates a surprisingly simple algebraic turbulence treatment for the adjoint momentum equation. This LoW-consistent formulation is expressed by halving the velocity inclination entering a wall function boundary condition in the logarithmic region and doubling the turbulent viscosity. Comparing to the frozen turbulence approach, the LoW-consistent method is deemed a better approximation for adjoint flow optimisation efforts. Results obtained by the LoW-consistent algebraic closure come at no extra cost and indicate an acceleration of the optimization process as well as improved optimal solutions for shape optimizations of external and internal engineering flows. A hidden benefit of the suggested LoW-consistent approach refers to the enhanced stability of the numerical framework due to the augmented viscosity.

Acknowledgments
The current work is a part of the research projects "Drag Optimisation of Ship Shapes'" funded by the German Research