81
A varia’onal framework for flow op’miza’on: an introduc’on to adjoints Peter Schmid Laboratoire d’Hydrodynamique (LadHyX) CNRSEcole Polytechnique, Palaiseau EPTT, Sao Paulo, Sept. 2012

A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

A  varia'onal  framework  for  flow  op'miza'on:  an  introduc'on  to  adjoints  

   Peter  Schmid  Laboratoire  d’Hydrodynamique  (LadHyX)  

CNRS-­‐Ecole  Polytechnique,  Palaiseau  

EPTT, Sao Paulo, Sept. 2012

Page 2: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

recap: time-periodic flow

Generalizations

d

dtq = L(t)q L(t + T ) = L(t) period T

with the formal solution q(t) = A(t)q0 initial condition propagator

A(t + T ) = A(t) A(T ) = A(t) C

monodromy matrix (mapping over one period)

from periodicity

qn = C qn−1 = Cn q0initial state

EPTT, Sao Paulo, Sept. 2012

Page 3: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

Generalizations

Example: pulsatile channel flow

transient growth

asymptotic contractivity

recap: time-periodic flow

EPTT, Sao Paulo, Sept. 2012

Page 4: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

Generalizations

Example: pulsatile channel flow

transient growth

asymptotic contractivity

start

large inter-period amplification

recap: time-periodic flow

EPTT, Sao Paulo, Sept. 2012

Page 5: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

time-periodic and generally time-dependent flow

Generalizations

pseudo-Floquet analysis adjoint analysis

Example: pulsatile channel flow

Can we analyze the amplification of energy between one period, i.e., for a non-periodic system matrix ?

d

dtq = L(t)q

q(t) = A(t) q0

We have

with the formal solution initial condition propagator final solution

EPTT, Sao Paulo, Sept. 2012

Page 6: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

time-periodic and generally time-dependent flow

Generalizations

pseudo-Floquet analysis adjoint analysis

Example: pulsatile channel flow

We can formulate the optimal amplification of energy as

G(t)2 = maxq0

�q, q��q0, q0�

= maxq0

�A(t)q0, A(t)q0��q0, q0�

= maxq0

�AH(t)A(t)q0, q0��q0, q0�

EPTT, Sao Paulo, Sept. 2012

Page 7: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

time-periodic and generally time-dependent flow

Generalizations

pseudo-Floquet analysis adjoint analysis

Example: pulsatile channel flow

G(t)2 = maxq0

�AH(t)A(t)q0, q0��q0, q0�

is a normal matrix AHA

the maximum is achieved for the principal eigenvector of AHA

the principal eigenvector (and eigenvalue) can be found by power iteration

q(n+1)0 = ρ(n)AHA q(n)

0

EPTT, Sao Paulo, Sept. 2012

Page 8: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

time-periodic and generally time-dependent flow

Generalizations

pseudo-Floquet analysis adjoint analysis

Example: pulsatile channel flow

q(n+1)0 = ρ(n)AHA q(n)

0

break the power iteration into two pieces

w(t) = A q(n)0

propagation of initial condition forward in time

first step

EPTT, Sao Paulo, Sept. 2012

Page 9: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

time-periodic and generally time-dependent flow

Generalizations

pseudo-Floquet analysis adjoint analysis

Example: pulsatile channel flow

q(n+1)0 = ρ(n)AHA q(n)

0

break the power iteration into two pieces

propagation of final condition backward in time

second step q(n+1)0 = ρ(n)AH(t)w(t)

EPTT, Sao Paulo, Sept. 2012

Page 10: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

time-periodic and generally time-dependent flow

Generalizations

pseudo-Floquet analysis adjoint analysis

Example: pulsatile channel flow

q(n+1)0 = ρ(n)AHA q(n)

0

q(n)0 A

w(t) = Aq(n)0

AHAHAq(n)0

ρ(n) direct problem

adjoint problem

scaling

updating

