INDUSTRIAL APPLICATION OF CONTINUOUS ADJOINT FLOW …is based on the continuous adjoint formulation...

17
CFD & OPTIMIZATION 2011 - 069 An ECCOMAS Thematic Conference 23-25 May 2011, Antalya TURKEY INDUSTRIAL APPLICATION OF CONTINUOUS ADJOINT FLOW SOLVERS FOR THE OPTIMIZATION OF AUTOMOTIVE EXHAUST SYSTEMS C. Hinterberger * , M. Olesen * * Faurecia Emissions Control Technologies, Germany GmbH e-mail: Christof.Hinterberger, [email protected] Key words: Geometry Optimization, Adjoint Flow Solver, Exhaust Systems Abstract. A continuous adjoint geometry optimization tool (CAGO), has been developed at Faurecia Emissions Control Technologies [1], which finds suitable shapes for catalyst inlet cones directly from the package space. CAGO produces a design proposal, which is used as a reference surface in the CAD process. Subsequently, the CAD design is validated in a fully compressible flow analysis. For further optimization sensitivities are computed by solving the adjoint flow fields with a frozen density and frozen viscosity assumption. This pseudo-compressible continuous adjoint method is described in the paper in detail in a general form including scalar transport. 1

Transcript of INDUSTRIAL APPLICATION OF CONTINUOUS ADJOINT FLOW …is based on the continuous adjoint formulation...

Page 1: INDUSTRIAL APPLICATION OF CONTINUOUS ADJOINT FLOW …is based on the continuous adjoint formulation derived and implemented by Othmer et al.[2, 3]. The implementation uses the open

CFD & OPTIMIZATION 2011 - 069An ECCOMAS Thematic Conference

23-25 May 2011, Antalya TURKEY

INDUSTRIAL APPLICATION OF CONTINUOUS ADJOINT FLOWSOLVERS FOR THE OPTIMIZATION OF AUTOMOTIVE EXHAUST

SYSTEMS

C. Hinterberger∗, M. Olesen∗

∗Faurecia Emissions Control Technologies, Germany GmbHe-mail: Christof.Hinterberger, [email protected]

Key words: Geometry Optimization, Adjoint Flow Solver, Exhaust Systems

Abstract. A continuous adjoint geometry optimization tool (CAGO), has been developedat Faurecia Emissions Control Technologies [1], which finds suitable shapes for catalystinlet cones directly from the package space. CAGO produces a design proposal, which isused as a reference surface in the CAD process. Subsequently, the CAD design is validatedin a fully compressible flow analysis. For further optimization sensitivities are computedby solving the adjoint flow fields with a frozen density and frozen viscosity assumption.This pseudo-compressible continuous adjoint method is described in the paper in detail ina general form including scalar transport.

1

Page 2: INDUSTRIAL APPLICATION OF CONTINUOUS ADJOINT FLOW …is based on the continuous adjoint formulation derived and implemented by Othmer et al.[2, 3]. The implementation uses the open

C. Hinterberger, M. Olesen

1 OPTIMIZATION OF EXHAUST SYSTEMS

Meeting backpressure and flow uniformity requirements within severe packaging con-straints presents a particular challenge in the layout of catalyst inlet cones. Figure 1illustrates how the flow uniformity of a closed coupled catalyst can be influenced by thedesign of the inlet cone.

Figure 1: Close coupled catalyst and a 3-in-1 manifold of a 12 cylinder engine.

Especially for complex package spaces it can prove difficult to find designs that fulfill theuniformity targets. To address this problem, a continuous adjoint geometry optimizationtool (CAGO) has been developed at Faurecia Emissions Control Technologies that findssuitable shapes for catalyst inlet cones directly from the package space[1]. The toolis based on the continuous adjoint formulation derived and implemented by Othmer etal.[2, 3]. The implementation uses the open source CFD toolbox OpenFOAM1 [5]. Asshown in Figure 2, CAGO begins from the provided package space and produces a designproposal that can be used as a reference surface (in IGES format) during the CAD process.

Once a corresponding CAD geometry has been established — including considerationof manufacturing and durability constraints — a fully compressible flow analysis is pre-formed, in which the catalysts are modelled as anisotropic porosities. In this analysis,the surface sensitivities for the optimization of the flow uniformity and the pressure drop(see Figure 2b) are also computed by solving the adjoint flow fields with a frozen densityand frozen viscosity assumption. This pseudo-compressible continuous adjoint method isdescribed in the methodology section of the paper. For systems that are equipped witha fuel vaporizer — which is an exhaust system component for introducing additional fuelto support DPF (diesel particulate filter) regeneration — the surface sensitivities for theuniformity of the fuel vapour distribution in front of a DOC (diesel oxidation catalyst) can

