Optimisation for CFD
ANSYS R14 Fluids Update Seminar
David Mann, ANSYS UK Ltd.
Milton Park, February 16th, 2012
Sheffield, February 29th, 2012
Aberdeen, March 8th, 2012
1
2011 ANSYS, Inc.
March 2, 2012
Agenda
Optimisation Tools for CFD
Introduction
Manual Optimisation and Scripting
Design Xplorer (DX)
Mesh Morpher or Shape Optimiser
RBF-Morph
Adjoint Solver
Remote Solve Manager (RSM)
Summary
2011 ANSYS, Inc.
March 2, 2012
Introduction
I have run my analysis, but ..
What happens if I increase/reduce the flow rate?
What do I need to adjust to unify the flow distribution?
How should the geometry change to maximise heat rejection?
What can be to done to mix out the species earlier?
Which parameters have greatest effect on the pressure drop?
What actions can I take to prevent the coolant from boiling?
How do I optimise my design .
3
2011 ANSYS, Inc.
March 2, 2012
Introduction
Optimisation refers to seeking the best possible design point
within the design space
Optimisation is a three-fold problem
Formulation of appropriate parameterisation
Parametric geometry using CAD tool or Design Modeler
Mesh morpher to define parametric mesh deformations
Selection of objective function
What are we seeking to maximise or minimise
Selection of robust optimiser
Gradient based optimisation method (Adjoint Solver)
Direct search based optimisation method (e.g. Simplex Method)
Statistical Optimisation method (ANSYS DesignXplorer)
4
2011 ANSYS, Inc.
March 2, 2012
Introduction
ANSYS provides a
comprehensive set of tools
for optimisation
Manual part mesh replacement
Design of Experiments
Response Surfaces
Goal Seek
Mesh Morphing
Adjoint Solutions
Optimisation can be based around
parametric geometry, arbitrary
freeform mesh deformation, or precise
geometrical mesh deformation
5
2011 ANSYS, Inc.
March 2, 2012
Agenda
Optimisation Tools for CFD
Introduction
Manual Optimisation and Scripting
Design Xplorer (DX)
Mesh Morpher or Shape Optimiser
RBF-Morph
Adjoint Solver
Remote Solve Manager (RSM)
Summary
2011 ANSYS, Inc.
March 2, 2012
Manual Optimisation
Replace sub zones effectively as parameter for design points.
New in R14.
Allows automatic first order interpolation of face and cell data
Allows automatic grid manipulations (face slitting, node merging,
zone fusing, recreation of mesh interfaces etc)
Can use apriori grid preparation/decomposition but also works
well with cavity re-meshing tool in TGrid for conformal interfaces
Only requires re-meshing of sub zones (replaced part) and larger
mesh can be re-used across design points
Able to cope with large design changes and topology changes
(with consistent zone names)
2011 ANSYS, Inc.
March 2, 2012
Manual Optimisation
Part Swapping : Six
Each
Cavity
different
wing
remesh
has
wing
slightly
zone
configurations
fordifferent
conformal
rotation,
tosub-grid
be compared
position
transplant
and AoA
2011 ANSYS, Inc.
March 2, 2012
Manual Optimisation
Transplant of meshes using script
Design 2
Design 1
Design 3
Design 4
2011 ANSYS, Inc.
March 2, 2012
Design 5
Design 6
Manual Optimisation
Example Script for the case
Replace sub grid command
Path to new sub grid
Repeat for
N designs
Interpolate
New fluid zone name and
zone to be replaced (need
not be the same as here)
10
2011 ANSYS, Inc.
March 2, 2012
face/cell data?
Manual Optimisation
Design1 Design 2 Design 3 Design 4 Design 5 Design 6
11
2011 ANSYS, Inc.
March 2, 2012
Manual Optimisation
Design 1
Drag=97N
Design 2
Drag=137N
Design 3
Drag=131N
12
2011 ANSYS, Inc.
March 2, 2012
Design 4
Drag=141N
Design 5
Drag=139N
Design 6
Drag=173N
Agenda
Optimisation Tools for CFD
Introduction
Manual Optimisation and Scripting
Design Xplorer (DX)
Mesh Morpher or Shape Optimiser
RBF-Morph
Adjoint Solver
Remote Solve Manager (RSM)
Summary
13
2011 ANSYS, Inc.
March 2, 2012
Gain Deeper Product Insights
ANSYS simulation software can give you more clarity into your products and
development processes
Move from a single point solution to understanding the design space so simulation
can guide design.
?
?
?
Single Point
14
2011 ANSYS, Inc.
March 2, 2012
What If?
Response
Surface
Design Xplorer (DX)
15
Workbench based optimisation tool
Input and output parameters from all types of analysis can be
shared with DX via WorkBench
Works with all ANSYS products from ANSYS structural to EMAG to
CFD, making it beneficial for multiphysics analysis
2011 ANSYS, Inc.
March 2, 2012
Example of DX usage Simple Diffuser
To illustrate how Design Xplorer can be used to optimise a simple
geometry consider the simple diffuser below:-
The diffuser
geometry is
characterised by four
input parameters
This allows the
diffusers shape to be
controlled by
WorkBench and
Design Xplorer
16
2011 ANSYS, Inc.
March 2, 2012
Initial setup and run Current Design Point
The initial run is setup and run as normal
with CFD post then being used to provide
output parameters
This forms the current design point
which can then be rerun with a different
geometry simply by changing the input
parameters, and the new results viewed
via the output parameters
17
2011 ANSYS, Inc.
March 2, 2012
Design of Experiments (DoE)
A Design of Experiments can then be used to
automatically generate a set of runs which cover the
design space specified by the parameters
18
2011 ANSYS, Inc.
March 2, 2012
Response Surface Results
The data from the Design of Experiments runs is then
used to generate a response surface from which the
performance of other designs can be predicted
A clear maximum pressure rise is visible in the results
beyond which additional diffusion causes separation
19
2011 ANSYS, Inc.
March 2, 2012
Goal Driven Optimisation
The response surface is used to predict the
parameters that give the optimum design
The objective function can be multi-variate, but in
this case is simply chosen to maximise the pressure
rise through the diffuser.
Once determined the optimum design can be run to
confirm the predicted results or to improve the
resolution of the response surface
20
2011 ANSYS, Inc.
March 2, 2012
Confirmation Run
21
2011 ANSYS, Inc.
Pressure Rise = 43.465 Pa (43.397 Pa predicted)
March 2, 2012
Design Xplorer (DX)
DesignXplorer features the following studies:
Design point analysis (default) - examines how the input parameters
affect the output parameters by creating designs in a spreadsheet
like view.
Response Surface
- Goal-Driven Optimization or GDO automatically change design
parameters to find optimal design.
- Six Sigma incorporates uncertainties of input parameters.
22
Min-Max Search examines the entire output parameter space from
a Response Surface to approximate the minimum and maximum of
each output parameter. You can perform this search at any time.
Parameter Correlation gives correlation data that has been used to
derive sensitivities and decide if individual sensitivity values are
significant or not.
2011 ANSYS, Inc.
March 2, 2012
Agenda
Optimisation Tools for CFD
Introduction
Manual Optimisation and Scripting
Design Xplorer (DX)
Mesh Morpher or Shape Optimiser
RBF-Morph
Adjoint Solver
Remote Solve Manager (RSM)
Summary
23
2011 ANSYS, Inc.
March 2, 2012
Introduction
The mesh morphing technology introduced to ANSYS FLUENT at R13
allows a single mesh to be deformed in a freeform way to achieve new
designs without the need to create new geometries or meshes.
This gives us a platform on which we can carry out design optimisation
studies without the need to build a parametric model on a
topologically identical mesh.
24
2011 ANSYS, Inc.
March 2, 2012
Mesh Morpher
Introduction
The FLUENT Mesh Morpher utilizes Bernstein Polynomials to allow smooth
mesh deformations based upon movement of predefined control points.
The Morpher is hooked up to some basic optimization algorithms allowing
shape optimization to be carried out within FLUENT with the following
benefits:
Shape modification carried out quickly in parallel solver
Zero file I/O requirement
Quick convergence - data from previous design point can be used for
subsequent design points so initial data field is close to final solution
Scriptable by Text User Interface journals
Works on all mesh types, i.e. hex, tet, cutcell, hybrid, poly etc.
25
2011 ANSYS, Inc.
March 2, 2012
Mesh Morpher
Case Study Manual Morphing
Generic F1 car (Hexcore) nose extension before
Two control points moved in -x
26
2011 ANSYS, Inc.
March 2, 2012
Mesh Morpher
Case Study Manual Morphing
Generic F1 car (Hexcore) nose extension after
Two control points moved in -x
27
2011 ANSYS, Inc.
March 2, 2012
The morpher deformation modes
In FLUENT the user specifies a deformation region inside which the mesh is
morphed and an array of control points to define the deformation
Modes of deformation are specified by describing how all the control points move
together, for example the sine wave deformation shown
Multiple deformation modes can be specified and the relative weighting of each
controlled by parameters (three deformation modes = 3 parameters)
28
A sufficient number of deformation modes will allow arbitrary shapes to be formed
2011 ANSYS, Inc.
March 2, 2012
Mesh Morpher
Interface Deformation Setup
In R14 we now have the
ability to constrain
boundaries within
deformation regions!
29
2011 ANSYS, Inc.
March 2, 2012
Optimisation methods
Design Xplorer Design of Experiments
Internal FLUENT Simplex Optimiser
Two different optimisation techniques are available when using the FLUENT
morpher:1. Optimisation using Design of Experiments (DoE) in Design Xplorer (DX) requires
script
2. Optimisation using one of the internal FLUENT Mesh Morpher Optimiser (MMO)
methods such as the Simplex optimiser
30
2011 ANSYS, Inc.
March 2, 2012
Mesh Morpher
Optimiser
31
2011 ANSYS, Inc.
March 2, 2012
Mesh Morpher
Objective Functions and Definition
The Objective Function is a single scalar value that the chosen
optimizer method will drive towards a minimum.
Typical Objective Functions
Lift & drag
Mass flow-rate for inlets and outlets
Surface average pressures for walls/inlets/outlets
Min-max absolute pressure/temperature etc.
Objective Function can be defined by:
User defined functions
Scheme Function
NEW IN R14 GUI Driven Objective Function Definition that can call
FLUENT exposed parameters
32
2011 ANSYS, Inc.
March 2, 2012
Case Study 1 - Generic Sedan Drag
Optimization
Study effect of various vehicle shape parameters on drag force
Shape parameters are defined using mesh morphing technology in ANSYS
Fluent
ANSYS WB is used to drive the shape parameters, create DOE & perform
goal driven optimization
ANSYS WB makes the process automatic
Three Shape Parameters
1. Backlight angle (1)
2. Tumble home angle (2)
3. Windshield angle (3)
Generic Sedan Model
33
2011 ANSYS, Inc.
March 2, 2012
Generic Sedan Baseline Design
34
2011 ANSYS, Inc.
March 2, 2012
Generic Sedan Worst Design
35
2011 ANSYS, Inc.
March 2, 2012
Generic Sedan Optimal Design
36
2011 ANSYS, Inc.
March 2, 2012
Case Study 2 Optimisation of NACA0012
37
The initial geometry to be optimised is the NACA0012 symmetrical 2D aerofoil
section.
A grid of 5 rows of 18 control points is superimposed over the mesh to facilitate the
mesh morphing
Moving these control points causes the mesh to morph
A course tet mesh and a finer quad pave mesh were used
Seek to maximise Lift to Drag ratio
2011 ANSYS, Inc.
March 2, 2012
Sine deformation modes
applied to NACA 0012
section
1.5
Mode 1
Mode 2
1
Mode 3
Mode 4
Mode 5
0.5
Mode 6
0
0
10
12
-0.5
Mode n = sin(n.pi.x) where x is normalised
between 0 and 1 from leading edge to trailing edge
-1
-1.5
Mode 1 180o
Mode 2 360o
Mode 3 540o
Mode 4 720o
Mode 5 900o
Mode 6 1080o
38
2011 ANSYS, Inc.
March 2, 2012
14
16
18
Workbench Morpher Optimisation
Project Workflow
39
Workbench and Design Xplorer are used to drive the six morpher
parameters to optimise the design for lift/drag
The workflow is shown below
2011 ANSYS, Inc.
March 2, 2012
Output parameters from CFD Post
40
CFD Post is used to return the lift and drag from the aerofoil as
Workbench output parameters
A new workbench output parameter of Lift/Drag can then be derived in
WB parameter manager for use in the DoE optimisation
2011 ANSYS, Inc.
March 2, 2012
Optimisation using Design Xplorer
41
Data points using six morpher parameters are very noisy in their fit to
the response surface, as there are always four other parameters not
involved in the surface fit
The response surface fit can be poor if the search area is wide, so the
limits on parameters were tightened around the then best point and
the DoE rerun several times to get a better fit
2011 ANSYS, Inc.
March 2, 2012
Optimisation using sine modes and inbuilt
Simplex optimiser
Convergence history using Simplex optimiser
42
2011 ANSYS, Inc.
March 2, 2012
Comparison of optimised aerofoil shapes
with different optimisers
Sine modes using DoE in
Design Xplorer
Parameters {0.018027, 0.0042698, -0.001, 0.00083241, -0.002297,
0.0025603}
CL/CD = 26.746, CL = 7.3694, CD = 0.27553
Sine modes using internal
MMO simplex optimiser
Parameters {0.03000086, 0.00429696, 0.003607369, 0.001349214,
0.0003653693, 0.001880633}
CL/CD = 26.349, CL = 7.5189, CD = 0.28536
Interestingly two completely different sets of parameters were obtained giving very similar but
laterally displaced aerofoil shapes with the same morpher modes
The number of design points required were 3x 45 design points with DX and 148 with the MMO
running the Simplex optimiser. DX required some manual refinement points. For the same CL/CD DX
would have needed less. DX can spawn runs to multiple machines/cores via RSM
43
2011 ANSYS, Inc.
March 2, 2012
Comparison of DX and MMO results
The two optimisation methods ended up with very similar aerofoil sections,
but in each case the geometry ended up in a different y location
The DX route is less prone to get stuck in a local minimum, but requires more
manual fine tuning of limits
0.01
0.035
0.03
0.005
0.025
0
-0.06
-0.04
-0.02
0.02
0.04
0.02
0.06
Sine Modes DX
Sine Modes DX
Sine Modes MMO
Sine Modes MMO
0.015
-0.005
0.01
-0.01
0.005
0
-0.06
-0.015
Optimised designs translated and overlaid
44
2011 ANSYS, Inc.
March 2, 2012
-0.04
-0.02
0.02
0.04
Optimised designs untranslated
0.06
Case Study 3 - Optimisation of a UAV wing
A generic (representative, but not accurate) model of the Global Hawk UAV was downloaded
from http://www.nasa.gov/multimedia/3d_resources/assets/global_hawk.html
The non realistic wing was replaced with one with a realistic section and the correct
planform view derived from open literature relating to this aircraft
The Mesh Morpher Optimiser (MMO) tool in ANSYS Fluent was used to deform the wing
section to optimise the Lift-Drag ratio
45
2011 ANSYS, Inc.
March 2, 2012
Deformation Modes
Mode 1 Decrease/Increase
Aft Thickness
Mode 2 Decrease/Increase
Stagger
Mode 3 Redistribute Camber
Mode 4 Increase/Decrease
Camber
46
2011 ANSYS, Inc.
March 2, 2012
The Optimised Wing Section
1.4
6
5
1.2
4
1
CL
The simplex optimiser was used to find the
combination of the four deformation modes
that gave the maximum lift/drag ratio
The resultant wing section has a CL/CD ratio
24.8% higher than the original at the datum
3 degree Angle of Attack (AoA), and a wider
range of AoA capability
The optimised section is more aft loaded
0
0.4
-1
1
0.6
0
Optimised Section
-1
-2
-2
0.2
0.01
0.8
0.015
0.02
0.025
Original Section
0.03
0.035
CD
0.14
-2
Original PS
0.12
Original SS
-1.5
Optimised
0.1
Baseline
Optimised
0.08
-1
CP
0.06
0.04
-0.5
-0.2
0.2
0.4
0.6
0.8
0.02
Chord
0.5
0.2
0.4
0.6
0.8
-0.02
1
-0.04
-0.06
47
2011 ANSYS, Inc.
1.5
March 2, 2012
Baseline
Optimum
0.04
Mesh Morpher - Conclusions
The inbuilt freeform mesh morpher in Fluent provides a powerful tool for
arbitrary changes in the geometry without being limited by a constrained
parameterised geometry
If sufficient well designed deformation modes are used with the mesh
morpher, any arbitrary shape change can be achieved and true optima can
be approached
This mesh morpher is less suitable for cases where a high degree of control
is needed, for example part of the geometry is a given shape.
48
2011 ANSYS, Inc.
March 2, 2012
Agenda
Optimisation Tools for CFD
Introduction
Manual Optimisation and Scripting
Design Xplorer (DX)
Mesh Morpher or Shape Optimiser
RBF-Morph
Adjoint Solver
Remote Solve Manager (RSM)
Summary
49
2011 ANSYS, Inc.
March 2, 2012
RBF-Morph
RBF Morph tool
3rd Party Add-on
50
2011 ANSYS, Inc.
March 2, 2012
RBF-Morph
Tool Objective
The aim of RBF Morph is to perform fast mesh morphing using a meshindependent approach based on state-of-the-art RBF (Radial Basis Functions)
techniques.
The use of RBF Morph allows the CFD user to perform shape modifications,
compatible with the mesh topology, directly in the solving stage, just adding a
single command line in the input file:
(rbf-morph (("sol-1" amp-1) ("sol-2" amp-2)...("sol-n" amp-n)))
The final goal is to perform parametric studies of component shapes and positions
typical of the fluid-dynamic design like:
Design Developments
Multi-configuration studies
Sensitivity Studies
DOE (Design Of Experiment)
Optimization
51
2011 ANSYS, Inc.
March 2, 2012
RBF-Morph
Features
Fully integrated within Fluent (GUI, TUI &
solving stage) and Workbench
Mesh-independent RBF fit used for surface
mesh morphing and volume mesh smoothing
Parallel support allows morphing of large
grids in a short time
Support for all mesh types (tetrahedral,
hexahedral, hexcore, polyhedral, etc.)
Ability to generate modified CAD file from
morphed surface mesh
Multi fit makes the Fluent case truly
parametric (only 1 mesh is stored)
High precision morphing : exact nodal
movement and exact feature preservation.
52
2011 ANSYS, Inc.
March 2, 2012
RBF-Morph
Background and Theory
A system of radial functions is used to fit a
solution for the mesh movement/morphing,
from a list of source points and their
displacements. This approach is valid for
both surface shape changes and volume
mesh smoothing. The RBF problem definition
does not depend on the mesh
Radial Basis Function interpolation
is used to derive the displacement
in any location in the space, so it is
also available in every grid node.
Radial Basis Function
(r )
Spline type (Rn)
r , n odd
Thin plate spline (TPSn)
r log r , n even
n
n
Multiquadric(MQ)
1+ r 2
1
Inverse multiquadric (IMQ)
1+ r 2
1
1+ r 2
2
e r
Inverse quadratic (IQ)
An interpolation function composed by a
radial basis and a polynomial is defined.
N
s (x ) = i ( x x i ) + h(x )
i =1
53
2011 ANSYS, Inc.
March 2, 2012
h(x ) = + 1 x + 3 y +
Gaussian (GS)
(
(
(
)
)
)
v x = s x (x) = ix x x ki + 1x + 2x x + 3x y + 4x z
4z
i =1
N
(
)
=
=
v
s
x
iy x x ki + 1y + 2y x + 3y y + 4y z
y
y
i =1
N
v = s (x) = z x x + z + z x + z y + z z
1
2
3
4
z
i
ki
z
i =1
RBF-Morph
How it Works : Problem Setup
The problem must describe correctly the desired changes and
must preserve exactly the fixed part of the mesh.
The prescription of the source points and their displacements fully
defines the RBF Morph problem.
The problem is mesh-independent, and could be defined using grid
nodes as well as arbitrary point locations.
Each problem and its fit define a mesh modifier or a shape
parameter.
54
2011 ANSYS, Inc.
March 2, 2012
RBF-Morph
Solid body motion and exact deformation
55
The main differentiator between RBF-Morph and the inbuilt morpher is that
RBF-Morph allows the mesh to be deformed to give precise geometry
changes, such as solid body motion. The inbuilt morpher is designed for
arbitrary shape change with little constraint.
RBF-Morph is a useful alternative to parameterising the geometry as the
mesh does not need to be recreated.
2011 ANSYS, Inc.
March 2, 2012
RBF-Morph
Industrial Applications
56
2011 ANSYS, Inc.
March 2, 2012
Motorbike driver height and position
The original motorbike model
is parameterized to
investigate the effect of
driver height and position:
57
1.
Changing of driver height
[-5 cm, 0 cm, 5 cm];
2.
Changing of driver
position acting on the
hunching angle
[0,7.5,15];
2011 ANSYS, Inc.
March 2, 2012
Set up of RBF Morph
The morphed action is limited in the
box region domain 1.
The motion of the surfaces inside the
encapsulation domain is imposed
to the points on the windshield
(fixed), the fairing (fixed) and the
helmet (moving).
Driver height is changed moving the
helmet
Driver position is changed rotating
the helmet around the ankle
58
2011 ANSYS, Inc.
March 2, 2012
59
2011 ANSYS, Inc.
March 2, 2012
(Bricomoto, MRA)
Motorbike Windshield
Formula 1 Front Wing
60
2011 ANSYS, Inc.
March 2, 2012
61
2011 ANSYS, Inc.
March 2, 2012
Sails Trim (Ignazio Maria Viola,
University of Newcastle)
Generic Formula 1 Front End
62
2011 ANSYS, Inc.
March 2, 2012
Generic Formula 1 Front End
63
2011 ANSYS, Inc.
March 2, 2012
Fluid Structure Interaction
64
2011 ANSYS, Inc.
March 2, 2012
Turbine Blade
65
2011 ANSYS, Inc.
March 2, 2012
MIRA Reference car
(MIRA ltd)
66
2011 ANSYS, Inc.
March 2, 2012
Conclusions
A shape parametric CFD model can be defined using ANSYS
Fluent and RBF Morph.
Such parametric CFD model can be easily coupled with
preferred optimization tools to steer the solution to an optimal
design that can be imported in the preferred CAD platform
(using STEP)
Proposed approach dramatically reduces the man time
required for set-up widening the CFD calculation capability
M.E. Biancolini, Mesh morphing and smoothing by means of
Radial Basis Functions (RBF): a practical example using Fluent
and RBF Morph in Handbook of Research on Computational
Science and Engineering: Theory and Practice (http://www.csebook.com/).
67
2011 ANSYS, Inc.
March 2, 2012
Using CFX moving mesh for optimisation
68
The preceding mesh
morphing sections have
been on Fluent, but the
moving mesh model in
CFX can also be used as
the basis of an
optimisation
Solid body motion and
deflections can be applied
and the mesh will morph
to accommodate the
movement
Multiple scenarios can
then be run with one
mesh
2011 ANSYS, Inc.
March 2, 2012
Agenda
Optimisation Tools for CFD
Introduction
Manual Optimisation and Scripting
Design Xplorer (DX)
Mesh Morpher or Shape Optimiser
RBF-Morph
Adjoint Solver
Remote Solve Manager (RSM)
Summary
69
2011 ANSYS, Inc.
March 2, 2012
The Adjoint Solver
The Adjoint solver is an additional solver within Fluent that is run after
the conventional solution is converged
The Adjoint solver is used to assess the sensitivity of output parameters
such as lift, drag or pressure drop to input parameters such as the
geometrical shape without the need for additional runs
The output from the Adjoint
solver is typically a surface
vector field that illustrates how
the geometry would need to
change to increase or decrease
the output parameter of interest
70
As such it forms a very useful
tool in an optimisation study and
can be linked to the mesh
morpher
2011 ANSYS, Inc.
March 2, 2012
Drag sensitivity for NACA0012
Adjoint Solver
Key Ideas - Fundamentals
High-level system view of a conventional flow solver
Inputs
Outputs
Field data
Contour plots
Vector plots
xy-plots
Scalar values
Lift
Drag
Total pressure drop
Boundary mesh
Interior mesh
Material properties
Boundary condition 1
Flow angle
Inlet velocity
@
@
71
2011 ANSYS, Inc.
March 2, 2012
FLOW SOLVER
Adjoint Solver
Fundamentals
HOW ARE CHANGES TO KEY OUTPUTS DEPENDENT ON CHANGES TO
THE INPUTS?
Inputs
Outputs
Field data
Contour plots
Vector plots
xy-plots
Scalar values
Lift
Drag
Total pressure drop
Boundary mesh
Interior mesh
Material properties
Boundary condition 1
Flow angle
Inlet velocity
@
@
72
2011 ANSYS, Inc.
March 2, 2012
?
ADJOINT SOLVER
Adjoint Solver
Key Ideas
73
The Adjoint solver can be used to compute the derivative of a chosen
observation of engineering interest with respect to all the input data for
the system.
Solving an adjoint problem is not trivial about as much effort as a flow
solution.
The adjoint solution provides guidance on the optimal adjustment that
will improve a systems performance.
An adjoint solution can be used to estimate the effect of a change prior
to actually making the change.
Shape sensitivity data can be combined with mesh morphing to guide
smooth mesh deformations.
An adjoint solution can be used as part of a gradient-based optimization
algorithm.
2011 ANSYS, Inc.
March 2, 2012
Adjoint Solver
Mesh Morphing
Completing the design cycle
Mesh Morphing
Sensitivity of lift to surface shape
Use Bernstein polynomial-based
morphing scheme
Adjoint to deformation operation
Surface shape sensitivity becomes
control point sensitivity
Benefit of this approach is two-fold
Smooths the surface sensitivity
field
Provides a smooth interior mesh
deformation
Select portions of the geometry to be
modified
74
2011 ANSYS, Inc.
March 2, 2012
Flow
Adjoint Solver
Mesh Morphing
Constrained motion
Some walls within the control volume may be constrained not to
move.
A minimal adjustment is made to the control-point sensitivity field
so that deformation of the wall is eliminated. Cast as a least-squares
problem.
Actual change 3.1
P = -213.8
Total improvement
of 8%
75
2011 ANSYS, Inc.
March 2, 2012
Adjoint Solver
Current Functionality
ANSYS-Fluent flow solver has very broad scope
Adjoint is configured to compute solutions based on some assumptions
Steady, incompressible, laminar flow.
Steady, incompressible, turbulent flow with standard wall functions.
First-order discretization in space.
Frozen turbulence.
The primary flow solution does NOT need to be run with these restrictions
Strong evidence that these assumptions do not undermine the utility of the adjoint
solution data for engineering purposes.
Fully parallelized.
Gradient algorithm for shape modification
Mesh morphing using control points.
Adjoint-based solution adaption
76
2011 ANSYS, Inc.
March 2, 2012
Adjoint Solver
Example Test Cases S809 HAWT Blade
Objective Maximise Lift/Drag Ratio
77
2011 ANSYS, Inc.
March 2, 2012
Adjoint Solver
Example Test Cases S809 HAWT Blade
The best lift/drag ratio is observed when setting observable for lift, and using a scale factor of 2.5. The new
shape provides about 30% more lift than the original geometry
Highest lift/drag
ratio achieved
78
2011 ANSYS, Inc.
March 2, 2012
Adjoint Solver
Example Test Cases Internal ducting U bend
100
90
Base design
80
ptot [Pa]
70
60
50
40
30
20
10
End design
79
2011 ANSYS, Inc.
March 2, 2012
0
0
10
20
Run [-]
30
Adjoint Solver
Example Test Cases External Aero (Small car)
Surface map of the drag sensitivity to shape changes
Surface map of the drag sensitivity to shape changes
80
2011 ANSYS, Inc.
March 2, 2012
Surface map of the drag sensitivity to shape changes
Adjoint Solver
Example Test Cases External Aero (Full Generic Race Car)
Increase the downforce on the vehicle
Adjoint result shows regions of highest sensitivity of downforce to shape
81
2011 ANSYS, Inc.
March 2, 2012
Adjoint Solver
Example Test Cases External Aero (Full Generic Race Car)
Front Wing changes
Rear Wing Changes
Downforce (N)
82
Downforce (N)
Geometry
Predicted
Result
Geometry
Predicted
Result
Original
---
425.7
Original
---
425.7
Modified
447.4
451.1
Modified
481.3
492.5
2011 ANSYS, Inc.
March 2, 2012
Adjoint Solver Summary
The Adjoint solution is carried out as an addition to the primary flow solution
The Adjoint solver solves the Navier Stokes equations recast as derivatives of
output flow variables of interest such as drag, lift or pressure drop
As the equations are rewritten only a finite number of predefined flow
variables of interest are available
The output from the Adjoint is a field of the sensitivity of inputs such as the
geometry and boundary conditions to the output variables of interest.
This can form the basis for optimising these inputs.
83
2011 ANSYS, Inc.
March 2, 2012
Agenda
Optimisation Tools for CFD
Introduction
Manual Optimisation and Scripting
Design Xplorer (DX)
Mesh Morpher or Shape Optimiser
RBF-Morph
Adjoint Solver
Remote Solve Manager (RSM)
Summary
84
2011 ANSYS, Inc.
March 2, 2012
The Remote Solve Manager (RSM)
RSM has a three tiered architecture
85
Client
Solver Manager
Compute Server
2011 ANSYS, Inc.
March 2, 2012
The Remote Solve Manager (RSM)
A queue can be set up on
the solver manager for
multiple compute cores
which may be available on
the network
All design points are then
submitted to this queue
Design points are run as
compute cores become
available
WB session can be
detached and reattached
Results picked up by WB
when complete
86
2011 ANSYS, Inc.
March 2, 2012
Workbench RSM Terminology
There are RSM controls at both the solution level, e.g. FLUENT or CFX, to
control how jobs are run, and also at the parameter set (global) level giving
good control of resource utilisation
Solution Component properties
Parameter Set properties
87
2011 ANSYS, Inc.
March 2, 2012
RSM Summary
88
Optimisation can create a large number of design points that
would be slow to run sequentially in serial.
In R14 the Remote Solve Manager provides a way of controlling
compute resource allocation for CFD design point/ optimisation
studies to allow multiple design points to be submitted to a
queue of available compute nodes.
2011 ANSYS, Inc.
March 2, 2012
Agenda
Optimisation Tools for CFD
Introduction
Manual Optimisation and Scripting
Design Xplorer (DX)
Mesh Morpher or Shape Optimiser
RBF-Morph
Adjoint Solver
Remote Solve Manager (RSM)
Summary
89
2011 ANSYS, Inc.
March 2, 2012
Summary
Where should I use these tools?
Manual Optimisation and Scripting
I want high level control on the meshes to be generated and I am
prepared to script the process
Design Xplorer
My optimisation may include a wider process or workflow in
Workbench with input and output parameters coming from multiple
simulations, and/or I am working with parametric geometry. My
design space may have local minima that I wish to avoid. I have a good
idea of nature and limits of the design space and want to enforce strict
control on any changes.
MMO
90
I am interested arbitrary shape optimisation where geometry
parameterisation may limit finding a true optimum. Constraints and
prescribed deformations are secondary concerns. No additional cost.
Can interface with Workbench but scripts needed.
2011 ANSYS, Inc.
March 2, 2012
Summary
Where should I use these tools?
RBF-Morph
I want high level control on the morphed geometry shape, for example
can do solid body transformations and modify geometry in a manner
consistent with using parameterised geometry. Highly beneficial
where remeshing a parametric geometry is costly. Morphed
modifications can be fed back to CAD. Additional cost.
Adjoint Solver
91
I am interested in finding where I could potentially modify my
geometry to make small improvements. Which areas are most
contributing to lift, drag, pressure drop Limitations on models and
objective functions. No additional cost. No interaction with
Workbench, solver only. Geometry deformation is free form as with
the MMO.
2011 ANSYS, Inc.
March 2, 2012
Conclusions
92
ANSYS can provide tools to drive your design to optimise for
chosen parameters
This can be done with geometric parameterisation, mesh
replacement or morphing technologies
Some tools can provide predicted off design performance
without running multiple design points
The Remote Solve Manager allows the efficient handling of
large numbers of design points
We are continually developing these new technologies to be
more efficient
We want to listen to your feedback to improve the usefulness
of the tools
Increase your ROI using the ANSYS optimisation tools
2011 ANSYS, Inc.
March 2, 2012