CFD Optimisation
CFD Optimisation
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
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
March 2, 2012
Introduction
Optimisation refers to seeking the best possible design point
within the design space
Optimisation is a three-fold problem
March 2, 2012
Introduction
ANSYS provides a
comprehensive set of tools
for optimisation
Design of Experiments
Response Surfaces
Goal Seek
Mesh Morphing
Adjoint Solutions
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
March 2, 2012
Manual Optimisation
New in R14.
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
March 2, 2012
Manual Optimisation
Design 1
Design 3
Design 4
March 2, 2012
Design 5
Design 6
Manual Optimisation
Example Script for the case
Repeat for
N designs
Interpolate
New fluid zone name and
zone to be replaced (need
not be the same as here)
10
March 2, 2012
face/cell data?
Manual Optimisation
11
March 2, 2012
Manual Optimisation
Design 1
Drag=97N
Design 2
Drag=137N
Design 3
Drag=131N
12
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
March 2, 2012
?
?
?
Single Point
14
March 2, 2012
What If?
Response
Surface
15
March 2, 2012
The diffuser
geometry is
characterised by four
input parameters
16
March 2, 2012
17
March 2, 2012
18
March 2, 2012
19
March 2, 2012
20
March 2, 2012
Confirmation Run
21
March 2, 2012
Response Surface
- Goal-Driven Optimization or GDO automatically change design
parameters to find optimal design.
- Six Sigma incorporates uncertainties of input parameters.
22
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
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.
24
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.
25
March 2, 2012
Mesh Morpher
Case Study Manual Morphing
Generic F1 car (Hexcore) nose extension before
March 2, 2012
Mesh Morpher
Case Study Manual Morphing
Generic F1 car (Hexcore) nose extension after
March 2, 2012
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
March 2, 2012
Mesh Morpher
Interface Deformation Setup
29
March 2, 2012
Optimisation methods
Design Xplorer Design of Experiments
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
March 2, 2012
Mesh Morpher
Optimiser
31
March 2, 2012
Mesh Morpher
Objective Functions and Definition
March 2, 2012
March 2, 2012
34
March 2, 2012
35
March 2, 2012
36
March 2, 2012
37
A grid of 5 rows of 18 control points is superimposed over the mesh to facilitate the
mesh morphing
A course tet mesh and a finer quad pave mesh were used
March 2, 2012
1.5
Mode 1
Mode 2
1
Mode 3
Mode 4
Mode 5
0.5
Mode 6
0
0
10
12
-0.5
-1
-1.5
Mode 1 180o
Mode 2 360o
Mode 3 540o
Mode 4 720o
Mode 5 900o
Mode 6 1080o
38
March 2, 2012
14
16
18
39
Workbench and Design Xplorer are used to drive the six morpher
parameters to optimise the design for lift/drag
March 2, 2012
40
CFD Post is used to return the lift and drag from the aerofoil as
Workbench output parameters
March 2, 2012
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
March 2, 2012
March 2, 2012
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
March 2, 2012
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
0.015
-0.005
0.01
-0.01
0.005
0
-0.06
-0.015
March 2, 2012
-0.04
-0.02
0.02
0.04
0.06
45
March 2, 2012
Deformation Modes
Mode 1 Decrease/Increase
Aft Thickness
Mode 2 Decrease/Increase
Stagger
Mode 4 Increase/Decrease
Camber
46
March 2, 2012
1.2
4
1
CL
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
1.5
March 2, 2012
Baseline
Optimum
0.04
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
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
March 2, 2012
RBF-Morph
RBF Morph tool
3rd Party Add-on
50
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:
51
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
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.
(r )
r , n odd
r log r , n even
n
n
Multiquadric(MQ)
1+ r 2
1
1+ r 2
1
1+ r 2
2
e r
s (x ) = i ( x x i ) + h(x )
i =1
53
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
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.
March 2, 2012
RBF-Morph
Industrial Applications
56
March 2, 2012
57
1.
2.
Changing of driver
position acting on the
hunching angle
[0,7.5,15];
March 2, 2012
58
March 2, 2012
59
2011 ANSYS, Inc.
March 2, 2012
(Bricomoto, MRA)
Motorbike Windshield
March 2, 2012
61
2011 ANSYS, Inc.
March 2, 2012
March 2, 2012
March 2, 2012
March 2, 2012
Turbine Blade
65
March 2, 2012
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
March 2, 2012
68
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
March 2, 2012
The Adjoint solver is an additional solver within Fluent that is run after
the conventional solution is converged
70
March 2, 2012
Adjoint Solver
Key Ideas - Fundamentals
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
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
March 2, 2012
?
ADJOINT SOLVER
Adjoint Solver
Key Ideas
73
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
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
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
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
March 2, 2012
Adjoint Solver
Example Test Cases S809 HAWT Blade
Objective Maximise Lift/Drag Ratio
77
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
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
March 2, 2012
0
0
10
20
Run [-]
30
Adjoint Solver
Example Test Cases External Aero (Small car)
March 2, 2012
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
March 2, 2012
Adjoint Solver
Example Test Cases External Aero (Full Generic Race Car)
Front 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
March 2, 2012
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
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.
83
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
March 2, 2012
85
Client
Solver Manager
Compute Server
March 2, 2012
WB session can be
detached and reattached
Results picked up by WB
when complete
86
March 2, 2012
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
87
March 2, 2012
RSM Summary
88
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
March 2, 2012
Summary
Where should I use these tools?
Manual Optimisation and Scripting
MMO
90
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
March 2, 2012
Conclusions
92
March 2, 2012