EPTT, Sao Paulo, Sept. 2012

Page 11: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

time-periodic and generally time-dependent flow

Generalizations

pseudo-Floquet analysis adjoint analysis

Example: pulsatile channel flow

q(n)0 A

w(t) = Aq(n)0

AHAHAq(n)0

ρ(n) direct problem

adjoint problem

scaling

updating

can be any discretized solution operator. The above technique (adjoint looping) can be applied to general time-dependent stability problems. A

EPTT, Sao Paulo, Sept. 2012

Page 12: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

time-periodic and generally time-dependent flow

Generalizations

pseudo-Floquet analysis adjoint analysis

Example: pulsatile channel flow

applying adjoint looping to the pulsatile (inter-period) stability problem

one period

significant inter-period transient energy growth

EPTT, Sao Paulo, Sept. 2012

Page 13: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

time-periodic and generally time-dependent flow

Generalizations

pseudo-Floquet analysis adjoint analysis

Another look at the direct-adjoint system

q(n)0 A

w(t) = Aq(n)0

AHAHAq(n)0

direct problem

adjoint problem

flow information

sensitivity/gradient information

EPTT, Sao Paulo, Sept. 2012 I −AHA correction

Page 14: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

time-periodic and generally time-dependent flow

Generalizations

pseudo-Floquet analysis adjoint analysis

reformulate the optimal growth problem variationally

we wish to optimize J =

�q�2

�q0�2→ max

subject to the constraint d

dtq − Lq = 0

EPTT, Sao Paulo, Sept. 2012

Page 15: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

time-periodic and generally time-dependent flow

Generalizations

pseudo-Floquet analysis adjoint analysis

rather than substituting the constraint directly into the cost functional …

d

dtq − Lq = 0

J =�q�2

�q0�2=� exp(tL)q0�2

�q0�2→ max

EPTT, Sao Paulo, Sept. 2012

only valid for LTI systems

Page 16: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

time-periodic and generally time-dependent flow

Generalizations

pseudo-Floquet analysis adjoint analysis

… we enforce the equation via a Lagrange multiplier

J =�q�2

�q0�2−

�q,

�d

dtq − Lq

��→ max

q

This has the advantage that the solution to the governing equation does not have to be known explicitly.

Other constraints (such as initial and boundary conditions) can be added.

EPTT, Sao Paulo, Sept. 2012

Page 17: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

time-periodic and generally time-dependent flow

Generalizations

pseudo-Floquet analysis adjoint analysis

for an optimum we have to require all first variations of J to be zero

δJ

δq= 0

δJ

δq= 0

J =�q�2

�q0�2−

�q,

�d

dtq − Lq

��→ max

�δq,

�d

dtq − Lq

��= 0

�q,

�d

dtδq − L δq

��= 0

EPTT, Sao Paulo, Sept. 2012

Page 18: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

time-periodic and generally time-dependent flow

Generalizations

pseudo-Floquet analysis adjoint analysis

for an optimum we have to require all first variations of J to be zero

δJ

δq= 0

δJ

δq= 0

J =�q�2

�q0�2−

�q,

�d

dtq − Lq

��→ max

�q,

�d

dtδq − L δq

��= 0

d

dtq − Lq = 0

EPTT, Sao Paulo, Sept. 2012

Page 19: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

time-periodic and generally time-dependent flow

Generalizations

pseudo-Floquet analysis adjoint analysis

for an optimum we have to require all first variations of J to be zero

δJ

δq= 0

δJ

δq= 0

J =�q�2

�q0�2−

�q,

�d

dtq − Lq

��→ max

d

dtq − Lq = 0

��− d

dtq − LH q

�, δq

�= 0

EPTT, Sao Paulo, Sept. 2012

Page 20: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

time-periodic and generally time-dependent flow

Generalizations

pseudo-Floquet analysis adjoint analysis

for an optimum we have to require all first variations of J to be zero

δJ

δq= 0

δJ