1OpenFOAM R© is a registered trademark of OpenCFD Ltd.

2

Page 3: INDUSTRIAL APPLICATION OF CONTINUOUS ADJOINT FLOW …is based on the continuous adjoint formulation derived and implemented by Othmer et al.[2, 3]. The implementation uses the open

C. Hinterberger, M. Olesen

be also calculated. The resulting surface sensitivities can be used to assess the effect ofgeometry modifications and to identify areas that are critical with respect to manufactur-ing tolerances. In the current optimization workflow, geometry modifications at this laterstage are either applied manually in the CAD model or by morphing the CFD surfacemesh directly. Since the number of additional constraints (e.g., manufacturing) increasesat these later design stages, further automation is difficult to define or implement andsome degree of manual intervention must be accepted. Nevertheless, by enhancing theusability of the geometry manipulation tools, further improvement of the design processis still possible.

Figure 2: (a, b) Workflow of design and optimization process. (b) surface sensitivities for pressure dropand flow uniformity, showing areas which have to be expanded (green) or shrunk (red) to improve results.

Figure 3: Schematic of the optimization with CAGO: (a) package space and (b) computational mesh andboundary conditions.

3

Page 4: INDUSTRIAL APPLICATION OF CONTINUOUS ADJOINT FLOW …is based on the continuous adjoint formulation derived and implemented by Othmer et al.[2, 3]. The implementation uses the open

C. Hinterberger, M. Olesen

Figure 4: Automatic geometry optimization with CAGO; (a, c) volumetric sensitivities for energy dissi-pation, (b, d) volumetric sensitivities for flow uniformity.

4

Page 5: INDUSTRIAL APPLICATION OF CONTINUOUS ADJOINT FLOW …is based on the continuous adjoint formulation derived and implemented by Othmer et al.[2, 3]. The implementation uses the open

C. Hinterberger, M. Olesen

2 CONTINUOUS ADJOINT METHOD

Our optimization process uses two different adjoint solvers. The first is the solver usedin our automatic geometry optimization tool CAGO, which is based on an incompressiblecontinuous adjoint solver originally developed by Othmer et al.[2], and which is describedin detail in[1]. CAGO operates on a fixed (non-moving) mesh for the package space anduses a level set method to describe the geometry (Figure 3). The geometry is adjustedautomatically according to computed sensitivity fields. This is shown in Figure 4 wherethe development of the cone geometry over the solver iterations can be seen. CAGO isused to generate a design proposal for the CAD designer.

The CAD design is then validated using a fully compressible CFD simulation. For thefurther optimization of this model, sensitivities are calculated using a pseudo-compressiblecontinuous adjoint method, which uses a frozen density and frozen turbulence assump-tion. This method is described in this section in a general form including scalar transport,so that it can be easily transferred to other applications (e.g. optimization of heat ex-changers, as seen in [4]). The derivation of the equations follows the theoretical paper ofOthmer[3].

2.1 Concept of the adjoint CFD method

At the beginning of an optimization problem, a cost function J = J(c, ξ), which is tobe minimized, is defined. The cost function depends on the geometry, which is specifiedvia a design vector c and it depends on the flow field ξ. The total variation of the costfunction with respect to a design change is thus given as follows

δJ = δcJ︸︷︷︸geometry

+ δξJ︸︷︷︸flow

(=∂J

∂c· δc +

∂J

∂ξ· δξ)

(1)

When the design changes by an amount δc, the flow field changes accordingly by δξ andthis affects the cost function J , causing the variation δξJ . Additionally, there could bea direct (geometrical) dependence of J on the geometry, causing the variation δcJ . Thevariation can also be written as δcJ = ∂J

∂c· δc = ∂cJ · δc.

For geometry optimization, it is quite convenient to define a sensitivity field in thefollowing form:

δJ = ∂cL︸︷︷︸sensitivity

· δc︸︷︷︸design variation

(2)

in which the sensitivity field (∂cL) relates how the cost function J is affected by anarbitrary, small, and reasonable smooth, design variation δc. Since the sensitivities ∂cLhave to account for how design variations influence the flow field ξ, an augmented costfunction

L = J +

∫Ω

Ψ ·R (3)

5

Page 6: INDUSTRIAL APPLICATION OF CONTINUOUS ADJOINT FLOW …is based on the continuous adjoint formulation derived and implemented by Othmer et al.[2, 3]. The implementation uses the open

C. Hinterberger, M. Olesen

introduces the state equations R (ξ) = 0, which are the Navier-Stokes equations writtenin residual form, as an constraint into the optimization problem, with the adjoint flowfield Ψ acting as Lagrange multiplier.

