Sensitivity Calculations for fun and profit I. G. Abel 1 2 G. W. Hammett 2 1 Princeton Center for Theoretical Science 2 Princeton Plasma Physics Laboratory Vienna Shindig 2016
Outline Sensitivity Calculations 1 Sensitivity Calculations 2 3 4
Outline Sensitivity Calculations 1 Sensitivity Calculations 2 3 4
Outline Sensitivity Calculations 1 Sensitivity Calculations 2 3 4
Outline Sensitivity Calculations 1 Sensitivity Calculations 2 3 4
Sensitivity Calculations... What the?? What are they? Derivatives of functionals of our system, with respect to input parameters. Paradigmatically, Qi (R/ LTi ) (1) Uses Stiffness Implicit Transport Algorithms (TRINITY) Dynamical Reduction Uncertainty Quantification Gradient-Driven optimization
Adjoint Methods for Sensitivity Calculations If your forward system is F (g; m) = 0 Your functional is Q[g, m], then Q m = Q g g m + Q Q m = g, g + Q m m g m satisfies Use inner product structure λ, F g = λ, F g m m F g g m = F m implies F g λ, g = λ, F m m (2) (3) (4) Hence, if F λ = Q g g Then Q m = λ, F + Q m m (5)
Adjoint Methods for Sensitivity Calculations II Direct Methods OR Just make a two-point approximation. Differentiate with respect to paramter, solve tangent equtions. Scales linearly with number of paramters to vary. Adjoint Methods Solve adjoint state equation (backwards in time, around reference value) Take inner product of adjoint solution to get needed derivatives. Scales linearly with number of functionals to differentiate.
The Gyrokinetic System Use g s = h s Zse T s δϕ R F s to isolate the time derivative, Then the Gyrokinetic system is given by With g s t = (Lg) s + (C GK g) s c B b δϕ R R s (Lg) s = ( ) v b + V Ds R s δϕ = c B [ s F 0s ψ b δϕ[g] R ψ. R s ( g s + Zse T s δϕ[g] R F 0s gs R s. (6) ] 1 Zs 2e2 n s (1 Γ 0s ) Z se d 3 w g s T r, (8) s s ) (7)
Free Energy as an Inner Product This conserves W [g] = s d 3 w Tsg2 s + 1 δϕ[g] Φδϕ[g] 2F 0s 2 ψ, (9) ψ We use this as a norm, and can show that it has a consistent inner product given by g (1), g (2) = s d 3 w Tsg(1) s g (2) s + 1 [ 2F s 2 δϕ g (1)] [ Φδϕ g (2)], (10) ψ This is consistent in that W = g 2 = g, g. This is a good norm for subcritical studies, but we also need a time average. Thus we use g (1), g (2) = d 3 w Tsg(1) s g (2) s + 1 [ T 2F s s 2 δϕ g (1)] [ Φδϕ g (2)], (11) turb ψ
The Adjoint Gyrokinetic Operator We then calculate the adjoint gyrokinetic operator in this norm: (L g) s = ( ( ) v b + V Ds g s + Zse ) δϕ[g] R s T R F 0s s Zse F 0s b ζ[g] R ψ. T s R s (12) The adjoint source field ζ is given by ( Zs 2 e 2 n s ζ[g] = T s s + s ) 1 c B { s [ ( d 3 εs wt s 3 T s 2 ( ) d ln d 3 Ns wt sg s + Z sen sγ 0s δϕ[g] dψ ) g s + Z sen sγ 1s δϕ[g] ] } (13) d ln Ts dψ
The Adjoint Gyrokinetic State Equation Now we know L we can define the adjoint state equation to be ( t + L C GK + N[g 0 ] c ) B b δϕ[g 0] R g = S Q (14) R s The source depends on the quantitiy of interest, and is given by the functional derivative ( ) S Q = Q i g = c δϕ[g 0 ] R m i v 2 3 B y 2 2 T i F i δ(s = i) + c B Z se s Z s 2 e 2 /T s d 3 v y ( m i v 2 2 3 2 T i ) g 0i r This is formally solved backwards in time with final conditions g (T ) = 0. (see later) This equation is derived around a fixed background state g 0, and gives the derivative at that point. R (15)
Expressions for Q/ ( ) Now we can compute Q i R/L Ti = g, cb δ(s = i) ( m i v 2 2 3T i 2 ) δϕ[g 0 ] F i y Or any other derivative, with appropriate RHS, e.g. in shifted circles, Q i q = + 1 ( g, v g 0s + Zseδϕ[g ) 0] F s q T s (16) (17)
As above, we can do this all over again for perturbations around a transport solution
Obvious Distraction Sensitivity Calculations
What I didn t Tell You Sensitivity Calculations Problems Adjoints grow without bound This is due to the butterfly effect, and interchange of averaging limits in our derivation. This is why adjoints aren t used in fluid turbulence Solutions Ensemble Adjoint Method run backwards from noise for intermediate times Shadowing trajectories pick a g (T ) to prevent trajectory flying away Variations on the theme perhaps a mixture of both May Be Expensive
Summary & Future Developments Adjoint Methods may save the day But they may be expensive Test This! Profit