δq= 0

J =�q�2

�q0�2−

�q,

�d

dtq − Lq

��→ max

d

dtq − Lq = 0

− d

dtq − LH q = 0

direct problem

adjoint problem

EPTT, Sao Paulo, Sept. 2012 KKT-condition

Page 21: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

time-periodic and generally time-dependent flow

Generalizations

pseudo-Floquet analysis adjoint analysis

adjoint variables can be interpreted as sensitivities

J = obj−�

q,

�d

dtq − Lq

��→ max

d

dtq − Lq = f

external force

δJ = −�q, δf�

let us add an external body force to the governing equations

EPTT, Sao Paulo, Sept. 2012

Page 22: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

time-periodic and generally time-dependent flow

Generalizations

pseudo-Floquet analysis adjoint analysis

adjoint variables can be interpreted as sensitivities

J = obj−�

q,

�d

dtq − Lq

��→ max

d

dtq − Lq = f

external force

let us add an external body force to the governing equations

∇fJ = −qsensitivity to external body force

EPTT, Sao Paulo, Sept. 2012

Page 23: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

time-periodic and generally time-dependent flow

Generalizations

pseudo-Floquet analysis adjoint analysis

Example: which adjoint variable measures the sensitivity to a mass source/sink?

enforcing momentum conservation

enforcing mass conservation

EPTT, Sao Paulo, Sept. 2012

−�ξ,∇ · u� �∇ξ, δu�integration

by parts

ξ is the adjoint pressure

J = obj− �u, NS(u)� − �ξ,∇ · u�

Page 24: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

time-periodic and generally time-dependent flow

Generalizations

pseudo-Floquet analysis adjoint analysis

Example: which adjoint variable measures the sensitivity to a mass source/sink?

enforcing momentum conservation

enforcing mass conservation

EPTT, Sao Paulo, Sept. 2012

∇ · u = Q δJ = �ξ, δQ�assuming a mass source/sink

adjoint pressure = sensitivity to a mass source/sink

J = obj− �u, NS(u)� − �ξ,∇ · u�

Page 25: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

time-periodic and generally time-dependent flow

Generalizations

pseudo-Floquet analysis adjoint analysis

for the incompressible Navier-Stokes equations

∇ · u = Q

u = uw on y = 0

∇FJ = u

∇QJ = p

∂u∂t

+ advdiff(U,u) +∇p = F

∇uwJ = σ|w

forcing sensitivity

EPTT, Sao Paulo, Sept. 2012

Page 26: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

Sensitivity to internal changes (changes of specific eigenvalues with respect to parameter variations)

general formulation

A(p)q = λBq p Reynolds number wave number base-flow

Reα, β

U(y)

(A + δA)(q + δq) = (λ + δλ)B(q + δq)perturbation expansion

Generalizations

EPTT, Sao Paulo, Sept. 2012

Page 27: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

Sensitivity to internal changes (changes of specific eigenvalues with respect to parameter variations)

general formulation

(A + δA)(q + δq) = (λ + δλ)B(q + δq)

Generalizations

EPTT, Sao Paulo, Sept. 2012

(A− λB)q + (A− λB)δq + (δA− δλB)q + (δA− δλB)δq = 00 ≈ 0

(higher order)

Page 28: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

Sensitivity to internal changes (changes of specific eigenvalues with respect to parameter variations)

general formulation

(A + δA)(q + δq) = (λ + δλ)B(q + δq)

Generalizations

EPTT, Sao Paulo, Sept. 2012

(A− λB)δq + (δA− δλB)q ≈ 0

Page 29: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

Sensitivity to internal changes (changes of specific eigenvalues with respect to parameter variations)

general formulation

Generalizations

EPTT, Sao Paulo, Sept. 2012

q+(A− λB) = 0 (A+ − λ∗B+)q+ = 0

(A− λB)δq + (δA− δλB)q ≈ 0

q+(A− λB)δq + q+(δA− δλB)q ≈ 00