The augmented cost function L depends on the design c and on the flow field ξ, andtherefore its total variation is

δL = δcL︸︷︷︸geometry

+ δξL︸︷︷︸flow

= ∂cL · δc + ∂ξL · δξ (4)

By requiringδξL ≡ 0 (5)

the total variation (4) becomes δL ≡ δcL = ∂cL · δc, which includes the sensitivity∂cL defined in (11). This requirement defines the adjoint flow field Ψ. With δ (ΨR) =ΨδR + RδΨ and R = 0, the variation of the augmented cost function (3) is given as

δL = δJ +

∫Ω

Ψ · δR (6)

and (5) expands to

δξL = δξJ +

∫Ω

Ψ · δξR ≡ 0 (7)

From this, an equation system A (Ψ) = 0 can be derived for the adjoint flow field Ψ, inwhich the boundary conditions and source terms depend on J (see section 2.5.2). Theadjoint equations A (Ψ) = 0 are very similar to the flow equations R (ξ) = 0, and can besolved with a similar numerical cost. Once the adjoint equations are solved, the variationof the cost function with respect to an arbitrary design change, can be computed directlyfrom the primal flow ξ and adjoint flow field Ψ, as follows

δcL = δcJ +

∫Ω

Ψ · δcR (8)

without the need of an extra CFD–solution of the state equations. This can be easilyapplied for the computation of volumetric sensitivities, as it will be shown later, but forsurface sensitivities it is difficult to compute δcR. However, since the total variation ofthe state equation is zero,

δR = δcR + δξR = 0 (9)

the computation of shape sensitivities can be defined alternatively:

δcL = δcJ −∫

Ω

Ψ · δξR (10)

6

Page 7: INDUSTRIAL APPLICATION OF CONTINUOUS ADJOINT FLOW …is based on the continuous adjoint formulation derived and implemented by Othmer et al.[2, 3]. The implementation uses the open

C. Hinterberger, M. Olesen

Combining (1), (7) and (10), shows that (2) holds, and gives a descriptive relationbetween δcL and δJ :

δL = δcL = ∂cL︸︷︷︸sensitivity

· δc = δcJ︸︷︷︸geometry

+ δξJ︸︷︷︸flow

= δJ (11)

Therefore, the quantity of main interest — the total variation δJ of the original costfunction with respect to a design change (including alterations in flow field arising fromthis design change) — is equal to δcL, and this quantity can be easily computed for anyarbitrary small geometry variation δc from the sensitivity field ∂cL via (8) for volumetricsensitivities and via (10) for shape sensitivities. The adaption of the flow field δξ toa design variation δc is included via the term δξJ . The term δcJ describes the direct(geometrical) dependence of J on the design c. In many practical cases, the definition ofJ itself is independent of the design vector c and thus δcJ = 0.

2.2 Primal flow in exhaust systems

For the CFD optimization of automotive exhaust systems, the compressible flow ata maximum mass flow rate, which occurs at full blow down conditions, is typically cal-culated. The flow field (v, ρ, p, T, k, ε,Φi) is computed by solving the steady-state, fullycompressible flow equations, with the standard high-Re k-ε model. The catalysts aremodeled as anisotropic porosities and the exhaust gas is treated as an ideal gas withp = ρRT .

2.3 Cost functions

For the optimization of exhaust systems, the following types of cost functions are ofinterest:

• dissipated power

J1 = −∫inlet

ptotal v · n︸ ︷︷ ︸energy flux in

−∫outlet

ptotal v · n︸ ︷︷ ︸energy flux out

(12)

• flow uniformity

J2 =

∫CAT

1

2(v − 〈v〉)2 (13)

• species uniformity

J3 =

∫CAT

1

2(Φ− 〈Φ〉)2 (14)

These cost functions can either be optimized individually or be combined with weightingfactors wi as J =

∑iwiJi for a multiobjective optimization.

7

Page 8: INDUSTRIAL APPLICATION OF CONTINUOUS ADJOINT FLOW …is based on the continuous adjoint formulation derived and implemented by Othmer et al.[2, 3]. The implementation uses the open

C. Hinterberger, M. Olesen

2.3.1 Generic cost function

For the description of the adjoint method used, we consider a generic cost function

J =

∫Ω

JΩ︸ ︷︷ ︸volume

+

∫Γ

JΓ︸ ︷︷ ︸surface

(15)

with local contributions JΩ

[[J ]m3

]and JΓ

[[J ]m2

]from the volume Ω and the surface Γ of the

flow domain. The compact notation∫

Γ:=∫

