E l ti & G di t B d Evolutionary & Gradient-Based

advertisement
NATIONAL TECHNICAL UNIVERSITY OF ATHENS
Parallel CFD & Optimization Unit
Laboratory of Thermal Turbomachines
Evolutionary
E
l ti
&G
Gradient-Based
di t B d
Optimization in Engineering –
Methods & Industrial Applications
Kyriakos C. GIANNAKOGLOU, Professor NTUA
kgianna@central.ntua.gr
http://velos0.ltt.mech.ntua.gr/research/
The Parallel CFD & Optimization Unit of NTUA
Research Activities:
Development and parallelization (on CPUs and GPUs) of:
1. In
In-house
house aero
aero-thermal
thermal analysis software (mostly CFD a/w),
2. An optimization platform based on enhanced evolutionary algorithms,
3. Optimization tools based on adjoint methods for fluid flow/heat applications,
4. Hybrid
y
(gradient-based & stochastic)) optimization
(g
p
methods.
Applications in: turbomachines, aircraft/car aerodynamics, energy production &
management systems, etc
p
Research Group:
~12 researchers
Funding:
EU Projects (FP6/7: HISAC,
HISAC ACFA,
ACFA HYDROACTION,
HYDROACTION AQUAGEN,
AQUAGEN RBF4AERO),
)
projects funded directly by the Industry (Dassault Aviation, Volkswagen, Andritz Hydro,
Schlumberger, etc), software developers & vendors (ICON, NUMECA, SOFISTIK, etc),
state research projects,
projects Greek companies (Hellenic Aerospace Industry,
Industry Public Power
Corporation, various SMEs). Income from selling the optimization software EASY
(provided at zero cost to University groups and a symbolic cost to
companies/industries).
Parallel CFD & Optimization Unit, NTUA, Greece
2
Outline
►Brief Introduction to Optimization methods:
From the Analysis to the Optimization, without (??) extra pain!
►Gradient based & Gradient
►Gradient-based
Gradient-free
free methods:
Selecting the most appropriate Optimization method is important!
Commercial or In-house (with access to its source code) Analysis s/w?
Generic of tailored to the problem Optimization method?
Single- or Multi-Objective Optimization, Multi-Disciplinary Optimization.
Important criterion: the number of design variables (optimization unknowns).
p
cost of Optimization
p
methods ((and its reduction).
)
Computational
Hybridization!
►Industrial Optimization– Suggestions, ideas & recipes:
Relevant or irrelevant cases to the themes discussed in this event.
Optimization in Aerodynamics/fluid mechanics always shows us the way!!
►Modern research areas in Optimization methods:
Optimization of unsteady/transient processes…
Optimization of processes involving multiphase flows, chemical reactions…
Robust Optimization, Optimization under Uncertainties…
Methods for low-cost computation of high-order derivatives…
Parallel CFD & Optimization Unit, NTUA, Greece
3
Optimization Methods – Prerequisites / Classification
F(b)
(1) Problem Parameterization
(2) Objective(s) – Objective Function(s)
(3) Constraint(s), equality-inequality, if any…
(4) Evaluation-analysis software
((5)) Optimization-search
p
method
(6) (in most cases) An adequately powerful
computer
b
Gradient-Free Methods
(Stochastic optimization methods)
Gradient-Based Methods
(Steepest Descent, CG, etc)
(
(exact
or approximate
i
gradient)
di )
Hessian-Based Methods
(N t or Quasi-Newton
(Newton
Q i N t methods)
th d )
(exact or approximate Hessian)
Individual-Based Methods
Population Based Methods
Population-Based
Hybridization!
Parallel CFD & Optimization Unit, NTUA, Greece
4
Multi-Objective Optimization
min F1, min F2
F2
F1
Pareto Front
Parallel CFD & Optimization Unit, NTUA, Greece
5
PART I: Stochastic Optimization methods
•
•
•
•
•
Evolutionary Algorithms (EAs)
Differential Evolution (DE)
Particle-Swarm Optimization (PSO)
Ant-Colony Optimization (ACO)
etc.
Population-based, randomized search of the design space.
Suitable for multi-objective
j
and multi-disciplinary
p
y optimization
p
problems.
p
Pro(s): Gradient-Free, Plug&Play way of accommodating existing/commercial analysis
tools directly amenable to parallelization.
tools,
parallelization
Con(s): Computationally expensive unless coupled with “computational intelligence”
techniques.
Parallel CFD & Optimization Unit, NTUA, Greece
6
(μ, λ) Evolutionary Algorithms (EAs) at a Glance
Offspring
population
((λ individuals))
Mutation
Evaluation
(λ calls to the
evaluation s/w)
Parent Selection
(μ parents)
CrossoverC
Recombination
The (μ,λ) ΕΑ can reproduce almost any other known evolutionary algorithm, such as
G
Genetic
i Algorithms,
Al i h
E l i Strategies,
Evolution
S
i etc.
Parallel CFD & Optimization Unit, NTUA, Greece
7
Metamodel-Assisted EAs (MAEAs)
Problem-Specific
Evaluation Model
(Exact/Costly Model)
Surrogate
Evaluation Model
(Approximate/Cheap Model)
Performance
F
Design
Variable
b
In each generation, instead of performing λ calls to the exact-costly evaluation s/w, the
metamodel or surrogate evaluation model (less accurate, cheaper) is used to preevaluate
l
the
h population
l i members.
b
Th
Then,
only,
l the
h top λe<<λλ off them
h
are evaluated
l
d on
the expensive s/w.
Parallel CFD & Optimization Unit, NTUA, Greece
8
MAEAs with Inexact Pre-Evaluation (IPE)
λ evaluations
Generation 2
Generation 1
Generation 3
IPE
starts here
λe<<λ evaluations
Generation 6
Generation 5
Generation 4
More generations are needed; however, apart from the very first ones, the number of
calls to the expensive
e pensi e evaluation
e al ation tool per generation reduces
red ces to λe<<λ.
<<λ The value
al e of λe
and the first generation relying upon IPE are user-controlled parameters.
Parallel CFD & Optimization Unit, NTUA, Greece
9
Distributed Metamodel-Assisted EAs (DMAEAs)
Adjustable
j
Parameters:
‰ Number of demes or islands
‰ Communication topology
‰ Communication
C
i i ffrequency
‰ Migration algorithm
‰ EA set-up per deme
A DEA or DMAEA with distinct explorationp
& exploitation-oriented
p
subpopulations
p p
is
a very efficient search method!
Parallel CFD & Optimization Unit, NTUA, Greece
10
Expected Gain from DMAEAs
Standard EA
Metamodel-Assisted EA (MAEA)
Distributed EA (DEA)
(
)
Distributed MAEA (DMAEA)
E l ti
Evaluations
Similar behavior can be found in manyy other cases! A well-tuned DMAEA constantlyy
outperforms other variants, such as EAs, DEAs or MAEAs.
Parallel CFD & Optimization Unit, NTUA, Greece
11
Optimization Study in Marine Engines
Marine Diesel Oil (MDO) combustion in a large two-stroke marine Diesel engine
Maker: Wärtsilä Switzerland
Type
2T
2-T
RT-flex58T-B
Bore
580 mm
Stroke
2416 mm
Speed
105 RPM
Max. power output
2125 KW/cyl
Injection system
Common Rail
Number of injectors
3
Improvement of the operation of a large two-stroke
two stroke marine diesel engine,
engine at full load,
load
by implementing pilot injection, using CFD and EAs. The problem is solved as a twoobjective optimization one: (a) min. NOx concentration & (b) min. specific fuel oil
consumption (SFOC); both are normalized with the corresponding values for
continuous injection (reference case). The main and pilot injection profiles are
parameterized in terms of four design variables.
Division of Marine Engineering
Evaluation Code (CFD) : KIVA 3.
3
Optimization S/W : EASY
Parallel CFD & Optimization Unit, NTUA, Greece
School of Naval Architecture &
Marine Engineering, NTUA
Prof. L. Kaiktsis
12
Optimization Study in Marine Engines
SOPI
SOMI
PMF
MR
Design-Optimization Variables:
: Start Of the Pilot Injection
: Start
St rt Of the Main
M in Injection
: Pilot Mass Fraction injected as part of the total fuel amount
: Total injected Mass Reduction with respect to the reference case of
continuous injection.
Fuel injection profile
Studies with single- and twin-needle
j
will be p
presented. A twin-needle
injectors
injector allows different orientation of fuel
injection for the pilot and main injection.
Parallel CFD & Optimization Unit, NTUA, Greece
Division of Marine Engineering
School of Naval Architecture &
Marine Engineering, NTUA
Prof. L. Kaiktsis
13
Optimization Study in Marine Engines
MDO combustion in RT-flex58T-B under Partially Premixed Compression Ignition
Pilot
Main Injection
Injection
A l α
Angle
Angle β
Spatial distribution of temperature
Pilot
Injection
j
Main
j
Injection
Twin-needle injector
Division of Marine Engineering
School of Naval Architecture &
Marine Engineering, NTUA
Prof. L. Kaiktsis
Parallel CFD & Optimization Unit, NTUA, Greece
14
Optimization Study in Marine Engines
Results of Unconstrained & Constrained Optimization using EAs
103
101
7
100
H
I J
K
99
98
97
E
F
Case H
Reference
6
Rate of He
eat Release
S FOC [% of R eeference C ase]
Reference
Unconstrained Case of Present Study
Unconstrained Case of Andreadis et al.
Constrained Case of Present study (Pressure, Work)
Constrained Case of Andreadis et al. (Pressure, Work)
Pareto fronts
102
5
4
3
2
1
G
0
-40
96
-20
0
20
40
60
Crank Angle [deg.]
95
75
80
85
90
95
100
105
NOx [% of Reference Case]
Division of Marine Engineering
School of Naval Architecture &
Marine Engineering, NTUA
Prof. L. Kaiktsis
Parallel CFD & Optimization Unit, NTUA, Greece
15
Optimization Study in Marine Engines
S
Spray
propagation
i d
during
i pilot
il iinjection
j i
Pananakis et al.
25th ILASS Conf. (2013)
C
Case
H
● Utilization of available
cylinder volume
● No impact of fuel on
cylinder wall
Andreadis et al.
Int. J. Engine Research
(2011)
Case C
● Fuel liquid films on
cylinder wall
● Higher
Hi h di
dispersion
i
of fuel droplets
● Good air-fuel mixing
during pilot injection
The pilot injection parameters are very similar but the injection angles are substantially
g
injectors
j
are considered in Case C,, where p
pilot injection
j
different,, since single-needle
is associated with wall wetting, with fuel still remaining in the near-wall region at the
Top Dead Center (TDC). This is avoided for injection from
Division of Marine Engineering
twin needle valves, due to the modified injection angles.
School of Naval Architecture &
Thus, in Case H, a Partially Premixed Compression
Marine Engineering, NTUA
Ignition (PPCI) is attained.
Prof. L. Kaiktsis
Parallel CFD & Optimization Unit, NTUA, Greece
16
Biomass Pyrolysis Process
Use of EA for the determination of a kinetic model and its parameters, to be used in
biomass pyrolysis process.
‰
‰
‰
‰
Fuel : Straw
Experimental thermogravimetric analysis (TGA) using a heating rate of 10 oC/min
To describe the mass loss during pyrolysis,
pyrolysis an independent parallel reaction model
was adopted and mathematically fitted, in order to determine its constants (using
Eas, namely EASY).
Biomass pyrolysis is modeled using three (N=3) components: Hemicellulose,
Hemicellulose
Cellulose and Lignin.
Lab. Steam Boilers
School of Mechanical
Engineering, NTUA
Prof. S. Karellas
Parallel CFD & Optimization Unit, NTUA, Greece
17
Biomass Pyrolysis Process
Independent Parallel Reaction Model
Overall ((mass loss)) rate of
conversion for N reactions:
dm j
dt
=
∑c
i
da i , j
i
dt
Thermal decomposition
p
of the
individual components
da i , j
, i = 1,.., N
9 Design variables:
c i , E i , Ai
dt
= Ai e
− Ei
RT j
(1 − a i , j )
Determine the contribution (c) of each component
to dm/dt, the activation energy (E) and preexponential factor (A).
Objective Function:
⎡⎛ dm
j
Fobj = ∑ ⎢⎜⎜
j = 1 ⎢ ⎝ dt
⎣
K
min .
⎤
⎞
⎛ dm j ⎞
⎥
⎟
⎟
− ⎜⎜
⎟
⎟
⎠ exp ⎝ dt ⎠ comp ⎥⎦
2
Lab. Steam Boilers
School of Mechanical
Engineering, NTUA
Prof. S. Karellas
Parallel CFD & Optimization Unit, NTUA, Greece
18
Biomass Pyrolysis Process
Optimization Results – DMAEA vs. EA
Optimal Solution
Lab. Steam Boilers
School of Mechanical
Engineering, NTUA
Prof. S. Karellas
Parallel CFD & Optimization Unit, NTUA, Greece
19
Design of HYDROMATRIX®
The design of a Hydromatrix®,
Hydromatrix® which comprises a number of “small”
small axial flow
turbine generator units forming a factory-assembled grid or “matrix”, was carried out
in Andritz-Hydro, using EASY. A Hydromatrix® has a lot of advantages compared to
conventional designs (lower cost to power ratio): min. civil construction works, min.
time for project schedules, construction & installation, min. environmental inflict, etc.
Parallel CFD & Optimization Unit, NTUA, Greece
20
Design of HYDROMATRIX®
Objectives (metrics):
‰
‰
‰
‰
Objectives 1/2 (f1,f2) : Given swirl and
axial velocity distributions at the exit
Objective 3 (f2): Uniform loading
Objective 4 (f4): Cavitation index
Objective 5 (f5): Pumping area
Full
Load
Part
Load
Best
Effic
The Hydromatrix®
Th
H d
i ® runner blade
bl d was modeled
d l d using
i
52 design
d i
variables and the design was carried out with 5 objectives, at 3
operating points. EASY handled this design problem as a twoobjective
bj ti case (via
( i weights):
i ht )
(a) min. F1(f1,f2, at the 3 OPs) & (b) min. F2(f3,f4,f5, at the 3 OPs)
Parallel CFD & Optimization Unit, NTUA, Greece
21
Design of HYDROMATRIX®
F2
F1
EAs or MAEAs with the PCA of design variables:
With the same computing cost (number of evaluations), the MAEA with PCA
assisting the evolution operators outperforms MAEA. The computed fronts of nondominated solutions by the two methods,
methods at the same cost,
cost are shown for the
Hydromatrix® runner design problem.
Parallel CFD & Optimization Unit, NTUA, Greece
22
Design-Optimization of a Francis Runner
The design of the Francis runner, at 3 operating points, was carried out
by Andritz-Hydro, with two objectives: (a) exit velocity profiles’ quality
and (b) uniformity of the blade loading and two constraints (head and
cavitation). There are 372 design variables, in total!
Due to the extremely high problem dimension, the Principal
Component Analysis (PCA) of the continuously evolving front of nondominated solutions assists (a) the application of the evolution
operators (EA(PCA) or MAEA(PCA)) and (b) the metamodel training
by cutting off the less important components of the training patterns
(M(PCA)AEA). Both are combined in M(PCA)AEA(PCA).
Parallel CFD & Optimization Unit, NTUA, Greece
23
Overall efficiency
Optimization of Geothermal ORC Systems
R-134a
R-410A
R-407C
R-600a
Design- Optimization of an innovative Organic Rankine Cycle (ORC) System for
electricity production using low-enthalpy geothermal energy, with three objectives.
Design carried out at the Center for Renewable Energy Sources (CRES)
(CRES), using EASY
EASY,
for the EU-funded project LOW-BIN.
Parallel CFD & Optimization Unit, NTUA, Greece
24
Optimization of Ground Source Heat Pump Systems
Design of a Ground Source Heat Pump with two objectives: (a) max. coefficient of
performance, COP & (b) min. heat exchangers’ surface. GSHPs are used for heating
and cooling buildings.
buildings Design performed by CRES,
CRES using EASY,
EASY for the EU-funded
project GROUND-MED.
Parallel CFD & Optimization Unit, NTUA, Greece
25
Solution of Unit Commitment Problems using EASY
EASY was used to solve Unit Commitment problems. With M power units (gas, steam,
wind turbines etc.) and a given energy demand for a T-hour scheduling horizon, the
objective is to schedule all units so as to operate with min. Total Operating Cost (TOC)
while meeting constraints (min. STUP/SHDN times, ramp, spinning reserve, etc).
The method has been extended to handle problems with probabilistic unit outages
((Monte Carlo simulations).
) In collaboration with the Public Power Corporation,
p
,
Greece.
Parallel CFD & Optimization Unit, NTUA, Greece
26
PART II: Deterministic Optimization methods
Deterministic Optimization Methods:
Gradient-based methods,
methods quasi-Newton or exact Newton methods.
methods
Assisted by the adjoint variable method in fluid mechanics (gradient or Hessian
computation)
Pro(s): Fast!
Con(s): Need to compute the gradient of F, or even the Hessian. May be trapped into
local minima.
Hybrid Optimization Methods!
Continuous Adjoint: First-differentiate, then-discretize
Di
Discrete
Adj i First-discretize,
Adjoint:
Fi di
i then-differentiate
h diff
i
Starting Point: The set of PDEs governing the analysis problem.
Parallel CFD & Optimization Unit, NTUA, Greece
27
Applications of the Adjoint Method in Turbomachinery
Reference Blade
Ent
ntropy Generation
Row 1
1.34
Reference Blade
1.32
1.3
Row 2
1.28
1.26
1.24
1.22
0
5
10
15 20
Cycle
25
30
35
Optimal Blade
Optimal Blade
Design-Optimization of a 3D peripheral compressor rows, for minimal viscous losses,
with
ith geometrical constraints
constraints, using
sing the contin
continuous
o s adjoint method.
method
Turbulence model : Low-Reynolds number Spalart-Allmaras.
Parallel CFD & Optimization Unit, NTUA, Greece
28
Applications of the Adjoint Method in Turbomachinery
pinit
popt
Optimization of a Francis turbine blade, targeting a 1.5m increase in the
hydraulic height, subject to a number of flow constraints, incl. cavitation.
Parallel CFD & Optimization Unit, NTUA, Greece
29
Applications of the Adjoint Method in Car Industry
Volkswagen L1 Car:
● Half-model, low-Re mesh (y+~1), 18 M cells
●(Continuous) Adjoint to [RANS & Spalart-Allmaras].
Spalart Allmaras]
● Drag reduction.
Velocity
Adjoint velocity
Sensitivity
Sensitivity map:
Direction of favorable surface displacement
for reducing drag:
red
d - inwards,
i
d blue
bl – outwards.
d
Sensitivity Map
Sensitivity Map
Parallel CFD & Optimization Unit, NTUA, Greece
30
Applications of the Adjoint Method in Car Industry
Convergence: Optimizing ONLY the Spoiler Overall deformation less than 20mm
Baseline
Optimized
For an aerodynamically already nearly perfect car:
„ >2% drag reduction
„ 30% lift improvement (not included in F!!!!)
Baseline
Optimized
Parallel CFD & Optimization Unit, NTUA, Greece
31
Topology Optimization & Continuous Adjoint Method
Unconstrained
With constraint on
the mass flowrate per exit
The adjoint method is used to solve
topology optimization problems in
fluid mechanics & heat transfer. Due
to the
h excessively
i l hi
high
h number
b off
design variables, the adjoint method
suits perfectly to this purpose.
With constraint on the
Flow swirl at the exit
Example: Design of a manifold with
a single inlet and four outlets.
Parallel CFD & Optimization Unit, NTUA, Greece
32
Topology Optimization & Continuous Adjoint Method
gear
box
outle
t
inlet
Topology optimization of an air-conditioning duct of a passenger car, targeting min.
total pressure losses. The optimal design (yields 45% less total pressure losses.
Starting Geometry:
F = 0.25 m5/s3
Optimal Geometry:
F = 0.177m5/s3
Topology optimization of the plenum chamber of a student racing car, targeting min.
totall pressure llosses, b
by additionally
ddi i
ll using
i a fl
fluid
id volume
l
constraint.
i Th
The optimal
i l
design yields a 29% reduction in the objective function value.
Parallel CFD & Optimization Unit, NTUA, Greece
33
Closure
Once a reliable analysis method is available, next step is to optimize the “system”.
A great gamut off optimization
i i i
methods
h d is
i available
il bl from
f
plug-and-play
l
d l evolutionary
l i
algorithms to tailored-to-the problem gradient-based methods.
Evolutionary algorithms are nice is there is a moderate number of unknowns and/or the
optimization is not to be repeated on a daily basis. They might be the only choice if the
existing analysis s/w is a “black-box”.
In their standard form, EAs are quite slow. However, nowadays, there are interesting
ways to lower the CPU cost and/or the wall clock time.
Gradient-based methods, usually based on the adjoint method to compute the gradient
of the objective function, are much faster but can be trapped into a local (rather than the
global)) minimum. Programming
g
g
g adjoint
j
methods require
q
a certain investment in time.
Hybridization seems to be the best way to use them. EAs are responsible for the
exploration
p
of the search space
p
whereas g
gradient-based for the refinement of p
promising
g
solutions.
Parallel CFD & Optimization Unit, NTUA, Greece
34
Many Thanks to:
Dr. A. Asouti
Dr. E. Kontoleontos
D E
Dr.
E. P
Papoutsis-Kiachagias
i Ki h i
Dr. D. Papadimitriou
Dr. S. Kyriacou
Parallel CFD & Optimization Unit, NTUA, Greece
35
Download