use adjoint

Page 30: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

Sensitivity to internal changes (changes of specific eigenvalues with respect to parameter variations)

general formulation

perturbation expansion

δλ =q+δAq

q+Bq

gradient

∇pλ =q+∇pAq

q+Bq

Generalizations

EPTT, Sao Paulo, Sept. 2012

A(p)q = λBq

Page 31: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

Example: sensitivity to a scalar parameter

Generalizations

ν = U + 2icu

∇UA = −∂x

ut = (−ν∂x + γ∂xx + µ(x))� �� �A

u

λ = σ + iω

complex Ginzburg-Landau

eigenvalue sensitivity ∇Uλ = u+∇UAu

Au = λu

A+u+ = λ∗u+

EPTT, Sao Paulo, Sept. 2012

= −u+∂xu

Page 32: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

Example: sensitivity to a scalar parameter

Generalizations

ν = U + 2icu

∇UA = −∂x

ut = (−ν∂x + γ∂xx + µ(x))� �� �A

u

∇Uσ = Real(∇Uλ) ∇Uω = Imag(∇Uλ)

λ = σ + iω

complex Ginzburg-Landau

eigenvalue sensitivity

sensitivity of growth rate sensitivity of frequency

∇Uλ = u+∇UAu

Au = λu

A+u+ = λ∗u+

EPTT, Sao Paulo, Sept. 2012

Page 33: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

Sensitivity to internal changes (changes of specific eigenvalues with respect to parameter variations)

Example: choose base flow profile as control variable

p Reynolds number wave number base-flow

Reα, β

U(y)

∇Uλ = −(∇u)H u +∇u · u∗

relate mean flow modification to small control forces

delay onset of instabilities to higher Reynolds numbers; increase stability margins

Generalizations

EPTT, Sao Paulo, Sept. 2012

Page 34: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

Flow chart for sensitivity/receptivity analysis

Generalizations

base flow calculation

LNS adjoint LNS

adjoint modes global modes

receptivity sensitivity

Newton, Newton-Krylov selective frequency damping

power iteration Arnoldi

to baseflow modifications to localized feedback to structural changes

to external forces to mass sources/sinks to forcing a the wall

EPTT, Sao Paulo, Sept. 2012

Page 35: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

Generalizations

base flow calculation

LNS adjoint LNS

adjoint modes global modes

receptivity sensitivity

Ubase Vbase

Example: flow around a cylinder

EPTT, Sao Paulo, Sept. 2012

Page 36: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

Generalizations

LNS adjoint LNS

adjoint modes global modes

receptivity sensitivity

(power iteration)

base flow calculation

udirect vdirect

Example: flow around a cylinder

EPTT, Sao Paulo, Sept. 2012

Page 37: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

Generalizations

LNS adjoint LNS

adjoint modes global modes

receptivity sensitivity

base flow calculation

vadjointuadjoint

(power iteration)

Example: flow around a cylinder

EPTT, Sao Paulo, Sept. 2012

Page 38: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

Generalizations

LNS adjoint LNS

adjoint modes global modes

receptivity sensitivity

base flow calculation

uwavemaker vwavemaker

Example: flow around a cylinder

EPTT, Sao Paulo, Sept. 2012

Page 39: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

Generalizations

LNS adjoint LNS

adjoint modes global modes

receptivity sensitivity

base flow calculation

uwavemaker vwavemaker

Example: flow around a cylinder

sensitivity to localized spatial feedback EPTT, Sao Paulo, Sept. 2012

Page 40: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

Generalizations

LNS adjoint LNS

adjoint modes global modes

receptivity sensitivity

base flow calculation Example: flow around a cylinder

structural sensitivity

∇Uλ = −(∇u)H u +∇u · u∗

EPTT, Sao Paulo, Sept. 2012

Page 41: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

Generalizations

LNS adjoint LNS

adjoint modes global modes

receptivity sensitivity