ΓdΓ and

∫Ω

:=∫

ΩdΩ is used in the following

sections for surface and volume integrals, respectively.

2.4 Control variables

For the control variables (c in section 2.1) we use, in accordance with Othmer[3], thefollowing fields:

• a porosity field α, acting as ’virtual’ sand inside the fluid region

• the normal surface displacement β, a scalar field defined at the surface of the geom-etry.

This provides a convenient distinction between volumetric sensitivities ∂αL and surfaceshape sensitivities ∂βL. The surface sensitivities can be used to adjust the geometry(e.g., via morphing), whereas the volumetric sensitivities ∂αL are useful to identify regionswithin the fluid volume that are detrimental to the cost function (e.g., recirculation regionsfor pressure loss). The sensitivities of the cost functions to changes in the control variablesare computed via a continuous adjoint CFD method as described previously in section 2.1.

2.5 Pseudo-compressible continuous adjoint method

The formulation of the continuous adjoint method is simplified somewhat by makinga frozen density and frozen turbulence assumption. For our applications, the densityvariations linked to design variations are quite small: The density depends primarily onthe system temperature and on the system pressure, which is dominated by the pressuredrop across the catalysts. Although Zymaris et. al. [6] showed that the frozen turbulenceassumption can have quite an significant influence on the overall scaling of the computedsensitivities, using an adjoint turbulence model like Zymaris et. al. [6, 7] increases theoverall complexity of the simulations significantly and potential numerical issues (e.g.,stability) could make it difficult for use as a standard engineering tool.

8

Page 9: INDUSTRIAL APPLICATION OF CONTINUOUS ADJOINT FLOW …is based on the continuous adjoint formulation derived and implemented by Othmer et al.[2, 3]. The implementation uses the open

C. Hinterberger, M. Olesen

2.5.1 State equation

We consider (a subset of) the computed primal flow field

ξ =

vpΦ

=

velocitypressurepassive scalar – e.g., species concentration

(16)

to be the solution of the pseudo-compressible steady state Navier-Stokes equations (NSE),written in residual form as

R (ξ) = 0

=

(R1, R2, R3)T

R4

R5

=

momentum equationscontinuity equationscalar transport

(17)

=

(v · ∇) v︸ ︷︷ ︸convection

−∇ · (2νD (v))︸ ︷︷ ︸diffusion

+ ∇p︸︷︷︸pressure

+ αv︸︷︷︸porous resistance

−∇ · v

(v · ∇) Φ︸ ︷︷ ︸scalar convection

−∇ ·(

Γ∇Φ)

︸ ︷︷ ︸scalar diffusion

with D (v) = 1

2(∇v + v∇). The tilda operator . . . has been introduced as a convenience

to denote a multiplication with the density ρ. When the . . . operator is omitted, theincompressible equations are recovered. The continuity equation for a steady-state com-pressible flow ∇ · v = 0 was used, i.e. ∇ (vΦ) = (v · ∇) Φ + Φ∇ · v = (v · ∇) Φ, to writethe pseudo-compressible NSE in a non-conservative form, convenient for the further ma-nipulations. The density ρ, the effective turbulent viscosity ν and the effective turbulentdiffusivity Γ are provided by the fully compressible primal flow solver. These fields arevariable in space, but assumed to be constant with respect to a design variation. For thecomputation of the sensitivities, their dependence on geometry variations is considerednegligible. The porous resistance term f = αv serves as a ’virtual’ resistance to computevolumetric sensitivities ∂αL, but is also present in the porosity model of the catalysts,where α := αij is an anisotropic porosity.

9

Page 10: INDUSTRIAL APPLICATION OF CONTINUOUS ADJOINT FLOW …is based on the continuous adjoint formulation derived and implemented by Othmer et al.[2, 3]. The implementation uses the open

C. Hinterberger, M. Olesen

2.5.2 Derivation of the adjoint equations

The starting point for adjoint equation system is (7), also given here in index notation:

δξL = δξJ +

∫Ω

Ψ · δξR = 0 (18)

=∑i

∂J

∂ξiδξi +

∑i,j

∫Ω

Ψj∂Rj

∂ξiδξi

with ξ = (v, p,Φ)T and Ψ = (u, q, ϕ)T . The physical dimension of the adjoint field is

[Ψj] = [J ][Rj ]m3 = [J ] ∗ s

m3 ∗[ξj

]−1

, where [J ] is the physical dimension of the cost function

and [Rj] the dimension of the j-th component of the state equation (17). This gives, for

example, [u] =[

s2

kgm

]∗ [J ] as the dimension of the adjoint velocity.

