Upload
others
View
2
Download
0
Embed Size (px)
Citation preview
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
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
Generalizations
Example: pulsatile channel flow
transient growth
asymptotic contractivity
recap: time-periodic flow
EPTT, Sao Paulo, Sept. 2012
Generalizations
Example: pulsatile channel flow
transient growth
asymptotic contractivity
start
large inter-period amplification
recap: time-periodic flow
EPTT, Sao Paulo, Sept. 2012
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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�
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�
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
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
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)
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Generalizations
EPTT, Sao Paulo, Sept. 2012
stochastic channel flow (perturbed base flow profile) ν = 1/5 � = 0.2
Re = 2000,α = 0.2,β = 2
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
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.
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
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
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
no checkpointing (store everything)
Generalizations
total number of time-steps done
time
stored direct flow field
EPTT, Sao Paulo, Sept. 2012
no checkpointing (store everything)
Generalizations
total number of time-steps done
time
stored direct flow field
EPTT, Sao Paulo, Sept. 2012
no checkpointing (store everything)
Generalizations
total number of time-steps done
time
stored direct flow field
EPTT, Sao Paulo, Sept. 2012
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
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
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
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
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
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
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
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
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
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
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)
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
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
Generalizations
EPTT, Sao Paulo, Sept. 2012
localization of the optimal structures, symmetry breaking (work in progress)
p = 2 p = ∞
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
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
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
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
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
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
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
multiple inhomogeneous directions/complex geometry
Generalizations
global mode analysis
Examples of global modes: open cavity flow (two-dimensional)
EPTT, Sao Paulo, Sept. 2012
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
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
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
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
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
Arnoldi algorithm (a Krylov subspace technique) to compute the Hessenberg matrix H
Jacobian-free framework
DNS
ARPACK
EPTT, Sao Paulo, Sept. 2012
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