base flow calculation Example: flow around a cylinder

structural sensitivity

∇Uλ = −(∇u)H u +∇u · u∗

EPTT, Sao Paulo, Sept. 2012

place a small cylinder here to increase Rec to 70

Page 42: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

Generalizations

EPTT, Sao Paulo, Sept. 2012

What if the operator perturbation is stochastic ?

d

dtq − Lq = 0

L(t) = LS + �µ(t)S

dµ = −νµdt+ dW

statistically steady part uncertain part

stochastic process

ν ~ auto-correlation time

Page 43: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

Generalizations

EPTT, Sao Paulo, Sept. 2012

What if the operator perturbation is stochastic ?

We have to describe the solution statistically: propagation of covariance (second-order moments)

K = E(qqH)evolution equation for the covariance matrix (expansion of propagator A(t))

d

dtK = (LS + �2SD)K +K(LS + �2SD)H + �2(SKD +DKSH)

D =

� t

0exp(τLs)S exp(−τLS) exp(−ντ) dτwith

Page 44: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

Generalizations

EPTT, Sao Paulo, Sept. 2012

stochastic channel flow (perturbed base flow profile) ν = 1/5 � = 0.2

Re = 2000,α = 0.2,β = 2

Page 45: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

nonlinear perturbation dynamics

Generalizations

adjoint analysis with check-pointing

the variational formulation also allows us to add nonlinear constraints to the cost functional

J = obj−�

q,

�d

dtq −N(q)

��→ max

nonlinear Navier-Stokes equations

How does this affect the adjoint looping ?

EPTT, Sao Paulo, Sept. 2012

Page 46: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

nonlinear perturbation dynamics

Generalizations

adjoint analysis with check-pointing

Example: nonlinear advective terms

first variation �u,u∇u� �−u∇u, δu�

We have direct terms appearing in the adjoint equation.

EPTT, Sao Paulo, Sept. 2012

Adjoint equation is a variable-coefficient linear equation.

Page 47: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

nonlinear perturbation dynamics

Generalizations

adjoint analysis with check-pointing

q(n)0 direct nonlinear problem

linear adjoint problem

u∇u

−u∇u

u(0) u(t)· · · · · ·· · ·the flow fields at the forward sweep have to be saved and injected into the backward sweep

checkpointing

EPTT, Sao Paulo, Sept. 2012

Page 48: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

nonlinear perturbation dynamics

Generalizations

adjoint analysis with check-pointing

q(n)0 direct nonlinear problem

linear adjoint problem

u∇u

−u∇u

u(0) u(t)

For long-time integrations and high-dimensional problems we quickly reach the limits of storage devices.

EPTT, Sao Paulo, Sept. 2012

Page 49: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

nonlinear perturbation dynamics

Generalizations

adjoint analysis with check-pointing

q(n)0 direct nonlinear problem

linear adjoint problem

u∇u

−u∇u

u(0) u(t)

store flow fields at coarse intervals and use as initial conditions for repeated forward integrations

optimized checkpointing

duplicate integration

EPTT, Sao Paulo, Sept. 2012

Page 50: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

no checkpointing (store everything)

Generalizations

total number of time-steps done

time

stored direct flow field

EPTT, Sao Paulo, Sept. 2012

Page 51: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

no checkpointing (store everything)

Generalizations

total number of time-steps done

time

stored direct flow field

EPTT, Sao Paulo, Sept. 2012

Page 52: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

no checkpointing (store everything)

Generalizations

total number of time-steps done

time

stored direct flow field

EPTT, Sao Paulo, Sept. 2012

Page 53: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

uniform checkpointing (store at a few equispaced locations)

Generalizations

total number of time-steps done

time

stored direct flow field

EPTT, Sao Paulo, Sept. 2012

Page 54: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

uniform checkpointing (store at a few equispaced locations)

Generalizations

total number of time-steps done

time

stored direct flow field