The generic cost function (15) has volumetric and surface contributions and its variationδξJ with respect to the flow field is:

δξJ = δξJΩ + δξJΓ =∑i

Ω

∂JΩ

∂ξiδξi︸ ︷︷ ︸

volume

+

∫Γ

∂JΓ

∂ξiδξi︸ ︷︷ ︸

surface

(19)

The variation of (17) with respect to the flow field is

δξR = δvR + δpR + δΦR (20)

withδv (R1, R2, R3)T = (δv · ∇) v + (v · ∇) δv −∇ · (2νD (δv)) + αδv

δvR4 = −∇ · δvδvR5 = (δv · ∇) Φ

δp (R1, R2, R3)T = ∇δpδpR4 = 0δpR5 = 0

δΦ (R1, R2, R3)T = 0δΦR4 = 0

δΦR5 = (v · ∇) δΦ−∇ ·(

Γ∇δΦ)

(21)

10

Page 11: INDUSTRIAL APPLICATION OF CONTINUOUS ADJOINT FLOW …is based on the continuous adjoint formulation derived and implemented by Othmer et al.[2, 3]. The implementation uses the open

C. Hinterberger, M. Olesen

Placing (19) and (21) into (18) yields:

δξL ≡ 0

=∫

Ω∂JΩ

∂ξδξ +

∫Γ∂JΓ

∂ξδξ +

∫Ω

Ψ · δξR

=∫

Ω∂JΩ

∂vδv +

∫Γ∂JΓ

∂vδv +

∫Ω

uqϕ

· (δv·∇)v+(v·∇)δv−∇·(2νD(δv))+αδv

−∇ · δv(δv · ∇) Φ

+∫

Ω∂JΩ

∂pδp+

∫Γ∂JΓ

∂pδp +

∫Ω

uqϕ

· ∇δp0

0

+∫

Ω∂JΩ

∂ΦδΦ +

∫Γ∂JΓ

∂ΦδΦ +

∫Ω

uqϕ

· 0

0

(v · ∇) δΦ−∇ ·(

Γ∇δΦ)

(22)

The variations of the flow field δξ = (δv, δp, δΦ)T in (22) within the fluid domain Ω areunknown a priori, but can be separated by partial integration. After some manipulation(see 2.5.3) we obtain from (22) the basis for the adjoint equation system:

δξL := 0

p.I.=∫

Ω

δvδpδΦ

· −∇u·v−(v·∇)u−∇·(2νD(u))+ρ(αu+∇q−Φ∇ϕ) +

∂JΩ∂v

−∇·u +∂JΩ∂p

−(v·∇)ϕ−∇·(Γ∇ϕ) +∂JΩ∂Φ

︸ ︷︷ ︸

adjoint flow equations A(Ψ)

+∫

Γ

δvδpδΦ

· n(u·v)+u(v·n)+2νn·D(u)+ρ(ϕΦn−qn) +

∂JΓ∂v

u·n +∂JΓ∂p

ϕ(v·n)+Γn·∇ϕ +∂JΓ∂Φ

︸ ︷︷ ︸

adj. BC1

+∫

Γ

uqϕ

· −2νn·D(δv)

0

−Γn·∇(δΦ)

︸ ︷︷ ︸

adj. BC2

(23)

Equation (23) can be fulfilled for arbitrary variations of the flow field δξ = (δv, δp, δΦ)T bysolving the adjoint flow equations A (Ψ) = 0 along with the adjoint boundary conditions(BC1 + BC2 = 0).

11

Page 12: INDUSTRIAL APPLICATION OF CONTINUOUS ADJOINT FLOW …is based on the continuous adjoint formulation derived and implemented by Othmer et al.[2, 3]. The implementation uses the open

C. Hinterberger, M. Olesen

2.5.3 Notes on the partial integration of (22)

For completeness, we provide some details for the partial integration of (22). Thefollowing mathematical rules:

• Gauss’s theorem, to convert volume integral to surface integral∫Ω

∇a =

∫Γ

a n

∫Ω

∇ · a =

∫Γ

a · n

• chain rule

∇ (ab) = a∇b+ b∇a =⇒ a∇b c.r.= ∇ (ab)− b∇a

• partial integration∫Ω

a (∇ · b)c.r.=

∫Ω

∇ (ab)−∫

Ω

b · ∇a p.I.=

∫Γ

b·an−∫

Ω

b · ∇a

lead to specific rules used for the partial integration of (22):

a)∫

Ωa (∇ · b) =

∫Ω∇ (ab)−

∫Ω

b · ∇a p.I.=∫

Γb·an−

∫Ω

b · ∇ab)

∫Ω

a · (∇b) =∫

