0% found this document useful (0 votes)
48 views24 pages

Best Practices Workshop (III) Adjoint Solver

This document discusses the adjoint solver in STAR-CCM+ and its usefulness for design optimization. The adjoint method provides gradient information to efficiently explore large design spaces with many parameters. It does this by solving the adjoint equation to determine sensitivities of objectives like drag or lift with respect to design changes. This allows optimization with far fewer design evaluations than traditional methods. Examples shown optimize a car front wing shape to increase downforce using the adjoint solver gradients to update the design over multiple iterations.

Uploaded by

mnogopod
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views24 pages

Best Practices Workshop (III) Adjoint Solver

This document discusses the adjoint solver in STAR-CCM+ and its usefulness for design optimization. The adjoint method provides gradient information to efficiently explore large design spaces with many parameters. It does this by solving the adjoint equation to determine sensitivities of objectives like drag or lift with respect to design changes. This allows optimization with far fewer design evaluations than traditional methods. Examples shown optimize a car front wing shape to increase downforce using the adjoint solver gradients to update the design over multiple iterations.

Uploaded by

mnogopod
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

Adjoint Solver Workshop

Why is an Adjoint Solver useful?

• Design and manufacture for better performance:


e.g. airfoil, combustor, rotor blade, ducts, body shape, etc.
by optimising a certain characteristic

• CFD has the capability to explore the design space

• Sensitivity analysis may be used to provide insight into how


best to optimise the design
How can we explore a design space?

• STAR-CCM+ already used for sensitivity and optimisation using


DOE approaches with surface response and optimum search
– Coupled with ISIGHT, modeFRONTIER, Heeds, Optimus, and Optimate
– Pros: Straightforward generation of information by solving multiple design
points to find optimal set of parameters for given objectives
– Cons: Prohibitively expensive when the number of parameters goes up
• i.e. for CCD: 1p-> 5 dp / 2p-> 9 dp / 5p-> 27 dp / 20 -> 553 dp

• STAR-CCM+ adjoint method provides a more efficient approach


to sensitivity analysis where cost is independent of the number
of design parameters
– Gradient method based on differentiating the “primal” equation
– Can be used in shape optimisation, flow field insight, uncertainty
quantification, and inverse problems
What is the Adjoint Method?

• Helps understand influence of parameter variations on the


solution
– Examples
• If I change the shape of my duct, what happens to the pressure drop?
• If I change my inlet conditions, will flow uniformity improve at the outlet?
• If I change my airfoil shape will it produce more lift?
• How sensitive is my flow to changes due to manufacturing tolerances
• The pressure loss of my system is too high, what are the main drivers of this?
Traditional Analysis Workflow

• How do I know the effect on solution if…


– Geometry changes?
– Mesh changes?
– Boundary/physics variation?
• Traditional answer ends up in running many cases
– N configurations = N Cases
– Effects of parameter changes only understood after
multiple iterations of analysis cycle
Setup
Run flow Analyze
geometry,
solver results
physics

Setup
Run flow Analyze
geometry,
solver results
physics

Setup
Run flow Analyze
geometry,
solver results
physics
Adjoint Method Workflow

• Adjoint provides design insight


– Offers guidance towards improving system’s performance
– Gives insight into relative influence of variables on objective

• Adjoint is effective for problems with many design variables


– Far fewer design iterations needed
– Faster route to optimised design

Setup Run
Run flow Analyze Set Cost Analyze Update Run flow Analyze
geometry, adjoint
solver results Functions results model solver results
physics solver

STAR-CCM+
Adjoint
Solver
What the Adjoint Method Provides

Input User Data


Initial geometry, Surface/volume mesh Choose how to modify our simulation
Physical conditions (boundaries, flow models) Deform shape, change boundaries etc

Run Flow Solver


Provides output data for given inputs – Solve Adjoint Flow & Mesh
Pressures, Velocities, Forces, Drag, Take flow solution and provide sensitivity of
Pressure Drop objectives to flow & geometry parameters

Choose Simulation Objectives


Reduce pressure drop, maximize lift, Objectives become adjoint cost
velocity uniformity etc functions
Examples of typical uses

• Shape optimisation
– Part design
• Determine best design based on shape modifications
• Drive the parametric changes
– Leverage external optimisation code
• Coupled with gradient-based optimisation method

• Examples
1. Car-body shape analysis to improve external aerodynamics behavior

2. Optimise the geometry of three-way catalyst pipes


• optimisation for satisfying (A) Velocity uniformity in front of catalyst and
(B) Velocity value at the specific point conditions
– Maximizing A, B, A and B
– Maximizing A and minimizing B
– Maximizing B and minimizing A
STAR-CCM+ Adjoint Solver

