ated below using five cost functions written in multi-objective form as ..... 0.00025. 1.061. 768Ã128 for the pressure are enforced at the hydrofoil surface, while ...... NASA/CR-97-206253, Institute for Computer Applications in Science and Engi-.
The Pennsylvania State University The Graduate School Department of Mechanical and Nuclear Engineering
A CONTINUOUS ADJOINT APPROACH TO DESIGN OPTIMIZATION IN MULTIPHASE FLOW
A Dissertation in Mechanical Engineering by David A. Boger c 2013 David A. Boger
Submitted in Partial Fulfillment of the Requirements for the Degree of
Doctor of Philosophy May 2013
1
The dissertation of David A. Boger was reviewed and approved by the following:
Eric G. Paterson Professor of Mechanical Engineering Dissertation Advisor Co-Chair of Committee
John M. Cimbala Professor of Mechanical Engineering Co-Chair of Committee
Robert F. Kunz Professor of Aerospace Engineering
Luigi Martinelli Associate Professor of Mechanical and Aerospace Engineering Princeton University Special Member
Sava¸s Yavuzkurt Professor of Mechanical Engineering
Karen A. Thole Professor of Mechanical Engineering Head of the Department of Mechanical and Nuclear Engineering
1
Signatures on file in the Graduate School.
iii
Abstract
Continuous adjoint methods are developed for design optimization in multiphase flow based on two homogeneous multiphase mixture models for cavitating flow — a barotropic model and a transport-equation-based model. The barotropic model consists of variable-density mass and momentum equations and uses an equation of state for the density that depends on only the local static pressure and the vapor pressure of the liquid. In that case, the primary equations are homogeneous, and a conventional hybrid multistage explicit method based on central differencing and second- and fourth-order scalar artificial dissipation can be applied to solve both the primary and adjoint systems. Results are presented for both surface- and volume-based vapor minimization cost functions for a two-dimensional cavitating hydrofoil in which the geometry is parameterized using B-splines. The cost function gradients computed using the adjoint method are shown to compare well with gradients computed using standard and complex-step finite-difference methods, and several examples serve to demonstrate that these gradients can be used to inform a fixed-step method of steepest descent for shape optimization. For the transport-equation-based model, the governing flow equations include source terms that model the mass transfer between liquid and vapor, and the fact that these source terms are not continuously differentiable with respect to the state variables gives rise to a discontinuity in the adjoint solution. A high-resolution fluctuation-splitting method with wave limiters is used to discretize the non-conservative, variable-coefficient linear system of equations, where the preconditioning matrix from the primary algorithm is included in the adjoint system to render it hyperbolic. Results are presented for several cost functions applied to quasi-one-dimensional flow through a converging-diverging nozzle. The geometry is once again parameterized using B-splines, and once again, the cost function gradients computed using the adjoint method are shown to compare well with gradients calculated using standard and complex-step finite-difference methods.
iv Exploration of several cost functions for the transport-equation-based model in multiphase flow reveals that the corresponding minimization surfaces can be poorly conditioned and non-convex. Nevertheless, with careful cost function design and the use of a low-memory quasi-Newton descent method, the cost functions are minimized or significantly decreased in every case. Thus, this work establishes that the continuous adjoint method can serve as the basis for a new generation of hydroelectric design tools that provide detailed design guidance from high-fidelity multiphase flow simulations.
v
Table of Contents
List of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
viii
List of Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ix
List of Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
xiv
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
xxii
Chapter 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1
1.1
Continuous Adjoint Method . . . . . . . . . . . . . . . . . . . . . . .
3
1.1.1
Overview of the Continuous Adjoint Method . . . . . . . . .
3
1.1.2
Recent Extensions of the Continuous Adjoint Method . . . .
8
1.1.3
Applicability to Hydroturbine Design . . . . . . . . . . . . . .
10
Objectives and Dissertation Outline . . . . . . . . . . . . . . . . . .
14
Chapter 2. Barotropic Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15
1.2
2.1
2.2
2.3
2.4
Governing Equations . . . . . . . . . . . . . . . . . . . . . . . . . . .
16
2.1.1
Primary Equations . . . . . . . . . . . . . . . . . . . . . . . .
16
2.1.2
Adjoint Equations . . . . . . . . . . . . . . . . . . . . . . . .
18
Numerical Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . .
23
2.2.1
Primary Equations . . . . . . . . . . . . . . . . . . . . . . . .
23
2.2.2
Adjoint Equations . . . . . . . . . . . . . . . . . . . . . . . .
28
Design Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
30
2.3.1
Geometry, Parameterization and Design Variables . . . . . .
30
2.3.2
Cost Functions . . . . . . . . . . . . . . . . . . . . . . . . . .
35
2.3.3
Gradient Calculation . . . . . . . . . . . . . . . . . . . . . . .
37
2.3.4
Minimization Method . . . . . . . . . . . . . . . . . . . . . .
38
Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
38
2.4.1
39
Finite Difference Methods for Validation . . . . . . . . . . . .
vi 2.4.2
Computational Mesh . . . . . . . . . . . . . . . . . . . . . . .
40
2.4.3
Primary Equations . . . . . . . . . . . . . . . . . . . . . . . .
40
2.4.3.1
Single-Phase Numerical Solution . . . . . . . . . . .
41
2.4.3.2
Multiphase Numerical Solutions . . . . . . . . . . .
43
Adjoint Equations . . . . . . . . . . . . . . . . . . . . . . . .
45
2.4.4.1
Single-Phase Numerical Solutions and Gradient . . .
46
2.4.4.2
Multiphase Numerical Solutions and Gradient . . .
47
Minimization . . . . . . . . . . . . . . . . . . . . . . . . . . .
56
2.4.5.1
Single-Phase Inverse Design Based on Pressure . . .
56
2.4.5.2
Multiphase Inverse Design Based on Pressure . . . .
56
2.4.5.3
Multiphase Inverse Design Based on Density . . . .
58
2.4.5.4
Volume Vapor Minimization With and
2.4.4
2.4.5
Without Specification of Lift . . . . . . . . . . . . .
61
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
65
Chapter 3. Transport-Equation-Based Model . . . . . . . . . . . . . . . . . . . .
69
2.5
3.1
3.2
3.3
3.4
Governing Equations . . . . . . . . . . . . . . . . . . . . . . . . . . .
69
3.1.1
Primary Equations . . . . . . . . . . . . . . . . . . . . . . . .
69
3.1.2
Adjoint Equations . . . . . . . . . . . . . . . . . . . . . . . .
72
Numerical Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . .
76
3.2.1
Primary Equations . . . . . . . . . . . . . . . . . . . . . . . .
76
3.2.2
Adjoint Equations . . . . . . . . . . . . . . . . . . . . . . . .
77
Design Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
83
3.3.1
Geometry, Parameterization and Design Variables . . . . . .
83
3.3.2
Cost Functions . . . . . . . . . . . . . . . . . . . . . . . . . .
85
3.3.3
Gradient Calculation . . . . . . . . . . . . . . . . . . . . . . .
86
3.3.4
Minimization Method . . . . . . . . . . . . . . . . . . . . . .
87
Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
88
3.4.1
Primary Equations . . . . . . . . . . . . . . . . . . . . . . . .
88
3.4.1.1
Single-Phase Analytical Solution . . . . . . . . . . .
89
3.4.1.2
Single-Phase Numerical Solutions . . . . . . . . . .
89
vii 3.4.1.3
Multiphase Numerical Solutions . . . . . . . . . . .
90
Adjoint Equations . . . . . . . . . . . . . . . . . . . . . . . .
95
3.4.2.1
Single-Phase Numerical Solutions and Gradient . . .
97
3.4.2.2
Multiphase Numerical Solutions and Gradient . . .
98
Minimization . . . . . . . . . . . . . . . . . . . . . . . . . . .
107
3.4.3.1
Single-Phase Inverse Design . . . . . . . . . . . . . .
109
3.4.3.2
Multiphase Inverse Design
. . . . . . . . . . . . . .
109
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
119
Chapter 4. Summary, Conclusions, and Future Work . . . . . . . . . . . . . . .
122
3.4.2
3.4.3
3.5
4.1
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
122
4.2
Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
125
4.3
Future Work
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
127
Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
129
Appendix A. Eigendecomposition for the Quasi-One-Dimensional Transport-Equation-Based Model . . . . . . . . . . . . . . . . . . . .
140
Appendix B. Incomplete Cost Functions and the Use of Auxiliary Boundary Equations
. . . . . . . . . . . . . . . . .
142
B.1 Generalized Scalar Transport Equation . . . . . . . . . . . . . . . . .
143
B.2 Inviscid Mixture Momentum Equation . . . . . . . . . . . . . . . . .
144
B.3 Inviscid Multiphase ABE Formulation . . . . . . . . . . . . . . . . .
145
B.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
147
Appendix C. Laplace-Beltrami Identity . . . . . . . . . . . . . . . . . . . . . . .
149
viii
List of Tables
2.1
B-spline control point coordinates for the NACA66(MOD) foil . . . . . .
34
2.2
Mesh parameters for the NACA66(MOD) foil . . . . . . . . . . . . . . .
41
3.1
B-spline control point coordinates for the baseline nozzle geometry . . .
85
ix
List of Figures
2.1
Least-squares fit of B-Spline for NACA66(MOD) foil . . . . . . . . . . .
33
2.2
Least-squares fit of B-Spline for NACA66(MOD) leading edge . . . . . .
33
2.3
Design variable numbering for the NACA66(MOD) foil . . . . . . . . . .
35
2.4
Convergence histories for single-phase primary equations . . . . . . . . .
42
2.5
Pressure contours for single-phase primary equations . . . . . . . . . . .
42
2.6
Pressure distributions for single-phase primary equations . . . . . . . . .
43
2.7
Convergence histories for multiphase primary equations . . . . . . . . .
44
2.8
Pressure contours for multiphase primary equations . . . . . . . . . . . .
44
2.9
Density contours for multiphase primary equations . . . . . . . . . . . .
45
2.10 Pressure distributions for multiphase primary equations . . . . . . . . .
46
2.11 Baseline and target pressure distributions for single-phase inverse design
47
2.12 Convergence histories for single-phase adjoint equations . . . . . . . . .
48
2.13 Comparison of single-phase cost function gradient with finite differences
48
2.14 Grid sensitivity for the single-phase cost function gradient . . . . . . . .
49
2.15 Convergence histories for multiphase adjoint equations for lift specification
50
2.16 Comparison of the lift specification penalty function gradient with finite differences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
51
2.17 Grid sensitivity for the lift specification penalty function gradient . . . .
51
2.18 Convergence histories for multiphase adjoint equations for surface vapor minimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
52
2.19 Convergence histories for multiphase adjoint equations for volume vapor minimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
53
2.20 Comparison of surface-based multiphase cost function gradient with finite differences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
53
2.21 Comparison of volume-based multiphase cost function gradient with finite differences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
54
2.22 Grid sensitivity for the surface-based multiphase cost function gradient .
55
x 2.23 Grid sensitivity for the volume-based multiphase cost function gradient
55
2.24 Evolution of the single-phase inverse design cost function and gradient for the method of steepest descent . . . . . . . . . . . . . . . . . . . . .
57
2.25 Evolution of the pressure distribution for single-phase inverse design with the method of steepest descent . . . . . . . . . . . . . . . . . . . . . . .
57
2.26 Evolution of the control points for single-phase inverse design with the method of steepest descent . . . . . . . . . . . . . . . . . . . . . . . . .
58
2.27 Evolution of the cost function and gradient for multiphase inverse design based on pressure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
59
2.28 Evolution of the pressure distribution for multiphase inverse design based on pressure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
59
2.29 Evolution of the control points for multiphase inverse design based on pressure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
60
2.30 Evolution of the cost function and gradient for multiphase inverse design based on density . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
61
2.31 Evolution of the suction side density distribution for multiphase inverse design based on density . . . . . . . . . . . . . . . . . . . . . . . . . . .
62
2.32 Evolution of the pressure distribution for multiphase inverse design based on density . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
62
2.33 Evolution of the control points for multiphase inverse design based on density . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
63
2.34 Evolution of the cost function for cavitation minimization with various weights for lift specification . . . . . . . . . . . . . . . . . . . . . . . . .
64
2.35 Evolution of the cost function gradient for cavitation minimization with various weights for lift specification . . . . . . . . . . . . . . . . . . . . .
64
2.36 Original and final geometry for cavitation minimization with various weights for lift specification . . . . . . . . . . . . . . . . . . . . . . . . .
65
2.37 Original and final leading edge geometry for cavitation minimization with various weights for lift specification . . . . . . . . . . . . . . . . . . . . .
66
xi 2.38 Evolution of the volume vapor integral for cavitation minimization with various weights for lift specification . . . . . . . . . . . . . . . . . . . . .
66
2.39 Evolution of the force penalty function for cavitation minimization with various weights for lift specification . . . . . . . . . . . . . . . . . . . . .
67
3.1
Density gradient distribution for quasi-one-dimensional cavitating flow .
79
3.2
Least-squares fit of a cubic B-spline to the cross-sectional area distribution of the baseline nozzle geometry . . . . . . . . . . . . . . . . . . . .
3.3
Single-phase primary flow distributions compared with the analytical solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.4
84
90
Multiphase primary flow convergence histories for the third-order MUSCL scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
91
3.5
Multiphase primary flow distributions for the third-order MUSCL scheme
92
3.6
Mass transfer term on selected grids for the multiphase primary flow solution with third-order MUSCL scheme . . . . . . . . . . . . . . . . .
3.7
92
Multiphase primary flow distributions for the third-order MUSCL scheme showing spurious oscillations
. . . . . . . . . . . . . . . . . . . . . . . .
93
3.8
Multiphase primary flow distributions for the ENO scheme . . . . . . .
94
3.9
Multiphase primary flow distributions for the ENO scheme in the vicinity of the interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
94
3.10 Multiphase primary flow convergence histories for the ENO scheme . . .
95
3.11 Multiphase primary flow distributions for the WENO scheme . . . . . .
96
3.12 Multiphase primary flow distributions for the WENO scheme in the vicinity of the interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
96
3.13 Multiphase primary flow convergence histories for the WENO scheme .
97
3.14 Adjoint solution for single-phase inverse design . . . . . . . . . . . . . .
98
3.15 Comparison of cost function gradients for single-phase inverse design . .
99
3.16 Adjoint solution for multiphase inverse design with a step function for αtar 100 3.17 Source term coefficient from the multiphase adjoint equations . . . . . .
101
3.18 Grid dependence for the first adjoint variable for multiphase inverse design with a step function for αtar . . . . . . . . . . . . . . . . . . . . . .
101
xii 3.19 Comparison of cost function gradients for multiphase inverse design with a step function for αtar . . . . . . . . . . . . . . . . . . . . . . . . . . . .
102
3.20 Grid dependence for the first-order and high-resolution methods . . . .
103
3.21 Adjoint solution for an inverse design to shift the cavitation region . . .
103
3.22 Comparison of cost function gradients for an inverse design to shift the cavitation region . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
104
3.23 Comparison of cost function gradients to shift the cavitation region based on a Huber function . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
105
3.24 Comparison of control point definitions and geometry for the baseline (red) and perturbed (green) design variables . . . . . . . . . . . . . . . .
105
3.25 Comparison of cost function gradients for multiphase inverse design based on the multiphase baseline pressure distribution . . . . . . . . . . . . . .
106
3.26 Adjoint solution for multiphase inverse design based on the multiphase baseline pressure distribution . . . . . . . . . . . . . . . . . . . . . . . .
107
3.27 Adjoint solution for multiphase vapor minimization . . . . . . . . . . . .
108
3.28 Comparison of cost function gradients for multiphase vapor minimization 108 3.29 Evolution of the design variables for single-phase inverse design . . . . .
109
3.30 Evolution of the cost function and gradient for single-phase inverse design 110 3.31 The initial (baseline) and target geometries for the two-variable inverse design problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
111
3.32 Evolution of the cost function and gradient for single-phase inverse design with two design variables . . . . . . . . . . . . . . . . . . . . . . . . . .
112
3.33 Cost function contours and steepest-descent trajectory for single-phase inverse design based on pressure . . . . . . . . . . . . . . . . . . . . . .
112
3.34 Cost function contours and steepest-descent trajectory for multiphase inverse design based on pressure . . . . . . . . . . . . . . . . . . . . . .
113
3.35 Cost function contours for multiphase inverse design based on volume fraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
114
3.36 Evolution of the cost function for multiphase inverse design based on pressure using L-BFGS-B for two design variables . . . . . . . . . . . . .
114
xiii 3.37 Cost function contours and L-BFGS-B trajectory for multiphase inverse design based on pressure . . . . . . . . . . . . . . . . . . . . . . . . . . .
115
3.38 Evolution of the cost function for multiphase inverse design based on volume fraction using L-BFGS-B for two design variables . . . . . . . .
116
3.39 Cost function contours and L-BFGS-B trajectory for multiphase inverse design based on volume fraction . . . . . . . . . . . . . . . . . . . . . . .
116
3.40 Evolution of the cost function for multiphase inverse design based on pressure using L-BFGS-B for seven design variables . . . . . . . . . . . .
117
3.41 Evolution of the pressure profiles for multiphase inverse design based on pressure using L-BFGS-B for seven design variables . . . . . . . . . . . .
117
3.42 Evolution of the cost function for multiphase inverse design based on volume fraction using L-BFGS-B for seven design variables . . . . . . .
118
3.43 Evolution of the volume fraction profiles for multiphase inverse design based on volume fraction using L-BFGS-B for seven design variables . .
119
3.44 The initial (baseline) and final geometries for the seven-variable inverse design problem based on volume fraction . . . . . . . . . . . . . . . . . . 3.45 The Rosenbrock function
. . . . . . . . . . . . . . . . . . . . . . . . . .
120 121
xiv
List of Symbols
α
characteristic jump, page 82
α
liquid volume fraction, page 70
αm
hybrid multistage step-size coefficient, page 23
αtar
inverse design target distribution for liquid volume fraction, page 85
β
Huber threshold, page 86
β
artificial compressibility parameter, page 17
βmr
hybrid multistage residual coefficient, page 23
Γ
preconditioning matrix, page 16
γ
density gradient measure, page 24
γ
diffusion coefficient for generalized scalar transport, page 143
γmr
hybrid multistage dissipation coefficient, page 23
∆ρ
transport model coefficient, ∆ρ = dρ/dα = ρ` − ρv , page 72
∆t
local time step size, page 23
δb
variation of the vector of design variables, page 4
δq
variation of the flow field, page 5
δR
first variation of the governing equations, page 6
δ2
undivided second-difference operator, page 24
δ4
undivided fourth-difference operator, page 24
δij
Kronecker delta, page 16
xv δb
step size for finite difference approximations to the cost function gradient, page 39
δJ
variation of the cost function, page 4
δL
variation of the augmented cost function, page 6
δxs
variation of the shock location, page 74
ε
(2)
second-order dissipation scaling coefficient, page 24
ε
(4)
fourth-order dissipation scaling coefficient, page 24
a small number, page 77
θ
smoothness indicator, page 82
κ
surface mean curvature, page 150
Λ
eigenvalue matrix, page 25
λ
eigenvalue, page 26
λ
step size multiplier for gradient-based optimization methods, page 4
ν
pressure gradient measure, page 24
ξk
curvilinear coordinate vector, page 25
ρ
mixture density, page 16
ρ`
liquid density, page 17
ρ∞
freestream density, page 17
ρv
vapor density, page 17
σ
preconditioning factor, barotropic model, page 17
φ
generalized scalar field, page 143
φ
limiter function, page 82
xvi Ψ
preconditioned adjoint variable, page 20
ˆ Ψ
preconditioned adjoint characteristic variables, page 22
ψ
vector of adjoint variables, page 6
ψs
adjoint variable at the shock location, page 73
Ω
flow domain, page 18
A
quasi-one-dimensional inviscid flux Jacobian matrix, page 74
Ak
curvilinear flux Jacobian matrix, page 25
A
computational cell face area, page 23
aj
inviscid flux Jacobian matrix, page 20
an
normal inviscid flux Jacobian, an = aj nj , page 21
B
matrix coefficients associated with the inviscid flux Jacobian for the quasi-onedimensional adjoint field equation, page 76
b n
vector of design variables, page 4
bi
B-spline basis function of degree n, page 31
C
preconditioned adjoint source term vector, page 81
Cdest
transport model coefficient associated with evaporation rate, page 71
Cmin
minimum speed of sound in the mixture, page 17
Cprod
transport model coefficient associated with condensation rate, page 71
CFD
computational fluid dynamics, page 2
c
vector of hydrodynamic and geometric constraints, page 4
c
speed of sound,
c1
mass transfer coefficient, c1 =
p dp/dρ, page 26 1 ρ`
−
1 ρv ,
page 70
xvii 1 ρ` ,
page 70
c4
mass transfer coefficient, c4 =
D
matrix coefficients associated with the linear source term for the quasi-onedimensional adjoint field equation, page 76
D
second- and fourth-order dissipation vector, hybrid multistage method, page 23
DES
detached-eddy simulation, page 10
d
direction vector for gradient-based optimization methods, page 4
d
dissipation flux, page 24
Ek
curvilinear flux vector, page 25
ˆm e
m-th column of the identity matrix, page 39
F
∗
high resolution correction terms, page 81
ˆ F
quasi-one-dimensional numerical flux vector, page 77
F
quasi-one-dimensional flux vector, page 71
F
force of the fluid acting on the foil in a specified direction, page 18
Ftar
target force, page 18
F
symbolic representation of the geometry, page 4
fˆ j
numerical flux vector, page 23
f
non-homogeneous part of the linearized quasi-one-dimensional primary state equations, page 73
fj
inviscid flux vector, page 16
G
discretized residual vector, hybrid multistage method, page 23
g
gradient of the cost function with respect to the design variables, page 4
g
non-homogeneous part of the quasi-one-dimensional adjoint field equations, page 74
xviii H
Hessian matrix of the cost function, page 87
H(x)
Huber function, a hybrid L1 -L2 norm, page 86
˜ h
variation of the cross-sectional area distribution, page 73
h
source vector, page 16
h(x)
cross-sectional area distribution, page 83
hs
cross-sectional area distribution at the shock location, hs = h(xs ), page 73
I
identity matrix, page 26
J
cost function, page 4
J
metric Jacobian, page 25
JΩ
volume contribution to the cost function, page 35
JS
surface contribution to the cost function, page 35
k2
pressure gradient scaling coefficient, page 24
k3
density gradient scaling coefficient, page 24
k4
coefficient associated with fourth-order artificial dissipation, page 25
L
linear operator associated with the linearized quasi-one-dimensional primary state equations, page 73
∗
L
linear operator associated with the quasi-one-dimensional adjoint field equations, page 74
L
−
diagonal selection matrix associated with negative eigenvalues, page 26
L
+
diagonal selection matrix associated with positive eigenvalues, page 80
L
augmented cost function, page 6
LES
large-eddy simulation, page 11
xix `
unit normal vector in the direction of specified force, page 18
M
matrix of right eigenvectors, page 25
M
quasi-one-dimensional source vector associated with mass transfer, page 70
˜ M
variation of the source vector associated with mass transfer, page 73
M
generation term for generalized scalar transport, page 143
m ˙
mass transfer rate, page 70
m
number of knots in the B-spline knot vector, page 31
ND
number of design variables, page 4
NG
number of geometric constraints, page 4
NH
number of hydrodynamic constraints, page 4
n
degree of the B-spline basis function, page 31
nj
unit normal vector for computational cell face, page 23
P
quasi-one-dimensional source vector related to pressure, page 71
Pi
i-th B-spline control point, page 31
PIV
particle image velocimetry, page 11
p
static pressure, page 16
p∞
freestream pressure, page 17
ptar
inverse design target distribution for pressure, page 35
pvap
vapor pressure, page 17
Q
matrix of right eigenvectors of ΓA, page 80
ˆ q
primary characteristic variables, page 21
xx ˜ q
variation of the vector of primitive variables, page 73
q
vector of primitive variables, page 4
˜ R
variation of the governing flow equations, page 73
R
governing flow equations, page 5
RANS
Reynolds-averaged Navier-Stokes, page 9
r
right eigenvector of B, page 82
S
flow domain boundary, page 18
Sio
inlet/outlet or far-field boundary surface, page 21
s
cavitation index, page 17
p
s
wave speed, page 82
T
matrix of right eigenvectors of B, page 78
t
B-spline parameterization variable, page 31
t
time, page 16
t∞
characteristic time scale, page 71
ti
i-th component of the B-spline knot vector, page 31
`
ti
wall tangential unit vectors, page 37
u
Cartesian velocity component in the x direction, page 17
uj
adjoint velocity, page 22
V
discrete cell volume, page 23
V
computational control volume, page 23
V∞
freestream velocity magnitude, page 17
xxi v
Cartesian velocity component in the y direction, page 17
vi
primary velocity vector, page 16
˜ W
limited wave vector, page 82
W
wave vector, page 82
w
vector of weighting coefficients for multi-objective cost functions, page 35
x
B-spline coordinates, page 31
x
Cartesian coordinate vector, page 16
xs
quasi-one-dimensional discontinuity or shock location, page 73
xxii
Acknowledgments
I would like to express my sincere thanks first of all to the members of my committee — Dr. Eric Paterson, Dr. John Cimbala, Dr. Luigi Martinelli, Dr. Robert Kunz, and Dr. Savas Yavuzkurt — each of whom graciously volunteered his time for my benefit. Most of all, of course, I am indebted to my advisor, Eric Paterson, who gave me this incredible opportunity. It’s been a great pleasure to work on this and several other research projects that were made possible and more enjoyable as a result of his creativity and enthusiasm. This work was funded by the U.S. Department of Energy (DOE) Energy Efficiency and Renewable Energy (EERE) Wind & Water Power Program under award DE-EE0002667. I am grateful to John Cimbala for his leadership and organization of this grant as well as for his detailed and helpful feedback on my work and on my writing. I am thankful that Luigi Martinelli agreed to serve as a special member on my committee and was willing to share his expertise in continuous adjoint methods. He was incredibly generous with his time, and I benefited at several points from the technical advice he provided. My research topic was directly inspired by the prior works of Rob Kunz and Jim Dreyer, so I am fortunate and very grateful for the feedback and suggestions they contributed here. I was also incredibly fortunate to have them, along with Chuck Brickell, as my line management at ARL during the course of my research since their support made it possible for me to complete my degree while keeping both my career and my marriage intact. My co-workers at ARL were all terrific in helping me to complete my research while maintaining my full-time job. Ralph Noack, in particular, gave me constant encouragement, ideas and technical help, patiently endured my endless complaints, and graciously absorbed work that should otherwise have fallen to me. Rob Campbell, Jeremy Koncoski, Scott Miller, and Jay Lindau each generously lent their individual expertise at critical moments, and my closest colleagues — Warren Baker, Rick Medvitz, Jack
xxiii Poremba, and Frank Zajaczkowski — were all supportive and understanding despite the fact that I’ve been of little to no use to them for the past three years. The Wehr American Hydro Corporation served as an industrial partner and technical advisor to Penn State as part of this DOE grant. I was impressed at every visit with the knowledge and abilities of the employees I met there, and I would especially like to thank Bill Colwill, Gerry Russell, Andrew Ware, and Joe Hill for sharing their wisdom in hydroelectric design and analysis, as well as to Doug Miller (AHC) and Linda Church Ciocci (Executive Director, National Hydropower Association) who entertained my questions on the history and evolution of hydropower in the United States. Several people generously responded to verbose and unsolicited e-mails from me and in doing so greatly advanced my cause. Carsten Othmer promptly answered my questions about his adjoint boundary condition implementation and shared some of his own OpenFOAM code. Dimitrios Papadimitriou and Kyriakos Giannakoglou both gave detailed answers to my detailed questions about their derivations of the continuous adjoint equations. Eugene de Villiers was helpful in explaining some subtleties of the adjoint method and wisely cautioned me about several potential pitfalls on my proposed research path. And Joao Luiz Azevedo quickly supplied me with several of his papers on spatial discretization techniques that I had been eager to obtain. I also wish to thank Dr. Gita Talmage, who has proven over and over to be an outstanding teacher as well as an invaluable advisor during my many years as a graduate student in the Mechanical Engineering Department at Penn State. Finally, I am always grateful for the love and support of my family, particularly my parents, Ed and Ann, my daughter Rebecca, and my wife Lore. I am also eternally grateful for the extra time that my parents spent with Rebecca after she was born while I worked toward my comprehensive exam. Lore and Rebecca have both been amazingly understanding of the evenings, nights, and weekends I have spent in front of my computer, and I’m looking forward to the chance to make it up to them now.
1
Chapter 1
Introduction
Multiphase flow effects, including cavitation and air injection, are an important consideration for both expanding the operating range of hydroturbines and making them more environmentally friendly. Cavitation is a critical flow mechanism in hydroturbines that greatly restricts the operating range of the plant. Cavitation can not only significantly decrease efficiency but perhaps more importantly can physically damage the runner and draft tube surfaces, leading to a rapid decrease in the useful life of the components. The amount and types of cavitation that are acceptable in a hydroturbine vary depending on the configuration and design tradeoffs. For example, bulb turbines, which are suitable for large flow rates and low head applications such as in run-of-river power plants, regularly encounter cavitation as a part of their normal operation, making it necessary to include cavitation effects during the design stage [1]. Kaplan runners typically allow some amount of cavitation during normal operation primarily as a tradeoff to a deeper setting of the machine. For Francis turbines, cavitation is generally considered intolerable, but in offdesign conditions, swirling flow leaving the runner often forms a cavitating vortex rope. As a result, it is necessary to consider cavitation effects during the design stage of Francis turbines in order to predict and expand their operating range. Air injection can be used to reduce pressure fluctuations from the vortex rope and other flow sources [2, 3]. Hydroturbines also tend to discharge water with low dissolved oxygen content from the bottom of the reservoir, which can severely impact aquatic life downstream, so air injection is also used in that case to improve water quality [4]. Many experimental and analytical studies have sought to better understand the causes and effects of cavitation in hydropower systems [5], and multiphase CFD simulations of cavitation in hydroturbines have become increasingly common in the last several
2 years. For example, Liu and colleagues (2007, 2009) simulated the full unsteady flow from the inlet of the spiral casing to the exit of the draft tube for both a Kaplan [6] and Francis [7, 8] turbine. Using a two-phase mixture model, they reported improvement over single-phase results in terms of the amplitude and dominant frequency of the pressure fluctuations. Necker and Aschenbrenner (2010) predicted the effects of cavitation breakdown for the efficiency of a bulb turbine and reported good qualitative and quantitative agreement with experimental measurements in terms of the relative losses and location and scope of cavitation [1]. Bunea (2010) proposed multiphase CFD modeling to support the design of air injection systems for improving dissolved oxygen content [4], and Qian (2007) solved the two-fluid unsteady RANS equations including air injection through the whole passage of a Francis turbine to predict the effect on unsteady pressures in the draft tube, in front of the runner, and in the spiral case [9]. But even when CFD simulations are able to accurately predict the performance of a design, it is usually still incumbent on the designer to correct any problems using traditional design tools and his own experience and intuition. CFD-based design optimization, on the other hand, can provide a direct link between the CFD solution and the required design improvements. Thus, design optimization tools become extremely valuable for problems involving very demanding design goals (which test the limits of the design tools) or new and complicated physical phenomena (which test the limits of the designer’s experience and intuition). With full system multiphase calculations still in their infancy, researchers have not yet sought to systematically tie hydroturbine shape design to the results of multiphase analysis. It is therefore of interest to investigate the extension of shape optimization methods to multiphase flow, allowing them to be applied to operating conditions in which cavitation or injected air exists either in the component being modified or in an adjacent stage of the machine. With that as motivation, this dissertation presents the extension of continuous adjoint methods to multiphase flow models. As discussed in the next section, adjoint methods are used to calculate design sensitivity information that is provided as input to gradient-based optimization strategies and are particularly powerful in the sense that
3 their cost is essentially independent of the number of design variables. Adjoint methods have proven successful in many aerospace and turbomachinery design applications but do not appear to have been applied to multiphase flow at all. The remainder of this chapter provides a basic overview of the continuous adjoint method and then goes on to survey some recent extensions of the method relevant to the current work. Finally, the specific needs of hydroturbine design are compared with the current state of CFD analysis and CFD-based design optimization in order to demonstrate that the continuous adjoint method can be applied to meet the objective of improving the efficiency and operating range of hydroelectric machines.
1.1
Continuous Adjoint Method The continuous adjoint method represents the application of control theory to
solve the problem of fluid dynamic design. It is normally attributed to Pironneau (1973, 1974), who studied drag minimization for two-dimensional shapes in Stokes [10] and low-Reynolds number flows [11]. Jameson (1988) was the first to apply the continuous adjoint method to transonic inviscid flow [12], and his subsequent body of work with his students and colleagues is largely responsible for the widespread popular application of these methods. 1.1.1
Overview of the Continuous Adjoint Method A simplified overview of the continuous adjoint method is presented here in order
to introduce the reader to the subject. More detailed derivations are introduced for a barotropic multiphase flow model in Chapter 2 and for a transport-equation-based multiphase flow model in Chapter 3. The basic fluid dynamic design problem is to develop or modify a geometry to achieve some objective under various geometric and fluid dynamic constraints. The design problem can be expressed mathematically as a general control problem in which the goal is to determine the set of ND design variables bi (for i = 1, ND ) that minimize
4 some cost function J(q, F(b)) subject to NH hydrodynamic constraints cj (q, F(b)) ≤ 0,
j = 1, 2, . . . , NH
and NG geometric constraints cj (F(b)) ≤ 0,
j = NH + 1, . . . , NH + NG
where F represents the geometry and q represents the flow field. Optimization problems such as the one expressed above can be solved using a variety of methods that can be categorized as either stochastic or deterministic. Stochastic methods, including genetic algorithms, have the advantage that they require evaluations of only the objective function (but not its gradient), so they are preferable in cases where the objective function is discontinuous. Deterministic methods, including gradient-based methods, can be more efficient, particularly when the optimum is “nearby,” but suffer the disadvantage that they can be trapped by local minima. Gradient-based methods update the design variables using an expression of the form δb = λd,
(1.1)
where λ controls the step size and d is a direction vector. The direction vector is related in some way to the gradient of the cost function with respect to the design variables. Perhaps the most common example of gradient-based optimization is the method of steepest descent [13]. For steepest descent, the direction vector is selected as d=−
∂J ∂b
T = −g,
(1.2)
from which it can be shown that every change in the design variables will serve to further decrease the cost function provided that the step size is sufficiently small; i.e., δJ =
∂J T T δb = g δb = −λg g ≤ 0. ∂b
5 Efficient and accurate determination of the cost function gradient g is the primary obstacle that must be overcome. Finite differences can be used to obtain a straightforward approximation to the cost function gradient as ∂J J(q + δq, F + δF) − J(q, F) = , ∂b δb but this requires at least ND +1 cost function evaluations (using one-sided differencing) at each step in the design cycle. Since each cost function evaluation requires a separate CFD solution, this severely limits the number of variables that can be used to parameterize the design. In addition, the accuracy of finite-difference methods can suffer from a significant dependence on the step size δb, although complex-step methods can be used to circumvent this in exchange for some extra development effort. An alternative to finite-difference methods is sensitivity analysis, in which the cost function gradient is expanded using the chain rule ∂J ∂q ∂J ∂F ∂J = + ∂b ∂q ∂b ∂F ∂b or δJ =
∂J ∂J δq + δF. ∂q ∂F
(1.3)
Here ∂F/∂b is the geometric sensitivity, which is usually straightforward to compute, while ∂q/∂b is the flow sensitivity, which is not generally available explicitly. Therefore, the key to the success of sensitivity analysis is finding an efficient method to handle the flow sensitivity term. The governing equations of the fluid, which can be written as R(q, F) = 0,
(1.4)
represent an important hydrodynamic constraint but also provide a means to eliminate the flow field dependence from the expression for the variation of the cost function. To
6 accomplish this, the dot product of an arbitrary vector ψ with the first variation of the governing equations,
δR =
∂R ∂R δq + δF = 0, ∂q ∂F
(1.5)
is added to the variation of the cost function to form the variation of the so-called augmented cost function, T
δL = δJ + ψ δR,
(1.6)
where ψ is referred to as the adjoint variable. The fact that δR is identically zero allows ψ to be selected arbitrarily. As with the method of Lagrange multipliers, introduction of the adjoint (or costate) variable and the formation of the augmented cost function L has thus converted the constrained optimization problem into an unconstrained optimization problem. In particular, minimizing L is equivalent to minimizing J under the constraints given by R = 0. The addition of the variation of the governing equations to the cost function also provides a means by which the flow variation can be eliminated from the variation of the (augmented) cost function. Substitution of Eq. (1.3) and Eq. (1.5) into the variation of the augmented cost function in Eq. (1.6) gives ∂J ∂R ∂R T δq + δF + ψ δq + δF δL = ∂F ∂q ∂F ∂J ∂R ∂J ∂R T T = +ψ ∂q + +ψ ∂F, ∂q ∂q ∂F ∂F
∂J ∂q
so choosing ψ to satisfy
∂R ∂q
T
ψ=−
∂J ∂q
T (1.7)
7 eliminates the flow sensitivity term δq from δL, leaving δL =
∂J ∂F
+ψ
T
∂R ∂F
∂F.
(1.8)
Equation (1.8) shows that the expression for the gradient of the objective function can be obtained from two things: geometric variations, which are relatively simple to compute, and the solution of the adjoint field resulting from Eq. (1.7). Once the gradient is calculated, it can be preconditioned or smoothed. This is especially important to maintain smooth geometry updates when the surface grid points are used as the design variables, and it decreases the number of design iterations required to achieve the minimum [13–16]. Finally, assuming the design variables parameterize the surface geometry, the computational mesh must be updated at the end of each design iteration. The final algorithm therefore consists of the following steps: 1. Solve the flow equations as expressed by Eq. (1.4) in order to acquire the primary flow field q. 2. Solve the adjoint equations as expressed by Eq. (1.7) in order to acquire the adjoint variable field ψ. 3. Evaluate the cost function gradient as expressed by Eq. (1.8) and apply any required smoothing. 4. Update the design variables based on the cost function gradient, e.g., using the method of steepest descent as expressed by Eq. (1.1) and Eq. (1.2). 5. Update the geometry using the new design variables. 6. Update the computational mesh using the new geometry. 7. Repeat as needed. With this, the cost of the gradient-based design optimization has been reduced to the cost of only two CFD solutions per step of the design cycle, independent of the number of design variables. The continuous adjoint method is therefore an extremely
8 efficient method for improving fluid dynamic designs parameterized by large numbers of design variables. 1.1.2
Recent Extensions of the Continuous Adjoint Method Several recent contributions to the basic method described in Section 1.1.1 have
helped to significantly expand the practical application of the adjoint method. Two areas that are of particular interest to the current work pertain to the reduced gradient formulation and to adjoint systems including turbulence effects. Reduced Gradient Formulation A significant advance in the continuous adjoint method over the past decade was the elimination of a field integral involving mesh modification terms that typically arose in the final expression of the cost function gradient. The resulting method is referred to as the reduced gradient formulation. The consequence of the field integral was that the perturbation of each design variable needed to be accompanied by a full mesh modification over which the variation of the mesh metric terms could be evaluated [17]. With the elimination of that step, reduced gradient formulations are more efficient. And by restricting the cost function gradient evaluation to an integral over the surface, the reduced gradient formulation is also a significant enabler for the use of unstructured and overset grids. Jameson derived an early version of a reduced gradient formulation in 1995 but did not pursue it since the cost of evaluating the field integral on structured grids was negligible. The first published results with that method analyzed the cost function gradient in inviscid, transonic flow on structured grids and concluded that the results were more sensitive to strong curvature and pressure gradients but agreed with the original formulation as the mesh was refined [14, 18]. The formulation was later demonstrated on unstructured grids [15, 19] and from there to incompressible flow [16]. In this final study, application to viscous flow is cited as on-going pending validation of the reduced gradient formulation for the design variables of interest and improved robustness of the mesh deformation process.
9 Similar reduced gradient formulations have been advanced by Soto and Lohner (2004) and Castro (2006, 2007) for unstructured grids in both inviscid and viscous flow [20–22]. Papadimitriou (2006, 2007) generalized the derivation through an expansion of the first variation of the gradient of a flow quantity and showed that the revised derivation is equivalent to derivations based on structured grid metric variations [23, 24]. Note that in spite of the apparent advantages of the reduced gradient formulation, Wang (2010) elected to calculate the mesh perturbation field integral because the reduced gradient formulation “involves calculation of spatial derivatives of flow variables along the boundary of a computational domain, which is not easy to obtain with desirable accuracy” [25]. Turbulence Models and Boundary Conditions Nearly all applications of the continuous adjoint method invoke the so-called frozen turbulence assumption, in which the eddy viscosity is assumed to have negligible variation with respect to the design variables. This is particularly convenient in applications that rely on algebraic turbulence models such as the Baldwin-Lomax model, in which the definition of the eddy viscosity is conditional or mathematically discontinuous. In addition, the definition of the adjoint variable requires that the adjoint boundary conditions be specified in such a way that flow variation terms are eliminated on the surface of the domain. Specification of no-slip boundary conditions on viscous walls is therefore typical since it considerably simplifies the derivation. On the other hand, practical modern CFD analysis of turbulent internal flows is generally based on one- or two-equation turbulence modeling and the use of wall function boundary conditions, the latter of which significantly alleviates grid density requirements, especially at high Reynolds numbers. Zymaris (2009) presented a continuous adjoint form of the incompressible Reynolds-averaged Navier-Stokes (RANS) equations based on the one-equation Spalart-Allmaras model for minimization of total pressure loss in ducted flow [26]. A subsequent 2010 paper extended the same derivation method to a twoequation k-ε turbulence model with wall functions, introducing an “adjoint law of the wall” [27]. In both cases, including the eddy viscosity variation improves the accuracy of
10 the cost function gradient compared with frozen turbulence assumptions and allows for a quantitative evaluation of the newly arising terms that would otherwise be neglected. 1.1.3
Applicability to Hydroturbine Design The previous two sections document the basic formulation and some important
recent developments of the adjoint method in general. This section focuses on the suitability of the method for hydroturbine design in particular. Here the primary goal is improved efficiency across a wider range of operating conditions. Pertinent to that discussion are recent CFD applications in hydroturbine analysis and recent extensions to the continuous adjoint formulation that relate to the unsteady, multistage, multiphase flow effects found in modern hydroelectric machines and to the important question of multipoint design and operation. Unsteady Flow The rotation of the turbine coupled with multiple blade row interactions and a flow passage which is non-axial and geometrically complex gives rise to unsteady flow that is important at all operating conditions but becomes increasingly problematic at off-design conditions. Unsteady effects are attributed to non-uniform inflow, interaction between the runner and guide vanes, channel vortices in the runner blade passage, and the vortex rope in the draft tube, with the latter two sources dominating at partial load. Design support CFD has been traditionally restricted to steady-state calculations for reasons of simplicity as well as economy of both computer time and memory, but with the continuing growth of computational resources, unsteady simulations have become more common. In the context of hydroelectricity, most of the unsteady flow simulations have focused on the unsteady and unstable nature of the turbulent flow in the draft tube. Unsteady RANS and detached-eddy simulations (DES) performed by Paik (2005) were found to exhibit “intense unsteadiness” throughout the draft tube, despite the specification of steady axisymmetric inflow conditions at the exit of the runner [28]. The DES results in that case were particularly adept at capturing the formation of the precessing,
11 spiral rope vortex and its complex interaction with the elbow walls. Duprat (2009) has begun large-eddy simulations (LES) of a draft tube and reported encouraging results relative to particle image velocimetry (PIV) measurements [29]. Going beyond the draft tube, Xiao (2010) and Petit (2011) each solved the unsteady RANS equations and used sliding grid interfaces to simulate the entire flow passage [30, 31]. Xiao simulated the entire passage of a Francis turbine at partial load — including the spiral case, stay vanes, guide vanes, runner, and draft tube — to predict pressure pulsations blamed for cracks found in blades that had operated for long periods of time at low head. Measured and predicted pressure pulses at different positions along the runner and in the draft tube were found to be comparable, although peak-to-peak amplitudes in the spiral case were not as well predicted [30]. Likewise, Petit et al. (2011) simulated a full swirl generator test rig — including the struts, guide vane, free runner, and draft tube — to predict the unsteady pressure measured at four locations in the draft tube [31]. Petit reported good agreement with the fundamental frequency of the vortex rope but found that the pressure amplitude was overpredicted throughout the draft tube. As unsteady analysis methods mature, it is inevitable that interest will grow in applying CFD-based design methods to minimize unsteady effects across the spectrum of operating conditions. The continuous adjoint formulation can be extended in a straightforward manner to include temporal effects, with the interesting but unfortunate side-effect that the resulting unsteady adjoint equations must be advanced by marching backwards through time. As a result, unsteady adjoint methods are theoretically applicable to only deterministic, periodic unsteadiness where the initial conditions are not relevant. For such a case, Nadarajah and Jameson (2002) examined a fully unsteady adjoint method along with two simplifications — one in which the steady adjoint equations were solved at each time step of the primary flow and one in which the steady adjoint equations were solved using the time-averaged primary flow field [32]. All three unsteady methods were found to give the same results for the problem that was studied, and the unsteady methods were found to give superior results compared with a multipoint design method applied to various conditions encountered during the unsteady operation.
12 Mixing Planes As has been seen above already, it is often necessary in the analysis of hydroturbines to simultaneously solve multiple stages of the machine. A useful simplification in that case is to express each stage in a different frame of reference. For example, the distributor, runner, and draft tube can all be coupled together in a single steady-state solution if the runner is considered in a rotating frame of reference. Such an analysis typically uses mixing planes at the interfaces between the stationary and rotating components. Circumferentially-averaged flow properties are used to couple the solutions on either side of the mixing plane in such a way that mass, momentum, and energy are still conserved. A recent example was provided by Page et al. (2011), in which both mixing plane and generalized grid interfaces were used for the purpose of simulating hydroturbine flows [33]. From a design stand-point, it may also be necessary or desirable to design one of the stages while simultaneously simulating or even designing one or more of the adjoining stages. As an example, the goal of the redesign of the runner blade may involve consideration of the overall energy loss through the flow, requiring the calculation of the total pressure exiting the draft tube. Such multistage designs have been solved using the continuous adjoint method through the implementation of an adjoint mixing plane, which conserves the circumferentially-averaged adjoint fluxes in a manner analogous to the primary flow quantities [25]. Multipoint Design Hydroelectric power plants have the ability to smooth out variations in consumption in electrical power networks, but to meet this demand requires that they are increasingly subjected to off-design operation [5]. Likewise, reversible Francis-type pump turbines are being driven towards higher flexibility in operation and an extended range in order to provide stability to the electrical grid in the face of growing contributions from intermittent power generation sources such as wind and solar [34]. In the context of aerodynamic design, it has been observed that virtually all aerodynamic components must perform efficiently over a range of operating conditions
13 and that optimization at a single operating point invariably leads to poor off-design performance [35]. Recognizing this, multipoint design optimization has appeared with increasing frequency, particularly as single-point design optimization techniques have matured. In essentially all cases, multipoint design methods are based on expressing the overall objective function as the weighted sum of the objective function evaluated at a number of discrete operating conditions [36, 37]. As an example, Jameson (2007) considered multipoint design of a wing at two different flight conditions using a weighted sum of the cost functions and gradients. He observed that the improvement in performance was significantly less than in the single-point design case because the gradient with respect to one of the design variables was opposite in direction between the two design conditions [36]. Examination of the Pareto fronts in such situations has been shown to be a valuable diagnostic tool that can highlight the tradeoffs incurred as the relative importance of two competing objectives is varied [35, 38]. The extension of single-point methods to multipoint design brings with it other new and sometimes subtle problems. For instance, Drela (1998) concluded that the use of too many design parameters in multipoint design optimization can lead to a condition called “point optimization,” in which the performance of the optimized shape rapidly deteriorates away from the design point(s) [39]. Li (2002) provided a mathematical argument for this phenomenon [40]. Recent attempts at overcoming point optimization have focused on varying (randomly or systematically) the design points at each iteration (Huyse and Lewis, 2001), adaptively redefining the weights at each iteration [40], or both [35]. More generally, it has been observed that optimization methods tend to “exploit holes in the problem definition,” requiring the designer to iterate on the design variables, especially in cases where the design is highly constrained and geometrically complex [35, 39, 41]. According to Drela, design optimization “is still an iterative cut-and-try undertaking. But compared to the traditional inverse techniques, the cutting-and-trying is not on the geometry, but rather on the precise formulation of the optimization problem” [39]. The need to iterate on the problem definition is multiplied for multipoint
14 design optimization using weighted-sum methods, where both the operating points and their weights are not apparent a priori [40].
1.2
Objectives and Dissertation Outline CFD-based design optimization has found widespread acceptance across a range
of engineering fields but has attained particular maturity in aerospace design for the improvement of fixed wing aircraft and rotorcraft. From the preceding discussion, it is clear that developments including adjoint mixing planes and extensions to unsteady and multipoint design give the continuous adjoint formulation great potential to improve the efficiency and operating range of hydroelectric systems as well. On the other hand, many of the most pressing hydropower design problems are inherently multiphase, and so extensions to multiphase flow are required to make continuous adjoint methods directly applicable. Over the next two chapters, continuous adjoint methods are developed for design optimization in multiphase flow based on two homogeneous multiphase mixture models for cavitating flow — a barotropic model in Chapter 2 and a transport-equation-based model in Chapter 3. In each case, the derivation of the adjoint equations, adjoint boundary conditions, and cost function variation is presented along with a solution method suitable for the resulting systems of equations. In each case, the overall method is validated by comparison of the gradients computed by the continuous adjoint method with the same gradients calculated by standard and complex-step finite-difference methods. And in each case, several design optimization examples are presented to demonstrate the effectiveness of the overall algorithm, bringing to light characteristics of descent methods and cost function design that are important for multiphase flow. In short, this dissertation shows that continuous adjoint methods for shape optimization can be extended to multiphase flow and develops the analytical equations and numerical methods required to do so.
15
Chapter 2
Barotropic Model
A homogeneous multiphase mixture model based on a barotropic equation of state for the mixture density provides a convenient entry into adjoint methods for cavitating flow. The barotropic model consists of variable-density mass and momentum equations, so it has similar mathematical properties to the compressible Euler equations for which adjoint methods are well-established. The model has some limitations — its barotropic equation of state prevents baroclinic vorticity generation, which is important for turbulence production in the cavity closure region [42], and prevents simulation of multiphase flows involving non-condensable gases, which is important in hydropower applications involving air injection. Nevertheless, this level of cavitation modeling has proven valuable in design analysis, having been used to calculate cavitation breakdown of a centrifugal pump [43] and more recently to calculate the effect of sheet cavitation on hydrofoil lift [44, 45]. This chapter develops a continuous adjoint formulation for a barotropic multiphase cavitation model. The governing equations for the adjoint field are derived at the level of the partial differential equations, and standard explicit Runge-Kutta methods are applied to discretize and solve the resulting adjoint system in two-dimensional cavitating flow. The accuracy of the model is demonstrated by comparing the cost function gradient arising from the adjoint method with the gradient calculated using standard and complex-step finite difference methods for a variety of cost functions including both surface- and volume-based vapor minimization, and several minimization examples are provided to demonstrate the applicability of the adjoint method in the context of the overall shape optimization problem.
16
2.1
Governing Equations The derivation for the continuous adjoint method occurs at the level of the partial
differential equations. This section thus presents first the governing partial differential equations for the underlying barotropic model and then from that system of equations develops the partial differential equations governing the corresponding adjoint field. 2.1.1
Primary Equations The governing equations for the barotropic flow model originally proposed by
Delannoy and Kueny [46] are given in pre-conditioned form as −1 ∂q
Γ
∂t
+
∂f j ∂xj
= h,
(2.1)
where q is the vector of primitive variables, p q = , vi
(2.2)
f j is the inviscid flux vector,
ρvj
, fj = ρvi vj + pδij
(2.3)
and h is a vector of source terms, which is identically zero for the barotropic model (but is included here for generality, particularly with respect to the transport-equation-based cavitation model discussed in Chapter 3) [45].
17 A barotropic equation of state is used to determine the density as a function of pressure according to
ρ(p) =
ρl
if θ > π/2,
ρl + ρv 2 ρ
+
ρl − ρv 2
if |θ| ≤ π/2,
sinθ
if θ < −π/2,
v
where θ =
2 p − pvap /∆pvap and ∆pvap = 0.5(ρl − ρv )Cmin and Cmin represents the
minimum speed of sound in the mixture, normally specified between 1.5 m/s and 4.0 m/s. The ratio of the vapor density to liquid density is specified as ρv /ρl = 0.001. The vapor pressure is specified by way of the cavitation index, which is defined as
s=
p∞ − pvap 2 1 2 ρ∞ V∞
.
(2.4)
The preconditioning matrix for two-dimensional flow is given by −1
Γ
1/β
2
0 0
β
2
0
0
−1
= σu/β 2 ρ 0 = −σu/ρ 1/ρ 0 2 σv/β 0 ρ −σv/ρ 0 1/ρ
,
(2.5)
where σ is a preconditioning factor and β is the artificial compressibility parameter [44]. Note that a diagonal preconditioning matrix corresponding to standard artificial compressibility is recovered when σ = 0, and that is the only value of σ that has been used in this work. Likewise, the choice of the artificial compressibility parameter can be important for stability and convergence, and this topic has been investigated in detail elsewhere [45, 47]. In the present work, however, β is taken as a constant equal to the freestream velocity magnitude.
18 2.1.2
Adjoint Equations The cost functions investigated in the current work can be expressed generally by
integrals over the flow domain Ω and its boundary S as Z
Z
J= Ω
JΩ dΩ +
1 2 JS dS + w5 (F − Ftar ) , 2 S
(2.6)
where Z F = S
p`j nj dS
is the force of the fluid acting on the foil in the direction of the unit vector `. The system of governing equations for the flow field represents a set of constraints that apply at every point in the domain, so following the method of Lagrange multipliers, these constraints are added to Eq. (2.6) to form the augmented cost function L=J+
Z
T ψ R dΩ,
Ω
where ψ is the costate or adjoint variable, and from Section 2.1.1, R=
∂f j ∂xj
−h=0
(2.7)
represents the constraint imposed by the governing flow equations. Following Zymaris [27], a distinction is made between the global variation of a quantity with respect to the design variables, δ/δb, and the direct variation of a quantity with respect to the design variables, ∂/∂b, and these two variations are related to one another by δ δbm
∂ = ∂bm
∂ + ∂xk
δxk . δbm
(2.8)
Leibniz’s rule for differentiation under the integral sign then gives the variation of L as δL δJ = + δbm δbm
Z Ω
Z δ ∂ T T ψ R dΩ + ψ R (dΩ) . ∂bm δbm Ω
19 The variation of the differential volume can be written as δ ∂ (dΩ) = δbm ∂xk
δxk δbm
dΩ
(2.9)
[24, Appendix A]. Using the product rule for differentiation, the divergence theorem, and Eqs. (2.8)-(2.9), the cost function variation is then δL δJ = + δbm δbm
Z Z δx T ∂R T k ψ dΩ + ψ R nk dS. ∂b δb S Ω m m
(2.10)
Likewise, the global variation of J can be expressed as Z
δJ = δbm
Ω
∂JΩ ∂bm
Z dΩ + S
δxk δJS δfs JΩ n + + w5 (F − Ftar ) dS δbm k δbm δb
Z + S
[JS + w5 (F − Ftar ) fs ]
δ (dS) , δbm
(2.11)
where fs = p`j nj . Using Eq. (2.7), the domain integral in Eq. (2.10) can be rewritten as !# Z Z " ∂f ∂R ∂ j T T ψ dΩ = ψ −h dΩ ∂b ∂b ∂x Ω Ω m m j # Z " ∂f j T ∂h T ∂ −ψ dΩ ψ = ∂xj ∂bm ∂bm Ω # Z " T ∂ ∂ψ ∂f j T ∂f j T ∂h = ψ − −ψ dΩ ∂bm ∂xj ∂bm ∂bm Ω ∂xj ! Z Z T ∂ψ ∂f j T ∂h T ∂f j = ψ n dS − +ψ dΩ. ∂bm j ∂xj ∂bm ∂bm S Ω
(2.12)
Substitution of Eq. (2.11) and Eq. (2.12) into Eq. (2.10) then gives δL = δbm
Z Ω
∂JΩ ∂ψ T ∂f j T ∂h − −ψ ∂bm ∂xj ∂bm ∂bm
! dΩ
δJS δfs T ∂f j + + w5 (F − Ftar ) +ψ n dS δb ∂bm j S δbm Z Z δx δ T k + [JS + w5 (F − Ftar ) fs ] (dS) + JΩ + ψ R nk dS. δb δb S S m m Z
(2.13)
20 Eq. (2.13) provides a general expression for the variation of the augmented cost function. It remains to specify ψ in such a way that direct variations of the flow variables are eliminated from the first and second integrals on the right-hand side. The first integral on the right-hand side is an integral over the flow domain and is eliminated by specifying that the adjoint variable at every point in the domain should satisfy T ∂J ∂ψ ∂f j T ∂h − −ψ + Ω = 0. ∂xj ∂q ∂q ∂q
Defining Ψ as a preconditioned adjoint variable such that T
ψ = Γ Ψ,
(2.14)
the field equation for the adjoint variable can be written as T ∂Ψ − Γaj − ∂xj
∂Γ ∂h aj + Γ ∂xj ∂q
!T
Ψ+
∂JΩ ∂q
T = 0,
(2.15)
where aj is the inviscid flux Jacobian matrix, defined by
aj =
∂f j ∂q
.
The preconditioning matrix has been introduced into Eq. (2.15) so that the adjoint equation solver benefits from the same eigensystem conditioning as the primary equation solver. Introducing it by way of Eq. (2.14) is equivalent to having used the preconditioned form of the governing equations
R=Γ
∂f j ∂xj
! −h
=0
as the constraint when forming the augmented cost function.
21 Adjoint Boundary Conditions Returning to Eq. (2.13), having eliminated the first field integral through definition of the adjoint field equations, the variation of the augmented cost function is reduced to Z δ T ∂f j nj dS (dS) + Ψ Γ [JS + w5 (F − Ftar ) fs ] δbm ∂bm S S Z δxk δJS δfs + JΩ n + + w5 (F − Ftar ) dS. δbm k δbm δb S
δL = δbm
Z
(2.16)
Each surface integral can be split into separate integrals over different portions of the flow domain boundary. Any far-field, inlet, or outlet boundaries are assumed in this work to have no geometric variation, and any flow variation contribution from those boundaries is eliminated by selecting the adjoint variable boundary conditions to satisfy ∂JS T Ψ Γan + δq = 0, ∂q S io
where an = aj nj . In the present work, JS = 0 for all but the solid boundary, so the adjoint boundary condition on other boundaries reduces to T Ψ (Γan ) δq
= 0.
Sio
Introduction of the spectral decomposition of Γan in terms of a matrix of eigenvalues Λ and right eigenvectors M then gives T
Ψ
M ΛM
−1
δq
=0 Sio
or T T M Ψ Λδˆ q
= 0, Sio
(2.17)
22 where δˆ q represents the variation of the primary characteristic variables at the boundary. Consistency at the boundary requires the same number of specified boundary values for ˆ as there are incoming characteristics. Specification of M T Ψ = 0 corresponding to q each of the outgoing characteristics then cancels the remaining flow perturbation terms ˆ = M T Ψ represents the characteristic adjoint variables at the boundary. Note that Ψ at the boundary. The remaining terms from Eq. (2.16) consist of integration over only the solid walls and can be written as δL = δbm
Z
δ [JS + w5 (F − Ftar ) fs ] (dS) + δbm Sw
Z −
ψ nj
Sw
Z + Sw
T
∂f j ∂xk
− JΩ nk
Z Sw
T
uj p − ψ f j
δ nj dS δbm
δxk dS δbm
δJS δf δp + w5 (F − Ftar ) s + uj nj dS, δbm δbm δbm
(2.18)
T
where ψ = Γ Ψ according to Eq. (2.14) and (u1 , u2 ) = (ψ2 , ψ3 ) is referred to as the adjoint velocity. Only the fourth integral in Eq. (2.18) retains any flow field variation, and this can be eliminated by selecting
uj nj = −
∂JS + w5 (Ftar − F ) `j nj , ∂p
(2.19)
but only for the case where JS depends only on p. Surface-based cost functions written in terms of flow variables other than p are normally considered to be inadmissible since there are no naturally occurring boundary terms in Eq. (2.18) available to cancel the additional flow variation terms that would arise from the variation of JS . This has implications for the transport-equation-based model defined in Chapter 3, so more general adjoint velocity boundary conditions are derived in Appendix B using auxiliary boundary equations to circumvent this problem.
23
2.2
Numerical Methods The previous section defined the governing partial differential equations for the
primary field and then derived a corresponding set of governing partial differential equations for the adjoint field. This section presents discretization and solution techniques for both systems based on explicit Runge-Kutta methods using central differencing and scalar artificial dissipation. 2.2.1
Primary Equations The governing equations of the fluid are integrated over a control volume as ∂ ∂t
Z
Z q dV = −Γ V
A
Z f j nj dA −
h dV V
and then advanced in time using an explicit hybrid multistage scheme, which can be written as m
q
(m)
=q
(0)
i ∆t X h (r−1) (r−1) βmr G q − γmr D q , − αm V
(2.20)
r=1
where V is the cell volume. Here G(q) represents the discretized residual vector X G(q) = Γ fˆ j nj dA − V h , f
D(q) includes additional second- and fourth-order dissipation, q
(0)
represents the solu-
tion at the previous time step, and αm , βmr , and γmr are the coefficients that define the hybrid multistage scheme. For example, Esfahanian uses a hybrid four-stage (4–1) scheme, where αm = { 41 , 13 , 21 , 1}, βmr is the identity matrix, and γmr is such that the dissipation is evaluated at only the first stage and then frozen. The numerical flux through each face is evaluated using simple averages of the values in the cells on either side of the face [48]. For the barotropic model, the flux is
24 calculated as ρ¯ v¯j nj dA , fˆ j nj dA = (ρvi ) v¯j nj dA + p¯ni dA
where the overbars denote the averaged quantities. The artificial dissipation operator is constructed as the divergence of dissipation fluxes evaluated at the faces [49, p. 13]. For example, considering only faces in the i-direction, D (q) = d (q) i
i+1/2
− d (q)
i−1/2
where the dissipation flux includes separate second- and fourth-order dissipation terms such that d (q)
= i+1/2
V ∆t
i+1/2
"
(2) εi+1/2 δ2 q i+1/2
−
#
(4) εi+1/2 δ4 q i+1/2
.
(2.21)
Here δ2 and δ4 are the undivided second- and fourth-difference operators: δ2 q|i+1/2 = q i+1 − q i and δ4 q|i+1/2 = q i+2 − 3q i+1 + 3q i − q i−1 . Ordinarily, the second-order term is applied only in regions of strong pressure gradients, but here, an additional switch dependent upon strong density gradients is included for the cavitating cases. Thus, (2) εi+1/2 = k2 max νi+2 , νi+1 , νi , νi−1 + k3 max γi+2 , γi+1 , γi , γi−1 ,
(2.22)
25 where pi+1 − 2pi + pi−1 νi = pi+1 + 2pi + pi−1 and ρi+1 − 2ρi + ρi−1 γi = ρi+1 + 2ρi + ρi−1 [45]. The fourth-order term is applied in all regions of the flow, except that it is turned off in regions where the second-order term is applied, which is accomplished by specifying i h (4) (2) εi+1/2 = max 0, k4 − εi+1/2 . The leading term in Eq. (2.21) is a scaling factor for the dissipation. In this case, the factor is an isotropic scalar based on the spectral radius of the inviscid flux Jacobian matrix [49, p. 13], which is derived next. Eigensystem Analysis The eigensystem analysis is performed by first rewriting Eq. (2.1) as ∂q ˆ ∂q = Γh, +A k ∂t ∂ξk ˆ = 1 ΓA , A = ∂E /∂q and where A k k k k J Ek = J
∂ξk f . ∂xj j
One-dimensional wave propagation for any given coordinate direction (i.e., no summation over k) can be examined by decomposing the flux Jacobian matrix and multiplying the ˆ = M Λ M −1 , then equation through by the matrix of left eigenvectors. Thus if A k k k k −1
multiplication by M k leads to the characteristic equation ∂ˆ q ∂ˆ q −1 + Λk = M k Γh, ∂t ∂ξk
(2.23)
26 −1
where ∂ˆ q = M k ∂q. ˆ are λ = θ and For the preconditioned barotropic model, the eigenvalues of A k 1 k r
2 2 2 2 2 2 2 2 H θk − β /c θk + β kx + ky
λ2,3 = Hθk ±
where H =
1 2
2
2
2 − σ + β /c
,c=
p dp/dρ, and θk = ukx + vky .
Characteristic Variable Boundary Conditions The characteristic equation presented in Eq. (2.23), along with the eigensystem analysis presented in the previous section, is used to define characteristic variable con1
ditions at the far-field boundary. The boundary condition consists of assigning values to characteristic variables corresponding to incoming waves while extrapolating characteristic variables corresponding to outgoing waves. It can be written as h i − −1 − −1 q = M k L M k q ∞ + (I − L )M k q int , −
where L is a diagonal selection matrix with ones corresponding to the eigenvalues that are in-bound and zeroes elsewhere, q int is the primary variable vector just internal to the boundary, and q ∞ is a vector of far-field values of the primary variables. The derivation of the eigenvectors for the barotropic model is simplified by assuming that dρ/dp = 0, since the only concern is to find the eigenvectors in the far field. With that assumption, the right (column) eigenvectors are
0
2 Mk = −2β ky 2 2β kx 1
2
2
−ρβ C
ρβ C (1−σ)u(Hθ+C)+kx β [1+(H−1)θ/C]
2
(1−σ)v(Hθ+C)+ky β [1+(H−1)θ/C]
2
2 (1−σ)u(Hθ−C)+kx β [1+(1−H)θ/C] 2 (1−σ)v(Hθ−C)+ky β [1+(1−H)θ/C]
Note that the assumption of single-phase flow at the far-field boundary means that h = 0 at the far-field boundary in Eq. (2.23) for both the barotropic model (where it is always zero) and the transport-equation-based model (because m ˙ = 0).
27 q 2 2 2 2 2 where C = H θ + β (kx + ky ), and the left (row) eigenvectors can be written as
−1
Mk
(1−σ) ρ
uky − vkx 1 [C+(H−1)θ][β 2 (kx2 +ky2 )+(1−σ)θ(Hθ−C)] = 2 ρC D1 [C+(1−H)θ] β 2 k2 +k2 +(1−σ)θ(Hθ+C) [ ( x y) ] − 2
h
− (1 − σ)vθ + ky β
ρC
2
i h
(1 − σ)uθ + kx β
kx β D2
2
ky β D2
2
ky β D2
kx β D2
2
2
where D1 = 2β
2
h i 2 2 2 2 β kx + ky + (1 − σ)θ
and 2 2 2 2 (1 − σ)θ + β kx + ky . D2 = 2 2 2 2 2 H θ + β kx + ky Local Time Step A two-dimensional von Neumann stability analysis of the multistage explicit scheme for a constant coefficient, homogeneous, hyperbolic scalar equation shows that the maximum time step for stability is inversely proportional to the sum of the spectral radii associated with each computational coordinate; i.e., CFL J , ∆t = λmax,ξ + λmax,η ˆ . where J is the Jacobian or cell volume, which arises due to the definition of A k For the barotropic model, which is homogeneous, r 2 2 2 2 2 2 2 λmax,k = |Hθk | + H θk + β kx + ky − θ /c .
2
i
28 2.2.2
Adjoint Equations Transforming the adjoint field equations, Eq. (2.15), to curvilinear coordinates
gives ∂Ψ − (ΓAk ) − ∂ξk T
∂Γ ∂h Ak + JΓ ∂ξk ∂q
T
Ψ+J
∂JΩ ∂q
T = 0,
(2.24)
where Ak = aj J∂ξk /∂xj and J is the cell volume or Jacobian. As with the primary equations, the steady-state form for the adjoint field equations is made amenable to solution by time-marching through the addition of a pseudotime derivative; i.e., ∂Ψ T ∂Ψ J − (ΓAk ) − ∂t ∂ξk
∂Γ ∂h Ak + JΓ ∂ξk ∂q
T
Ψ+J
∂JΩ ∂q
T = 0.
(2.25)
Integration of Eq. (2.25) over a computational cell gives Z D
0
T Z Z ∂Ψ ∂Γ T ∂Ψ JdDξ − (ΓAk ) dDξ − Ak ΨdDξ 0 0 ∂t ∂ξk ∂ξk D D Z Z ∂J T ∂h T Ω − Γ Ψ JdDξ + JdDξ = 0. 0 0 ∂q ∂q D D
Substituting dV = JdDξ and assuming that the dependent variables are constant over the cell, ∂ ∂t
Z V
T Z ∂Γ ∂Ψ dDξ − A ΨdDξ ΨdV − (ΓAk ) 0 0 ∂ξk k D D ∂ξk Z ∂JΩ T ∂h T ΨdV + V = 0. − Γ ∂q ∂q V T
Z
Following Asouti, the spatial variation of the preconditioning matrix, Γ, is neglected [50], which is identically true anyway in the present work since the preconditioning matrix is taken as a constant for the barotropic model. Then applying the divergence theorem and assuming that Ψ on a cell face is given by the average of the values in the adjacent
29 cells gives ∂ ∂t
Z V
∂h ΨdV − (ΓAk ) ∆k Ψ − V Γ ∂q T
T
Ψ+V
∂JΩ ∂q
T = 0,
where ∆k Ψ represents the 3-point central difference of Ψ with respect to ξk . In direct analogy with the primary flow equations presented above, the adjoint equations can then be written as ∂ ∂t
Z ΨdV + G(Ψ) = 0, V
where now ∂JΩ T ∂h T Ψ+V . G(Ψ) = − (ΓAk ) ∆k Ψ − V Γ ∂q ∂q T
(2.26)
Adjoint Artificial Dissipation As with the primary flow equations, artificial dissipation is needed. The same subroutine is used here for both the primary and adjoint artificial dissipation, with the only difference being that the second- and fourth-order operators apply to the primary and adjoint fields, respectively. Note that the pressure and density switches used to control the amount of second- and fourth-order dissipation are based on the primary pressure and density variables in both cases. Adjoint Solution Update The final adjoint equations can then be advanced in time using the same explicit hybrid multistage method previously applied to the primary flow equations, such that m
Ψ
(m)
=Ψ
(0)
− αm
i ∆t X h (r−1) (r−1) βmr G q − γmr D q . V
(2.27)
r=1
Jameson writes that the sign of the dissipation term should be reversed to give a downwind bias and that the direction of time integration is reversed [19]; however, both of
30 these sign changes are accommodated here through the leading negative sign in Eq. (2.26) such that Eq. (2.27) for the update of the adjoint solution has the same form as Eq. (2.20) for the update of the primary solution.
2.3
Design Methods In this section, details associated with the problem definition and particularly the
gradient calculation are briefly summarized, including the geometric parameterization and design variables, the definition of the cost functions that are explored, and implementation details of the gradient calculation itself. A brief description of the steepest descent method is also given. 2.3.1
Geometry, Parameterization and Design Variables The NACA66(MOD) foil serves as the geometry for the two-dimensional examples
considered in this chapter. Corresponding experimental work was reported by Shen, in which the geometry was described as a laminar foil section with a camber ratio of f /c = 0.020, a NACA meanline of a = 0.8, and a thickness ratio of T = 0.09 [51]. The section geometry was described as the NACA66(MOD)+a=0.8 foil by Brockett [52, Table 3]. For the results that follow, the foil surface is parameterized using a B-spline curve, similar to what was previously presented by Anderson [53]. The control points of the B-spline curve are then used as the design variables in the optimization problem. Using spline functions to define the geometry and then selecting the control point coordinates as design variables is convenient for two reasons — the number of control points can be much smaller than the number of grid points, and the variation of the geometry resulting from changes to the control points is smoother than it is when varying individual grid points. Neither of these characteristics is specifically required by the adjoint method, but each facilitates comparison of the adjoint results with the cost function gradients calculated by standard and complex-step finite difference methods.
31 The B-spline is a parametric curve composed of a linear combination of basis n
functions bi of degree n where
x(t) =
m−n−2 X
n
t ∈ [tn , tm−n−1 ]
P i bi (t),
(2.28)
i=0
given a knot vector of m real-valued knots ti with t0 ≤ t1 ≤ · · · ≤ tm−1 . There are m − n − 1 control points P i (i = 1, m − n − 1), and the basis functions can be defined using the Cox-de Boor recursion formula n bi (t)
=
t − ti ti+n − ti
n−1 bi (t)
+
ti+n+1 − t ti+n+1 − ti+1
n−1
bi+1 (t)
(2.29)
with
0
bi (t) =
1
if ti ≤ t < ti+1 ,
0
otherwise.
(2.30)
Writing Eq. (2.28) for each known input coordinate x in terms of the unknown control point locations then gives a linear system of equations. The system generally has more equations (one per input coordinate) than unknowns (one per control point) and so can be solved only in a least-squares sense. To fully define the system also requires that each input coordinate must be associated with a value of the B-spline parameter t. Several strategies exist for this, including uniform, chord-length, or centripetal distributions. Anderson assumed a uniform distribution (the parameter values are uniformly spaced from t0 to tm−1 ), and that strategy was found to work best here as well. The definition of the basis functions in Eq. (2.29) and Eq. (2.30) also depends on the definition of the knot vector. For the application here, the first knot value (0) and last knot value (1) were each repeated n + 1 times at the beginning and end of the knot vector, which forces the first and last control points
32 to coincide exactly with the first and last input coordinates. Similarly, other control points can be forced to coincide with other input coordinates by having a knot with a multiplicity of n in the middle of the knot vector. Any remaining knots can be uniformly distributed across the subsequent intervals. As in Anderson, QR factorization is used here to solve the resulting least-squares equations [54, p. 158]. Note that any control point locations that are specified must be formally removed from the linear system before the least-squares solution so that those constraints are met exactly and not just in a least-squares sense. In the current case, 101 input coordinates were provided on each of the surfaces of the NACA66(MOD) foil, clustered toward the leading and trailing edges. It was found that the best fit was achieved when the pressure and suction sides were fit simultaneously, specifying a middle control point to coincide with the leading edge of the foil, rather than trying to fit each of the surfaces individually. The first and last control points were also specified to coincide with the first and last grid points, which in this case coincided with the location of the sharp trailing edge point. A third-degree (cubic) B-spline was specified, and through trial-and-error, it was found that using 10 control points on each of the surfaces (19 total since the leading edge control point is shared) was necessary and adequate to fit the input coordinates. The input coordinates, B-spline control points, and resulting B-spline are shown in Figure 2.1 for the NACA66(MOD) foil (with distorted axes to show the overall agreement for the entire surface) and in Figure 2.2, which focuses on the comparison at the leading edge. The control point coordinates are provided in Table 2.1. The least-squares fit is simply meant to provide initial coordinates for the control points (i.e., initial values of the design variables) that are as representative as possible to the NACA66(MOD) foil. More advanced optimization methods than the one described above can be used to generate a B-spline with a minimal number of control points for a specified tolerance. Such a method is provided by Yang [55] but was not pursued here. In terms of the allowable design space, the x-coordinates of all control points are held constant as are the y-coordinates of the control points at the leading and trailing
33
Fig. 2.1. Least-squares fit of B-Spline for NACA66(MOD) foil
Fig. 2.2. Least-squares fit of B-Spline for NACA66(MOD) leading edge
34
Table 2.1. B-spline control point coordinates for the NACA66(MOD) foil i
x
y
0
1.0196254659999999
-1.24906630399999993E-003
1
0.97320600110227740
-6.51398770289108968E-003
2
0.85141875261254119
-1.11093113367048742E-002
3
0.58694167938015640
-2.46694897602148383E-002
4
0.32602414970874088
-2.62461623702990345E-002
5
0.15072875134015004
-2.05418643672352422E-002
6
5.79018553667689437E-002
-1.44447071152881967E-002
7
1.49600168830775985E-002
-8.71582991156757275E-003
8
2.02480022908887091E-003
-4.61174226634780519E-003
9
5.11705507609361332E-015
-2.96892200331554887E-014
10
3.22378942180114481E-004
5.13093656477200521E-003
11
1.17881087833852337E-002
1.28479190226418304E-002
12
5.32633364582341742E-002
2.64971041677601292E-002
13
0.14568232206414766
4.49274022957118421E-002
14
0.32294704479634195
6.38431691878558055E-002
15
0.58848863316067723
6.76329718593295520E-002
16
0.85528143937343637
3.85736689142064104E-002
17
0.97388109045547211
7.67833173568241694E-003
18
1.0196254659999999
-1.24906630399999993E-003
35 edges (which causes the chord length to remain constant). The y-coordinates of the 16 remaining control points serve as the design variables as depicted in Figure 2.3.
Fig. 2.3. Design variable numbering for the NACA66(MOD) foil
2.3.2
Cost Functions The adjoint method developed in this chapter for the barotropic model is evalu-
ated below using five cost functions written in multi-objective form as Z
Z
S
S
1 1 2 2 (ρ − ρtar ) dS + w5 (F − Ftar ) , 2 2
J = w1 Z + w4
Z
1 2 (p − ptar ) dS + w2 2
S
(ρ` − ρ) dS + w3
Ω
(ρ` − ρ) dΩ (2.31)
where ptar is a target distribution for pressure, ρtar is a target distribution for density, Ftar is a target value for the force acting on the foil, and w is a vector of weighting coefficients. In Eq. (2.31), the w1 coefficient is associated with a traditional “inverse design” cost function, which is simply the L2 norm of the difference between the actual and
36 specified pressure distributions, while the w4 coefficient is associated with an inverse design cost function but based on surface density rather than surface pressure. The w2 and w3 coefficients are associated with cost functions designed to minimize the presence of vapor at the surface or throughout the volume, respectively. The form of the arguments in Eq. (2.31) relies on the fact that ρ ≤ ρ` , which is true in theory although not precisely in practice. If instead the argument is taken to be |ρ` − ρ|, then the cost function corresponds to an L1 (or Manhattan or taxicab) norm. The w5 coefficient is associated with a penalty function to constrain the force in a particular direction, as described for Eq. (2.6). From Eq. (2.6) and Eq. (2.31), 1 1 2 2 JS = w1 (p − ptar ) + w2 (ρ` − ρ) + w4 (ρ − ρtar ) 2 2 and JΩ = w3 (ρ` − ρ) . Substitution into Eq. (2.19) then gives the adjoint velocity at the wall as
uj nj = w1 (ptar − p) + w2
dρ + w4 (ρtar − ρ) + w5 (Ftar − F ) `j nj dp
(2.32)
while the source term in the first adjoint equation is given by ∂JΩ dρ = −w3 . ∂p dp With one exception, the adjoint method is applied separately to each of the five cost functions in the examples below; i.e., only one component of w is non-zero at any given time. The multi-objective form of the cost function is used primarily for convenience in the derivation, presentation, and implementation of the method.
37 2.3.3
Gradient Calculation Rewriting the second integral in Eq. (2.18) by invoking the fact that vj nj = 0 at
the wall and having specified the adjoint boundary conditions to eliminate the fourth integral leaves δL = δbm
Z
δ (dS) − JS δbm Sw
Z Sw
Z + Sw
w5 (F − Ftar ) p`j
ρvj (ψ1 + ui vi )
δnj δbm
dS
δ nj dS δbm
∂f j δxk T − ψ nj − JΩ nk dS. ∂xk δbm Sw Z
(2.33)
Accuracy of the fourth integral in Eq. (2.33) can be improved by recasting the gradient of the flux vector in terms of only tangential derivatives along the wall [27]. This is accomplished by first decomposing the gradient into components normal and tangential to the wall, so ∂ ∂xk
= nk ni
∂ ∂xi
` `
+ tk ti
∂ ∂xi
.
The barotropic model satisfies ∂f j ∂xj
= 0,
so
nj
∂f j ∂xk
= nj
∂f j ∂xk
− nk
∂f j ∂xj
` ` ∂f j ` ` ∂f j = nj nk ni + tk ti − nk nj ni + tj ti ∂xi ∂xi ∂f j ` ` ` = nj tk − nk tj ti . ∂xi
38 The final form of the cost function gradient is then written as δL = δbm
Z
δ JS (dS) − δbm Sw
Z Sw
Z + Sw
Z −
ρvj (ψ1 + ui vi )
w5 (F − Ftar ) p`j
δ nj dS δbm
ψ
T
Sw
` nj tk
−
` nk tj
` ∂f j ti ∂xi
δnj δbm
− JΩ nk
dS
δxk dS, δbm
(2.34)
which involves only the primary and adjoint solutions and geometric variation terms. 2.3.4
Minimization Method The optimization method in this chapter uses only the simple steepest descent
method. In that case, changes to the control variables follow the cost function gradient in the direction that tends to decrease the cost function; i.e., δb = −λg,
T
where δb is the change to the vector of design variables, g = (∂J/∂b) represents the cost function gradient, and λ is a positive scalar that controls the step size. Assuming λ is sufficiently small, then δJ =
∂J ∂b
T
δb = −λg g < 0,
indicating that for a sufficiently small step size, every design cycle decreases the cost function and improves the design.
2.4
Results In this section, solutions are obtained for both primary and adjoint systems in
both single- and multiphase flows using the barotropic model and the numerical methods described in the previous sections. Grid dependence is examined in all cases.
39 The test cases are centered around cavitation of a two-dimensional NACA66(MOD) hydrofoil, a traditional benchmark case for cavitation that was studied experimentally by Shen and Dimotakis [51]. Esfahanian recently predicted the cavitating flow over the NACA66(MOD) hydrofoil using an inviscid barotropic model [45]. The primary and adjoint solution fields are used as a basis to calculate the cost function gradients for various cost functions, and those gradients are validated by comparison with standard and complex-step finite difference methods. The finite difference methods are reviewed first before proceeding with the actual comparisons. The steepest descent method is applied in a subset of cases to highlight some properties of the minimization problem in multiphase flow. 2.4.1
Finite Difference Methods for Validation Both standard and complex-step finite difference methods are used here to calcu-
late each cost function gradient as a means of validating the continuous adjoint method. Both methods suffer primarily from the cost, which requires one (or more) primary solutions for each component of the cost function gradient (i.e., for each design variable). For the standard one-sided finite difference method, each component of the cost function gradient is calculated as ˆm ) − J(b) J(b + δb e δJ = + O (δb) , δbm δb ˆm is the m-th column of the identity matrix that has the same size as b, such that where e ˆm serves to add the step size δb to only the m-th component of b. For each case, b + δb e several values of the step size were tested to find one small enough to give an accurate estimate of the gradient but large enough to avoid corrupting the result with cancellation error. Ultimately, one forward step and one backward step are presented for each case. For the complex-step finite difference method, each component of the cost function gradient is calculated as ˆm )] Im [J(b + i δb e δJ 2 = + O δb δbm δb
40 while the value of the cost function itself is returned simultaneously as ˆm )] + O δb2 . J = Re [J(b + i δb e Using a finite difference based on complex variables to obtain the sensitivity gradient has the advantage that it eliminates any concerns about cancellation error, allowing an −10
arbitrarily small step size. (The step size is δb = 10 presented in this chapter and δb = 10
−20
for the two-dimensional examples
for the quasi-one-dimensional examples pre-
sented in Chapter 3.) The complex variable sensitivity is therefore extremely accurate, although at the cost of increased memory (about a factor of 2) and increased run time (about a factor of 2.5) due to the use of complex variables. To implement the method, the source code was modified to use complex rather than real variables, and some intrinsic functions (such as max and log10) were modified to operate on only the real part of their arguments [56]. 2.4.2
Computational Mesh For the two-dimensional hydrofoil calculations, a baseline structured O-type mesh
was created with 192 cells around the foil (96 each on the pressure and suction side). The grid was generated by hyperbolic extrusion in Gridgen version 15.17 using an initial spacing of 0.001 times chord, a stretching ratio of 1.282, and 32 steps (cells) to a “distance” of 10 chord lengths. This mesh is referred to as the coarse grid in the results presented below. Later, medium and fine versions of the same grid were generated in order to gauge grid sensitivity of the primary and adjoint solutions. Relative to the baseline grid, the medium grid doubles the mesh resolution in each direction, just as the fine grid does relative to the medium grid. The near wall spacing, stretching ratio, and mesh size are summarized for all three grids in Table 2.2. 2.4.3
Primary Equations The primary flow equations are solved for the case of the NACA66(MOD) foil at
◦
4 angle-of-attack. Slip boundary conditions for the velocity and a zero gradient condition
41 Table 2.2. Mesh parameters for the NACA66(MOD) foil mesh
wall spacing (∆y/c)
stretching ratio
mesh size (cells)
baseline/coarse
0.001
1.282
192 × 32
medium
0.0005
1.127
384 × 64
fine
0.00025
1.061
768 × 128
for the pressure are enforced at the hydrofoil surface, while the inlet velocity and outlet pressure are assigned in the far field. The hybrid 4–1 multistage method is used to advance the solution using the standard artificial compressibility method with a constant value of β/V∞ = 1 and local time stepping with CFL = 2. An isotropic dissipation scaling is used, calculated in each cell as V/∆t, where V is the cell volume and ∆t is the local time step. 2.4.3.1
Single-Phase Numerical Solution
The single-phase solution is given by the barotropic model equations but with a cavitation index of s = 10.0. A smoothly varying flow field is obtained, requiring only fourth-order artificial dissipation. Thus, the artificial dissipation coefficients in the present case are defined as k2 = 0, k3 = 0, and k4 = 1/256. In all cases, the primary equations are converged until the residual (measured by the L2 -norm of the change in the pressure field between time steps) has decreased by 10 orders of magnitude, as shown for the coarse, medium, and fine grids in Figure 2.4. Pressure contours from the fine grid solution are shown in Figure 2.5 in the vicinity of the foil leading edge, reflecting a deep suction peak at the suction side leading edge ◦
resulting from the 4 angle-of-attack. The pressure distributions on the hydrofoil surface are compared with the experimental measurements of Shen in Figure 2.6. For the singlephase primary flow, good agreement is obtained with the measured data for all three grids, and the uncertainty in the solutions due to grid resolution is shown to be negligible.
42
Fig. 2.4. Convergence histories for single-phase primary equations
Fig. 2.5. Pressure contours for single-phase primary equations
43
Fig. 2.6. Pressure distributions for single-phase primary equations
2.4.3.2
Multiphase Numerical Solutions
The multiphase solution is given by the barotropic model equations with a cavitation index of s = 0.91, Cmin = 4 m/s, V∞ = 12.192 m/s, and ρv /ρ∞ = 0.001. Due to the phase change in the flow field, both second- and fourth-order artificial dissipation are now required. Thus, the artificial dissipation coefficients in the present case are defined as k2 = 3/16, k3 = 3/8, and k4 = 1/256. In all cases, the primary equations are converged until the residual (measured by the L2 -norm of the change in the pressure field between time steps) has decreased by 10 orders of magnitude, as shown for the coarse, medium, and fine grids in Figure 2.7. Pressure contours from the fine grid solution are shown in Figure 2.8 in the vicinity of the hydrofoil leading edge. Due to leading-edge cavitation, the pressure adjacent to the suction side leading edge is now relatively constant and approximately equal to the vapor pressure of the fluid. Density contours from the fine grid solution in the same region are shown in Figure 2.9. The contours reflect the shape of the attached vapor cavity, and the fact that it takes the same shape as the pressure contours in Figure 2.8 is a direct result of the barotropic state equation for the present cavitation model. The pressure
44
Fig. 2.7. Convergence histories for multiphase primary equations
Fig. 2.8. Pressure contours for multiphase primary equations
45
Fig. 2.9. Density contours for multiphase primary equations
distributions on the hydrofoil surface are compared with the experimental measurements of Shen in Figure 2.10. For the cavitating flow, good agreement is obtained with the measured data for all three grids, although the uncertainty in the solutions due to grid resolution is now evident in the cavity closure region. 2.4.4
Adjoint Equations The adjoint field equations given by Eq. (2.15) are solved using the same numerical
method as for the primary flow — a hybrid 4–1 multistage method preconditioned using the standard artificial compressibility method with a constant value of β/V∞ = 1 and local time stepping with CFL = 2. The same isotropic dissipation scaling is employed, although only fourth-order artificial dissipation is needed for both the single-phase and multiphase adjoint solutions. Thus, for all of the adjoint solutions in this section, the artificial dissipation coefficients are defined as k2 = 0, k3 = 0, and k4 = 1/80. The boundary conditions for the adjoint field are given by Equation (2.19) for the adjoint velocity (ψ2 , ψ3 ) while a zero gradient condition is enforced for the preconditioned adjoint
46
Fig. 2.10. Pressure distributions for multiphase primary equations
pressure (Ψ1 ). Different cost functions are employed in each example as will be detailed below. 2.4.4.1
Single-Phase Numerical Solutions and Gradient
The capability of the code to calculate a sensitivity gradient using the adjoint method is first verified for single-phase flow, again using the NACA66(MOD) foil at ◦
4 angle-of-attack as the baseline flow field. The cost function for the single-phase case is taken to be the inverse design cost function using a target pressure distribution. The ◦
surface pressure distribution for a NACA0012 foil, also at 4 angle-of-attack and shown in Figure 2.11, is provided as the target pressure distribution. The adjoint equations are converged until the residual has decreased by 10 orders of magnitude (measured by the L2 -norm of the change in the first adjoint variable field between time steps); however, it is found that the gradient values are essentially determined once the adjoint residual has decreased by only two orders of magnitude. In the convergence histories shown in Figure 2.12, it can be seen that the convergence rate on
47
Fig. 2.11. Baseline and target pressure distributions for single-phase inverse design
the fine grid lags significantly behind that of the other two grids and requires approximately 700,000 iterations to reach the same specified tolerance. On all three grids, the residual is dominated by the cells adjacent to the sharp trailing edge. The single-phase cost function gradient on the coarse mesh is compared with the gradient calculated using standard (forward and backward) and complex-step finite differences in Figure 2.13. The standard finite difference results were generated by perturbing each design variable in the y-direction by 0.001, while the complex-step finite difference results were generated by perturbing the imaginary component of each design variable by 10
−10
. Excellent agreement is obtained between the adjoint and finite-
difference gradient calculations except near the leading edge and (sharp) trailing edge of the foil. Mesh sensitivity accounts for the discrepancy in these regions, as can be seen in Figure 2.14, especially for the trailing edge variables (1 and 17). 2.4.4.2
Multiphase Numerical Solutions and Gradient
The remaining test cases examine cost functions corresponding to the multiphase primary flow solution for the NACA66(MOD) hydrofoil with cavitation index s = 0.91
48
Fig. 2.12. Convergence histories for single-phase adjoint equations
Fig. 2.13. Comparison of single-phase cost function gradient with finite differences
49
Fig. 2.14. Grid sensitivity for the single-phase cost function gradient
that was described above in Section 2.4.3.2. Gradients are presented for three cost functions — one that specifies the lift and two based on cavitation minimization. Specification of Lift in Cavitating Flow A constraint on the hydrofoil lift can be enforced through the cost function by writing it in terms of a penalty function. In the present context, specification of lift (or more generally, force) thus takes the form of Eq. (2.31) by specifying w = (0, 0, 0, 0, 1). The force specification penalty function adds a contribution to the adjoint boundary condition expressed in Eq. (2.32) and a contribution to the gradient calculation expressed in Eq. (2.34). The multiphase adjoint equations are converged until the residual has decreased 10 orders of magnitude (measured by the L2 -norm of the change in the first adjoint variable field between time steps). For the coarse grid, the convergence rate is similar to that of the multiphase primary solution, as shown in Figure 2.15. On the medium grid, the convergence rate is slower than the rate for the primary solution by about a factor of two. On the fine grid, the rate is slower by about a factor of four (reaching 10 orders in 410,500 iterations).
50
Fig. 2.15. Convergence histories for multiphase adjoint equations for lift specification
The cost function gradient for the lift specification penalty function on the coarse grid is compared with the gradients calculated using standard (forward and backward) and complex-step finite differences in Figure 2.16. The standard finite difference results were generated by perturbing each design variable in the y-direction by 0.0001, while the complex-step finite differences were again generated by perturbing the imaginary com−10
ponent of the design variables by 10
. Good agreement is obtained with the exception
of the first control point downstream of the leading edge on the suction side and for the control point associated with the cavity closure region. For most of the design variables, mesh refinement significantly improves the agreement between the adjoint and finite difference measures, as shown in Figure 2.17. On the other hand, mesh refinement alone does not appear to resolve the discrepancies in the gradient for the design variable associated most closely with the cavity closure region (variable 14). Cavitation Minimization Gradients are presented for two cost functions based on cavitation minimization — a surface-based cost function JS = w2 (ρ` − ρ) with w2 = 0.1, and a volume-based cost function JΩ = w3 (ρ` − ρ) with w3 = 1.0. The primary field in
51
Fig. 2.16. differences
Comparison of the lift specification penalty function gradient with finite
Fig. 2.17. Grid sensitivity for the lift specification penalty function gradient
52 both cases is given by the simulation of the NACA66(MOD) hydrofoil with cavitation index s = 0.91 that was described above in Section 2.4.3.2. The multiphase adjoint equations are again converged until the residual has decreased by 10 orders of magnitude (measured by the L2 -norm of the change in the first adjoint variable field between time steps), although it is again the case that the gradient values are effectively converged within two orders. For the coarse grid, the convergence rates of the adjoint solutions are similar to that of the multiphase primary solution, which is shown in Figure 2.18 and Figure 2.19. On the medium grid, the convergence rates for the adjoint solutions are slower than for the primary solution by about a factor of two; on the fine grid, they are slower by about a factor of four (reaching 10 orders in 390,000 and 455,000 iterations respectively).
Fig. 2.18. Convergence histories for multiphase adjoint equations for surface vapor minimization
The multiphase cost function gradients for the surface- and volume-based cost functions on the coarse mesh are compared with the gradients calculated using standard (forward and backward) and complex-step finite differences in Figure 2.20 and Figure 2.21.
The standard finite difference results were generated by perturbing each
53
Fig. 2.19. Convergence histories for multiphase adjoint equations for volume vapor minimization
Fig. 2.20. Comparison of surface-based multiphase cost function gradient with finite differences
54
Fig. 2.21. Comparison of volume-based multiphase cost function gradient with finite differences
design variable in the y-direction by 0.001, while the complex-step finite differences were −10
again generated by perturbing the imaginary component of the design variables by 10
.
Excellent agreement is again obtained for the majority of the design variables, particularly on the pressure side and the downstream portion of the suction side. Compared with the volume-based cost function results that follow, the surfacebased cost function gradient suffers greater mesh sensitivity, especially in the cavity region (variables 10-15), as shown in Figure 2.22. As with the force specification gradient, refinement significantly improves the agreement between the adjoint and finite difference measures for most variables but again does not appear to resolve the discrepancies in the gradient for the design variable most closely associated with the cavity closure region (variable 14) nor in this case for those associated with the leading and trailing edges (particularly variables 1, 10, and 17). By comparison, the mesh sensitivity for the volume-based cost function is smaller and better able to account for the discrepancies with the complex-step finite difference measures, which can be seen in Figure 2.23. The notable exception is again variable 14, which is the variable most closely associated with the cavity closure region.
55
Fig. 2.22. Grid sensitivity for the surface-based multiphase cost function gradient
Fig. 2.23. Grid sensitivity for the volume-based multiphase cost function gradient
56 2.4.5
Minimization The previous section established that the adjoint method developed for the barotropic
model is able to calculate accurate cost function gradients in both single- and multiphase flow. This section uses that formulation to inform a steepest descent method for several examples, including single-phase inverse design based on pressure, multiphase inverse design based on pressure, multiphase inverse design based on density, and minimization of volume vapor with and without specification of the lift acting on the hydrofoil. 2.4.5.1
Single-Phase Inverse Design Based on Pressure
The first shape optimization test is for single-phase inverse design based on pressure, corresponding to w = (1, 0, 0, 0, 0) in Eq. (2.31). The initial geometry corresponds to the NACA66(MOD) foil, and a target pressure distribution is provided for ◦
a NACA0012 hydrofoil at 4 angle-of-attack. As described in Section 2.3.1, 19 B-spline control points are used to parameterize the geometry. The coordinates of the leading and two trailing edge points are held fixed, and the y-coordinates of the 16 remaining control points represent the design variables. The steepest descent algorithm is run for 200 design cycles with λ = 0.02, and the cost function reduces monotonically by nearly three orders of magnitude as shown in Figure 2.24. The pressure distribution is shown to evolve from the NACA66(MOD) distribution toward the target NACA0012 distribution in Figure 2.25 and the control points evolve likewise as shown in Figure 2.26. 2.4.5.2
Multiphase Inverse Design Based on Pressure
Inverse design based on a specified pressure distribution was repeated using the NACA0012 foil as the initial geometry and a target pressure distribution based on the ◦
multiphase flow about the NACA66(MOD) foil at 4 angle-of-attack and with a cavitation index of s = 0.91.
57
Fig. 2.24. Evolution of the single-phase inverse design cost function and gradient for the method of steepest descent
Fig. 2.25. Evolution of the pressure distribution for single-phase inverse design with the method of steepest descent
58
Fig. 2.26. Evolution of the control points for single-phase inverse design with the method of steepest descent
To ensure convergence in this case, the gradient is smoothed using ∂ ¯− g ∂ξ
∂¯ g ε =g ∂ξ
with ε = 3.2. In addition, the two design variables adjacent to the trailing edge point are held fixed. The steepest descent algorithm is run for 200 design cycles with λ = 0.02, and the cost function reduces monotonically by nearly three orders of magnitude as shown in Figure 2.27. The pressure distribution and control points are shown to evolve from those corresponding to the NACA0012 foil toward the target NACA66(MOD) foil distributions in Figure 2.28 and Figure 2.29, respectively. 2.4.5.3
Multiphase Inverse Design Based on Density
Inverse design based on a specified density distribution, corresponding to w = (0, 0, 0, 1, 0) in Eq. (2.31), is tested using the NACA0012 foil as the initial geometry and
59
Fig. 2.27. Evolution of the cost function and gradient for multiphase inverse design based on pressure
Fig. 2.28. Evolution of the pressure distribution for multiphase inverse design based on pressure
60
Fig. 2.29. Evolution of the control points for multiphase inverse design based on pressure
the multiphase density distribution for the NACA66(MOD) foil as the target distribution. The two design variables adjacent to the trailing edge are again held constant, and the two design variables adjacent to the leading edge are held constant as well such that 12 design variables remain. The method of steepest descent is applied over 200 design cycles with λ = 0.01, again using gradient smoothing with ε = 3.2. The cost function reduces monotonically by about two orders of magnitude over the first 100 design cycles and then levels out, as shown in Figure 2.30. The gradient continues to decrease and reaches three orders of magnitude by the end of 200 design cycles, suggesting that the method has indeed settled to a minimum even if the design goal cannot be met exactly. The suction side density distribution is shown to evolve from that corresponding to the NACA0012 foil toward that corresponding to the NACA66(MOD) foil in Figure 2.31. (The flow on the pressure side is single-phase in all cases.) Both the pressure distribution and control points also evolve from those corresponding to the NACA0012 foil toward those corresponding to the NACA66(MOD) foil but only for the suction side leading
61
Fig. 2.30. Evolution of the cost function and gradient for multiphase inverse design based on density
edge region where the flow is multiphase. The rest of the foil is specified to have singlephase flow, and the original geometry and pressure distributions are largely maintained in the single-phase region, as shown in Figure 2.32 for the pressure distribution and in Figure 2.33 for the definition of the control points. 2.4.5.4
Volume Vapor Minimization With and Without Specification of Lift
The final test case examines a multi-objective cost function that combines both volume vapor minimization and a specified force acting on the hydrofoil. The resulting cost function corresponds to w = (0, 0, w3 , 0, w5 ) in Eq. (2.31), where the unit vector ` for the definition of F is taken to be in the direction of lift. The coefficient definitions are adjusted in order to scale the different contributions to the cost function, so ∗
w3 , (ρ − ρ) dΩ o ` Ω
w3 ≡ R
62
Fig. 2.31. Evolution of the suction side density distribution for multiphase inverse design based on density
Fig. 2.32. Evolution of the pressure distribution for multiphase inverse design based on density
63
Fig. 2.33. Evolution of the control points for multiphase inverse design based on density
where the denominator is the measure of the volume vapor associated with the baseline geometry and flow field, and ∗
w5 ≡
w5 2
Ftar
,
such that the contribution measures the force deviation relative to the target force magnitude. Three variations of this case are presented to examine the effect of the weighting ∗
∗
coefficients w3 and w5 in the multi-objective cost function. ∗
∗
In the first case, w3 = 1 and w5 = 0, so the volume vapor is minimized without ∗
∗
concern for the resulting foil lift. In the second case, w3 = w5 = 1, which attempts to minimize the volume vapor while constraining the lift through a penalty function. In ∗
∗
the final case, w3 = 1 and w5 = 10, which results in a more stringent constraint on the lift force. Steepest descent with λ = 0.0001 and gradient smoothing with ε = 6.4 are used in all three cases to complete 60 design cycles. The cost function and gradient are reduced in all cases as shown in Figure 2.34 and Figure 2.35 — the vapor is effectively eliminated in all cases while the final change in lift is always less than 1%.
To accomplish the
64
Fig. 2.34. Evolution of the cost function for cavitation minimization with various weights for lift specification
Fig. 2.35. Evolution of the cost function gradient for cavitation minimization with various weights for lift specification
65 goal, the y-coordinates of the control points at the leading edge are allowed to vary, so only the control points adjacent to the trailing edge and the trailing edge itself are held fixed. The algorithm then accomplishes the goal by pointing the nose into the oncoming flow, as shown in Figure 2.36 and Figure 2.37.
The evolution of the two components
Fig. 2.36. Original and final geometry for cavitation minimization with various weights for lift specification
2
of the cost function are examined separately in Figure 2.38 and Figure 2.39. Note that the lift remains within 1% of the original (target) lift in all cases, whether or not it is ∗
constrained — the unconstrained case where w5 = 0 results in a 0.7% decrease in the ∗
lift, the case where w5 = 1 results in a 0.5% decrease in the lift, while the case where ∗
w5 = 10 maintains the lift within 0.02% of its original value.
2.5
Summary This chapter has presented the development and validation of a continuous ad-
joint method for a barotropic cavitation model, a method that produces cost function 2
∗
∗
In the figures, J3 and J5 are defined by J = w3 J3 + w5 J5 .
66
Fig. 2.37. Original and final leading edge geometry for cavitation minimization with various weights for lift specification
Fig. 2.38. Evolution of the volume vapor integral for cavitation minimization with various weights for lift specification
67
Fig. 2.39. Evolution of the force penalty function for cavitation minimization with various weights for lift specification
gradients in multiphase flow that generally agree well with complex-step finite difference methods, for example. In the multiphase flow examples, the adjoint method proved to be particularly sensitive to grid refinement for design variables associated with the leading edge and (sharp) trailing edge of the two-dimensional foil, although this behavior can be seen in the single-phase example as well and has been observed in other work [17]. The surface-based cost function (which manifests itself through the boundary conditions for the adjoint velocity) was observed to be more sensitive to grid refinement than the volume-based cost function (which manifests itself through source terms in the adjoint equations). This provides guidance for future cost function design and may prove advantageous for volume-fraction-based models where surface-based cost functions written in terms of density are not readily admissible. In addition to validating the adjoint gradient calculation, several examples of shape optimization in multiphase flow were provided, including inverse design based on a multiphase pressure distribution, inverse design based on a multiphase density distribution, and volume vapor minimization with lift specification. In all cases, the method of steepest descent with gradient smoothing was able to decrease the cost function by
68 2–3 orders of magnitude. The final case of volume vapor minimization with lift specification begins to show the potential of this as a design method to improve cavitation breakdown for bulb turbine sections. The resulting geometry in this case reveals the pitfalls of single-point optimization and the need for careful selection of geometry parameterization, geometry constraints, and cost function design, all of which is true for shape optimization methods in single-phase flow as well [35–41, 57, 58]. Because of the mathematical similarity between the barotropic cavitation model and the compressible Euler equations, the barotropic model has proved amenable to standard discretization and solution methods for both the primary and adjoint systems of equations. As a result, the barotropic model is a convenient starting point for the development of continuous adjoint methods for multiphase flows. On the other hand, the model is somewhat limited in terms of its predictive abilities. For example, its equation of state precludes baroclinic vorticity generation in the cavity closure region and precludes consideration of multiphase flows that include non-condensable constituents. The transport-equation-based model considered in the next chapter overcomes both of these modeling shortcomings by using a state equation based on the volume fractions of the constituent fluids derived from corresponding volume fraction transport equations. But the stiffness of the source terms used to model mass transfer between phases causes the explicit solver used in this chapter to be inefficient for the primary equations and unstable for the adjoint equations. Consequently, the next chapter develops a new formulation based on implicit, fluctuation-splitting methods to solve the adjoint equations for the transport-equation-based cavitation model.
69
Chapter 3
Transport-Equation-Based Model
Homogeneous multiphase mixture models that include mass transfer between liquid and vapor as well as non-condensable constituents represent an increasingly important analysis tool for hydroturbine design. For example, this level of modeling has been recently used in bulb turbine simulations to assess leading-edge cavitation [59] and cavitation breakdown [1] as well as to simulate unsteady cavitation in Kaplan and Francis turbines [6–8]. This chapter develops a continuous adjoint formulation for a transport-equationbased multiphase cavitation model. The governing equations and numerical methods are derived for a quasi-one-dimensional flow model. The accuracy of the method is demonstrated by comparing cost function gradients arising from the adjoint method with gradients calculated using standard and complex-step finite difference methods for several cost functions.
3.1
Governing Equations The derivation for the continuous adjoint method occurs at the level of the partial
differential equations. This section thus presents first the governing partial differential equations for the underlying transport-equation-based model and then from that system of equations develops the partial differential equations governing the corresponding adjoint field. 3.1.1
Primary Equations The flow equations or primary equations used here are defined by a transport-
equation-based homogeneous multiphase mixture model, which consists of mixture volume, mixture momentum, and constituent volume fraction equations as well as mass
70 transfer between the liquid and vapor fields [60]. Although the original model includes effects due to unsteadiness, buoyancy, viscosity, turbulence, and the presence of a noncondensable gas, those effects are neglected for now. Instead, the primary equations are defined in terms of the inviscid flux vector f j and source vector M as
R=
∂f j ∂xj
− M = 0.
(3.1)
The inviscid flux vector is defined as
vj
f j = ρvi vj + pδij , αvj where vi is the velocity vector, p is the static pressure, α is the liquid volume fraction, and ρ is the mixture density. The mixture density is defined by ρ = ρv + α(ρ` − ρv ), in which ρ` and ρv are the densities of the liquid and vapor, respectively, each of which is assumed to be constant. The source vector, which accounts for mass transfer between phases, is defined as c 1 M = 0 m, ˙ c4 where m ˙ is the mass transfer model, c1 and c4 are constant, with c1 =
1 1 − ρ` ρv
and c4 =
1 ρ`
,
71 and the zero element should be interpreted as a zero vector of length equal to the number of spatial dimensions. The mass transfer model is defined by m ˙ =
Cprod
t∞
2
ρv α (1 − α) +
Cdest t∞
ρv α
h i min p − pvap , 0 2 1 2 ρ∞ V∞
,
(3.2)
in which (Cprod /t∞ ) and (Cdest /t∞ ) are model coefficients related to condensation and evaporation rates, ρ∞ and V∞ represent freestream conditions for the density and velocity magnitude, and pvap is the vapor pressure of the fluid. It should be noted that the second term of Eq. (3.2) is not continuously differentiable with respect to the pressure, p. This is a common feature at this level of cavitation modeling; min, max, square root, and sign operators are often employed with (p − pvap ) or |p − pvap | as arguments; e.g., [61, 62]. The governing equations for the quasi-one-dimensional multiphase transport model are derived by integrating Eq. (3.1) over a differential volume of the form dV = h(x)dx, where h(x) is a cross-sectional area distribution. The resulting equations are given by R=
d dh (F h) − P − M h = 0, dx dx
(3.3)
where
u
F = ρu2 + p , uα
0 P = p , 0
c 1 and M = 0 m ˙ c4
relate to the inviscid flux, pressure force, and mass source vectors. The dependent variables p, ρ, and α are now understood to represent averages over the cross-sectional area, as is u, which represents the sole (x-)component of the fluid velocity. Eq. (3.1) is solved using a preconditioned time-marching method, in which case it is written as Γ
−1 ∂q
∂t
+
∂f j ∂xj
− M = 0,
72 −1
where Γ
is the preconditioning matrix and q is the vector of the primary variables, p q = vi . α
The preconditioning matrix is selected to render the system hyperbolic as well as to condition the eigensystem such that the eigenvalues do not depend on the density ratio [60]. Likewise, Eq. (3.3) is solved by a preconditioned time-marching method in the present work, in which case it takes the form −1 ∂q
hΓ
∂t
+
∂ dh (F h) − P − M h = 0. ∂x dx
In the quasi-one-dimensional case, the preconditioning matrix is defined as Γ
−1
1 2 ρβ
= 0
α 2 ρβ
0
0
ρβ
2
0
0
−1
ρ u∆ρ = αu∆ρ/ρ 1/ρ −u∆ρ/ρ 0 1 −α 0 1
,
where ∆ρ = dρ/dα = (ρ` − ρv ) . 3.1.2
Adjoint Equations Having defined the minimization problem and primary equations, it remains to
derive the continuous adjoint equations. In the process, an efficient expression for the cost function gradient is also brought to light. The derivation in this section follows that of Giles and Pierce, who previously studied numerical and analytical solutions to the continuous adjoint equations for quasi-one-dimensional compressible flow including discontinuities associated with shocks [63]. The derivation begins from the state equation given in Eq. (3.3) and allows that discontinuities — e.g., arising from phase change — may be present in the solution. As the source term vectors P and M are both bounded, the Rankine-Hugoniot conditions
73 at the location xs of any discontinuity or “shock” is simply +
xs − xs
[F ]
= 0.
˜ ˜ and geometry perturbations h Linearization of R with respect to flow perturbations q yields ˜ = L˜ R q − f = 0,
(3.4)
where d L˜ q≡ dx
∂F dh ∂P ∂M ˜ − ˜−h ˜ h q q q ∂q dx ∂q ∂q
˜ and is a linear operator acting on q f≡
˜ dh d ˜ ˜ P + hM − hF dx dx
represents the non-homogeneous part of the linearized primary system.
(3.5) Note that
Eq. (3.4) assumes ˜ ≈ ∂M q ˜ M ∂q despite the fact that M is not continuously differentiable with respect to q since m ˙ is not continuously differentiable with respect to p. For the quasi-one-dimensional case, consider an objective function of the form xs
Z J= 0
Z JΩ dx +
1
xs
JΩ dx.
Following the adjoint method, the augmented form of the cost function is written by including the constraints (in the form of the flow equations) multiplied by Lagrange multipliers. The augmented cost function in this case is written as Z L= 0
xs
Z JΩ dx +
1
xs
Z JΩ dx −
0
xs
T
ψ R dx −
Z
1
xs
+ x T T ψ R dx − hs ψ s [F ] s− , xs
74 where hs ≡ h(xs ), ψ is a continuous Lagrange multiplier associated with the enforcement of the flow equations in continuous regions of the flow field, and ψ s is an additional Lagrange multiplier defined at xs associated with the enforcement of the Rankine-Hugoniot conditions at the discontinuity. Linearization of the augmented cost function gives xs
Z δL =
T
Z
˜ dx + g q
0
˜ dx − g q
− xs
T
T
ψ (L˜ q − f ) dx − hs ψ s
x [JΩ ] s− xs
∂F ˜ q ∂q
δxs −
x+ s
−
xs
Z
+
T
xs
1
Z
1
T
T
ψ (L˜ q − f ) dx
0
− hs ψ s
xs
dF dx
x+ s
−
δxs ,
xs
T
where g = (∂JΩ /∂q) and δxs is the variation of the location of the discontinuity. Then integration by parts and re-arrangement gives Z δL = −
xs
∗
L ψ−g
Z
T
0
+
xs
∗
L ψ−g
T
˜ dx q
xs
h iT + − hs ψ s − ψ xs A˜ q Z
1
˜ dx − q
T
ψ f dx +
0
Z
1
xs
h
+
xs T
+ hs ψ s − ψ
− xs
iT
ψ f dx − δxs
x [JΩ ] s− xs
+
T hs ψ s
1 − hψ A˜ q
−
xs
+
A˜ q
T
0
dF dx
x+ ! s
,
(3.6)
−
xs
where A = ∂F /∂q and dψ dh L ψ ≡ −hA − dx dx ∗
T
∂P ∂q
T
ψ−h
∂M ∂q
T ψ.
˜ is removed from the cost function variation δL The effect of the flow variation q through the selection of the adjoint variables ψ and ψ s . In particular, choosing ψ to eliminate the first two integrals on the right-hand side of Eq. (3.6) defines the adjoint field equations, ∗
L ψ − g = 0,
(3.7)
75 while elimination of the fifth term on the right-hand side of Eq. (3.6) defines the adjoint boundary conditions, 1 T hψ A˜ q = 0.
(3.8)
0
As noted by Giles and Pierce [63], elimination of the third and fourth terms on the righthand side of Eq. (3.6) implies that the adjoint variable is continuous across the shock ; i.e., + − ψ s = ψ xs = ψ xs . The final term on the right-hand side of Eq. (3.6) can be eliminated through the selection of ψ s , which would represent an internal boundary condition for the adjoint variable at xs ; however, in the present work, the final term is simply neglected under the assumption that the primary flow is essentially continuous despite large gradients associated with phase change. With this assumption, and having defined the adjoint equations, the variation of the augmented cost function is reduced to Z δL =
xs
T
Z
ψ f dx +
0
1
T ψ f dx,
(3.9)
xs
where f depends on only geometric variations and the primary flow, and ψ is the solution to the adjoint equations, Eq. (3.7) and Eq. (3.8). For the primary equations, preconditioning was introduced to render the equations hyperbolic and to produce eigenvalues that were independent of the density ratio. The same benefits can be realized in the adjoint system by introducing the preconditioning matrix through substitution using T
ψ = Γ Ψ,
(3.10)
76 1
where Ψ is the preconditioned adjoint variable. Expanding Eq. (3.7) gives the adjoint field equations as dψ dh − −hA dx dx T
where hA
T
∂P ∂q
T
ψ−h
∂M ∂q
T
ψ−
∂JΩ ∂q
T = 0,
is the transpose of the inviscid flux Jacobian from the primary equations.
Then substitution of the expression for the preconditioned adjoint variable gives the preconditioned adjoint field equations as dΨ B −h dx
dΓ A dx
T
T
Ψ − h (ΓD) Ψ −
∂JΩ ∂q
T = 0,
(3.11)
T
where B = −h (ΓA) and D=
∂M 1 dh ∂P + h dx ∂q ∂q
,
(3.12)
while substitution into Eq. (3.8) gives the preconditioned adjoint boundary conditions as 1 T ˜ = 0. hΨ (ΓA) q
(3.13)
0
3.2
Numerical Methods The previous section defined the governing partial differential equations for the
primary field and then derived a corresponding set of governing partial differential equations for the adjoint field. This section presents discretization and solution techniques for the two systems based on implicit, cell-centered finite volume methods. 3.2.1
Primary Equations The numerical solution method for the primary equations described by Eq. (3.3)
generally follows the method adopted in Kunz et al. [60]. An implicit time-marching 1
Note that the same result can be accomplished by multiplying the flow equations through by Γ in defining the state equations R used by the augmented cost function.
77 method is applied to the preconditioned, pseudo-compressible system. Fluxes are calculated at the cell faces using flux-difference splitting. Higher-order accuracy is achieved through polynomial reconstruction of the dependent variables in each cell. The baseline method employs a third-order MUSCL scheme [64], but both the ENO (Essentially NonOscillatory) [65, 66] and WENO (Weighted Essentially Non-Oscillatory) [66, 67] schemes are tested here as alternatives to suppress spurious oscillations near sharp interfaces. Flux Jacobians are calculated using both standard numerical derivatives and a complex step method. The j, k component of a numerical flux Jacobian matrix is calculated as ˆ (q , q ) ∂F L R ∂q L
≈
ˆk , q R ) − Fˆj (q L , q R ) Fˆj (q L + e
j,k
,
where is a small number, q L and q R are the primary variables to the left and right ˆk is the k-th of the face at which the flux and flux Jacobian are being evaluated, and e ˆk serves to column of the identity matrix that has the same size as q, such that q L + e add to the k-th component of q L . Similarly, the j, k component of a complex-step flux Jacobian matrix is calculated as ˆ (q , q ) ∂F L R ∂q L
≈
i h ˆk , q R ) Im Fˆj (q L + i e
j,k
,
where i is the square root of negative one. The boundary conditions are treated implicitly. For the quasi-one-dimensional system, a direct block tridiagonal matrix solver is applied to solve the resulting linear system of equations at each time step. 3.2.2
Adjoint Equations The numerical discretization for the non-conservative, linear system of precondi2
tioned adjoint equations is characterized by a fluctuation splitting method [68, p. 177]. 2
LeVeque uses the term “fluctuation splitting” to refer to the effect on the solution due to waves arising from a one-dimensional Riemann problem at a cell edge [68]. It is therefore a
78 A first-order unsplit (relative to source terms) Godunov-type method can be constructed by writing Eq. (3.11) in semi-discrete form as ∂Ψ + ∂Ψ − ∂Ψ + Bw + Be ∂t i ∂x w ∂x e T ∂JΩ T ∂Γ T = 0, −h A Ψi − h (ΓD) Ψi − ∂x ∂q ±
±
where B = T ΛB T
−1
(3.14)
is based on the eigendecomposition of B detailed in Appendix A.
The second term in Eq. (3.14) represents the net effect of fluctuations propagating into the cell from its faces. ±
±
For implementation, B is written as B =
1 2
(B ± |B|) , where |B| = T |ΛB | T
−1
The waves emanating in both directions from the cell face take on the properties of the medium into which they propagate [68, p. 177]. Thus, the positive eigenvalues and associated right eigenvectors are calculated based on properties to the right of the face, while negative eigenvalues and associated right eigenvectors are calculated based on properties to the left of the face. Properties on either side of the face are based on the primary variable polynomial reconstruction in the respective cell. Second-order central differences are used to discretize the gradient of the adjoint variable vector at each face. Testing has shown that the third term in Eq. (3.14), which arises from the gradient of the preconditioning matrix, is critical in calculating accurate cost function gradients for the multiphase examples presented below. The coefficients of that term can be written out as 0 T dρ ∂Γ 2 A = β dx ∂x 0
1 dρ − 2 ρ dx u dρ − ρ dx u∆ρ du − ρ dx
0 1 dρ − , ∆ρ dx 0
generalization of flux-difference splitting to non-conservative systems of equations in which there is no flux vector.
.
79 in which four out of the five non-zero terms are directly proportional to the density gradient. For the baseline multiphase primary flow presented in the examples below, the density gradient distribution is discontinuous and can be sensitive to spurious oscillations in the vicinity of the discontinuity, as shown in Figure 3.1. The discretization of that
Fig. 3.1. Density gradient distribution for quasi-one-dimensional cavitating flow
term uses the polynomial reconstruction of the primary variables within the cell to calculate the density and velocity gradient, which can be especially helpful in avoiding the discontinuity in the density gradient at the phase boundary when the ENO or WENO scheme is used for the primary variable polynomial reconstruction. The final two source terms in Eq. (3.14) are simply discretized using the piecewise constant or volume-averaged data within each cell. Of particular note, the implementation of ∂ m/∂p, ˙ which appears in D, includes the assumption that 0
h i ∂ min p − pvap , 0 = ∂p 1
if p > pvap , otherwise,
80 and so this too gives rise to discontinuous coefficients for the adjoint source term. Testing has shown that replacing the minimum operator with a continuously differentiable approximation such as
p − pvap − h i min p − pvap , 0 ≈
r
p − pvap
2
+
2
requires such large values of to be beneficial in terms of smoothing out this discontinuity that the accuracy of the cost function gradient is destroyed. The preconditioned adjoint boundary conditions expressed in Eq. (3.13) can be rewritten as 1 1 1 T T −1 ˆ T (Λδˆ Ψ (ΓA) δq = Ψ QΛQ δq = Ψ q ) = 0, 0
where ΓA = QΛQ
−1
0
0
is the eigendecomposition of ΓA detailed in Appendix A, δˆ q repre-
ˆ = QT Ψ represents the sents the variation of the primary characteristic variables, and Ψ characteristic adjoint variables at the boundary. Consistency at the boundary requires ˆ as there are incoming characteristics. the same number of specified boundary values for q ˆ = 0 corresponding to each of the outgoing characteristics then canSpecification of Ψ cels the remaining flow perturbation terms at the boundary. At the inlet, the boundary condition for Ψ thus takes the form h
T −1
Ψ1 + I − 2(Q )
+
L Q
T
i
Ψ2 = 0,
where Ψ1 and Ψ2 are the values of the preconditioned adjoint variable at the ghost and +
first interior cell, and L is the selection matrix associated with the positive eigenvalues of ΓA. Similarly, at the outflow boundary, the boundary condition for Ψ is implemented as h i T −1 − T I − 2(Q ) L Q Ψn + Ψn+1 = 0,
81 where Ψn and Ψn+1 are the values of the preconditioned adjoint variable at the last interior and ghost cell, and L
−
is the selection matrix associated with the negative
eigenvalues of ΓA. The solution to Eq. (3.14) is obtained by dropping the unsteady term and solving the remaining system of linear equations directly, with all terms including the characteristic-type boundary conditions treated implicitly. Because the first-order system is linear and all terms and boundary conditions are treated implicitly, the solution to the quasi-one-dimensional system is obtained by a single pass of a direct solver for the resulting block tridiagonal matrix. High Resolution Extension The discretization of the adjoint system is extended to include high-resolution correction terms using wave limiters [68]. Employing limiters is expected to work better than using formally second-order methods in cases where the solution is discontinuous and typically performs well even when the coefficients in the equation are discontinuous [68, p. 164]. Godunov’s method for the non-conservative, linear adjoint system was previously written in semi-discrete form as ∂Ψ + ∂Ψ − ∂Ψ + Bw + Be + C(Ψ) = 0, ∂t i ∂x w ∂x e where C(Ψ) represents the adjoint source terms. Motivated by the Lax-Wendroff method, which is a second-order method derived from Taylor series expansions in space and time, the high-resolution version of the Godunov method can be written as ∂Ψ 1 + ∂Ψ − ∂Ψ ∗ ∗ + B + B + F − F w e e w + C(Ψ) = 0, ∂t i ∂x w ∂x e ∆x
82 ∗
where F represents higher-order corrections in the fluctuations emanating from a given cell face, ∗
F =
m ∆t p ˜ p 1 X p 1− λ λ W , 2 ∆x p=1
˜ p is a limited wave vector, W ˜ p = φ θ p αp r p , W p
p
λ is an eigenvalue of B representing the edge velocity, α is the characteristic jump, p
p
r is the right eigenvector associated with B, and θ is a smoothness indicator, each of which is associated with the p-th characteristic and evaluated at the same given cell face ∗
as F [68]. The limiter function φ(θ), which is interpreted as acting on the characteristic jump, can take a variety of forms, each of which essentially selects from the slopes of the function measured in adjacent cells. The van Leer limiter, for example, is defined by φ(θ) =
θ + |θ| , 1 + |θ|
while the superbee limiter is defined by φ(θ) = max(0, min(1, 2θ), min(2, θ)). For the case of variable coefficients, there are a number of possibilities for comp
p
puting θ due to the fact that W changes in both magnitude and direction with the local eigensystem [68, pp. 182–183]. For the present work, the projection of the upstream wave vector onto the local wave vector is used to define the scalar, such that p
θ =
p
p
p
WU · W p p W ·W
,
where W U denotes the wave vector at the upstream face with respect to the p-th characteristic component.
83 The limiter functions give rise to non-linearity which is resolved by time-marching, treating the first-order and source terms implicitly while lagging the higher-order corrections. On finer grids, the maximum allowable time step is essentially unlimited, but on the coarser grids, a finite time step is required. In either case, the high resolution terms converge within several dozen iterations.
3.3
Design Methods In this section, details associated with the problem definition and particularly
the gradient calculation are briefly summarized, including the geometry definition, the geometric parameterization and corresponding design variables, the definition of the cost functions that are explored, and implementation details of the gradient calculation itself. Brief descriptions are also given for two classes of gradient-based optimization methods — quasi-Newton methods and the method of steepest descent. 3.3.1
Geometry, Parameterization and Design Variables For the quasi-one-dimensional cases considered here, a simple converging-diverging
nozzle serves as the geometry. In all cases, a uniform grid is assumed in the x-direction and the geometry is expressed by its cross-sectional area distribution, h(x). For the baseline geometry, h(x) = 0.9 + 0.1 cos (2πx)
for
0 ≤ x ≤ 1,
such that the inlet and outlet areas are h(0) = h(1) = 1 and the cross-sectional area of the throat is h(0.5) = 0.8. Using spline functions to define the geometry and then selecting the control point coordinates as design variables is convenient for two reasons — the number of control points can be much smaller than the number of grid points, and the variation of the geometry resulting from changes to the control points is smoother than if the area distribution were modified at individual grid points. Neither of these traits is specifically required by the adjoint method, but each facilitates comparison of the adjoint results
84 with the cost function gradients calculated by standard and complex-step finite difference methods. The specific parameterization of the baseline geometry used in this chapter is defined by a fourth-order (third-degree or cubic) B-spline using nine control points. The Bspline coordinates were calculated by a least-squares solution using QR factorization [54, p. 158] consistent with the description in Section 2.3.1. To define the least-squares problem, a uniform parameter distribution was assumed for the 1001 input coordinates, and a uniform distribution was assumed for the knot vector. The baseline B-spline coordinates are provided as Table 3.1 and are shown in Figure 3.2. The corresponding knot vector
Fig. 3.2. Least-squares fit of a cubic B-spline to the cross-sectional area distribution of the baseline nozzle geometry
has 13 knots, with four zeroes at the beginning followed by five uniformly spaced knots (at 1/6, 2/6, 3/6, 4/6, and 5/6) followed by four ones at the end. In terms of the allowable design space, the x-coordinates of all control points are held constant as are the y-coordinates of the first and last control points (which causes the inlet and outlet areas to remain constant). The y-coordinates of the seven remaining control points serve as the design variables.
85 Table 3.1. B-spline control point coordinates for the baseline nozzle geometry i
3.3.2
x
y = h(x)
0
0.0000000000000000
1.00000000000000000
1
5.55555560166126963E-002
1.0005109033009492
2
0.16666666652644851
0.95992852167240661
3
0.33333333316523189
0.83998391794556460
4
0.50000000026919356
0.77965041330363061
5
0.66666666651116047
0.83998391793042670
6
0.83333333348011662
0.95992852152110308
7
0.94444444433025942
1.0005109035406941
8
1.00000000000000000
1.00000000000000000
Cost Functions The adjoint method developed in this chapter for the transport-equation-based
model is evaluated below using four cost functions which can be written in a multiobjective form as 1
Z J = w1
0
Z + w2
[1 − α(x)] dx 1
0
Z + w4
1
0
Z + w3
1 2 [α(x) − αtar (x)] dx 2
1 2 [p(x) − ptar (x)] dx 2
1
H(x) dx,
(3.15)
0
where αtar is a target distribution for the liquid volume fraction, ptar is a target distribution for pressure, and w is a vector of weighting coefficients. The function H(x) is the Huber function, which is explained further below. In Eq. (3.15), w1 and w3 are each associated with a traditional inverse design cost function (for volume fraction and pressure, respectively), which is simply an L2 norm
86 of the difference between the observed and specified distributions of a particular state variable. The w2 coefficient is associated with the volume integral of the vapor volume fraction, which results in an objective that minimizes the amount of vapor mass resulting from cavitation in the flow field. The form of the integrand relies on the fact that α ≤ 1, which is true in theory although not precisely in practice. If instead the integrand is defined to be |1 − α|, then the cost function corresponds to an L1 (or Manhattan or taxicab) norm. The w4 coefficient is associated with a hybrid L1 -L2 norm, or Huber norm, where
H(x) =
[α(x) − α (x)]2 tar
if |α(x) − αtar (x)| < β,
2β |α(x) − α (x)| − β 2 tar
otherwise,
and β is the Huber threshold, defined here by β = 0.01. The Huber norm has a stable minimum (since it is quadratic for small values) and a continuous first derivative. For large values, it becomes linear and so is less sensitive to outliers than a pure L2 norm. In the examples below, the adjoint method is applied separately to each of these four cost functions; i.e., only one component of w is non-zero at any given time. The multi-objective form of the cost function is used only for convenience in the derivation, presentation, and implementation of the method. 3.3.3
Gradient Calculation Substitution of Eq. (3.10) for the preconditioned adjoint variable into Eq. (3.9)
for the reduced cost function variation gives Z δL = 0
xs
Z T Γ Ψ f dx + T
1
T Γ Ψ f dx, T
(3.16)
xs
where from Eq. (3.5), f depends on only geometric variations and the primary solution. ˜ is measured by subtracting the perturbed For the discretization of Eq. (3.16), h and baseline B-spline representations at the grid points and is subsequently averaged
87 ˜ to the cell centers, while dh/dx is calculated at the cell centers through second-order ˜ at adjacent nodes. central differencing of the values of h 3.3.4
Minimization Method Minimization in this chapter is demonstrated using two gradient-based methods
— the method of steepest descent and a quasi-Newton method. For the method of steepest descent, changes to the control variables follow the cost function gradient in the direction that tends to decrease the cost function; i.e., δb = −λg,
T
where δb is the change to the vector of design variables, g = (∂J/∂b) represents the cost function gradient, and λ is a positive scalar that controls the step size. Assuming λ is sufficiently small, then δJ =
∂J ∂b
T
δb = −λg g < 0,
indicating that for a sufficiently small step size, every design cycle decreases the cost function and improves the design. The method of steepest descent can be viewed as using a linear model of the cost function in the neighborhood of the state vector. Newton methods, on the other hand, build a quadratic model in the neighborhood of the state vector by incorporating the Hessian matrix, H, such that 1 T T J(b + δb) ≈ J(b) + g δb + δb Hδb. 2
(3.17)
The quadratic cost function model is then minimized by δb = −H
−1
g.
(3.18)
88 Substituting Eq. (3.18) into Eq. (3.17) and assuming that H is symmetric then gives 1 T −1 J(b + δb) = J(b) − g H g, 2 indicating that every design cycle decreases the cost function and improves the design provided that H
−1
is positive definite.
As with the cost function gradient, the cost function Hessian matrix is expensive to compute. Quasi-Newton methods avoid this cost by using estimates of the Hessian matrix, which are usually iteratively refined based on changes in the gradient vector. The particular quasi-Newton method employed in this work is the L-BFGS-B method [69]. That method has two additional advantages — it accommodates box constraints on the design variables, and it is a low-memory method, which means that it avoids storage of the complete Hessian matrix, making it suitable for problems in which the number of design variables is large.
3.4
Results In this section, solutions are obtained for both primary and adjoint systems in
both single- and multiphase flows using the transport-equation-based model and the numerical methods described in the previous sections. Several flux formulations are briefly examined for the multiphase primary flow, and grid dependence is examined in all cases. The primary and adjoint solution fields are used as a basis to calculate the cost function gradients for various cost functions, and those gradients are validated by comparison with standard and complex-step finite difference methods, which were described in Section 2.4.1. Gradient descent methods are applied in a subset of cases, and these highlight some properties of the minimization problem in multiphase flow. 3.4.1
Primary Equations The primary flow equations are solved for the case of the baseline quasi-one-
dimensional nozzle. In all cases, pressure is specified at the outlet, while the velocity and
89 volume fraction are specified at the inlet. The single-phase case affords some analytical treatment that is useful for simple validation of the cost function gradient. 3.4.1.1
Single-Phase Analytical Solution
The analytical solution for the single-phase primary equations offers a simple benchmark for the primary flow solver and is later used to generate a semi-analytical solution for the single-phase cost function gradient. For a sufficiently high cavitation index, the mass transfer terms remain zero and an analytical solution to Eq. (3.3) is given by uh = constant, α = constant, and 1 2 p + ρu = constant. 2 For the specific case where u(0) = α(0) = h(0) = p(1) = h(1) = 1, the solution is given by u = 1/h, α = 1, and 1 p= 2 3.4.1.2
1 3− 2 . h
(3.19)
Single-Phase Numerical Solutions
Numerical solutions for the single-phase flow were obtained using the implicit flow solver and third-order MUSCL polynomial reconstruction for the fluxes. Solutions were obtained on grids ranging from 25 to 800 cells. The residual in each case was reduced 10
90 orders of magnitude at a CFL of 80. All of the numerical solutions compare well with the analytical solution, as shown for three of the grids in Figure 3.3.
Fig. 3.3. Single-phase primary flow distributions compared with the analytical solution
3.4.1.3
Multiphase Numerical Solutions
Phase change can be induced in the previous solution by lowering the cavitation index, defined earlier as s=
p∞ − pvap 2 1 2 ρ∞ V∞
,
(2.4)
where for the nozzle flow, p∞ is taken as the static pressure at the nozzle exit, ρ∞ is taken as the liquid density ρ` , and V∞ is taken as the inlet velocity magnitude. In the singlephase case, the cavitation index was set to an arbitrary large number. In the present case, it is reduced to s = 0.54, which under the given conditions (V∞ = p∞ = ρ∞ = 1) implies pvap = 0.73. According to the single-phase analytical solution in the previous section, the single-phase flow should reach the vapor pressure at x = 0.45, which is just upstream of the throat in the baseline geometry. For the multiphase simulation, the
91 mass transfer coefficients also come into effect. In the present work, they are taken as 2
4
(Cprod /t∞ ) = 10 and (Cdest /t∞ ) = 10 , and the vapor density is taken as ρv = 0.001. The initial multiphase calculations were conducted using the implicit solver and a third-order MUSCL polynomial reconstruction for the fluxes. Solutions were obtained on grids ranging from 100 to 6400 cells. As shown in Figure 3.4, the residual in each case was reduced at least 10 orders of magnitude at CFL numbers ranging from 5 on the coarsest grid to 320 on the finest grid.
Fig. 3.4. scheme
Multiphase primary flow convergence histories for the third-order MUSCL
The solutions are generally independent of the mesh in this case, as shown in Figure 3.5. As expected, the flow remains single-phase until the vicinity of the throat, at which point the pressure has been reduced to the vapor pressure. Mass transfer from liquid to vapor begins to occur, as shown in Figure 3.6, causing the volume fraction of the liquid to be reduced. Farther downstream in the diverging part of the nozzle, the “bubble collapses,” at which point there is a rapid phase change back to liquid, a rapid rise in the static pressure, and a sharp decrease in the velocity.
92
Fig. 3.5. Multiphase primary flow distributions for the third-order MUSCL scheme
Fig. 3.6. Mass transfer term on selected grids for the multiphase primary flow solution with third-order MUSCL scheme
93 The rapid change in gradients combined with the higher-order polynomial reconstruction results in spurious oscillations in the primary variables, which can be seen in Figure 3.5 with a closer view in Figure 3.7. It can also be seen that without any additional
Fig. 3.7. Multiphase primary flow distributions for the third-order MUSCL scheme showing spurious oscillations
treatment such as slope or flux limiters, the solutions are essentially non-oscillatory on only the finest grids in the series. To reduce the oscillations on the coarser grids, the ENO and WENO schemes were applied as mentioned in Section 3.2.1. Figure 3.8 and Figure 3.9 show the primary flow distributions for the ENO scheme, which reflect that the solutions are indeed nonoscillatory on even the coarsest grids. An unfortunate (and well-known) side-effect of the stencil switching employed, however, is that the scheme is no longer able to converge to machine precision, as shown in Figure 3.10. The WENO scheme attempts to correct this deficiency by using convex combinations of all available stencils rather than choosing only the best. The primary flow distributions using the WENO scheme remain non-oscillatory, as shown in Figure 3.11
94
Fig. 3.8. Multiphase primary flow distributions for the ENO scheme
Fig. 3.9. Multiphase primary flow distributions for the ENO scheme in the vicinity of the interface
95
Fig. 3.10. Multiphase primary flow convergence histories for the ENO scheme
and Figure 3.12, and the convergence histories are improved but not entirely corrected, as shown in Figure 3.13. The fact that the convergence histories for the ENO and WENO schemes do not reliably reach machine precision is a concern in the context of design optimization because of the difficulty in knowing whether an accurate primary flow field has been reached at any given design cycle. More recent research continues to try to improve this aspect of the WENO scheme, and slope and flux limiters serve as alternative means for eliminating the spurious oscillations. The following section will show that the adjoint solutions for the multiphase case require significant grid resolution to reach an asymptotic regime relative to grid independence, and as such, the MUSCL scheme, which is essentially non-oscillatory on the finest grids anyway, will generally suffice. 3.4.2
Adjoint Equations Solutions for the adjoint equations were obtained using the implicit wave-splitting
method described in Section 3.2.2. The adjoint solutions and corresponding cost function gradients are presented for several cost functions below.
96
Fig. 3.11. Multiphase primary flow distributions for the WENO scheme
Fig. 3.12. Multiphase primary flow distributions for the WENO scheme in the vicinity of the interface
97
Fig. 3.13. Multiphase primary flow convergence histories for the WENO scheme
3.4.2.1
Single-Phase Numerical Solutions and Gradient
The first test case corresponds to the single-phase flow solutions presented in Section 3.4.1.2. The single-phase inverse design cost function is specified by Eq. (3.15) with w = (0, 0, 1, 0) so Z J= 0
1
1 2 (p − ptar ) dx. 2
(3.20)
Taking the first variation of Eq. (3.20) and substituting Eq. (3.19) for p gives Z
1
∂p ˜ h dx ∂h 0 ˜ Z 1 1 1 h = 3 − 2 − ptar 3 dx, 2 h h 0
δJ =
(p − ptar )
(3.21)
which gives an analytical expression for the cost function variation in terms of the geo˜ that is useful for validation. metric variation h Numerical solutions to the adjoint equations are obtained on three grids for the inverse design case where ptar (x) = 1, and the solutions are presented in Figure 3.14.
98 Note that even in single-phase flow, ∂ m/∂α ˙ is non-zero and contributes to the adjoint
Fig. 3.14. Adjoint solution for single-phase inverse design
source terms. These terms influence the third adjoint variable in this case, causing an exponential increase in Ψ3 as it is transported upstream from the exit boundary, but Ψ3 falls out of the expression for the sensitivity gradient when α = 1 everywhere. The sensitivity gradients are calculated using the adjoint methods on all three grids and are compared with a complex-step finite difference method and the semianalytical gradient from Eq. (3.21). Good agreement is observed among all the cases, as shown in Figure 3.15. 3.4.2.2
Multiphase Numerical Solutions and Gradient
The remaining test cases examine cost functions corresponding to the multiphase primary flow solutions presented in Section 3.4.1.3. Multiphase Inverse Design using Specified Volume Fraction Distributions Two multiphase examples are given for the cost function defined by Eq. (3.15) with w = (1, 0, 0, 0); i.e., inverse design based on a target distribution of volume fraction.
99
Fig. 3.15. Comparison of cost function gradients for single-phase inverse design
In the first example, the target distribution is defined as
αtar (x) =
0
if 0.50 ≤ x ≤ 0.92,
1
otherwise.
Numerical solutions are obtained to the multiphase adjoint equations, and these solutions are immediately found to differ from the single-phase adjoint solutions in two significant ways — the multiphase adjoint solution is discontinuous, and it is significantly more sensitive to grid resolution than the single-phase adjoint solution. The discontinuity in the multiphase adjoint solution corresponds to the cavitation inception location at the nozzle throat, as shown in Figure 3.16. The underlying multiphase primary solution variables (which determine the transport coefficients for the adjoint solution) vary smoothly in this region, as shown in Figure 3.5, and even the mass transfer source term is relatively continuous near the inception point, as shown in Figure 3.6. On the other hand, the derivative of the mass transfer source term with respect to pressure is discontinuous at both the cavitation inception point and in the bubble
100
Fig. 3.16. Adjoint solution for multiphase inverse design with a step function for αtar
collapse region, and this leads to a discontinuous source term for the adjoint equations, T
as shown in Figure 3.17 for one element of the matrix (ΓD) from Eq. (3.11). The multiphase adjoint solutions are characterized by a greater sensitivity to mesh resolution than the single-phase adjoint solutions presented earlier. Figure 3.18 shows the grid dependence of the first adjoint variable as an example, where it can be seen that the solution changes dramatically over a range of grids in which both the primary flow solution and the single-phase adjoint solution were relatively insensitive to the grid spacing. Once grid independence is finally achieved, the adjoint solution leads to an accurate measure of the cost function gradient in comparison to standard and complex-step finite difference methods, as shown in Figure 3.19.
3
Adding high-resolution terms with wave limiters to the discretization of the adjoint system significantly improves the accuracy and grid-dependence of the solutions. Figure 3.20 demonstrates the variation of the cost function with respect to the most sensitive design variable using both the first-order method and the high-resolution method 3
The complex-step method uses an imaginary step size of 10 ward standard finite difference methods use a step size of 0.01.
−20
while the forward and back-
101
Fig. 3.17. Source term coefficient from the multiphase adjoint equations
Fig. 3.18. Grid dependence for the first adjoint variable for multiphase inverse design with a step function for αtar
102
Fig. 3.19. Comparison of cost function gradients for multiphase inverse design with a step function for αtar
with a superbee limiter. In the first-order case, 800 cells are required to reach an asymptotic behavior with respect to grid uncertainty. In the high-resolution case, the asymptotic region is reached with only 200 cells and accuracy on the coarsest grids is greatly improved. The same conclusions are reached when the target distribution for the volume fraction is changed to shift the baseline cavitation region upstream by about half its length. Although this change in the target distribution serves to eliminate the discontinuity in the cost function from the previous example, the discontinuity in the adjoint solution remains, as shown in Figure 3.21. The comparison of the calculated cost function 4
gradients for that case is presented in Figure 3.22.
Good agreement is also obtained using the same target distribution but replacing the L2 norm by the Huber function, which corresponds to the cost function in Eq. (3.15) 4
−20
The complex-step method uses an imaginary step size of 10 ward standard finite difference methods use a step size of 0.002.
while the forward and back-
103
Fig. 3.20. Grid dependence for the first-order and high-resolution methods
Fig. 3.21. Adjoint solution for an inverse design to shift the cavitation region
104
Fig. 3.22. Comparison of cost function gradients for an inverse design to shift the cavitation region
with w = (0, 0, 0, 1). The comparison of the calculated cost function gradients for that 5
case is presented in Figure 3.23.
Multiphase Inverse Design using Specified Pressure Distributions A common feature of the gradients in the previous examples is the dominant influence of the design variables associated with the throat area. In the present example, the character of the gradient is altered by starting from a set of design variables that is closer in proximity to the minimizer of the cost function. The cost function is again defined by using Eq. (3.15) with w = (0, 0, 1, 0); i.e., inverse design based on a target distribution of pressure. The target distribution is specified as the pressure from the baseline multiphase flow solution in Section 3.4.1.3, while the current state for the design variables is taken as a perturbation of the baseline geometry, as shown in Figure 3.24. 5
−20
The complex-step method uses an imaginary step size of 10 ward standard finite difference methods use a step size of 0.005.
while the forward and back-
105
Fig. 3.23. Comparison of cost function gradients to shift the cavitation region based on a Huber function
Fig. 3.24. Comparison of control point definitions and geometry for the baseline (red) and perturbed (green) design variables
106 Figure 3.25 shows the adjoint-based cost function gradient compared with the standard and complex-step finite difference methods.
6
Note that the standard finite
difference gradients are very sensitive to the step size for only design variables 4 and 5, while the central standard finite difference compares very well with the adjoint and complex-step methods. This indicates that the second derivative of the cost function is very large for these two design variables.
Fig. 3.25. Comparison of cost function gradients for multiphase inverse design based on the multiphase baseline pressure distribution
In an interesting departure from the previous examples, the adjoint solution field in this case is continuous, as shown in Figure 3.26. Multiphase vapor minimization While inverse design cost functions (in terms of pressure distributions in single-phase flow) are among the most commonly employed in the shape optimization literature, a cost function to minimize vapor mass directly is perhaps more natural in the present context. For example, the cost function in Eq. (3.15) 6
−20
The complex-step method uses an imaginary step size of 10 while the forward and back−5 ward standard finite difference methods use a step size of 2 × 10 .
107
Fig. 3.26. Adjoint solution for multiphase inverse design based on the multiphase baseline pressure distribution
with w = (0, 1, 0, 0) represents a vapor minimization cost function in terms of an L1 norm (provided α < 1). The change in cost function has a relatively minor impact on the solution characteristics. The first-order adjoint solution is still sensitive to the grid spacing such that only the solutions at 3200 and 6400 cells are in agreement, the solution is still characterized by a discontinuity at the inception point, as shown in Figure 3.27, and once grid independence is achieved, the cost function gradient is still in good agreement with the standard and complex-step finite difference methods, as shown in Figure 3.28. 3.4.3
7
Minimization The previous section established that the adjoint method developed for the transport-
equation-based model is able to calculate accurate cost function gradients in both singleand multiphase flow. This section uses that formulation to inform gradient-based descent methods for several examples. 7
The complex-step method uses an imaginary step size of 10 ward standard finite difference methods use a step size of 0.01.
−20
while the forward and back-
108
Fig. 3.27. Adjoint solution for multiphase vapor minimization
Fig. 3.28. Comparison of cost function gradients for multiphase vapor minimization
109 3.4.3.1
Single-Phase Inverse Design
The full minimization method is first applied to the single-phase inverse design problem defined in Section 3.4.2.1. The initial geometry is defined by setting the design variables (i.e., the y-coordinates of the associated B-spline control points) to a constant value of 1.03, and the target pressure distribution is specified as the baseline single-phase flow solution. The domain is discretized by 400 cells, and the third-order MUSCL scheme is used for the primary flow solution. A total of 40 design cycles were run with λ = 1 determining the step size for the method of steepest descent. The design variables successfully approach the known values for the baseline geometry, as shown in Figure 3.29, and the cost function decreases by more than four orders of magnitude as shown in Figure 3.30.
Fig. 3.29. Evolution of the design variables for single-phase inverse design
3.4.3.2
Multiphase Inverse Design
Two cases are considered for multiphase flow — inverse design based on a specified pressure distribution and inverse design based on a specified volume fraction distribution.
110
Fig. 3.30. Evolution of the cost function and gradient for single-phase inverse design
For the first case, the initial geometry is defined by setting the design variables (i.e., the y-coordinates of the associated B-spline control points) to a constant value of 1.03, and the target pressure distribution is specified as the baseline multiphase flow solution. For the second case, the initial geometry is defined as the baseline geometry and the target distribution is specified as the volume fraction that shifts the cavity upstream by a distance of ∆x = 0.2 relative to the baseline multiphase primary solution. Neither of the multiphase inverse design cases could be readily solved using a simple method of steepest descent. To see why, three additional examples are presented in which the number of design variables is reduced to only two. The cases again consist of single-phase inverse design based on pressure, multiphase inverse design based on pressure, and multiphase inverse design based on volume fraction, but by using only two design variables, the cost function contours can be visualized to better understand the behavior of the descent methods in each case. Each of the two-variable cases begins with the baseline nozzle geometry as the initial design and solves an inverse design problem using a specified dependent variable distribution associated with the target geometry depicted in Figure 3.31. As such, the
111 minimum value of the cost function corresponds to the target geometry and is identically zero in each case.
Fig. 3.31. The initial (baseline) and target geometries for the two-variable inverse design problems
As with the seven-variable case, the two-variable case for single-phase inverse design based on pressure readily converges using a simple method of steepest descent, here with λ = 5. The cost function is decreased by about four orders of magnitude over 15 design cycles as shown in Figure 3.32. The cost function contours and steepest-descent path are shown in Figure 3.33. In this case, the minimization surface is clearly convex, and the method of steepest descent converges rapidly to the global minimum. When the specified pressure distribution is taken from the baseline multiphase primary solution rather than the baseline single-phase primary solution, the minimization problem is significantly altered. The cost function contours for the multiphase case are shown in Figure 3.34 along with the first 10 steps of a constant-step steepest-descent trajectory. For the minimization process to succeed in this case, it must navigate from the baseline state in the bottom right corner of Figure 3.34 to the target state in the top left corner, despite the fact that the predominant gradients in the surface are perpendicular
112
Fig. 3.32. Evolution of the cost function and gradient for single-phase inverse design with two design variables
Fig. 3.33. Cost function contours and steepest-descent trajectory for single-phase inverse design based on pressure
113 to the desired path. The simple steepest-descent algorithm is clearly not effective in that case.
Fig. 3.34. Cost function contours and steepest-descent trajectory for multiphase inverse design based on pressure
The problem is further complicated when the inverse design is written in terms of a specified distribution of volume fraction, as shown in Figure 3.35. Not only must the minimization process navigate the curved narrow trench to reach the target shape as in the previous example, it must also avoid the constant value single-phase region in the upper right-hand corner of the plot because the cost function gradient in that region is zero and could cause the descent method to stop prematurely. Convergence is significantly improved by replacing the method of steepest descent with the L-BFGS-B quasi-Newton method. For the multiphase inverse design based on pressure, the cost function is reduced more than eight orders of magnitude in 34 design cycles, as shown in Figure 3.36. The corresponding trajectory is shown relative to the cost function contours in Figure 3.37. Similar success is also achieved when the L-BFGSB method is applied to multiphase inverse design based on volume fraction. Again, the cost function is reduced by more than six orders of magnitude in 31 design cycles, as
114
Fig. 3.35. Cost function contours for multiphase inverse design based on volume fraction
Fig. 3.36. Evolution of the cost function for multiphase inverse design based on pressure using L-BFGS-B for two design variables
115
Fig. 3.37. Cost function contours and L-BFGS-B trajectory for multiphase inverse design based on pressure
shown in Figure 3.38, and the corresponding trajectory is shown relative to the cost function contours in Figure 3.39. Likewise, success is achieved when the L-BFGS-B method is applied to the multiphase inverse design based on pressure using seven design variables and a target pressure distribution corresponding to the baseline nozzle geometry, which was the first multiphase problem that was posed at the beginning of this section. With the improved method, the cost function is reduced by more than five orders of magnitude over 63 design cycles, as shown in Figure 3.40, and the specified pressure distribution is achieved by the final geometry, as shown in Figure 3.41. Finally, the L-BFGS-B method is applied to the second multiphase problem that was posed at the beginning of this section — multiphase inverse design based on volume fraction using seven design variables in which the target volume fraction distribution shifts the baseline cavity upstream by ∆x = 0.2. Unfortunately, the descent method in this case remains susceptible to false termination due to the zero gradient region that corresponds to single-phase solutions. To avoid this problem, the cost function must be
116
Fig. 3.38. Evolution of the cost function for multiphase inverse design based on volume fraction using L-BFGS-B for two design variables
Fig. 3.39. Cost function contours and L-BFGS-B trajectory for multiphase inverse design based on volume fraction
117
Fig. 3.40. Evolution of the cost function for multiphase inverse design based on pressure using L-BFGS-B for seven design variables
Fig. 3.41. Evolution of the pressure profiles for multiphase inverse design based on pressure using L-BFGS-B for seven design variables
118 modified so that it can distinguish among various single-phase geometries; e.g., 1
Z J = w1
0
Z + w5
1 2 (α − αtar ) dx 2
0.51
0.31
2 1 p − pvap dx. 2
(3.22)
If w5 is taken to be a small number, then the original intent is maintained but false terminations associated with single-phase solutions are avoided. In the present example, the weights are defined as w1 = 1 and w5 = 0.1, in which case the cost function is reduced by nearly three orders of magnitude over 45 design cycles, as shown in Figure 3.42.
Fig. 3.42. Evolution of the cost function for multiphase inverse design based on volume fraction using L-BFGS-B for seven design variables
Unlike in the previous examples, the target geometry is unknown, and there is no guarantee that any geometry exists that can provide the specified volume fraction distribution much less provide exactly the pressure distribution associated with w5 in Eq. (3.22). With that in mind, the volume fraction distribution achieved by the final
119 geometry is a good approximation to the target profile, as shown in Figure 3.43, while the associated design variables and area distribution are shown in Figure 3.44.
Fig. 3.43. Evolution of the volume fraction profiles for multiphase inverse design based on volume fraction using L-BFGS-B for seven design variables
3.5
Summary This chapter has presented the development and validation of a continuous ad-
joint method for a transport-equation-based cavitation model, producing cost function gradients in quasi-one-dimensional multiphase flow that agree well with complex-step finite difference methods for a variety of different cost functions. In the multiphase flow examples, the adjoint method proved to be very sensitive to grid refinement, especially for the first-order method. A high-resolution method with wave limiters was shown to significantly improve the grid resolution requirements. Initial applications of the method within the context of multiphase inverse design revealed pathological behavior characteristic of the method of steepest descent for surfaces that are not “well-scaled;” i.e., surfaces for which the eigenvalues of the Hessian
120
Fig. 3.44. The initial (baseline) and final geometries for the seven-variable inverse design problem based on volume fraction
matrix are widely spaced, meaning that the curvature is significantly higher in one direction than the other. In fact, the surfaces presented in Figure 3.34 and Figure 3.35 are strikingly similar to the so-called Rosenbrock function, shown in Figure 3.45, which was constructed specifically to demonstrate failure modes of standard steepest descent methods [70] and which became a popular testbed for the subsequent development of quasi-Newton methods [71] leading to the L-BFGS-B method that ultimately proved successful here. Ultimately, it was shown that the continuous adjoint method could be used to solve multiphase design problems based on the transport-equation-based model when advanced minimization methods are combined with careful cost function design. By extending this method to two- and three-dimensional flow, design improvements could be directly inferred from CFD simulations of many inherently multiphase flows, such as cavitation breakdown of low-head turbines and applications involving the introduction of air or other non-condensable gases.
121
Fig. 3.45. The Rosenbrock function
122
Chapter 4
Summary, Conclusions, and Future Work
To the author’s knowledge, this dissertation represents the first application of continuous adjoint methods to cavitating flow generally and to barotropic and transportequation-based models specifically. This work is only the first step in building a practical CFD-based design tool for multiobjective shape optimization in multiphase flows that could improve the efficiency and operating range of hydropower devices such as run-ofriver turbines. Considerable follow-on work is required to meet this long-term objective, but as recounted in the sections below, the work described here has provided a strong foundation in the critical technical areas and has significantly narrowed the scope for future research.
4.1
Summary Continuous adjoint formulations for multiphase flow based on two homogeneous
mixture models — a barotropic model and a transport-equation-based model — have been developed here and were shown to accurately calculate cost function gradients compared to standard and complex-step finite difference methods. For the barotropic model, a derivation was presented for the multiphase adjoint field equations to which it was shown that standard explicit Runge-Kutta methods could be successfully applied. Specifically, a four-stage hybrid explicit method was used with second- and fourth-order scalar artificial dissipation governed by Jameson-type switches based on the local pressure and density gradients, although only fourth-order dissipation was required for the adjoint solutions presented here. Only local time-stepping was used for convergence acceleration, but ten orders of magnitude reduction in the residual was reliably obtained in all cases using a CFL number of 2.
123 The cost function gradient itself was derived in a “reduced gradient” form, meaning that it consisted of integration over only the design surface, which makes it suitable for application on structured, unstructured, or overset grids. The fact that the state equation for the mixture density is barotropic means that cost functions based on surface integration of the density were readily admissible, so both surface-based and volume-based cost functions specific to multiphase flow were designed to minimize the presence of vapor. The accuracy of the corresponding adjoint-based cost function gradients was demonstrated for cavitating flow over a NACA66(MOD) foil using B-spline control points for the design variables, which facilitated comparison with cost function gradients calculated using complex-step finite difference methods. Excellent agreement was observed for the volume-based vapor minimization cost function with two exceptions. First, large grid uncertainty in the adjoint method cost function gradient was observed at the trailing edge of the foil, which was modeled as a sharp edge and discretized with an O-type mesh, although this was observed in the single-phase results as well and has been observed in other research [17]. More importantly, grid convergence was not demonstrated for the design variable associated with the bubble collapse location, which was observed to have large grid sensitivity in the primary solution. Agreement of the cost function gradients was not as good for the surface-based vapor minimization cost function, which demonstrated larger grid sensitivity overall and at the leading and trailing edge of the foil in particular. The barotropic model provided a convenient entry into adjoint methods for multiphase flows because of its mathematical similarity to the compressible Euler equations and because it is useful for design analysis in relatively simple cavitating flows. The transport-equation-based model represents the next level of predictive capability, adding a transport equation and mass transfer source terms for the constituent fluids. These source terms led to a stiff system that made application of the explicit solver impractical for the primary equations and unstable for the adjoint equations. For the transport-equation-based model, an implicit solution method was employed instead for the primary equations, and a corresponding fluctuation-splitting method
124 was used to discretize the non-conservative, linear system of adjoint equations. The firstorder fluctuation-splitting method was shown to exhibit severe grid dependence for the adjoint solution, providing gradients on coarse grids that were not only inaccurate in magnitude but often of the wrong sign. High-resolution terms in conjunction with superbee wave limiters were added and shown to significantly improve the accuracy and grid-dependence of the solutions. Preconditioning is important for the stability and convergence characteristics of the primary flow solvers for both the barotropic and transport-equation-based models, and as such, it was introduced into the corresponding adjoint equations in each case. This is especially important for the transport-equation-based model, where the preconditioning renders the system hyperbolic and eliminates any dependence on the density ratio from the eigenvalues of the flux Jacobian matrix. In addition, it was found that including the gradient of the preconditioning matrix in the adjoint system for the transport-equation-based model was critical in achieving accurate cost function gradients in multiphase flows — an important point since it departs from guidance given in the literature in the context of low Mach-number preconditioning [50]. Development of the adjoint solver was carried out using a quasi-one-dimensional model of a converging-diverging nozzle with both single-phase and cavitating flow. The nozzle cross-sectional area distribution was parameterized using a B-spline, and the Bspline control points were again chosen as the design variables in order to facilitate comparison of the cost function gradient with finite-difference methods. The quasi-one-dimensional single-phase flow affords an analytical expression for the cost function gradient that was useful as a simple verification of the solution method. For cavitating flow, verification was accomplished by comparison with complex-step finite difference methods for a variety of cost functions including both L1 and L2 norms of both the pressure and volume fraction distributions. Cost functions written in terms of density or vapor volume fraction on the surface are an obvious choice in the context of cavitating flow, but for the transport-equationbased model, such cost functions are not readily admissible. Appendix B applied the method of auxiliary boundary equations to derive boundary conditions for the adjoint
125 velocity that potentially accommodate much more general surface-based cost functions, allowing functions of the liquid volume fraction or tangential velocity in addition to functions of pressure for the inviscid transport-equation-based model. The results in Chapter 3 showed that accurate cost function gradients could be calculated using the adjoint methods developed for the transport-equation-based model; however, minimization of the cost function was not achieved when these gradients were used to inform a method of steepest descent in the context of multiphase flow. Simple two-variable inverse design problems for cavitating flow in a quasi-one-dimensional converging-diverging nozzle revealed two reasons for this. First, whether the inverse design problem was written in terms of a specified volume fraction or a specified pressure, it could be seen that the minimization surface was poorly conditioned and characterized by a long, curved valley. In such cases, the poor performance characteristics of fixed-step method of steepest descent are well-known. Second, when the inverse design problem was written in terms of volume fraction, a zero-gradient plateau formed in the minimization surface corresponding to design variable combinations that led to single-phase flow. The minimization surfaces in the multiphase flow problem sharply contrasted with the surface generated for pressure-based inverse design in single-phase flow, in which case the surface was clearly convex and a minimum was readily achieved using a simple method of steepest descent. Despite these problems, the examples in Chapter 3 showed that the minimization problems could be solved even in multiphase flow by employing a more advanced quasi-Newton descent method and through careful cost function design.
4.2
Conclusions The lessons that were garnered during the course of this research, and that were
summarized in the previous section, reduce to a few important conclusions that should expedite any follow-on research in this area: 1. This dissertation establishes that development of the barotropic adjoint model can be carried forward using traditional adjoint solution methods established in the literature for single-phase compressible flow, owing to the mathematical similarity
126 between the barotropic model and the compressible Euler or Navier-Stokes equations. This conclusion is supported in Chapter 2 by the success of the explicit solution method and the accuracy of the gradient for the volume-based vapor minimization cost function and by the successful application of the steepest descent method in several shape optimization examples involving multiphase flow. 2. For the transport-equation-based model, mass transfer source terms add stiffness to the system, which dictates the use of an implicit solution method for the primary equations. These mass transfer source terms as well as the spatially-varying matrix preconditioning required by the transport-equation-based model give rise to source terms in the adjoint equations that are linear in the adjoint variable — terms which did not arise for the adjoint equations corresponding to the barotropic model. These adjoint source terms cause the explicit solver to be unstable, so an implicit method is required for the adjoint equations as well. 3. The work documented here has revealed that the adjoint solution for the transportequation-based model is characterized by discontinuities, which results from the fact that the mass transfer source terms are not continuously differentiable. This causes the numerical method to be highly sensitive to grid resolution, and so the use of high-order methods is required to make two- and three-dimensional simulations feasible. 4. The results provided at the end of Chapter 3 show that the inverse design cost function contours for the quasi-one-dimensional multiphase flow using the transportequation-based model are non-convex and poorly conditioned, meaning that they have much higher curvature in one direction than the other. The method of steepest descent is known to perform poorly in such cases, so multiphase flow optimization with the transport-equation-based model requires more advanced methods such as the low-memory quasi-Newton method that was applied successfully here.
127
4.3
Future Work The discussion in the previous two sections has already hinted at several areas
for future work. Some of the most important of these recommendations are elaborated upon next. Development of the barotropic adjoint model should be continued along its current course, including the straightforward extension to three dimensions and the addition of viscous terms. Implementation of more advanced convergence acceleration techniques such as multigrid is essential, although the expectation is that the methods established in the literature for single-phase compressible flow should be directly applicable. The quasi-one-dimensional model proved to be a valuable platform for the development of the adjoint methods for the transport-equation-based model, but extension to two-dimensional flow is the obvious next step for further development. On the surface, the solution method described in Section 3.2.2 for the transport-equation-based adjoint equations is straightforward to extend to two dimensions. Efforts toward that end were pursued as part of the current work (direct LU decomposition was used to solve the linearized system), but the results for the volume-based vapor minimization cost function applied to the cavitating flow over the NACA66(MOD) foil were not in good agreement with the gradient calculated by the complex-step finite difference method. The first course in reconciling this difference is to eliminate grid sensitivity, especially given the severity of the grid dependence that was observed in the quasi-onedimensional system; however, such efforts are immediately complicated by the primary flow solver in the case of the transport-equation-based model because grid refinement of the inviscid flow field quickly leads to an unsteady and unstable bubble collapse region. This result is not surprising but dictates that for the transport-equation-based model, the extension to viscous, turbulent flow should be completed sooner rather than later since this may help to stabilize moderate attached cavities. But it also raises more serious research questions about the intrinsically unsteady nature of these flow fields. Previous research has shown that up to the point of cavitation breakdown and even shortly thereafter, accurate predictions of the cavitating flow field can be obtained without any unsteady modeling [72], so steady-state solutions or a time average of the primary flow
128 field may prove to be sufficient as input to a steady adjoint solver for the flows of interest here. Beyond that point, the cavitation might be characterized by a dominant shedding frequency, at which point it might be possible to retain only the dominant frequencies in the primary flow field while utilizing a temporally periodic solution for the adjoint system. For the transport-equation-based model, generalized boundary conditions were developed that support surface-based cost functions written in terms of density, volume fraction, or tangential velocity, but it is not clear that the resulting periodic system of linear ordinary differential equations that must be solved on the surface would be usable in practice, and so it would be interesting to further develop this topic. On the other hand, results from the barotropic model suggest that volume-based cost functions offer several advantages (proving to be both more flexible and more accurate in the initial results presented in Chapter 2), so future work should examine whether a volume-based cost function in which the integration volume is restricted to the cells adjacent to the surface provides a sufficient and practical alternative. Extension of the transport-equation-based model to higher dimensions would provide the means to demonstrate the full optimization method with both models. A possible test case that relates to the bulb turbine cavitation breakdown problem (e.g., [1]) would be to redesign a hydrofoil to maintain lift over a broader range of the cavitation index. The test case to minimize volume vapor while specifying lift that was presented in Chapter 2 was a first step in this direction, but the resulting geometry in that case revealed a common problem associated with single-point optimization — that the geometry is optimized for a specific flow condition but in a way that would significantly deteriorate performance for even slight departures from that design condition. More attention to the definition of the design problem and possibly multipoint optimization is required in that case as has been well-documented for single-phase flow [35–41, 57, 58]. Despite this list of remaining technical hurdles, the present work clearly demonstrates how to formulate and use a continuous adjoint method to efficiently and accurately calculate cost function gradients in multiphase flow, thus serving as the basis for a new shape optimization method for hydroelectric designs in multiphase flows.
129
Bibliography
[1] J. Necker and T. Aschenbrenner. Model test and CFD calculation of a cavitating bulb turbine. IOP Conference Series: Earth and Environmental Sciences, 12, 2010. [2] Fernando Casanova. Failure analysis of the draft tube connecting bolts of a Francistype hydroelectric power plant. Engineering Failure Analysis, 16(7):2202–2208, October 2009. [3] O. Kirschner, H. Schmidt, A. Ruprecht, R. Mader, and P. Meusburger. Experimental investigation of vortex control with an axial jet in the draft tube of a model pumpturbine. IOP Conference Series: Earth and Environmental Sciences, 12(1):012092, 2010. [4] F. Bunea, S. Houde, G.D. Ciocan, G. Oprina, G. Baran, and I. Pincovschi. Aspects concerning the quality of aeration for environmental friendly turbines. IOP Conference Series: Earth and Environmental Sciences, 12:012035, 2010. [5] Pardeep Kumar and R. P. Saini. Study of cavitation in hydro turbines — A review. Renewable and Sustainable Energy Reviews, 14(1):374–383, January 2010. [6] Shuhong Liu, Qingguang Chen, and Yuliun Wu. Unsteady Cavitating Turbulent Flow Simulation in a Kaplan Turbine. In 2nd IAHR International Meeting of the Workgroup on Cavitation and Dynamic Problems in Hydraulic Machinery and Systems, 24-26 October, 2007, Timisoara, Romania, 2007. [7] Shuhong Liu, Liang Zhang, Michihiro Nishi, and Yulin Wu. Cavitating Turbulent Flow Simulation in a Francis Turbine Based on Mixture Model. Journal of Fluids Engineering, 131(5):1361–1364, May 2009. [8] Yulin Wu, Shuhong Liu, Hua-Shu Dou, and Liang Zhang. Simulations of unsteady cavitating turbulent flow in a Francis turbine using the RANS method and the improved mixture model of two-phase flows. Engineering with Computers, 2010.
130 [9] Z. Qian, J. Yang, and W. Huai. Numerical simulation and analysis of pressure pulsation in Francis hydraulic turbine with air admission. Journal of Hydrodynamics, Ser. B., 19:467–472, 2007. [10] O. Pironneau. On optimum profiles in Stokes flow. Journal of Fluid Mechanics, 59(1):117–128, 1973. [11] O. Pironneau. On optimum design in fluid mechanics. Journal of Fluid Mechanics, 64(1):97–110, 1974. [12] Antony Jameson. Aerodynamic design via control theory. Journal of Scientific Computing, 3(3):233–260, 1988. [13] Antony Jameson. Advances in Aerodynamic Shape Optimization. In Computational Fluid Dynamics 2004: Proceedings of the 3rd International Conference on Computational Fluid Dynamics, ICCFD3, Toronto, 12-16 July 2004. Springer, New York, 2006. [14] Antony Jameson and Sangho Kim. Reduction of the Adjoint Gradient Formula for Aerodynamic Shape Optimization Problems. AIAA Journal, 41(11):2114–2129, November 2003. [15] Antony Jameson, Sriram Shankaran, and Luigi Martinelli. Continuous Adjoint Method for Unstructured Grids. AIAA Journal, 46(5):1226–1239, May 2008. [16] Sriram Shankaran, Antony Jameson, and Luigi Martinelli. Analysis and shape optimization in incompressible flows with unstructured grids. Computers & Fluids, 39:1774–1788, 2010. [17] James J. Dreyer. Hydrodynamic Shape Optimization of Propulsor Configurations Using A Continuous Adjoint Approach. PhD thesis, Penn State University, 2002. [18] Antony Jameson and Sangho Kim. Reduction of the Adjoint Gradient Formula in the Continuous Limit. In AIAA Paper 2003-0040, 41st AIAA Aerospace Sciences Meeting and Exhibit, January 6-9, 2003, Reno, Nevada, 2003.
131 [19] Antony Jameson, Sriram Shankaran, and Luigi Martinelli. A continuous adjoint method for unstructured grids. In AIAA Paper 2003-3955, 16th CFD Conference, June 23-26, 2003, Orlando, FL, 2003. [20] O. Soto and R. Lohner. On the Boundary Computation of Flow Sensitivities. In AIAA Paper 2004-0112, 42nd AIAA Aerospace Sciences Meeting and Exhibit, 5-8 January, 2004, Reno, Nevada, 2004. [21] Carlos Castro, Carlos Lozano, Francisco Palacios, and Enrique Zuazua. A Systematic Continuous Adjoint Approach to Viscous Aerodynamic Design on Unstructured Grids. In AIAA Paper 2006-0051, 44th AIAA Aerospace Sciences Meeting and Exhibit, 9-12 January, 2006, Reno, Nevada, 2006. [22] Carlos Castro, Carlos Lozano, Francisco Palacios, and Enrique Zuazua. Systematic Continuous Adjoint Approach to Viscous Aerodynamic Design on Unstructured Grids. AIAA Journal, 45(9):2125–2139, September 2007. [23] D. I. Papadimitriou and K. C. Giannakoglou. Compressor Blade Optimization Using a Continuous Adjoint Formulation. In GT2006/90466, Proceedings of GT2006, 2006 ASME TURBO EXPO, 8-11 May 2006, Barcelona, Spain, 2006. [24] D. I. Papadimitriou and K. C. Giannakoglou. A continuous adjoint method with objective function derivatives based on boundary integrals, for inviscid and viscous flows. Computers & Fluids, 36:325–341, 2007. [25] D. X. Wang and L. He. Adjoint Aerodynamic Design Optimization for Blades in Multistage Turbomachines – Part I: Methodology and Verification. Journal of Turbomachinery, 132(4), April 2010. [26] A. S. Zymaris, D. I. Papadimitriou, K. C. Giannakoglou, and C. Othmer. Continuous adjoint approach to the Spalart-Allmaras turbulence model for incompressible flows. Computers & Fluids, 38:1528–1538, 2009.
132 [27] A. S. Zymaris, D. I. Papadimitriou, K. C. Giannakoglou, and C. Othmer. Adjoint wall functions: A new concept for use in aerodynamic shape optimization. Journal of Computational Physics, 229:5228–5245, 2010. [28] Joongcheol Paik, Fotis Sotiropoulos, and Michael J. Sale. Numerical Simulation of Swirling Flow in Complex Hydroturbine Draft Tube Using Unsteady Statistical Turbulence Models. Journal of Hydraulic Engineering, 131(6):441–456, June 2005. [29] Cedric Duprat, Guillaume Balarac, Olivier Metais, Sylvain Tridon, Stephane Barre, Gabriel Dan Ciocan, Thomas Laverne, and Laurent Tomas. Large-Eddy Simulation of Draft Tube Flow and Validation from Experimental Measurements. In 3rd IAHR International Meeting of the Workgroup on Cavitation and Dynamic Problems in Hydraulic Machinery and Systems, 14-16 October, 2009, Brno, Czech Republic, 2009. [30] Y. Xiao, Z. Wang, Z. Yan, and J. Zhang. Experimental and numerical analysis of pressure pulses characteristics in a Francis turbine with partial load. IOP Conference Series: Earth and Environmental Sciences, 12, 2010. [31] Olivier Petit, Alin I. Bosioc, Hakan Nilsson, Sebastian Muntean, and Romeo F. Susan-Resiga.
Unsteady Simulations of the Flow in a Swirl Generator, Using
OpenFOAM. International Journal of Fluid Machinery and Systems, 4(1):199–208, January–March 2011. [32] Siva K. Nadarajah and Antony Jameson. Optimal Control of Unsteady Flows Using a Time Accurate Method. In AIAA Paper 2002-5436, 9th AIAA/ISSMO Symposium on Multidisciplinary Analysis and Optimization Conference, 4-6 September, 2002, Atlanta, GA, 2002. [33] Maryse Page, Martin Beaudoin, and Anne-Marie Giroux. Steady-state Capabilities for Hydroturbines with OpenFOAM. International Journal of Fluid Machinery and Systems, 4(1):161–171, 2011.
133 [34] D. Anciger, A. Jung, and T. Aschenbrenner. Prediction of rotating stall and cavitation inception in pump turbines. IOP Conference Series: Earth and Environmental Sciences, 12, 2010. [35] David W. Zingg and Samy Elias. Aerodynamic optimization under a range of operating conditions. AIAA Journal, 44(11):2787–2792, 2006. [36] Antony Jameson, Kasidit Leoviriyakit, and Sriram Shankaran. Multi-point AeroStructural Optimization of Wings Including Planform Variations. In AIAA Paper 2007-764, 45th AIAA Aerospace Sciences Meeting and Exhibit, January 8-11, 2007, Reno, Nevada, 2007. [37] Boris Epstein, Antony Jameson, Sergey Peigin, Dino Roman, Neal Harrison, and John Vassberg. Comparative Study of 3D Wing Drag Minimization by Different Optimization Techniques. In AIAA Paper 2008-326, 46th AIAA Aerospace Sciences Meeting and Exhibit, January 7-10, 2008, Reno, Nevada, 2008. [38] Howard P. Buckley and David W. Zingg. On Aerodynamic Design Through Multipoint Numerical Optimization. In AIAA Paper 2011-1244, 49th AIAA Aerospace Sciences Meeting and Exhibit, 4-7 January, 2011, Orlando, Florida, 2011. [39] Mark Drela. Frontiers of computational fluid dynamics, chapter Pros & Cons of Airfoil Optimization, pages 363–381. World Scientific, River Edge, NJ, 1998. [40] W. Li, L. Huyse, and S. Padula. Robust airfoil optimization to achieve drag reduction over a range of Mach numbers. Structural and Multidisciplinary Optimization, 24(1):38–52, 2002. [41] Susan E. Cliff, James J. Reuther, David A. Saunders, and Raymond M. Hicks. Single-Point and Multipoint Aerodynamic Shape Optimization of High-Speed Civil Transport. Journal of Aircraft, 38(6):997–1005, November-December 2001. [42] Inanc Senocak and Wei Shyy. A Pressure-Based Method for Turbulent Cavitating Flow Computations. Journal of Computational Physics, 176:363–383, 2002.
134 [43] O. Coutier-Delgosha, R. Fortes-Patella, J. L. Reboud, M. Hofmann, and B. Stoffel. Experimental and Numerical Studies in a Centrifugal Pump with Two-Dimensional Curved Blades in Cavitating Condition. Journal of Fluids Engineering, 125(6):970– 978, November 2003. [44] Vahid Esfahanian, Pooria Akbarzadeh, and Kazem Hejranfar. An improved progressive preconditioning method for steady non-cavitating and sheet-cavitating flows. International Journal for Numerical Methods in Fluids, 2010. [45] Vahid Esfahanian, Pooria Akbarzadeh, and Kazem Hejranfar. An improved progressive preconditioning method for steady non-cavitating and sheet-cavitating flows. International Journal for Numerical Methods in Fluids, 68:210–232, 2012. [46] Y. Delannoy and J. L. Kueny. Two-Phase Flow Approach in Unsteady Cavitation Modeling. In Cavitation and Multiphase Flow Forum, 1990. [47] Eli Turkel. Preconditioned Methods for Solving the Incompressible and Low Speed Computational Equations. Journal of Computational Physics, 72:277–298, 1987. [48] Antony Jameson, Wolfgang Schmidt, and Eli Turkel. Numerical Solution of the Euler Equations by Finite Volume Methods Using Runge-Kutta Time-Stepping Schemes. In AIAA Paper 1981-1259, 14th AIAA Fluid and Plasma Dynamics Conference, June 23-25, 1981, Palo Alto, California, 1981. [49] Antony Jameson. Numerical Solution of the Euler Equation for Compressible Inviscid Fluids. Technical Report MAE 1643, Princeton University, December 1983. [50] Varvara G. Asouti, Dimitrios I. Papadimitriou, and Kyriakos C. Giannakoglou. Continuous Adjoint Method with Low-Mach Number Preconditioning. In Pekka Neittaanmaki, Jacques Periaux, and Tero Tuovinen, editors, Evolutionary and Deterministic Methods for Design, Optimization and Control, 2007. [51] Young T. Shen and Paul E. Dimotakis. The influence of surface cavitation on hydrodynamic forces. In Proceedings of the 22nd ATTC, pages 44–53, St. Johns, Newfoundland and Labrador, Canada, 1989.
135 [52] Terry Brockett. Minimum Pressure Envelopes for Modified NACA-66 Sections with NACA a = 0.8 Camber and Buships Type I and Type II Sections. Technical Report Report 1780, David Taylor Model Basin Hydromechanics Laboratory, February 1966. [53] W. Kyle Anderson and Daryl L. Bonhaus. Airfoil Design on Unstructured Grids for Turbulent Flows. AIAA Journal, 37(2):185–191, February 1999. [54] David S. Watkins. Fundamentals of Matrix Computations. John Wiley & Sons, 1991. [55] Huaiping Yang, Wenping Wang, and Jiaguang Sun. Control point adjustment for B-spline curve approximation. Computer-Aided Design, 36(7):639–652, 2004. [56] Joaquim R. R. A. Martins, Peter Sturdza, and Juan J. Alonson. The ComplexStep Derivative Approximation. ACM Transactions on Mathematical Software, 29(3):245–262, September 2003. [57] James J. Dreyer. Blade Shaping for Off-Design Performance: Cavitation and Efficiency in Two-Dimensional Cascades. In Proceedings of the 4th International Conference on Marine Hydrodynamics, Southampton, UK, 2005. [58] Luigi Martinelli and James J. Dreyer. Frontiers of Computational Fluid Dynamics, chapter Design Optimization of Propeller Blades, pages 81–95. World Scientific, London, 2006. [59] Thaithacha Sudsuansee, Udomkiat Nontakaew, and Yodchai Tiaple. Simulation of leading edge cavitation on bulb turbine. Songklanakarin Journal of Science and Technology, 33(1):51–60, 2011. [60] Robert F. Kunz, David A. Boger, David R. Stinebring, Thomas S. Chyczewski, Jules W. Lindau, Howard J. Gibeling, Sankaran Venkateswaran, and T. R. Govindan. A preconditioned Navier-Stokes method for two-phase flows with application to cavitation prediction. Computers & Fluids, 29:849–875, 2000.
136 [61] C.L. Merkle, J.Z. Feng, and P.E.O. Buelow. Computational Modeling of the Dynamics of Sheet Cavitation. In Third International Symposium on Cavitation, Grenoble, France, 7-10 April, 1998, pages 307–311, 1998. [62] Ashok K. Singhal, Mahesh M. Athavale, Huiying Li, and Yu Jiang. Mathematical Basis and Validation of the Full Cavitation Model. Journal of Fluids Engineering, 124(3):617–624, September 2002. [63] Michael B. Giles and Niles A. Pierce. On the Properties of Solutions of the Adjoint Euler Equations. In Numerical Methods for Fluid Dynamics VI. ICFD, pages 1–16, 1998. [64] W. Kyle Anderson, James L. Thomas, and Bram Van Leer. Comparison of Finite Volume Flux Vector Splittings for the Euler Equations. AIAA Journal, 24(9):1453– 1460, September 1986. [65] Ami Harten, Bjorn Engquist, Stanley Osher, and Sukumar R. Chakravarthy. Uniformly High Order Accurate Essentially Non-oscillatory Scheme, III. Journal of Computational Physics, 71:231–303, 1987. [66] Chi-Wang Shu.
Essentially Non-Oscillatory and Weighted Essentially Non-
Oscillatory Schemes for Hyperbolic Conservation Laws.
Technical Report
NASA/CR-97-206253, Institute for Computer Applications in Science and Engineering (ICASE), Hampton, VA, November 1997. [67] Xu-Dong Liu, Stanley Osher, and Tony Chan. Weighted Essentially Non-oscillatory Schemes. Journal of Computational Physics, 115:200–212, 1994. [68] Randall J. LeVeque. Finite Volume Methods for Hyperbolic Problems. Cambridge University Press, 2002. [69] Ciyou Zhu, Richard H. Byrd, Peihuang Lu, and Jorge Nocedal. Algorithm 778: L-BFGS-B: Fortran Subroutines for Large-Scale Bound-Constrained Optimization. ACM Transactions on Mathematical Software, 23(4):550–560, December 1997.
137 [70] H. H. Rosenbrock. An Automatic Method for finding the Greatest or Least Value of a Function. The Computer Journal, 3:175–184, 1960. [71] R. Fletcher and M.J.D. Powell. A rapidly convergent descent method for minimization. The Computer Journal, 6:163–168, 1963. [72] Jules W. Lindau, Christopher Pena, Warren J. Baker, James J. Dreyer, William L. Moody, Robert F. Kunz, and Eric G. Paterson. Modeling of Cavitating Flow through Waterjet Propulsors.
International Journal of Rotating Machinery,
2012(716392):13, 2012. [73] Eyal Arian and Manuel D. Salas. Admitting the Inadmissible: Adjoint Formulation for Incomplete Cost Functionals in Aerodynamic Optimization. Technical Report NASA/CR-97-206269, Institute for Computer Applications in Science and Engineering (ICASE), Hampton, VA, December 1997. [74] Eyal Arian and Manuel D. Salas. Admitting the Inadmissible: Adjoint Formulation for Incomplete Cost Functionals in Aerodynamic Optimization. AIAA Journal, 37(1):37–44, January 1999. [75] V.A. Eremenko. Periodic Solutions of Systems of Two Linear First-Order Ordinary Differential Equations with Degenerate Asymmetric Matrix with Derivatives. Ukranian Mathematical Journal, 50(3):400–407, 1998. [76] Eyal Arian and Manuel D. Salas. Adjoint formulation using auxiliary boundary equations (ABEs) demonstrated on the Stokes equations. In Charles-Henri Bruneau, editor, Proceedings of the Sixteenth International Conference on Numerical Methods in Fluid Dynamics, Arcachon, France, Lecture Notes in Physics, vol. 515, pages 355–360, New York, 1998. Springer. [77] Radu Serban and Alan C. Hindmash. CVODES, The sensitivity-enabled ODE solver in SUNDIALS. In DETC2005-85597, Proceedings of the IDETC/CIE 2005, ASME International Design Engineering Technical Conferences & Computers and Information in Engineering Conference, 24-28 September, 2005, Long Beach, California, 2005.
138 [78] Bart van Bloemen Waanders, Roscoe Bartlett, Kevin Long, Paul Boggs, and Andrew Salinger. Large Scale Non-Linear Programming for PDE Constrained Optimization. Technical Report SAND2002-3198, Sandia National Laboratories, October 2002. [79] Chris Homescu and I.M. Navon. Optimal control of flow with discontinuities. Journal of Computational Physics, 187(2):660–682, May 2003. [80] Emmanuel Laporte. Optimisation de Formes pour Ecoulements Instationnaires. PhD thesis, l’Ecole Polytechnique, September 1998. [81] Jeffrey W. Yokota and Adam J. Medd. Shock Fitting of a Transonic Cascade Solution into an Inverse Design Technique. Journal of Propulsion and Power, 18(1):107– 115, January–February 2002. [82] Linda Petzold, Shengtai Li, Yang Cao, and Radu Serban. Sensitivity Analysis of differential-algebraic equations and partial differential equations. Computers & Chemical Engineering, 30(10–12):1553–1559, September 2006. [83] D. I. Papadimitriou and K. C. Giannakoglou. Aerodynamic Shape Optimization Using First and Second Order Adjoint and Direct Approaches. Arch Comput Methods Eng, 15:447–488, 2008. [84] D. I. Papadimitriou and K. C. Giannakoglou. Computation of the Hessian matrix in aerodynamic inverse design using continuous adjoint formulations. Computers & Fluids, 37(8):1029–1039, 2008. [85] P.W. Fick, K.G. van der Zee, and E.H. van Brummelen. Goal-oriented a-posteriori error estimation and adaptivity for fluid-structure interaction. Technical Report DACS-08-001, Delft Aerospace Computational Science, May 2008. [86] Alan Le Moigne. A discrete Navier-Stokes adjoint method for aerodynamic optimisation of Blended Wing-Body configurations. PhD thesis, Cranfield University, December 2002.
139 [87] Kyriakos C. Giannakoglou and Dimitrios I. Papadimitriou. Optimization and Computational Fluid Dynamics, chapter Adjoint Methods for Shape Optimization, pages 79–106. Springer, Berlin, 2008. [88] Angelo Iollo and Luca Zannetti. Body-Fitted Adjoint Formulation of the Euler Equations. Journal of Computational Fluid Dynamics, 13(4):393–396, 2000. [89] Antonio Baeza, Carlos Castro, Francisco Palacios, and Enrique Zuazua. 2-D Euler Shape Design on Nonregular Flows Using Adjoint Rankine-Hugoniot Relations. AIAA Journal, 47(3):552–562, March 2009. [90] Mihai Alexe and Adrian Sandu. Space-time adaptive solution of inverse problems with the discrete adjoint method. Technical Report TR-10-14, Computer Science, Virginia Tech, November 2010. [91] Oktay Baysal and Kaveh Ghayour.
Continuous Adjoint Sensitivities for Opti-
mization with General Cost Functionals on Unstructured Meshes. AIAA Journal, 39(1):48–55, January 2001. [92] Shengtai Li and Linda Petzold. Adjoint sensitivity analysis for time-dependent partial differential equations with adaptive mesh refinement. Journal of Computational Physics, 198(1):310–325, July 2004.
140
Appendix A
Eigendecomposition for the Quasi-One-Dimensional Transport-Equation-Based Model
For the quasi-one-dimensional transport-equation-based model, the eigendecom−1
position of ΓA is defined by ΓA = QΛQ
, where Λ is the matrix of eigenvalues of ΓA
and Q is the matrix of right eigenvectors. Specifically, the eigenvalues are λ1 = u λ2 = u − c λ3 = u + c, q 2 2 where c = u + β , and
0 −ρ(u + c) −ρ(u − c) Q = 0 . 1 1 1 0 0
T
Similarly, the eigendecomposition of B = −h(ΓA) is defined by B = T ΛB T
−1
,
where ΛB is the matrix of eigenvalues of B, and T is the matrix of right eigenvectors. In that case, the eigenvalues are λB,1 = −hu λB,2 = −h(u − c) λB,3 = −h(u + c),
141 q 2 2 where c = u + β , and
2
2
0 −(u + c)/(ρβ ) −(u − c)/(ρβ )
T = 0 1
1
1
0
0
.
142
Appendix B
Incomplete Cost Functions and the Use of Auxiliary Boundary Equations
Cost functions written in terms of density or vapor volume fraction on the surface are an obvious choice in the context of cavitating flow. But for the inviscid multiphase models considered in this dissertation, the derivation of the adjoint boundary conditions — i.e., the analysis in Section 2.1.2 leading up to Eq. (2.19) — showed that the only admissible surface-based cost functions are those that depend solely on pressure. For the barotropic model, cost functions based on density at the surface are admissible because density depends only on pressure. But for the transport-equation-based model, cost functions written in terms of density or volume fraction on the surface are usually considered to be inadmissible. Arian and Salas explained that cost functions previously thought of as inadmissible are instead only incomplete in the sense that they fail to cancel the naturally occurring boundary terms that result when the field equations are integrated by parts over the domain [73, 74]. In the case that the cost function is found to be incomplete, the boundary value problem for the adjoint variable can still be formulated by introducing auxiliary boundary equations (ABEs) that include the missing terms into the augmented cost function. A natural choice for the ABEs is the restriction of the governing flow field equations to the boundary. This appendix applies the ABE method to extend the set of admissible surfacebased cost functions for the transport-equation-based model. The derivation begins with the restriction of a generalized scalar transport equation, which will be used to represent the volume continuity and volume fraction equations, and then subsequently presents a somewhat simplified restriction of the mixture momentum equation. Finally, a system of boundary value equations is formulated for the inviscid multiphase adjoint equations that
143 permits surface-based cost functions dependent on volume fraction as well as pressure and/or tangential velocity at the wall.
B.1
Generalized Scalar Transport Equation A generalized non-conservative scalar transport equation representing the convec-
tion, diffusion, and generation of a scalar field φ can be written in vector form as ∇ · (ρvφ) = ∇ · (γ∇φ) + M, where γ is a diffusion coefficient and M represents the generation of φ. Of interest is the restriction to a solid wall, where the wall-normal component of the velocity is assumed to be zero. Using the properties of the surface gradient operator ∇s presented in Appendix C, the restriction of the convective term is lim ∇ · (ρvφ) = ∂n (ρφvn ) + κρφvn + ∇s · (ρv s φ)
x→S
= ρφ∂n vn + ∇s · (ρv s φ) ,
(B.1)
where v s is the tangential component of the velocity on the surface. Similarly, the restriction of the diffusion term is lim ∇ · (γ∇φ) = ∂n (γ∂n φ) + κγ∂n φ + ∇s · (γ∇s φ) .
x→S
(B.2)
Therefore, combining Eq. (B.1) and Eq. (B.2), the restriction of the generalized scalar transport equation to the wall is given by Rw = ρφ∂n vn − ∂n (γ∂n φ) − κγ∂n φ + ∇s · (ρv s φ − γ∇s φ) − M = 0.
(B.3)
The tangential velocity is assumed to be non-zero at the wall, which accommodates both inviscid flow and viscous flow using wall function boundary conditions. Similarly, ∂n vn may be non-zero since the surface divergence of the surface velocity may be non-zero and due to the additional possibility of phase change at the wall. The wall-normal derivative
144 of φ may be zero in some cases but is non-zero in general, depending on the boundary conditions for φ.
B.2
Inviscid Mixture Momentum Equation For simplicity, the discussion is limited to a two-dimensional surface on which ˆ = κˆ ∂s n s, ˆ = −κn, ˆ ∂s s ˆ = 0, ∂n n ˆ = 0. and ∂n s
(B.4)
The gradient operator can then be expressed as ˆ n+s ˆ ∂s ∇ = n∂
(B.5)
and the velocity vector can be expressed as ˆ n+s ˆ vs . v = nv
(B.6)
The inviscid mixture momentum equation in vector form is v
R = v · ∇ (ρv) + ρv (∇ · v) + ∇p = 0.
(B.7)
To restrict Eq. (B.7) to the surface, Eqs. (B.4)–(B.6) are substituted under the assumption that vn = 0. The result can be expressed in terms of the normal inviscid mixture momentum equation at the surface, 2
∂n p − κρvs = 0, and the tangential inviscid mixture momentum equation at the surface, vs ∂s (ρvs ) + ρvs (∇ · v) + ∂s p = 0.
(B.8)
145
B.3
Inviscid Multiphase ABE Formulation For the transport-equation-based model defined in Chapter 3, the design variables
effect three dependent variables on the wall — pressure, tangential velocity, and the liquid volume fraction. In deriving the adjoint boundary conditions on the wall in Eq. (2.19) of Section 2.1.2, the absence of naturally occurring boundary terms proportional to the velocity and volume fraction resulted in undesirable restrictions on the form of the cost function. The simplest solution to that problem is to introduce two auxiliary boundary equations (along with two additional adjoint variables) written in terms of the same three flow variations. In this case, that goal is accomplished using the restriction to the surface of the tangential momentum and volume fraction equations. The restriction of the tangential momentum equation is given by Eq. (B.8) for two-dimensional surfaces. (For simplicity, the present discussion is limited to the case of inviscid multiphase flow in which the cost function is expressed over a closed twodimensional surface.) Substituting the mixture volume continuity equation for the velocity divergence term gives the final form of the restricted tangential momentum equation as v
Rws = vs ∂s (ρvs ) + ρvs c1 m ˙ + ∂s p = 0. The restriction of the liquid volume fraction equation is given by Eq. (B.3) substituting ρ = 1, φ = α, γ = 0, and M = c4 m ˙ to give α∂n vn + ∇s · (v s α) − c4 m ˙ = 0.
(B.9)
Also useful is the restriction of the mixture volume continuity equation, again given by Eq. (B.3) but this time with ρ = 1, φ = 1, γ = 0, and M = c1 m, ˙ such that ∂n vn + ∇s · v s − c1 m ˙ = 0.
(B.10)
146 Substitution of Eq. (B.10) into Eq. (B.9) eliminates the normal component of the velocity and gives the final form of the restricted liquid volume fraction equation as α
Rw = vs ∂s α + (αc1 − c4 ) m ˙ = 0.
(B.11)
The auxiliary boundary equations are incorporated into the augmented cost function by adding the term Z LABE =
S
α v ψa Rws + ψb Rw dS,
where ψa and ψb represent two new adjoint variables defined only on the surface. Using tildes to denote the first variation, the first variation of the added term is ˜ L ABE =
Z S
˜ vs + ψ R ˜ α dS. ψa R w b w
(B.12)
Expanding Eq. (B.12) under the assumption that the surface is closed, and adding the result to Eq. (2.18) leads to three constraints for the elimination of the flow sensitivity. Elimination of the variation in pressure gives ∂JS ∂ψa ∂m ˙ ∂m ˙ un + − + ρvs c1 ψa + (αc1 − c4 ) ψ = 0, ∂p ∂s ∂p ∂p b
(B.13)
elimination of the variation in volume fraction gives ∂JS ∂ψa ∂ψb ∂m ˙ 2 − vs ∆ρ − vs + ∆ρ (vs c1 m ˙ − vs ∂s vs ) + ρvs c1 ψa ∂α ∂s ∂s ∂α ∂m ˙ + c1 m ˙ + (αc1 − c4 ) − ∂s vs ψb = 0, ∂α
(B.14)
and elimination of the variation in tangential velocity gives ∂JS ∂ψ − ρvs a + (ρc1 m ˙ + vs ∂s ρ) ψa + (∂s α) ψb = 0. ∂vs ∂s
(B.15)
From the three constraints, the last two can be solved for the surface adjoint variables ψa and ψb . At that point, un is given by Eq. (B.13), which provides the adjoint boundary
147 condition for the normal component of the adjoint velocity. This completes the boundary conditions for the inviscid multiphase system without placing any restrictions regarding admissible forms of the cost function. Note that the solution for the surface costate variables can be written as A(s)
dΛ − B(s)Λ = f (s), ds
(B.16)
T
in which Λ = (ψa , ψb ) , A(s) and B(s) represent periodic coefficient matrices of this non-homogeneous first-order ordinary differential vector equation, with
ρvs 0 A(s) = 2 vs ∆ρ vs and
∂α ∂s
ρc1 m ˙ + vs ∆ρ ∂α ∂s B(s) = ∂vs m ˙ ∆ρ vs c1 m ˙ − vs ∂s + ρvs c1 ∂∂α
m ˙ c1 m ˙ + (αc1 − c4 ) ∂∂α −
∂vs ∂s
,
and f (s) is a periodic vector, with f (s) =
∂JS ∂vs . ∂JS ∂α
Further analysis is required to determine the existence of periodic solutions to Eq. (B.16). Such analyses are discussed, for example, by Eremenko [75].
B.4
Summary During the course of this research, 20 references to the original work by Arian
and Salas were discovered and searched for successful applications of the ABE method. One reference was by the authors themselves in which they further demonstrated the method using the Stokes equations and showed that the resulting adjoint equations matched the discrete adjoint formulation exactly [76]. Of the rest, six provided vague
148 references to the work but did not mention ABEs or inadmissibility at all [26, 77–81], while another ten acknowledged that ABEs could provide a possible solution to the problem of inadmissible cost functions but explored the topic no further [22, 24, 82–89]. Three (including two already counted) cited inadmissibility of boundary conditions as an advantage of the discrete adjoint method [82, 86, 90], while one credited the work for pointing out that cost functions written in terms of pressure are essentially admissible in Navier-Stokes formulations but don’t really require ABEs to get there [91]. Thus, only one of these twenty papers attempted to use the ABEs to admit an otherwise inadmissible cost function. In that case, the application was for an unsteady adjoint formulation, and the “boundary” where the problem occurred was at the end time (t = T, the initial condition for the unsteady adjoint equation), where no ABE was available for use [92]. This appendix has applied the ABE method to derive boundary conditions for the adjoint velocity that potentially accommodate much more general surface-based cost functions, allowing functions of the liquid volume fraction or tangential velocity in addition to functions of pressure for the inviscid transport-equation-based model. But it remains to be seen whether the resulting periodic system of linear ordinary differential equations that must be solved on the surface will yield useful solutions in practice. The boundary conditions were not tested here because two-dimensional adjoint results for the transport-equation-based model were not completed within the scope of this research, and there appears to be little evidence in the literature that such boundary conditions have proven successful for others.
149
Appendix C
Laplace-Beltrami Identity
In restricting the Laplacian to the surface, it is useful to have a general relationship between the Laplacian operator and the surface Laplacian, otherwise known as the Laplace-Beltrami operator. The surface gradient operator ∇s is the orthogonal projection of the gradient operator ∇ onto the surface, such that the gradient operator can be written as ˆ (n ˆ · ∇) ∇ = ∇s + n and the Laplacian can be expressed as ˆ (n ˆ · ∇)] ∇ · ∇ = ∇ · ∇ s + ∇ · [n ˆ (n ˆ · ∇)] · ∇s + ∇ · [n ˆ (n ˆ · ∇)] = [∇s + n ˆ (n ˆ · ∇) · ∇s + ∇ · [n ˆ (n ˆ · ∇)] . = ∇s · ∇ s + n
(C.1)
The second of the three terms on the right-hand side of Eq. (C.1) can be shown to be zero by expanding it in Cartesian tensor notation. To begin, ˆ (n ˆ · ∇) · ∇s = n ˆ (n ˆ · ∇) · [∇ − n ˆ (n ˆ · ∇)] n ∂ ∂ ∂ ∂ − ni nj ni nk = ni nj ∂xj ∂xi ∂xj ∂xk ∂n ∂ ∂ ∂ = nj ni − nj i ∂xj ∂xi ∂xj ∂xi ! ∂ni ∂ ∂ ∂ − nj nk − ni nj nk . ∂xj ∂xk ∂xj ∂xk
(C.2)
150 The first and third terms on the right-hand side of Eq. (C.2) are identical and cancel one another, while the fourth term is identically zero since
ni nj
∂ni 1 ∂ (ni ni ) 1 ∂(1) = nj = nj = 0. ∂xj 2 ∂xj 2 ∂xj
The second term in Eq. (C.2) is zero intuitively; i.e., if the unit surface normal is taken to be the radial unit vector of a spherical coordinate system defined for a small neighborhood in the vicinity of each point on the boundary, then the normal derivative of the surface normal is equal to the radial derivative of the radial unit vector, which is zero. So having ˆ (n ˆ · ∇) · ∇s = 0, Eq. (C.1) reduces to shown that n ˆ (n ˆ · ∇)] ∇ · ∇ = ∇s · ∇s + ∇ · [n ˆ (n ˆ · ∇) + (n ˆ · ∇) (n ˆ · ∇) , = ∇s · ∇s + (∇ · n) or 2
2
2
∇ = ∇s + κ ∂n + ∂n ˆ is the surface mean curvature. where κ = ∇ · n
Vita David A. Boger Education • Ph.D. in Mechanical Engineering, Penn State University, 2013. Thesis: “A Continuous Adjoint Approach to Design Optimization in Multiphase Flow.” Advisor: Dr. Eric G. Paterson. • M.S. in Mechanical Engineering, Penn State University, 1997. Thesis: “Observations on Nonlinear k-ε Models of Turbulent Transport.” Advisor: Dr. Henry McDonald. • B.S. in Mathematics, Penn State University, 1993. With highest distinction and with honors; Evan Pugh Scholar Award. Thesis: “A Multigrid Method for Solving the Pressure-Correction Equation in Segregated Navier-Stokes Algorithms.” Advisor: Dr. Adam M. Yocum.
Professional Experience • Research Engineer, Penn State Applied Research Laboratory Computational Mechanics Division, 1993–present.
Selected Papers and Publications • D.A. Boger, R.W. Noack, A.J. Amar, B.S. Kirk, R.P. Lillard, and M.E. Olsen, “Overset Grid Applications in Hypersonic Flow Using the DPLR Flow Solver,” AIAA Paper 2009-3992, 19th AIAA Computational Fluid Dynamics Conference, San Antonio, TX, June 22–25, 2009. • D.A. Boger and J.J. Dreyer, “Prediction of Hydrodynamic Forces and Moments for Underwater Vehicles Using Overset Grids,” AIAA Paper 2006–1148, 44th AIAA Aerospace Sciences Meeting and Exhibit, Reno, NV, January 2006. • J.W. Lindau, D.A. Boger, R.B. Medvitz, and R.F. Kunz, “Propeller Cavitation Breakdown Analysis,” Journal of Fluids Engineering, Vol. 127, pp. 995–1002, September 2005. • D.A. Boger, “An Efficient Method for Calculating Wall Proximity,” AIAA Journal, Vol. 39, No. 12, pp. 2404–2406, December 2001. • R.F. Kunz, D.A. Boger, D.R. Stinebring, T.S. Chyczewski, J.W. Lindau, H.J. Gibeling, S. Venkateswaran, and T.R. Govindan, “A Preconditioned Navier-Stokes Method for Two-Phase Flows with Application to Cavitation Prediction,” Computers & Fluids, Vol. 29, No. 8, pp. 849–875, November 2000.