Ω∇ · (ab)−

∫Ωb∇ · a p.I.

=∫

Γb a·n−

∫Ωb∇ · a

c)∫

Ωc a · (∇b) =

∫Ω∇ (ca b)−

∫Ωb∇ · (ca)

p.I.=∫

Γb ca·n−

∫Ωbc∇ · (a)−

∫Ωba · ∇c

Using these rules, together with some more complex relations derived by Othmer[8], whichare not shown here (indicated with *), we obtain for the different terms of (22):∫

Ωu · ((δv · ∇) v)

(∗)=∫

Ωδv (−∇u · v) +

∫Γδv · (n (u · v))∫

Ωu · ((v · ∇) δv)

(∗)=∫

Ωδv (− (v · ∇) u) +

∫Γδv · (u (v · n)) with ∇ · v = 0∫

Ωu · (−∇ · (2νD (δv)))

(∗)=∫

Γu (−2νn ·D (δv)) +

∫Γδv (2νn ·D (u)) +

∫Ωδv (−∇ · (2νD (u)))∫

Ωq (−∇ · δv)

(a)=∫

Ωδv · ∇q +

∫Γδv · (−qn)∫

Ωϕ ((δv · ∇) Φ)

(c)=∫

Ωδv (−Φ∇ϕ) +

∫Γδv · (ϕΦn) with ∇ · δv = 0∫

Ωu · (∇δp) (b)

=∫

Ωδp (−∇ · u) +

∫Γδp (u · n)∫

Ωϕ ((v · ∇) δΦ)

(c)=∫

ΩδΦ (− (v · ∇)ϕ) +

∫ΓδΦ (ϕ (v · n))∫

Ωϕ(−∇ ·

(Γ∇δΦ

))(c)=∫

Γϕ(−Γn · ∇δΦ

)+∫

Ω(∇ϕ)

(Γ∇δΦ

)(c)=∫

Γϕ(−Γn · ∇δΦ

)+∫

ΓδΦ(

Γn · ∇ϕ)

+∫

ΩδΦ(−∇ ·

(Γ∇ϕ

))

12

Page 13: INDUSTRIAL APPLICATION OF CONTINUOUS ADJOINT FLOW …is based on the continuous adjoint formulation derived and implemented by Othmer et al.[2, 3]. The implementation uses the open

C. Hinterberger, M. Olesen

2.6 Continous adjoint equation system

The adjoint equation system A(Ψ) = 0, which originates from (23) is summarizedbelow:

• adjoint momentum eqn.

−ρv·2D (u)︸ ︷︷ ︸upstream convection

= −ρ∇q︸ ︷︷ ︸pressure

+∇ · (2ρνD (u))︸ ︷︷ ︸diffusion

− αρu︸︷︷︸friction

+ ρΦ∇ϕ︸ ︷︷ ︸scalar

− ∂JΩ

∂v︸ ︷︷ ︸cost function

• adjoint continuity eqn.

∇ · u =∂JΩ

∂p︸ ︷︷ ︸cost function

• adjoint scalar transport

−ρv · ∇ϕ︸ ︷︷ ︸upstream convection

= ∇ · (ρΓ∇ϕ)︸ ︷︷ ︸diffusion

− ∂JΩ

∂Φ︸ ︷︷ ︸cost function

The adjoint equation system is very similar to the primal NSE system. The main differencebeing that the adjoint convection is upstream to the primal flow, and there are volumetricsources ∂ξJΩ, if there is a volumetric contribution JΩ to the cost function.

Our OpenFOAM-based adjoint solver uses the same numerical method for the adjointflow as for the primal flow, but some adaptations in the convection scheme are appliedto improve stability and convergence. For applications involving species transport, usingnon-diffusive convection schemes proved to be important. Automatically generated poly-hedral meshes were used, in conjunction with OpenFOAM’s limitedLinear scheme (2ndorder central with TVD limiter).

2.6.1 Adjoint boundary conditions

The boundary conditions of A (Ψ) = 0 depend on the surface contribution JΓ of thecost function. The derivation of the adjoint boundary conditions is shown in [3].

• For inlets and walls with δv = 0, δp 6= 0 and ∂nδΦ = 0 (for adiabatic walls) the ad-joint boundary conditions2 are fulfilled with un = −∂pJΓ and ut = 0. Neumannboundaries ∂nq = 0, ∂nϕ = 0 can be applied for the adjoint pressure and adjointscalar.

2The condition ut = 0 follows from BC2, where ∇ · δv = 0 leads to 2νn · D (δv) = ν∂nδvt 6= 0.un = u ·n is the surface normal adjoint velocity component and ut = u− (u · n)n the surface tangentialadjoint velocity vector.