EPTT, Sao Paulo, Sept. 2012

Page 55: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

uniform checkpointing (store at a few equispaced locations)

Generalizations

total number of time-steps done

time

extra work

stored direct flow field

EPTT, Sao Paulo, Sept. 2012

Page 56: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

uniform checkpointing (store at a few equispaced locations)

Generalizations

total number of time-steps done

time

extra work

stored direct flow field

EPTT, Sao Paulo, Sept. 2012

Page 57: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

uniform checkpointing (store at a few equispaced locations)

Generalizations

total number of time-steps done

time

extra work

extra work

extra work

stored direct flow field

EPTT, Sao Paulo, Sept. 2012

Page 58: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

uniform checkpointing (store at a few equispaced locations)

Generalizations

total number of time-steps done

time

extra work

extra work

extra work

EPTT, Sao Paulo, Sept. 2012

six active checkpoints

Page 59: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

uniform checkpointing (store at a few equispaced locations)

Generalizations

total number of time-steps done

time

extra work

extra work

extra work

EPTT, Sao Paulo, Sept. 2012

five active checkpoints

Page 60: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

uniform checkpointing (store at a few equispaced locations)

Generalizations

total number of time-steps done

time

extra work

extra work

extra work

EPTT, Sao Paulo, Sept. 2012

four active checkpoints

Page 61: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

uniform checkpointing (store at a few equispaced locations)

Generalizations

total number of time-steps done

time

extra work

extra work

extra work

EPTT, Sao Paulo, Sept. 2012

three active checkpoints

Page 62: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

uniform checkpointing (store at a few equispaced locations)

Generalizations

total number of time-steps done

time

extra work

extra work

extra work

better: binomial checkpointing best: minimal-repetition dynamic checkpointing

EPTT, Sao Paulo, Sept. 2012

Page 63: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

Generalizations

EPTT, Sao Paulo, Sept. 2012

We often have governing equations with auxiliary evolution equations (e.g., for eddy-viscosity), but these auxiliary variables may not be part of the cost objective.

This leads to semi-norm constraints.

q =

�uνt

�d

dt

�uνt

�=

�f(u, νt)g(νt, ...)

�q� ≡ �u� �q� = 0 q �= 0

governing equations

turbulence model

not a true norm

We can have with

causes singularities (non-convergence)

Page 64: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

Generalizations

EPTT, Sao Paulo, Sept. 2012

We need additional constraints to avoid singularities.

constrained variational approach (penality terms)

optimization on hyper-spheres

constraint hyper-sphere

projection

Page 65: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

Generalizations

EPTT, Sao Paulo, Sept. 2012

Is the 2-norm appropriate for all applications ? Can we consider a worst-case scenario ?

dependence on chosen norm

�a�p = (|ax|p + |ay|p)1/p

p = 1 p = 2 p = 4 p = ∞

introduce a p-norm

Page 66: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

Generalizations

EPTT, Sao Paulo, Sept. 2012

localization of the optimal structures, symmetry breaking (work in progress)

p = 2 p = ∞

Page 67: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

multiple inhomogeneous directions/complex geometry

Generalizations

global mode analysis

for most industrial applications we cannot assume the existence of homogeneous directions that can be treated by a Fourier transform

rather, the eigenfunction will depend on more than one inhomogeneous coordinate direction

EPTT, Sao Paulo, Sept. 2012

Page 68: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

multiple inhomogeneous directions/complex geometry

Generalizations

global mode analysis

q =

q1

q2...

qN

L ∈ CN×N L ∈ CN2×N2

q =

q1,1

q1,2...

qN,N

∼ N3 ∼ N6

state vector

stability matrix

operation count one inhomogeneous direction

two inhomogeneous directions

EPTT, Sao Paulo, Sept. 2012

Page 69: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

multiple inhomogeneous directions/complex geometry

Generalizations

global mode analysis

direct eigenvalue algorithms quickly become prohibitively expensive

