Professional Documents
Culture Documents
theAdjointSolverin
ANSYSR14.0
SimonPereira
1 2011ANSYS,Inc. October14,2011
Agenda
FluentMorphingOptimizationFeature
RBFMorphwithANSYSDesignXplorer
AdjointSolver
Whatdoesanadjoint solverdo,andhow
doweusetheresults?
Supportingtechnologiesandchallenges
CurrentFunctionality
Examples
Summary
2 2011ANSYS,Inc. October14,2011
FLUENTMorpherOptimizationfeature
3 2011ANSYS,Inc. October14,2011
FLUENTMorpherOptimizationfeature
Allowsuserstooptimize
productdesignbasedon
shapedeformationto
achievedesignobjective
BasedonFreeForm
Deformationtool
coupledwithvarious
optimizationmethods
4 2011ANSYS,Inc. October14,2011
MeshMorphing
Appliesageometricdesignchangedirectlytothemeshinthesolver
UsesaBernsteinpolynomialbasedmorphingscheme
Freeformmeshdeformationdefinedonamatrixofcontrolpointsleadstoa
smoothdeformation
Worksonallmeshtypes(Tet/Prism,CutCell,HexaCore,Polyhedral)
Userprescribesthescaleanddirectionofdeformationstocontrol
pointsdistributedevenlythroughtherectilinearregion.
5 2011ANSYS,Inc. October14,2011
Examples
SomeBasicexamples
Optimizationbasedmorphing
Baseline
Modified
RegionDefined
6 2011ANSYS,Inc. October14,2011
Process
Whatif? OR Optimizer
SetupCase SetupCase
Run Run
Regions
Setup Setup
Morph Parameters Optimizer
Morph Deformation Optimize
Optimizer Auto
Evaluate
Choose Optimal
bestdesign Solution
7 2011ANSYS,Inc. October14,2011
ObjectiveFunction
ObjectiveFunction:Equalflowrate
BaselineDesign OptimizedDesign
8 2011ANSYS,Inc. October14,2011
Example SimpleSedan
SequentialTabs
DefineControlRegion(s)
9 2011ANSYS,Inc. October14,2011
DeformationDefinition
Defineconstraint(s)(ifany)
Selectcontrolpointsand
prescribetherelativerangesof
motion
10 2011ANSYS,Inc. October14,2011
Optimizer Algorithms;Compass,Powell,
Rosenbrock,Simplex,Torczon
Auto
Optimize!
11 2011ANSYS,Inc. October14,2011
Questions?
Results
PleasecontactANSYS
Incompressibleturbulentflow
Techsupportforhelpin
ObjectiveFunction;MinimizeDrag applyingthistechnology
BaselineDesign OptimizedDesign
12 2011ANSYS,Inc. October14,2011
RBFMorph
13 2011ANSYS,Inc. October14,2011
RBFMorph
14 2011ANSYS,Inc. October14,2011
HowRBFMorphWorks?
Oncedisplacementsaredefinedbythe
useratthesourcepoints,RadialBasis
Functioninterpolationisusedtoderivethe
displacementatanylocationinthespace,
soitisalsoavailableateverygridnode.
TheRBFproblemdefinitionismesh
independent,samesetupcanbeapplied
todifferentmeshes
15 2011ANSYS,Inc. October14,2011
Externalflowexample
16 2011ANSYS,Inc. October14,2011
RBFMorphmainfeatures
Fully integrated within FLUENT and Workbench
Easy to use
Parallel calculation allows to morph large size models
(many millions of cells) in a short time
Mesh independent solution works with all element types
(tetrahedral, hexahedral, polyhedral, etc.)
Superposition of multiple RBF-solutions makes the
FLUENT case truly parametric (only 1 mesh is stored)
RBF-solution can also be applied on the CAD
Precision: exact nodal movement and exact feature
preservation.
17 2011ANSYS,Inc. October14,2011
Testcasedescription
externalhydrodynamics
multiphaseflow(air&water)
shipadvancingsteadlyincalmwater
trimandsinkagefixed
displacedvolumeasconstraint
resistanceprediction
Objective:
Optimizationofthehullshape
Reductionofthe
withnodisplacementreduction resistance
18 2011ANSYS,Inc. October14,2011
Process
CAD
operator
MeshICEMCFD
Baselinesim.
Fluent grid cells
Coarse 331,652
Workbenchand
RBFmorphsetup Medium 692,984
Fine 1,274,742 CT CT
workbench
DOERUNS
Coarse 5.81x10-3 -2.52%
19 2011ANSYS,Inc. October14,2011
Process
CAD
operator
MeshICEMCFD Morphingdomain
Sectiondeformation
Eightcrosssections
Symmetryplane
defined
applied
specified
fixed
Baselinesim.
Fluent
Workbenchand
RBFmorphsetup
workbench
DOERUNS
Optimization
Finalsolution
20 2011ANSYS,Inc. October14,2011
Process
CAD
operator
MeshICEMCFD
Baselinesim. Parametersare
Fluent definedand DXbuildsaDOE
transferredtothe anddrivesFluent
Workbenchand parametersetbar andRBFMorph
RBFmorphsetup
forusewithANSYS
DesignXplorer
workbench
DOERUNS
Optimization
Finalsolution
21 2011ANSYS,Inc. October14,2011
ANSYSDesignXplorer
Results
Sensitivityanalysis
Input
parameters
Output
DesignofExperiments
parameters
ResponseSurface 45DesignPoints
DOE SolvedinBatch
Settings
22 2011ANSYS,Inc. October14,2011
OptimizewithANSYSDesignXplorer
Optimize
Baseline Optimized
Fx 6.83N 6.29N
baseline
7.9%resistancereduction
Novolumereduction
optimized
23 2011ANSYS,Inc. October14,2011
PerformancewithRBFMorphinWorkbench:
Meshgeneration:6manhours
Fluentcasesetup:1manhours
Baselinesimulation(coarsegrid):4CPU*hours
WorkbenchandRBFMorphsetup:1manhours
DOE(45simulations):45CPU*hours 8manhrs
Optimization:Minutes
2CPUdays
WithoutWorkbench&RBFMorph....?
Meshgeneration(firstmesh):6manhours
~100manhrs
Geometry(CAD)andmeshmodificationforeachcase
(consideringmeshautomationinICEMCFD):1x45=45 2CPUdays
manhours
Casesmanagement(Fluent):1x46=46manhours
(optimistically)
Casesexecution:4+45=49CPU*hours
useofotheroptimizationtools:??
24 2011ANSYS,Inc. October14,2011
*oneIntel i7quadcoreprocessor,2.8GHz
FluentAdjoint
25 2011ANSYS,Inc. October14,2011
Preface
AdjointsolverinANSYSFluent14istheculmination
ofseveralyearsofR&Deffort.
Thisprojectwasrisky,buttherewardsaregreatfor
ANSYSclients.
Therewereanumberoffalsestartsanddeadends.
Writinganadjoint solverthatmeetstheneedsofthe
engineeringcommunityisnotatrivialtask.
Wearepleasedtohavecomesofar,andlook
forwardtogoingmuchfurther.
26 2011ANSYS,Inc. October14,2011
Whatisanadjoint solutionandhowdo
weusethoseresults?
Anadjoint solverallowsspecificinformationaboutafluidsystemtobe
computedthatisverydifficulttogatherotherwise.
Theadjoint solutionitselfisasetofderivatives.
Theyarenotparticularlyusefulintheirrawformandmustbepostprocessed
appropriately.
Thederivativeofanengineeringquantitywithrespecttoall oftheinputsforthe
systemcanbecomputedinasinglecalculation.
Example:Sensitivityofthedragonanairfoiltoitsshape.
Thereare4mainwaysinwhichthesederivativescanbeused:
1. Qualitative guidanceonwhatcaninfluencetheperformanceofasystemstrongly.
2. Quantitative guidanceontheanticipatedeffectofspecificdesignchanges.
3. Guidanceonimportantfactorsinsolvernumerics.
4. Gradientbaseddesignoptimization.
27 2011ANSYS,Inc. October14,2011
Howtousetheresults Qualitative
GOAL:Identifyfeaturesofasystemdesignthataremostinfluential
intheperformanceofthesystem.
EXAMPLE:
SensitivityoftheDragonaNACA0012airfoiltochangesinthe
shapeoftheairfoil.
Theshapesensitivityfieldisextractedfromtheadjoint solutionina
postprocessingstep.
Highsensitivity changestoshapehaveabigeffectondrag
Lowsensitivity changestoshapehaveasmalleffectondrag
28 2011ANSYS,Inc. October14,2011
Howtousetheresults Quantitative
GOAL:Identifyspecificsystemdesignchangesthatbenefittheperformance
andquantifytheimprovementinperformancethatisanticipated.
EXAMPLE:
Designmodificationstoturningvanesina90degreeelbowtoreducethe
totalpressuredrop.
Theoptimaladjustmentthatismadetotheshapeisdefinedbytheshape
sensitivityfield(steepestdescentalgorithm).
Effectofeachchangecanbecomputedinadvancebasedonlinear
extrapolation.
Baseline
Modified
Original P=232.8Pa
Expectedchangecomputedusingtheadjoint
andlinearextrapolation=10.0Pa
Makethechangeandrecompute thesolution.
Actualchange=9.0Pa
29 2011ANSYS,Inc. October14,2011
Howtousetheresults SolverNumerics
GOAL:Identifyaspectsofthesolvernumerics andcomputationalmeshthathave
astronginfluenceonquantitiesthatarebeingcomputedthatareofengineering
interest.
EXAMPLE:
Usetheadjoint solutiontoidentifypartsofthemeshwheremeshadaptionwill
benefitthecomputeddragbyreducingtheinfluenceofdiscretization errors.
BaselineMesh AdaptedMesh
AdaptedMesh
Detail
30 2011ANSYS,Inc. October14,2011
Howtousetheresults Optimization
GOAL:Performasequenceofautomateddesignmodificationstoimproveaspecific
performancemeasureforasystem
EXAMPLE:
Gradientbasedoptimizationofthetotalpressuredropinapipe.
Flowsolutionisrecomputedandtheadjoint recomputedateachdesigniteration.
100
90
80
Initialdesign
70
60
ptot [Pa]
50
40
30
Finaldesign 20
30%reductionintotalpressure 10
dropafter30designiterations
0
0 10 20 30
Iteration
31 2011ANSYS,Inc. October14,2011
Howdoesanadjoint analysisfitintothe
familiarCFDworkflow?
StandardCFDWorkflowelements
Defineaflowproblem.
Createageometricrepresentationoftheproblemandcreateacomputationalmesh.
Setupandsolvetheflowproblem.
Postprocesstheresults.
Ifthedesignisnotmeetingperformancerequirements
Useinsight,experienceandintuitiontodecidehowtoselectdesignchangesthatwillimprove
theperformanceofthesystem
or
Adjoint workflowelements
Usetheresultstoimprovethedesignsystematicallyusingoneofthe4strategiesoutlined
Pickanobservationthatisofengineeringinterest.
Lift,drag,totalpressuredrop?
Setupandsolvetheadjoint problemforthisobservationforthespecificcomputedflowfield
Defineadjoint solutionadvancementcontrols
Setadjoint convergencecriteria
Initializetheadjoint solutionfield
Iteratetoconvergence
Postprocess
32 2011ANSYS,Inc. October14,2011
SupportingTechnologies
Meshmorphing
Meshmorphing&Adjoint Data
MeshMorphing,Adjoint Data&Constraints
33 2011ANSYS,Inc. October14,2011
MeshMorphing
Onceadesiredchangetothegeometryofthe
systemhasbeenselected,howisthatchangeto
bemade?
Meshmorphingprovidesaconvenientandpowerful
meansofchangingthegeometryandthecomputational
mesh.
UseBernsteinpolynomialbasedmorphingscheme
discussedearlier
34 2011ANSYS,Inc. October14,2011
MeshMorphing&Adjoint Data
Example: Sensitivityofliftto
surfaceshape Flow
Selectportionsofthegeometry
tobemodified
Adjoint todeformation
operation
Surfaceshapesensitivitybecomes
controlpointsensitivity(chainrule
fordifferentiation)
Benefitofthisapproachistwo
fold
Smooths thesurfacesensitivityfield
Providesasmoothinteriorand
boundarymeshdeformation
35 2011ANSYS,Inc. October14,2011
MeshMorphing,Adjoint Data&Constraints
Theadjoint solutionisdeterminedbasedonthespecificflow
physicsoftheprobleminhand.
Theeffectofotherpracticalengineeringconstraintsmustalsobe
takenintoaccount.
Example:
Somewallswithinthecontrolvolumemaybeconstrainednottomove.
Aminimaladjustmentismadetothecontrolpointsensitivityfieldsothat
deformationofthefixedwallsiseliminated.
Fixedwall
Fixedwall
Moveablewalls
36 2011ANSYS,Inc. October14,2011
CurrentFunctionality
ANSYSFluentflowsolverhasverybroadscope
Adjoint isconfiguredtocomputesolutionsbasedonsomeassumptions
Steady,incompressible,laminarflow.
Steady,incompressible,turbulentflowwithstandardwallfunctions.
Firstorderdiscretization inspace.
Frozenturbulence.
TheprimaryflowsolutiondoesNOTneedtoberunwiththeserestrictions
Strongevidencethattheseassumptionsdonotunderminetheutilityoftheadjoint
solutiondataforengineeringpurposes.
Fullyparallelized
Gradientalgorithmforshapemodification
Meshmorphingusingcontrolpoints.
Adjointbasedsolutionadaption
37 2011ANSYS,Inc. October14,2011
CurrentFunctionality
Theadjoint solverisanaddon thatwillbepartoftheFluent14distribution.
Documentationisavailable
Theory
Usage
Tutorial
Casestudy
Trainingisavailable.
Functionalityisactivatedbyloadingtheadjoint solveraddon module.
Anewmenuitemisaddedatthetoplevel.
Limitationsincludeunsupportedmodels(porousmedia,MRFetc.),convergence
canbechallengingforlargecases(510M+cells)andcasesthatexhibitunsteady
floworstrongshearflows
Stabilizedsolutionadvancementalgorithmisinplace
38 2011ANSYS,Inc. October14,2011
UserInterface
GUI
Followascloselyaspossiblethe
samedesignlayoutasFluent
solver
Specifyobservable
Adjoint solutionadvancementcontrols
Residualmonitors
Initializationanditeration
Postprocessing:contours,vectors.
Resultsreporting
Meshmorphingwithprecalculationof
expectedchangeinobservable.
TUI /adjoint>
controls morphing/ reporting/
monitors/ observable/ run/
39 2011ANSYS,Inc. October14,2011
Examples
40 2011ANSYS,Inc. October14,2011
TotalPressureDropinaBend
Fulldiscreteadjoint forshapesensitivity
Frozenturbulence
Reducetotalpressuredrop,P,throughsystem
P=232.8
Baseline
132 Expectchange10.0
Actualchange9.0
P=223.8
Expectchange8.9
Actualchange6.9
P=216.9
Expectchange7.0
Actualchange3.1
P=213.8
Totalimprovement
of8%
41 2011ANSYS,Inc. October14,2011
TotalPressureDropinaDuct
Flowresiduals
Flow
Outflow
Adjoint residuals
Goalistoreducethetotalpressuredrop
throughthesystem
Setupandsolvetheadjoint systemwitha
totalpressuredropobjectivefunction
42 2011ANSYS,Inc. October14,2011
TotalPressureDropinaDuct
TotalPressureDrop(Pa)
Original 22.0
Aggressiveadjustmentresultsina17%
reductioninlossinjustonedesign
iteration
43 2011ANSYS,Inc. October14,2011
Summary
TheadjointsolverwillbereleasedwithR14
Anadjoint solvercomputessensitivitydatathatcanbeusedtoaid
withdesigndecisionsin4mainways:
1. Qualitativeidentificationofcriticalpartsofthesystemofinterest.
2. Quantitativepredictionsoftheoptimalchoiceforadesignchangeanda
predictionoftheeffectofthatchange.
3. Aidinginthenumericalanalysisoftheflowsolutiontoimprovesolution
quality.
4. Gradientbasedoptimization.
Supportingtechnologiessuchasmeshmorphing,andthe
applicationofdesignconstraints,areseenasimportant.
Theadjoint solverforthepresentreleaseislimitedtosteady
incompressibleflows,withotherrestrictionsonmodels.
44 2011ANSYS,Inc. October14,2011