13

Page 14: INDUSTRIAL APPLICATION OF CONTINUOUS ADJOINT FLOW …is based on the continuous adjoint formulation derived and implemented by Othmer et al.[2, 3]. The implementation uses the open

C. Hinterberger, M. Olesen

• At an outlet (pressure boundary and Neumann condition ∂nξ = 0) is δv 6= 0,δp = 0 and ∂nδξ = 0 and BC2 is fulfilled. From BC1 follows ϕ = −∂ΦJΓ/vn for the

adjoint scalar, and q = u · v + unvn + ν∂nun + ϕΦ + ∂vnJΓ for the adjoint pressure,and 0 = vnut + ν∂nut + ∂vtJΓ for the tangential adjoint velocity.

In a multi-objective optimization, an adjoint system can be solved for each individual costfunction, or a single adjoint system can be solved if the cost functions are first combinedinto a single global cost function J =

∑iwiJi with individual weighting factors wi. If

scalar transport is unimportant for the cost function, setting ϕ = 0 leads directly to asimpler adjoint equation system.

2.7 Computation of sensitivities

2.7.1 Volumetric sensitivity

A volumetric sensitivity follows easily from (8) by using the porosity α, which canbe viewed as a type of “virtual sand” for the design variable (c ≡ α). The usual costfunctions do not depend directly on α, and thus δαJ = 0:

δαL = ∂αL · δα = δαJ +

∫Ω

Ψ · δαR

= 0 +

∫Ω

uqϕ

· vδα

00

=

∫Ω

u · vδα

=⇒ ∂αL = u · v (24)

Generic volumetric sensitivity

In addition to the ’virtual’ friction term αv in the momentum equation, a generic sinkγiξi could also be considered, which leads to a generic volumetric sensitivity ∂γiLi = Ψiξithat indicates how the cost function is influenced by local momentum, mass or scalarsources within the flow domain. This valuable information can be used to modify thedesign manually. For example, a momentum sink could be introduced by blocking a partof the flow domain. Or if an region is sensitive to a scalar source, flow with a higher scalarconcentration could be guided into that area via baffles or by relocating a scalar injectionpoint (e.g., fuel vaporizer application).

2.7.2 Surface sensitivities

The starting point for the computation of surface sensitivities ∂βL is (10) with c ≡ β:

δJ(11)= δβL = ∂βL︸︷︷︸

sens.

·δβ = δβJ −∫

Ω

Ψ · δξR (25)

14

Page 15: INDUSTRIAL APPLICATION OF CONTINUOUS ADJOINT FLOW …is based on the continuous adjoint formulation derived and implemented by Othmer et al.[2, 3]. The implementation uses the open

C. Hinterberger, M. Olesen

From the relation (7) and the adjoint equation system (23) with A (Ψ) = 0 and BC2 = 0follows:

δβL = δβJ −∫

Ω

Ψ · δξR(7)= δβJ + δξJ − δξL (26)

= δβJ +

(∫Ω

δξ · ∂ξJΩ +

∫Γ

δξ · ∂ξJΓ

)− δξL︸︷︷︸

(23)

(23)= δβ · ∂βJ +

∫Ω

δξ · ∂ξJΩ −∫

Γ

δξ ·

n(u·v)+u(v·n)+2νn·D(u)+ρ(ϕΦn−qn)

u·n

ϕ(v·n)+Γn·∇ϕ

︸ ︷︷ ︸

(=−∂ξJΓ)

The variations δξ of the flow field with respect to a geometry variation are unknownwithin the flow domain. At walls they are typically δξ = 0. Equation (26) simply reflectsthe definition of δJ , since δξL = 0. To compute the local surface sensitivities ∂βL, theflow field has to be held constant, since (26) was derived from (8), in which (with c ≡ β)only the partial derivative ∂β appears. Thus δξ = δβξ = 0 within the whole flow domainΩ, except at the boundary Γ, where a local wall normal displacement of δβ causes a localvariation δβξ. According to [3] and [9], the flow field can be approximated by a Taylorseries ξ (β) = ξ (0) + ∂nξ β + O(β2), where β is the wall distance (in direction of theoutward normal vector n) and ∂n is the wall normal gradient operator, and δξ can thusbe written as

δξ ≡ δβξ = ∂βξ · δβ ≈ ∂nξ · δβ (27)

which can be inserted into (26) to yield locally3:

∂βL = ∂βJ − ∂nξ ·

n(u·v)+u(v·n)+2νn·D(u)+ρ(ϕΦn−qn)

u·n

ϕ(v·n)+Γn·∇ϕ

(28)