• Available in STAR-CCM+ v8.04 onwards

• Delivered as a standard feature


– No additional license

• Aggressive development schedule – lots of new features …


Compatibility with Primal Flow Solution

• Adjoint solver provides sensitivities based on the


following models:
– Coupled implicit flow and fluid energy solvers
– Steady State
– Moving Reference Frame
– Multi-region
– Inviscid, laminar and frozen turbulence
– Single component gas and liquid
– Ideal gas (compressible) or constant density (incompressible)
– Constant material properties

• Use of the double precision version of STAR-CCM+ is


recommended
Adjoint Solver Capabilities

• Flow and mesh adjoint solvers


• Fully parallel
• 1st or 2nd order spatial discretisation solution
• Defect correction solver method
• GMRES – Krylov solver method
– Optional method for tough to converge cases
• Arbitrary number of cost functions
– Force (drag, lift), Moment
– Pressure drop
– Flow uniformity
• Sensitivities of cost functions with respect to
– Flow residuals
• Momentum equations, continuity, etc
– Design points
• Gradients with respect to user
defined design points
• Mesh morphing based on design point relocation
Adjoint Cost Functions

• Cost functions represent the engineering objectives of the


simulation
– An arbitrary number may be setup
– It is possible to view the flow and mesh adjoints for each cost function
– They may be created on physical boundaries or interfaces

• Force (e.g. Lift, Drag) & Moment


– Takes information from force or moment report with usual inputs
• Pressure drop
– Difference of mass flow averaged total pressure between two groups of
boundary surfaces
• Specify high and low pressure boundaries
• Uniformity ratio
• Deviation of local normal velocity from mass flow averaged value
Adjoint Outputs

• Adjoint flow data


– Sensitivity of cost functions with respect to x, y and z momentum
• Allows us to understand how a change in the velocity field affects the cost
function of interest
• E.G. Will increasing inlet velocities of my duct harm the uniformity at the outlet?
– Continuity
• Sensitivity of cost functions to changes in the mass of the system
• E.G. if I insert a boundary layer suction device will my drag change?
– Energy
• Effects of changing thermal properties on the cost function
• E.G. How will energy affect my pressure drop as a result of changing my fluid’s
density?
Adjoint Outputs

• Adjoint mesh data


– The adjoint mesh solver provides sensitivities with respect to mesh
coordinates
– This allows you to better understand the affect of mesh structure on the
cost function of interest
• E.G. Which areas of mesh have the greatest effect on my lift force and where
should I pay attention to adequately capturing flow structures

• Boundary parameter sensitivity reports


– These reports return the gradient of the cost function with respect to
changes in boundary inputs
– Gradients are only returned for inputs for the boundary type specified
– This allows you to better understand the influence of boundary conditions
values on the cost function of interest
• E.G. If I change the velocity on my inlet, how will my uniformity change?
Example Case
Front Wing optimisation

• Goal: Increase the downforce on race car front wing


• Case Details:
– 100 kph
– 700k polyhedra
– Cost function based on force report on lower element
Solution Method

• Unconstrained steepest decent method used


• 524 design points created in a “net” around the wing
– Gradients calculated at design points
– Displacements calculated by scaling gradients by an alpha of 5e-5

Run Primal Flow Solution

Run Adjoin Flow Solution

Calculate Mesh
Sensitivities

Scale Gradients to
Calculate Offset Positions

Morph Mesh
Results – Wing Profile
Results - Downforce

Front Wing Lower Element Downforce


480

475

470

465
Downforce [N]

460

455
10% Improvement in
450
Downforce Across 10
445 Design Iterations
440

435

430
1 2 3 4 5 6 7 8 9 10
Design Iteration
Using the STAR-CCM+ Adjoint Solver
Running an Adjoint Analysis

• Run primal flow solution


– Attention must be paid to
convergence
• Enable adjoint flow solver
– Selection via physics continua model selector
• Choose cost functions
– Available via right click on “Adjoint cost functions”
• Run adjoint flow solver
– Right click on adjoint flow model to step or run
• Run adjoint mesh solver
– Right click on adjoint mesh
“compute mesh sensitivity” to run
• Visualize results
– Scalars and vectors grouped
under “Adjoint” then by cost function
Demonstration
Summary

• Sensitivity analysis may be used to provide insight into


how best to optimise a design

• STAR-CCM+ provides an integrated adjoint solver


– The solver provides both 1st and 2nd order adjoints for improved accuracy

• Requires no additional licenses

• Extensive documentation and tutorials

• CD-adapco is actively involved with our partners to integrate


adjoint with optimisation tools

• Aggressive adjoint development schedule will be maintained,


delivering new features
Thank You

You might also like