Page 1
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
Efficient Homotopy Continuation Algorithms with Application toComputational Fluid Dynamics
David A. Brown
Department Doctoral SeminarSupervisor: Prof. D. W. Zingg
Committee: Prof. C. P. T. Groth, Prof. P. B. NairNovember 12, 2015
1/38
Page 2
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
Algorithms for Solving Nonlinear Systems of Equations
Problem definition: solve R (q) = 0 for q, R : RN → RN
Newton’s method has high (quadratic) convergence rate
Newton’s method will not converge without a suitable initial guess
A second globally convergent algorithm should be used to globalizeNewton’s method
Newton’s method
∇R (q)∆q = −R (q)
Pseudo-Transient Continuation(
1
∆tI +∇R (q)
)
∆q = −R (q)
We solve the linear systems inexactly using an iterative solver
2/38
Page 3
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
CFD Flow Solver Example
ONERA M6 wing
Inviscid
Ma = 0.7
AoA = 3◦
PTC =Pseudo-TransientContinuation
0 100 200 300 400 50010
−12
10−10
10−8
10−6
10−4
10−2
PTC Newton
‖R(q)‖
CPU Time
3/38
Page 4
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
CFD Flow Solver Example
ONERA M6 wing
Inviscid
Ma = 0.7
AoA = 3◦
PTC =Pseudo-TransientContinuation
0 100 200 300 400 50010
−12
10−10
10−8
10−6
10−4
10−2
PTC Newton
‖R(q)‖
CPU Time
RealityFantasy
3/38
Page 5
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
CFD Flow Solver Example
ONERA M6 wing
Inviscid
Ma = 0.7
AoA = 3◦
PTC =Pseudo-TransientContinuation
0 100 200 300 400 50010
−12
10−10
10−8
10−6
10−4
10−2
PTC Newton
‖R(q)‖
CPU Time
RealityFantasy
There is not much room for improvement with PTC
3/38
Page 6
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
Convex Homotopy Continuation
Homotopy: A continuous deformation
Convex Homotopy
H (q, λk) = (1− λk )R (q) + λkG (q) = 0
k ∈ [0, p] , λk ∈ R, λ0 = 1, λp = 0, λk+1 < λk
R : RN → RN is the flow residual
G : RN → RN is the homotopy system
H (q, λ) defines a homotopy from the solution of G (q) = 0 to thesolution of R (q) = 0 (under certain conditions)
Homotopy Continuation
Gradually reduce λ from 1 to 0 while solving H (q, λ) = 0 to obtain anestimate for the solution to the problem R (q) = 0
Note that the deformation can also be interpreted as a curve in RN
4/38
Page 7
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
Homotopy Design
The following properties are desired:
R and G should be continuous and invertible
➩ Necessary condition for the homotopy to exist
The curve should be regular (invertible Jacobian for all λ)
➩ Regular curves do not contain bifurcations
The Jacobian should be well-conditioned
➩ Reduced cost of the linear solves
The curve should exhibit modest curvature
➩ The curve will be easier to trace numerically
5/38
Page 8
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
Some Candidate Homotopies
Convex Homotopy
H (q, λ) = (1− λ)R (q) + λG (q) = 0
G can be of the form T (q− q0) where T is a diagonal matrix
G can be a numerical dissipation operator, which is of the form ofan undivided second difference; to make this operator nonsingular,we apply pseudo-boundary conditions
far-field boundary conditionsflow-imitative boundary conditions
Global Homotopy
H (q, λ) = R (q)− λR (q0) = 0
6/38
Page 9
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 10
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 11
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 12
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 13
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 14
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 15
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 16
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 17
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 18
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 19
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 20
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 21
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 22
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 23
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 24
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 25
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 26
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 27
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 28
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 29
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 30
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 31
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 32
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 33
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 34
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 35
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 36
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 37
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 38
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 39
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 40
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 41
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 42
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 43
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 44
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 45
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 46
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 47
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 48
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 49
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 50
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 51
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 52
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 53
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 54
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 55
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 56
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 57
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 58
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 59
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
An Example of a Homotopy Deformation
NACA 0012 airfoil
Transonic
RANS
Re=4.76× 107
Ma = 0.8395
AoA = 3.06◦
Convex homotopy using dissipation operator with far-field boundary conditions
7/38
Page 60
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
The Predictor-Corrector Curve-Tracing Algorithm
01λ
Cur
ve v
alue
s
Corrector phase: Based on Newton’s methodPredictor phase: Based on the tangent vector
Curves with higher curvature are more difficult to trace 8/38
Page 61
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
Traceability Metrics
How can we study the traceability of implicitly-deifned curves which existin higher-dimensional real space?
Surrogate curves: Calculate functionals (e.g. CL and CD) alongthe curveWatch movies (You already saw one)Curvature:
Parametrized curve c (s) = [q (s) ;λ (s)]Arclength parametrization: c (s) · c (s) ≡ 1Partial curvature κq ≡
√q (s) · q (s)
Taylor series around some s0:
q (s0 +∆s) = q (s0) + ∆sq (s0) +1
2∆s
2q (s0) +O
(
∆s3)
If the curve-tracing algorithm is based on the tangent, then theleading error term is
√(1
2∆s2
)2
q (s) · q (s) =1
2∆s
2κq
9/38
Page 62
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
Traceability - Inviscid Subsonic
NACA 0012
15,000 nodes
Ma = 0.3
AoA = 1◦
00.51−0.5
0
0.5
Cd
λ00.51
0
0.2
0.4
Cl
λ
0 0.5 10
500
1000
1500
s/stot
κqs2 to
t
00.5110
0
105
1010
λ
κr
“Diss - ff”“Diss - flow”“Diag”Global
κq uses an arclength parametrizationκr uses a λ parametrization
10/38
Page 63
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
Traceability in Different Coordinates
NACA 0012
15,000 nodes
Ma = 0.3
AoA = 1◦
00.510
0.1
0.2
λ
Cl
00.510
0.1
0.2
λ
Cd
00.510
10
20
λ
s
00.510
5
10
λ
κq
µ = 10µ = 1µ = 0.1
0 0.5 10
1000
2000
s/stot
κqs2 to
t
00.5110
0
105
1010
λ
κr
Change of coordinates: λ← λµ
1−λ+µλ
11/38
Page 64
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
Comparison of some Homotopies
Traceability:
➩ Global > Dissipation > Diagonal
Conditioning:
➩ Diagonal > Dissipation > Global
Success rate:
➩ Global: inviscid subsonic only➩ Diagonal: inviscid subsonic and transonic, turbulent subsonic➩ Dissipation: suitable for all flows
12/38
Page 65
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
Motivation
Predictor-corrector methods are the standard in the literature
To ensure that the algorithm converges, over-solving often occurs inthe corrector phase
The linear systems in both phases have the same matrix
Efficiency can be improved by combining the two phases
13/38
Page 66
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
Dynamic Inverse
Let qs (λ) be the (unique) solution to F (q (λ) , λ) = 0
Consider an ODE of the form q (λ) + F (q (λ) , λ) = 0
Under certain conditions, the ODE converges to qs (λ)
If the ODE does not converge to qs (λ) then it might be possible tofind F∗ such that the modified ODE q (λ) + F∗F (q (λ) , λ) = 0
does
Even if the original ODE does converge, the modified ODE can havea better convergence rate
F∗ is called the dynamic inverse of F
14/38
Page 67
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
Continuous Monolithic Homotopy Algorithm
The continuous monolithic homotopy algorithm is an ODE:
−q (λ) = −γH∗H (q, λ)︸ ︷︷ ︸
Corrector
+ E (q, λ)︸ ︷︷ ︸
Predictor
H∗ : RN+1 → RN is the dynamic inverse
γ > 0, γ ∈ R is a free parameter
15/38
Page 68
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
Continuous Monolithic Homotopy Algorithm
01λ
Cur
ve v
alue
s
CurrentTarget
−γH∗H (q, λ) corrects the current tracking error
E : RN+1 → RN corrects for tracking error due to evolution of the
curve
16/38
Page 69
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
Continuous Monolithic Homotopy Algorithm
01
γH∗H E
λ
Cur
ve v
alue
s
CurrentTarget
−γH∗H (q, λ) corrects the current tracking error
E : RN+1 → RN corrects for tracking error due to evolution of the
curve
16/38
Page 70
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
Continuous Monolithic Homotopy Algorithm
01
γH∗H E
λ
Cur
ve v
alue
s
CurrentTarget
−γH∗H (q, λ) corrects the current tracking error
E : RN+1 → RN corrects for tracking error due to evolution of the
curve
16/38
Page 71
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
Choosing E and H∗
Recall the continuous monolithic homotopy algorithm:
−q (λ) = −γH∗H (q, λ) + E (q, λ)
Objective
Construct E , H∗, and γ such that the above ODE converges to thehomotopy curve and can be integrated efficiently
Recall the convex homotopy:
H (q, λ) = (1− λ)R (q) + λG (q) = 0
17/38
Page 72
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
Choosing E and H∗
Recall the continuous monolithic homotopy algorithm:
−q (λ) = −γH∗H (q, λ) + E (q, λ)
Objective
Construct E , H∗, and γ such that the above ODE converges to thehomotopy curve and can be integrated efficiently
Recall the convex homotopy:
H (q, λ) = (1− λ)R (q) + λG (q) = 0
Construction of E
An expression for E can be taken as an approximation to the vectortangent to the curve.
In the context of convex homotopy:
E (q, λ) = [∇qH (q (λ) , λ)]−1
[G (q)−R (q)]
17/38
Page 73
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
Choosing E and H∗
Recall the continuous monolithic homotopy algorithm:
−q (λ) = −γH∗H (q, λ) + E (q, λ)
Objective
Construct E , H∗, and γ such that the above ODE converges to thehomotopy curve and can be integrated efficiently
Recall the convex homotopy:
H (q, λ) = (1− λ)R (q) + λG (q) = 0
Construction of H∗
H∗ = − [∇qH (q, λ)]−1
is a dynamic inverse as long as q is close tothe curve
This will give a Newton-like update for the corrector component
17/38
Page 74
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
Discrete Monolithic Homotopy Algorithm
Continuous version
−q (λ) = [∇qH (q, λ)]−1 [−γH (q, λ) + G (q)−R (q)]
Discrete version
qk+1 = qk +∆λk
Predictor−−−−−−−−−−−−−−−−−Predictor︷ ︸︸ ︷
[∇qH (qk , λk)]−1 [γkH (qk , λk)
︸ ︷︷ ︸Corrector
︷ ︸︸ ︷
− G (qk) +R (qk)]
18/38
Page 75
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
Discrete Monolithic Homotopy Algorithm
Continuous version
−q (λ) = [∇qH (q, λ)]−1 [−γH (q, λ) + G (q)−R (q)]
Discrete version
qk+1 = qk +∆λk
Predictor−−−−−−−−−−−−−−−−−Predictor︷ ︸︸ ︷
[∇qH (qk , λk)]−1 [γkH (qk , λk)
︸ ︷︷ ︸Corrector
︷ ︸︸ ︷
− G (qk) +R (qk)]
The continuous version converges to the homotopy curve withconvergence rate Ke
−(γβ−ω)(λ0−λ), where
β depends on the corrector qualityω depends on the predictor qualityγ is a free parameter that can be chosen by the user
18/38
Page 76
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
Discrete Monolithic Homotopy Algorithm
Continuous version
−q (λ) = [∇qH (q, λ)]−1 [−γH (q, λ) + G (q)−R (q)]
Discrete version
qk+1 = qk +∆λk
Predictor−−−−−−−−−−−−−−−−−Predictor︷ ︸︸ ︷
[∇qH (qk , λk)]−1 [γkH (qk , λk)
︸ ︷︷ ︸Corrector
︷ ︸︸ ︷
− G (qk) +R (qk)]
The continuous version converges to the homotopy curve withconvergence rate Ke
−(γβ−ω)(λ0−λ), where
β depends on the corrector qualityω depends on the predictor qualityγ is a free parameter that can be chosen by the user
Large γ will give high convergence rate for the continuous case
Large γ is not always ideal for the discrete case
18/38
Page 77
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
The Effect of γ on Curve-Tracing
01λ
Cur
ve v
alue
s
19/38
Page 78
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
The Effect of γ on Curve-Tracing
01λ
Cur
ve v
alue
s
γ = 1γ = 10γ = 100
19/38
Page 79
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
The Effect of γ on Curve-Tracing
01λ
Cur
ve v
alue
s
γ = 1γ = 10γ = 100
19/38
Page 80
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
The Effect of γ on Curve-Tracing
01λ
Cur
ve v
alue
s
γ = 1γ = 10γ = 100
For given ∆λ, there is an ideal γIt turns out that γ = 1
|∆λ| is ideal
We can also use γ = 1|∆λ∗|
19/38
Page 81
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
Automatic Step-length Adjustment
Step-length |∆λ| is adjusted automatically after each update to tryto achieve ‖∆q‖ = ‖∆q‖
tar
The target value ‖∆q‖tar
is set according to ‖∆q‖tar
= ‖∆q‖0‖∆q‖0 is determined indirectly by the user by adjusting the initialstep size |∆λ|0
Users’ Guide
The user adjusts the parameter |∆λ|0Smaller |∆λ|0 will improve curve tracing accuracy but will result inmore iterations
20/38
Page 82
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
Effect of |∆λ|0 in a Practical Example
Euler
ONERA M6 wing
Ma=0.5
AoA=6◦
00.510
0.1
0.2
0.3
0.4
0.5
λ
CL
Exact|∆λ0| = 0.1
00.510
0.1
0.2
0.3
0.4
0.5
λ
Exact|∆λ0| = 0.15
00.510
0.1
0.2
0.3
0.4
0.5
λ
Exact|∆λ0| = 0.2
00.510
0.1
0.2
0.3
0.4
0.5
λ
Exact|∆λ0| = 0.25
(17 iterations) (11 iterations) (10 iterations) (9 iterations)
21/38
Page 83
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
A Numerical Study of Stability
00.510
0.1
0.2
0.3
0.4
0.5
λ
CL
Exact|∆λ|= 0.1|∆λ|= 0.05|∆λ|= 0.02
00.510
0.01
0.02
0.03
0.04
λ
Errorin
CL
00.5110
−6
10−4
10−2
100
λ
‖H(q
,λ)‖
τl = 0.01
00.510
0.1
0.2
0.3
0.4
0.5
λ
CL
00.510
0.01
0.02
0.03
0.04
λ
Errorin
CL
00.5110
−6
10−4
10−2
100
λ‖H
(q,λ
)‖
τl = 0.001
ONERA M6, inviscid, Ma=0.5, AoA=6◦
22/38
Page 84
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
Comparison to Implicit Time Marching
Implicit Euler (Derivation)
qn =−R (qn)
R (qn) ≈ R (qn−1) +∇R (qn−1)∆q
⇒1
∆t∆q =−R (qn−1)−∇R (qn−1)∆q
⇒ ∆q =−
(1
∆tI +∇R (qn−1)
)−1
R (qn−1)
Monolithic Homotopy
−q (λ) =
Corrector︷ ︸︸ ︷
H∗γH (q, λ)+
Predictor︷ ︸︸ ︷
[∇qH (q, λ)]−1
[G (q)−R (q)]
H∗ ← − [∇qH (q, λ)]−1
23/38
Page 85
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
Performance Study for an Inviscid Case
ONERA M6 wing
1.9 million nodes
32 processors
Ma = 0.6
AoA = 3◦
0 200 400 60010
−6
10−4
10−2
100
102
Time (s)
%Errorin
CL
PTCCHC - PCCHC - MH
00.5110
−4
10−3
10−2
λ
‖H(q,λ
)‖
Glossary
PTC Pseudo-transient continuationCHC-PC Convex homotopy continuation - predictor-correctorCHC-MH Convex homotopy continuation - monolithic homotopy
24/38
Page 86
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
Performance Study for a RANS Case
ONERA M6 wing
2.3 million nodes
192 processors
Ma = 0.75
AoA = 1.5◦
Re = 1.172× 107
0 500 100010
−6
10−4
10−2
100
102
Time (s)
%Errorin
CL
PTCCHC - PCCHC - MH
00.5110
−5
10−4
10−3
10−2
λ
‖H(q,λ
)‖
Glossary
PTC Pseudo-transient continuationCHC-PC Convex homotopy continuation - predictor-correctorCHC-MH Convex homotopy continuation - monolithic homotopy
25/38
Page 87
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
Performance Study for another RANS Case
ONERA M6 wing
36 million nodes
1024 processors
Ma = 0.8
AoA = 3◦
Re = 1× 107
0 1 2x 10
4
10−6
10−4
10−2
100
102
Time (s)
%Errorin
CL
PTCCHC - PCCHC - MH
00.5110
−8
10−6
10−4
10−2
100
λ
‖H(q,λ
)‖
Glossary
PTC Pseudo-transient continuationCHC-PC Convex homotopy continuation - predictor-correctorCHC-MH Convex homotopy continuation - monolithic homotopy
26/38
Page 88
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
Performance Study for an Inviscid Case
ONERA M6 wing
1.9 million nodes
32 processors
H-C topology
2e+04 α = 0°
PTC CHC − PC CHC − MH
1e+04 α = 3°
2e+04
Equ
ival
ent R
esid
ual E
valu
atio
ns
α = 6°
4e+04 α = 9°
0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
4e+04
Ma
α = 12°
Compared to PTC: → CHC-PC was about 12% faster→ CHC-MH was about 23% faster
Glossary
PTC Pseudo-transient continuationCHC-PC Convex homotopy continuation - predictor-correctorCHC-MH Convex homotopy continuation - monolithic homotopy
27/38
Page 89
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
Performance Summary
Success Rate Rel. CPU TimeFlow Nodes Blocks PTC PC MH PTC PC MH
Inviscid 3D 2× 106 32 32/40 32/40 33/40 1.00 0.88 0.77Inviscid 3D 2× 107 256 21/40 27/40 27/40 1.00 0.85 0.66Laminar 3D 2× 106 48 28/40 30/40 31/40 1.00 0.91 0.60RANS 2D 2× 104 8 31/32 32/32 32/32 1.00 0.73 0.55RANS 3D 2× 106 192 16/16 16/16 16/16 1.00 1.14 0.64RANS 3D 4× 107 1024 13/16 13/16 14/16 1.00 3.33 1.00
3D results - ONERA M6 wing2D results - NACA 0012 airfoil
Summary
Usually: MH > PC > PTC
In all cases: MH > PC, MH ≥ PTC
Stability concerns can reduce the competitiveness of the MHalgorithm in some cases
28/38
Page 90
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
Matrix-Free Monolithic Homotopy
Monolithic homotopy
−q (λ) = H∗γH (q, λ) + E
Two-Stage Formulation
H∗ is set to a diagonal matrix T
E is estimated using finite-differencing E ≈ 1λk−λk−1
∆q
The two stages can be kept separate to improve the accuracy of E :
qk+ 12= qk +
(
λk+ 12− λk
)
γT H,
qk+1 = qk+ 12+ λk+1−λk
λk−λk−1
(
qk+ 12− qk− 1
2
)
This method is more accurate but unstable
Single-Stage Formulation
This method is stable but less accurate 29/38
Page 91
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
Matrix-Free Monolithic Homotopy
Monolithic homotopy
−q (λ) = H∗γH (q, λ) + E
Two-Stage Formulation
This method is more accurate but unstable
Single-Stage Formulation
H∗ is set to a diagonal matrix T
E is set to zero
The following ODE is produced:
q = −γT H (q, λ)
This can be integrated using explicit Euler
This method is stable but less accurate
29/38
Page 92
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
Performance Comparison
00.510
0.05
0.1
0.15
0.2
0.25
λ
Cl
|∆λ| = 1×10−4
00.510
0.05
0.1
0.15
0.2
0.25
λ
Cl
|∆λ| = 1×10−5
00.510
0.05
0.1
0.15
0.2
0.25
λ
Cl
|∆λ| = 1×10−6
00.510
0.05
0.1
0.15
0.2
0.25
λ
Cl
ExactSingle-StageTwo-Stage
|∆λ| = 1×10−7
30/38
Page 93
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
Algorithm Augmentations
Let γ = href/ (λk+1 − λk )
Augmentations to the Single-Stage Algorithm
q = −γT H (q, λ)
This method is stable but inaccurate
Can use RK4 instead of Euler for time integration
This allows for larger href for improved accuracy at increased CPUcost
Augmentations to the Two-Stage Algorithm
qk+ 12= qk +
(
λk+ 12− λk
)
γT H,
qk+1 = qk+ 12+ λk+1−λk
λk−λk−1
(
qk+ 12− qk− 1
2
)
This method is accurate but unstable
An explicit filter can be used to improve stability at the cost ofaccuracy 31/38
Page 94
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
Performance Comparison
00.510
0.05
0.1
0.15
0.2
0.25
λ
Cl
|∆λ| = 1×10−4
00.510
0.05
0.1
0.15
0.2
0.25
λ
Cl
|∆λ| = 1×10−5
00.510
0.05
0.1
0.15
0.2
0.25
λ
Cl
|∆λ| = 1×10−6
00.510
0.05
0.1
0.15
0.2
0.25
λ
Cl
Exact1-Stage1-Stage, RK42-Stage, Filter
|∆λ| = 1×10−7
32/38
Page 95
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
Efficiency of the Augmented Matrix-Free Algorithms
101
102
103
104
105
10−3
10−2
10−1
Time (s)
FinalC
lerror
1-Stage1-Stage, RK42-Stage, Filter
33/38
Page 96
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
Conclusions (Boring Part)
The new MH algorithm is more efficient than the predictor-correctoralgorithm
The MH algorithm is usually more efficient than PTC
Stability can become an issue for MH in some cases if the linearsystem is not solved accurately enough
An expensive solution to this problem is to solve the linear systemmore accurately
The matrix-free MH algorithm is inhererently unstable but can bestabilized using a filter
34/38
Page 97
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
Contributions (Boring Part 2)
Constructed several new homotopies based on CFD codes to whichcontinuation algorithms could be applied
Developed new tools for efficiently calculating quantities relevant tohomotopies for large sparse systems
Developed a methodology for quantifying the suitability ofhomotopies for continuation algorithms
Developed a new class of continuation algorithm, monolithichomotopy continuation
Demonstrated the effectiveness of the monolithic homotopyalgorithms numerically
35/38
Page 98
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
Homotopy Equations Hall of Fame
t =τ
‖τ‖, τ =
(z
−1
)
, z = [∇qH (q, λ)]−1 ∂
∂λH (q, λ)
−q (λ) = [∇qH (q, λ)]−1 [−γH (q, λ) + G (q)−R (q)]
∑
∗
n!∏n
j=1 j!mjmj !
∇∑n
j=1 mjH (c (s))
n∏
j=1
[
c(j) (s)]mj
︸ ︷︷ ︸
wn+∇H(c(s))c(n)(s)
= 0
q (λ∗) =
∑k+1i=k+1−p Kb (λ
∗, λi )q (λi )∑k+1
i=k+1−p Kb (λ∗, λi ), Kb (λ
∗, λi ) = exp
(
−(λ∗ − λi )
2
2b2
)
∗ Summation is over all positive {m1, . . . ,mn} such that∑n
j=1 jmj = n
36/38
Page 99
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
Special Credits
Professor Zingg
Michal Osusky
Howard Buckley
P. David Boom
Jason Hicken
Chris Lee
Many others
37/38
Page 100
Introduction Traceability Monolithic Homotopy Results Matrix-Free Conclusions
End of PhD
Questions?
38/38