iterative eigenvalue algorithms (Arnoldi technique) have to be used

EPTT, Sao Paulo, Sept. 2012

Page 70: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

multiple inhomogeneous directions/complex geometry

Generalizations

global mode analysis

≈L V

H

Arnoldi algorithm

action of the linear operator L is expressed within an orthonormal basis V

orthogonal basis

Hessenberg matrix

stability matrix

V

orthogonal basis

action of L action of H EPTT, Sao Paulo, Sept. 2012

Page 71: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

multiple inhomogeneous directions/complex geometry

Generalizations

global mode analysis

≈L V

H

Arnoldi algorithm

represent the (large) stability matrix by a low-rank approximation based on an orthogonal basis

V H

orthogonal basis

Hessenberg matrix

stability matrix

EPTT, Sao Paulo, Sept. 2012

Page 72: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

multiple inhomogeneous directions/complex geometry

Generalizations

global mode analysis

qk = L qk−1

j = 1 : k − 1Hj,k−1 = �qj , qk�qk = qk −Hj,k−1 qj

Hk,k−1 = �qk�qk = qk/Hk,k−1

for

end

only multiplications by L are necessary

eig{L} ≈ eig{H}

EPTT, Sao Paulo, Sept. 2012

Page 73: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

multiple inhomogeneous directions/complex geometry

Generalizations

global mode analysis

≈L V

V H

stability matrix

computing global modes by diagonalizing H = DΛD−1

D D−1Λ

global modes

EPTT, Sao Paulo, Sept. 2012

Page 74: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

multiple inhomogeneous directions/complex geometry

Generalizations

global mode analysis

Examples of global modes: open cavity flow (two-dimensional)

EPTT, Sao Paulo, Sept. 2012

Page 75: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

multiple inhomogeneous directions/complex geometry

Generalizations

global mode analysis

Examples of global modes: open cavity flow (two-dimensional)

global spectrum global mode

EPTT, Sao Paulo, Sept. 2012

Page 76: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

multiple inhomogeneous directions/complex geometry

Generalizations

global mode analysis

Examples of global modes: open cavity flow (two-dimensional)

global spectrum global mode

EPTT, Sao Paulo, Sept. 2012

Page 77: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

multiple inhomogeneous directions/complex geometry

Generalizations

global mode analysis

Examples of global modes: open cavity flow (two-dimensional)

global spectrum global mode

EPTT, Sao Paulo, Sept. 2012

Page 78: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

multiple inhomogeneous directions/complex geometry

Generalizations

global mode analysis

Examples of global modes: open cavity flow (two-dimensional)

global spectrum global mode

EPTT, Sao Paulo, Sept. 2012

Page 79: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

multiple inhomogeneous directions/complex geometry

Generalizations

global mode analysis

Examples of global modes: jet in cross flow (three-dimensional)

global mode snapshot

jet

cross flow

Arnoldi algorithm

EPTT, Sao Paulo, Sept. 2012

Page 80: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

Arnoldi algorithm (a Krylov subspace technique) to compute the Hessenberg matrix H

Jacobian-free framework

DNS

ARPACK

EPTT, Sao Paulo, Sept. 2012

Page 81: A variaonal frameworkforflow op’mizaon :anintroduc’ontoadjointssites.poli.usp.br/org/eptt2012/Presentations/Schmid/EPTT_Lecture2.pdf · time-periodic and generally time-dependent

Summary

  A variational approach for fluid stability problems provides a flexible and effective framework that allows the treatment time-invariant, time-periodic, time-dependent, linear and nonlinear problems.

  Adjoint variables can be interpreted as carriers of gradient/sensitivity information to external driving terms.

  Weighted (scalar) products of direct and adjoint variables yield structural sensitivity information and can be used for complex flow optimizations or the influence analysis of particular terms in the governing equations.

  Semi-norm constraints and p-norm extensions add even more flexibility.

EPTT, Sao Paulo, Sept. 2012