By considering the no-slip condition at the wall4, combined with the adjoint boundaryconditions, the local surface sensitivity to a surface normal displacement can be derived [3]:

∂βL = −ν ∂nut ∂nvt − Γ ∂nΦ ∂nϕ (29)

where ut = u− (u · n) n and vt are the surface tangential velocity components. Equation(29) is only valid within regions that are not part of the definition of J , otherwise theterm ∂βJ has to be taken into account. For adiabatic walls ∂nΦ = 0 and therefore

∂βL = −ν ∂nut ∂nvt (30)

3the result can also be derived directly by partial integration of (8), with c ≡ β, by applying the wallboundary condition at the displaced wall to gain δβR = ∂βR · δβ ≈ ∂ξR ∂βξ · δβ = −∂nξ ∂ξR · δβ.

4At the wall: ξ1 = v = 0, ∇ · v = 0, ∂nvn = 0, ∂np = 0 and n · 2D (u) = (n · ∇)ut = ∂nut.

15

Page 16: INDUSTRIAL APPLICATION OF CONTINUOUS ADJOINT FLOW …is based on the continuous adjoint formulation derived and implemented by Othmer et al.[2, 3]. The implementation uses the open

C. Hinterberger, M. Olesen

3 CONCLUDING REMARKS

An industrial CFD optimization workflow for exhaust systems has been presentedin the paper that utilizes two adjoint CFD solvers. The continuous adjoint geometryoptimization tool (CAGO) is an innovative form optimization tool — useful in the earlystages of the design process to get an design proposal for a given package space – thatprovides a design proposal, which can be used as a reference during CAD design. Furtheroptimization of CAD geometries use a fully compressible CFD solution, in combinationwith a pseudo-compressible continuous adjoint method, which has also been presentedhere in detail. Although the frozen turbulence and frozen density approximations reducethe absolute precision of the sensitivities, this adjoint method provides valuable insight toguide the manual geometry adjustment, which also needs to consider production processesand other constraints such as thermal behaviour, durabilty and product costs. The focusof the next developments lies on increasing the level of automation in this CAD-basedadjustment process. As demonstrated by [10], the computed sensitivities can also be usedto adjust CAD shape parameters directly.

REFERENCES

[1] C. Hinterberger, M. Olesen, Automatic geometry optimization of exhaust systemsbased on sensitivities computed by a continuous adjoint CFD method in OpenFOAM,SAE 2010-01-1278 (2010).

[2] C. Othmer, E. de Villiers and H.G. Weller, Implementation of a continuous adjointfor topology optimization of ducted flows, AIAA-2007-3947 (2007).

[3] C. Othmer, A continuous adjoint formulation for the computation of topological andsurface sensitivities of ducted flows, Int. J. Num. Meth. Fluids, Vol. 58, pp. 861–877(2008).

[4] K. Morimoto, Y. Suzuki, N. Kasagi, Optimal Shape Design of Compact Heat Ex-changers Based on Adjoint Analysis of Momentum and Heat Transfer, J. Therm.Sci. Tech., Vol. 5, No. 1, pp.24-35 (2010).

[5] H. G. Weller, G. Tabor, H. Jasak, C. Fureby, A Tensorial Approach to ComputationalContinuum Mechanics using Object Orientated Techniques. Computers in Physics,12(6):620-631 (1998).

[6] A.S. Zymaris, D.I. Papadimitriou, K.C. Giannakoglou, C. Othmer, Continuous Ad-joint Approach to the Spalart-Allmaras Turbulence Model for Incompressible Flows,Computers & Fluids, 38, pp. 1528-1538 (2009).

16

Page 17: INDUSTRIAL APPLICATION OF CONTINUOUS ADJOINT FLOW …is based on the continuous adjoint formulation derived and implemented by Othmer et al.[2, 3]. The implementation uses the open

C. Hinterberger, M. Olesen

[7] A.S. Zymaris, D.I. Papadimitriou, K.C. Giannakoglou, C. Othmer, Adjoint WallFunctions: A New Concept for Use in Aerodynamic Shape Optimization, Journal ofComputational Physics, Vol. 229, pp. 5228-5245 (2010).

[8] C. Othmer, personal communication (2010).

[9] O. Soto and R. Lohner, On the Computation of Flow Sensitivities From BoundaryIntegrals, AIAA-04-0112 (2004).

[10] Robinson, T.T, Armstrong, C.G., Chua, H.S., Othmer, C. and Grahs, T., Sensitivity-based optimisation of parameterised CAD geometries. 8th World Congress on Struc-tural and Multidisciplinary Optimisation June 1-5, Lisbon, Portugal (2009).

17