Adjoint Solver Workshop Why is an Adjoint Solver useful? Design and - - PowerPoint PPT Presentation
Adjoint Solver Workshop Why is an Adjoint Solver useful? Design and - - PowerPoint PPT Presentation
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
- 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
Why is an Adjoint Solver useful?
- 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
- f design parameters
– Gradient method based on differentiating the “primal” equation – Can be used in shape optimisation, flow field insight, uncertainty quantification, and inverse problems
How can we explore a design space?
- 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?
What is the Adjoint Method?
- 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
Traditional Analysis Workflow
Setup geometry, physics Run flow solver Analyze results Setup geometry, physics Run flow solver Analyze results Setup geometry, physics Run flow solver Analyze results Setup geometry, physics Run flow solver Analyze results Setup geometry, physics Run flow solver Analyze results Setup geometry, physics Run flow solver Analyze results
- 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
Adjoint Method Workflow
Setup geometry, physics Run flow solver Analyze results Set Cost Functions Run adjoint solver Analyze results
STAR-CCM+ Adjoint Solver
Update model Run flow solver Analyze results
What the Adjoint Method Provides
Input User Data Initial geometry, Surface/volume mesh Physical conditions (boundaries, flow models) Run Flow Solver Provides output data for given inputs – Pressures, Velocities, Forces, Drag, Pressure Drop Choose Simulation Objectives Reduce pressure drop, maximize lift, velocity uniformity etc Solve Adjoint Flow & Mesh Take flow solution and provide sensitivity of
- bjectives to flow & geometry parameters
Objectives become adjoint cost functions Choose how to modify our simulation Deform shape, change boundaries etc
- 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
Examples of typical uses
- Available in STAR-CCM+ v8.04 onwards
- Delivered as a standard feature
– No additional license
- Aggressive development schedule – lots of new features …
STAR-CCM+ Adjoint Solver
- 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
Compatibility with Primal Flow Solution
- 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 Solver Capabilities
- 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 Cost Functions
- 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?
Adjoint Outputs
Example Case
- Goal: Increase the downforce on race car front wing
- Case Details:
– 100 kph – 700k polyhedra – Cost function based on force report on lower element
Front Wing optimisation
- 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
Solution Method
Run Primal Flow Solution Run Adjoin Flow Solution Calculate Mesh Sensitivities Scale Gradients to Calculate Offset Positions Morph Mesh
Results – Wing Profile
Results - Downforce
430 435 440 445 450 455 460 465 470 475 480 1 2 3 4 5 6 7 8 9 10 Downforce [N] Design Iteration
Front Wing Lower Element Downforce
10% Improvement in Downforce Across 10 Design Iterations
Using the STAR-CCM+ Adjoint Solver
- 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
Running an Adjoint Analysis
Demonstration
- 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,