Elti &Gdi tEvolutionary & Gradient-BdBased Optimization in ... · Elti &Gdi tEvolutionary &...
Transcript of Elti &Gdi tEvolutionary & Gradient-BdBased Optimization in ... · Elti &Gdi tEvolutionary &...
NATIONAL TECHNICAL UNIVERSITY OF ATHENSParallel CFD & Optimization Unit
Laboratory of Thermal Turbomachines
E l ti & G di t B dEvolutionary & Gradient-BasedOptimization in Engineering –
Methods & Industrial Applications
Kyriakos C. GIANNAKOGLOU, Professor [email protected]
http://velos0.ltt.mech.ntua.gr/research/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-house aero-thermal analysis software (mostly CFD a/w),1. In house aero 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 (gradient-based & stochastic) optimization methods.y (g ) p
Applications in: turbomachines, aircraft/car aerodynamics, energy production & management systems, etc
Research Group:p
~12 researchers
Funding:
EU Projects (FP6/7: HISAC ACFA HYDROACTION AQUAGEN RBF4AERO)EU Projects (FP6/7: HISAC, ACFA, HYDROACTION, 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 Greek companies (Hellenic Aerospace Industry Public Powerstate research projects, Greek companies (Hellenic Aerospace Industry, Public PowerCorporation, various SMEs). Income from selling the optimization software EASY(provided at zero cost to University groups and a symbolic cost tocompanies/industries).
Parallel CFD & Optimization Unit, NTUA, Greece 2
companies/industries).
Outline
►Brief Introduction to Optimization methods:From the Analysis to the Optimization, without (??) extra pain!
►Gradient based & Gradient free methods:►Gradient-based & Gradient-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?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).Computational cost of Optimization methods (and its reduction).p p ( )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)(2) Objective(s) Objective Function(s)(3) Constraint(s), equality-inequality, if any…(4) Evaluation-analysis software(5) Optimization-search method( ) p(6) (in most cases) An adequately powerful computer
Gradient-Free Methods(Stochastic optimization methods)
b
Gradient-Based Methods(Steepest Descent, CG, etc)( i di )
Individual-Based Methods
Population Based Methods(exact or approximate gradient)
Hessian-Based Methods(N t Q i N t th d )
Population-Based Methods
Hybridization!
Parallel CFD & Optimization Unit, NTUA, Greece 4
(Newton or Quasi-Newton methods)(exact or approximate Hessian)
Hybridization!
Multi-Objective Optimization
F2min F1, min F2
Pareto Front F1
Parallel CFD & Optimization Unit, NTUA, Greece 5
PART I: Stochastic Optimization methods
• Evolutionary Algorithms (EAs)
• Differential Evolution (DE)
• Particle-Swarm Optimization (PSO)Particle-Swarm Optimization (PSO)
• Ant-Colony Optimization (ACO)
• etc.
Population-based, randomized search of the design space.
Suitable for multi-objective and multi-disciplinary optimization problems.j p y p p
Pro(s): Gradient-Free, Plug&Play way of accommodating existing/commercial analysistools directly amenable to parallelizationtools, directly amenable to 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 CParent Selection(μ parents)
Crossover-Recombination
The (μ,λ) ΕΑ can reproduce almost any other known evolutionary algorithm, such asG i Al i h E l i S i
Parallel CFD & Optimization Unit, NTUA, Greece 7
Genetic Algorithms, Evolution Strategies, etc.
Metamodel-Assisted EAs (MAEAs)
Problem-Specific Evaluation Model
(Exact/Costly Model)
SurrogateEvaluation Model
(Approximate/Cheap Model)(Approximate/Cheap Model)Performance
F
Design Variable
b
In each generation, instead of performing λ calls to the exact-costly evaluation s/w, themetamodel or surrogate evaluation model (less accurate, cheaper) is used to pre-
l h l i b Th l h λ λ f h l d
Parallel CFD & Optimization Unit, NTUA, Greece 8
evaluate the population members. Then, only, the top λe<<λ of them are evaluated onthe expensive s/w.
MAEAs with Inexact Pre-Evaluation (IPE)
λ evaluations
Generation 1Generation 2
Generation 1Generation 3
IPE starts herestarts hereλe<<λ evaluations
Generation 4Generation 5Generation 6 Generation 4Generation 5Generation 6
More generations are needed; however, apart from the very first ones, the number ofcalls to the e pensi e e al ation tool per generation red ces to λ <<λ The al e of λ
Parallel CFD & Optimization Unit, NTUA, Greece 9
calls to the expensive evaluation tool per generation reduces to λe<<λ. The value of λe
and the first generation relying upon IPE are user-controlled parameters.
Distributed Metamodel-Assisted EAs (DMAEAs)
Adjustable Parameters:j
Number of demes or islands
Communication topology
C i i fCommunication frequency
Migration algorithm
EA set-up per deme
A DEA or DMAEA with distinct exploration- & exploitation-oriented subpopulations is
Parallel CFD & Optimization Unit, NTUA, Greece 10
p p p pa very efficient search method!
Expected Gain from DMAEAs
Standard EAMetamodel-Assisted EA (MAEA)Distributed EA (DEA)( )Distributed MAEA (DMAEA)
E l tiEvaluations
Similar behavior can be found in many other cases! A well-tuned DMAEA constantly
Parallel CFD & Optimization Unit, NTUA, Greece 11
y youtperforms other variants, such as EAs, DEAs or MAEAs.
Optimization Study in Marine Engines
Marine Diesel Oil (MDO) combustion in a large two-stroke marine Diesel engine
Maker: Wärtsilä Switzerland
2 TType
2-TRT-flex58T-B
Bore 580 mm
Stroke 2416 mmStroke 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 marine diesel engine at full loadImprovement of the operation of a large two-stroke marine diesel engine, at full load,by implementing pilot injection, using CFD and EAs. The problem is solved as a two-objective optimization one: (a) min. NOx concentration & (b) min. specific fuel oilconsumption (SFOC); both are normalized with the corresponding values forconsumption (SFOC); both are normalized with the corresponding values forcontinuous injection (reference case). The main and pilot injection profiles areparameterized in terms of four design variables.
Evaluation Code (CFD) : KIVA 3Division of Marine EngineeringSchool of Naval Architecture &
12Parallel CFD & Optimization Unit, NTUA, Greece 12
Evaluation Code (CFD) : KIVA 3.Optimization S/W : EASY
Marine Engineering, NTUAProf. L. Kaiktsis
Optimization Study in Marine Engines
Design-Optimization Variables:
SOPI : Start Of the Pilot Injection
SOMI : St rt Of the M in InjectionSOMI : Start Of the Main Injection
PMF : Pilot Mass Fraction injected as part of the total fuel amount
MR : Total injected Mass Reduction with respect to the reference case ofcontinuous injection.
Fuel injection profile
Studies with single- and twin-needleinjectors will be presented. A twin-needle
Division of Marine EngineeringSchool of Naval Architecture &
j pinjector allows different orientation of fuelinjection for the pilot and main injection.
13Parallel CFD & Optimization Unit, NTUA, Greece 13
Marine Engineering, NTUAProf. L. Kaiktsis
Optimization Study in Marine Engines
MDO combustion in RT-flex58T-B under Partially Premixed Compression IgnitionPilot
InjectionMain Injection
A lAngle α
Angle β
Spatial distribution of temperaturePilot
InjectionMain
Injection Twin-needle injectorj j
Division of Marine EngineeringSchool of Naval Architecture &
14Parallel CFD & Optimization Unit, NTUA, Greece 14
Marine Engineering, NTUAProf. L. Kaiktsis
Optimization Study in Marine Engines
7
Case H102
103
ReferenceUnconstrained Case of Present StudyUnconstrained Case of Andreadis et al.Pareto fronts
Results of Unconstrained & Constrained Optimization using EAs
4
5
6
eat R
elea
se
Reference
99
100
101
efer
ence
Cas
e]
Constrained Case of Present study (Pressure, Work) Constrained Case of Andreadis et al. (Pressure, Work)
H I
KJ
1
2
3
Rat
e of
He
97
98
99
SFO
C [%
of R
e K
EF G
-40 -20 0 20 40 600
Crank Angle [deg.]
75 80 85 90 95 100 10595
96
NOx [% of Reference Case]
G
Division of Marine EngineeringSchool of Naval Architecture &
15Parallel CFD & Optimization Unit, NTUA, Greece 15
Marine Engineering, NTUAProf. L. Kaiktsis
Optimization Study in Marine Engines
S i d i il i j iSpray propagation during pilot injection
Andreadis et al. Int. J. Engine Research
Pananakis et al. 25th ILASS Conf. (2013)
C H● Utilization of available
cylinder volume
(2011) Case C
Case H
● No impact of fuel oncylinder wall
● Hi h di i
● Fuel liquid films oncylinder wall
● Higher dispersion of fuel droplets
● Good air-fuel mixingduring pilot injection
The pilot injection parameters are very similar but the injection angles are substantially different, since single-needle injectors are considered in Case C, where pilot injection , g j , p jis 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 twin needle valves, due to the modified injection angles.
Division of Marine EngineeringSchool of Naval Architecture &
16Parallel CFD & Optimization Unit, NTUA, Greece 16
Thus, in Case H, a Partially Premixed Compression Ignition (PPCI) is attained.
Marine Engineering, NTUAProf. L. Kaiktsis
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 an independent parallel reaction modelTo describe the mass loss during pyrolysis, an independent parallel reaction modelwas adopted and mathematically fitted, in order to determine its constants (usingEas, namely EASY).
Biomass pyrolysis is modeled using three (N=3) components: HemicelluloseBiomass pyrolysis is modeled using three (N=3) components: Hemicellulose,Cellulose and Lignin.
Lab. Steam BoilersSchool of Mechanical
17Parallel CFD & Optimization Unit, NTUA, Greece 17
School of Mechanical Engineering, NTUA
Prof. S. Karellas
Biomass Pyrolysis Process
Overall (mass loss) rate of
Independent Parallel Reaction Model
Thermal decomposition of the( )conversion for N reactions:
)1(, RTE
ji aeAda
j
i
−=−
Nida
cdm jij 1, == ∑
pindividual components
)1( , jii aeAdt
=Nidt
cdt i
i ,..,1, == ∑
9 Design variables: Determine the contribution (c) of each component
iii AEc ,, to dm/dt, the activation energy (E) and pre-exponential factor (A).
Objective Function: 2
1.min ∑
⎥⎥
⎦
⎤
⎢⎢
⎣
⎡
⎟⎟⎠
⎞⎜⎜⎝
⎛−⎟⎟
⎠
⎞⎜⎜⎝
⎛=
K
j
jjobj dt
dmdt
dmF
1 exp= ⎥⎦
⎢⎣ ⎠⎝⎠⎝j compdtdt
Lab. Steam BoilersSchool of Mechanical
18Parallel CFD & Optimization Unit, NTUA, Greece 18
School of Mechanical Engineering, NTUA
Prof. S. Karellas
Biomass Pyrolysis Process
Optimization Results – DMAEA vs. EA Optimal Solution
Lab. Steam BoilersSchool of Mechanical
19Parallel CFD & Optimization Unit, NTUA, Greece 19
School of Mechanical Engineering, NTUA
Prof. S. Karellas
Design of HYDROMATRIX®
The design of a Hydromatrix® which comprises a number of “small” axial flowThe design of a Hydromatrix®, which comprises a number of small axial flowturbine generator units forming a factory-assembled grid or “matrix”, was carried outin Andritz-Hydro, using EASY. A Hydromatrix® has a lot of advantages compared toconventional designs (lower cost to power ratio): min. civil construction works, min.
20Parallel CFD & Optimization Unit, NTUA, Greece 20
conventional designs (lower cost to power ratio): min. civil construction works, min.time for project schedules, construction & installation, min. environmental inflict, etc.
Design of HYDROMATRIX®
Objectives (metrics):Objectives 1/2 (f1,f2) : Given swirl and axial velocity distributions at the exitaxial velocity distributions at the exit
Objective 3 (f2): Uniform loading
Objective 4 (f4): Cavitation indexFullLoad
Objective 5 (f5): Pumping area
PartLoad
BestEffic
Th H d i ® bl d d l d i 52 d iThe Hydromatrix® runner blade was modeled using 52 designvariables and the design was carried out with 5 objectives, at 3operating points. EASY handled this design problem as a two-
bj ti ( i i ht )
21Parallel CFD & Optimization Unit, NTUA, Greece 21
objective case (via weights):
(a) min. F1(f1,f2, at the 3 OPs) & (b) min. F2(f3,f4,f5, at the 3 OPs)
Design of HYDROMATRIX®
F2
F1
EAs or MAEAs with the PCA of design variables:EAs or MAEAs with the PCA of design variables:
With the same computing cost (number of evaluations), the MAEA with PCAassisting the evolution operators outperforms MAEA. The computed fronts of non-dominated solutions by the two methods at the same cost are shown for the
22Parallel CFD & Optimization Unit, NTUA, Greece 22
dominated solutions by the two methods, at the same cost, are shown for theHydromatrix® runner design problem.
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 non-
dominated solutions assists (a) the application of the evolution operators (EA(PCA) or MAEA(PCA)) and (b) the metamodel training
23Parallel CFD & Optimization Unit, NTUA, Greece 23
by cutting off the less important components of the training patterns (M(PCA)AEA). Both are combined in M(PCA)AEA(PCA).
Optimization of Geothermal ORC Systems
y
R-134aR-410AR-407C
all e
ffic
ien
c R-600a
Ove
r
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) using EASY
24Parallel CFD & Optimization Unit, NTUA, Greece 24
Design carried out at the Center for Renewable Energy Sources (CRES), using EASY, for the EU-funded project LOW-BIN.
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 Design performed by CRES using EASY for the EU-funded
25Parallel CFD & Optimization Unit, NTUA, Greece 25
and cooling buildings. Design performed by CRES, using EASY, for the EU-funded project GROUND-MED.
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, theobjective is to schedule all units so as to operate with min. Total Operating Cost (TOC)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,
Parallel CFD & Optimization Unit, NTUA, Greece 26
( ) p ,Greece.
PART II: Deterministic Optimization methods
Deterministic Optimization Methods:
Gradient-based methods quasi-Newton or exact Newton methodsGradient-based methods, quasi-Newton or exact Newton methods.
Assisted by the adjoint variable method in fluid mechanics (gradient or Hessiancomputation)
Pro(s): Fast!
Con(s): Need to compute the gradient of F, or even the Hessian. May be trapped intolocal minima.
Hybrid Optimization Methods!Hybrid Optimization Methods!
Continuous Adjoint: First-differentiate, then-discretize
Di Adj i Fi di i h diff iDiscrete Adjoint: First-discretize, then-differentiate
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 1.32
1.34
1.26
1.28
1.3
1.32
ntro
py G
ener
atio
n Reference Blade
Row 1 Row 2
1.22
1.24
0 5 10 15 20 25 30 35
Ent
Cycle
Optimal Blade Optimal BladeOptimal Blade Optimal Blade
Design-Optimization of a 3D peripheral compressor rows, for minimal viscous losses, ith geometrical constraints sing the contin o s adjoint method
Parallel CFD & Optimization Unit, NTUA, Greece 28
with geometrical constraints, using the continuous adjoint method.Turbulence model : Low-Reynolds number Spalart-Allmaras.
Applications of the Adjoint Method in Turbomachinery
pinit
popt
Optimization of a Francis turbine blade, targeting a 1.5m increase in the
Parallel CFD & Optimization Unit, NTUA, Greece 29
Optimization of a Francis turbine blade, targeting a 1.5m increase in the hydraulic height, subject to a number of flow constraints, incl. cavitation.
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]●(Continuous) Adjoint to [RANS & Spalart-Allmaras].● Drag reduction.
Velocity Adjoint velocity
Sensitivity
Sensitivity Map
Sensitivity map:Direction of favorable surface displacement
for reducing drag: d i d bl d
Parallel CFD & Optimization Unit, NTUA, Greece 30
Sensitivity Mapred - inwards, blue – outwards.
Applications of the Adjoint Method in Car Industry
Convergence: Optimizing ONLY the Spoiler Overall deformation less than 20mm
BaselineOptimized
For an aerodynamically already nearly perfect car:
>2% drag reduction
30% lift improvement (not included in F!!!!)
Parallel CFD & Optimization Unit, NTUA, Greece 31
Baseline Optimized
Topology Optimization & Continuous Adjoint Method
Unconstrained
With constraint onWith constraint on the mass flowrate per exit
With constraint on the
The adjoint method is used to solve topology optimization problems in fluid mechanics & heat transfer. Due
h i l hi h b f Flow swirl at the exitto the excessively high number of design variables, the adjoint method suits perfectly to this purpose.Example: Design of a manifold with
Parallel CFD & Optimization Unit, NTUA, Greece 32
Example: Design of a manifold with a single inlet and four outlets.
Topology Optimization & Continuous Adjoint Method
gear box
outlet
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: Optimal Geometry: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. l l b ddi i ll i fl id l i Th i l
Parallel CFD & Optimization Unit, NTUA, Greece 33
total pressure losses, by additionally using a fluid volume constraint. The optimal design yields a 29% reduction in the objective function value.
Closure
Once a reliable analysis method is available, next step is to optimize the “system”.
A f i i i h d i il bl f l d l l iA great gamut of optimization methods is available from plug-and-play evolutionaryalgorithms to tailored-to-the problem gradient-based methods.
Evolutionary algorithms are nice is there is a moderate number of unknowns and/or theEvolutionary algorithms are nice is there is a moderate number of unknowns and/or theoptimization is not to be repeated on a daily basis. They might be the only choice if theexisting analysis s/w is a “black-box”.
In their standard form, EAs are quite slow. However, nowadays, there are interestingways to lower the CPU cost and/or the wall clock time.
Gradient-based methods, usually based on the adjoint method to compute the gradientof the objective function, are much faster but can be trapped into a local (rather than theglobal) minimum. Programming adjoint methods require a certain investment in time.g ) g g j q
Hybridization seems to be the best way to use them. EAs are responsible for theexploration of the search space whereas gradient-based for the refinement of promising
Parallel CFD & Optimization Unit, NTUA, Greece 34
p p g p gsolutions.
Many Thanks to:
Dr. A. AsoutiDr. E. KontoleontosD E P i Ki h iDr. E. Papoutsis-KiachagiasDr. D. PapadimitriouDr. S. Kyriacou
Parallel CFD & Optimization Unit, NTUA, Greece 35