Upload
others
View
0
Download
0
Embed Size (px)
Citation preview
RaymondAtta-Fynn
RaymondAtta-Fynn(UniversityofTexas,Arlington)NSFSummerSchoolonDisorderedMaterialsModeling
IntroductiontoStructuralOptimization
6/3/2019 Introduction toStructuralOptimization 1
RaymondAtta-Fynn
=Whatisstructuraloptimization?
=Optimizationalgorithms=Steepestdescentalgorithm=Conjugategradientalgorithm=MonteCarlomethod
=Closingremarks
Outline
6/3/2019 Introduction toStructuralOptimization 2
RaymondAtta-Fynn
= Anatomisticstructure isasetatomswithwell-definedpositions(orcoordinates).
= Severalpropertiesofanatomisticstructurearebestdescribed whenthestructureisinaminimumenergystate;thisisamajorreasonwhystructuraloptimizationisperformed
Whatisstructuraloptimization?
Whatisstructuraloptimization?𝑆𝑡𝑟𝑢𝑐𝑡𝑢𝑟𝑎𝑙𝑜𝑝𝑡𝑖𝑚𝑖𝑧𝑎𝑡𝑖𝑜𝑛𝑖𝑠𝑡ℎ𝑒𝑝𝑟𝑜𝑐𝑒𝑠𝑠𝑜𝑓𝑢𝑠𝑖𝑛𝑔𝑐𝑜𝑚𝑝𝑢𝑡𝑒𝑟𝑎𝑙𝑔𝑜𝑟𝑖𝑡ℎ𝑚𝑠𝑡𝑜𝑚𝑖𝑛𝑖𝑚𝑖𝑧𝑒𝑡ℎ𝑒𝑒𝑛𝑒𝑟𝑔𝑦𝑜𝑓𝑎𝑛𝑎𝑡𝑜𝑚𝑖𝑠𝑡𝑖𝑐𝑠𝑡𝑟𝑢𝑐𝑡𝑢𝑟𝑒.
Specifically, theatomicpositionsaredisplacedsequentially followingasetofrules untilaminimumenergystateisreached.
6/3/2019 Introduction toStructuralOptimization 3
RaymondAtta-Fynn
= Goalofstructuraloptimization:Minimizethetotalenergy𝐸 ofasetof𝑁 atomswithrespecttotheatomicpositions{𝐫S,𝐫T,….,𝐫U} ≡ 𝑥S, 𝑦S , 𝑧S , 𝑥T, 𝑦T, 𝑧T , , 𝑥U, 𝑦U, 𝑧U .
= 𝐸 isafunctionof{𝐫S,𝐫T,….,𝐫U},thatis:𝐸 ≡ 𝐸(𝐫S, 𝐫T,… , 𝐫U).𝐸 dependson3𝑁 variables.
= Theconditionfor𝐸 tobeaminimumis:𝛻𝐸 𝐫S, 𝐫T,… , 𝐫U = 𝟎[1]
where𝛻𝐸 isavectorknownasthegradientof 𝐸 givenby:
𝛻𝐸 =𝜕𝐸𝜕𝐫S
,𝜕𝐸𝜕𝐫T
, … ,𝜕𝐸𝜕𝐫U
=𝜕𝐸𝜕𝑥S
,𝜕𝐸𝜕𝑦S
,𝜕𝐸𝜕𝑥S
ded𝐫f
,𝜕𝐸𝜕𝑥T
,𝜕𝐸𝜕𝑦T
,𝜕𝐸𝜕𝑥T
ded𝐫g
,… . . ,𝜕𝐸𝜕𝑥U
,𝜕𝐸𝜕𝑦U
,𝜕𝐸𝜕𝑥U
ded𝐫h
Thusequation[1] isequivalenttosolvingthe3𝑁 equations:𝜕𝐸𝜕𝐫S
= 0;𝜕𝐸𝜕𝐫T
= 0;……𝜕𝐸𝜕𝐫U
= 0
Whatisstructuraloptimization?
6/3/2019 Introduction toStructuralOptimization 4
RaymondAtta-Fynn
= Example: Considerasystemwith𝑁 = 2 atoms.Supposethatatom1islocatedatposition𝐫S = (𝑥S, 0,0) andatom2islocatedat𝐫T = (𝑥T, 0,0)
= Supposethe(hypothetical)energy𝐸 ofthe2-particlesystemisgivenby:𝐸 𝑥S, 𝑥T = 𝑥ST + 2𝑥TT − 2𝑥S𝑥T − 2𝑥S − 𝑥T + 6
= Aplotof𝐸 isshownbelow:
Whatisstructuraloptimization?
6/3/2019 Introduction toStructuralOptimization 5
RaymondAtta-Fynn
Whatisstructuraloptimization?
6/3/2019 Introduction toStructuralOptimization 6
= Wewanttominimize𝐸 withrespectto𝑥S and𝑥T.Theconditionsare:
𝜕𝐸𝜕𝑥S
= 2𝑥S − 2𝑥T − 2 = 0
𝜕𝐸𝜕𝑥T
= 4𝑥T − 2𝑥S − 1 = 0
= Thesolutionstotheequationsare:𝑥S = 2.5 and𝑥T = 1.5;
= Theminimumenergyis𝐸 2.5, 1.5 = 2.75 [reddotis2.5, 1.5, 2.75 ]
= Giventheenergyofa2-atomsystem:𝐸 𝑥S, 𝑥T = 𝑥ST + 2𝑥TT − 2𝑥S𝑥T − 2𝑥S − 𝑥T + 6
RaymondAtta-Fynn
= Nowconsideramorerealisticscenario:beginwitharandom,highenergy𝑁-atomstructure[𝑁 = 1000 inthepictures]
= Theenergy𝐸(𝐫S, 𝐫T,… , 𝐫Srrr) ofthesystemcanbeabitcomplicated.= Optimizingtherandomstructureimplies:minimizing thetotalenergy 𝐸 byadjustingthepositionsoftheatomsseveraltimes toyieldanordered(orsemi-ordered),lowenergystructure.
Whatisstructuraloptimization?
6/3/2019 Introduction toStructuralOptimization 7
Random Ordered
Minimize𝐸 withrespecttopositions
𝛻𝐸(𝐫S, 𝐫T, … , 𝐫U) ≈ 𝟎
RaymondAtta-Fynn
Optimizationproblem:Given𝐸 ∶ 𝑅U → 𝑅,minimize𝐸 overallpossiblevaluesof�⃗� ∈ 𝑅U,where�⃗� = (𝐫S, 𝐫T, . . , 𝐫U).
Possibleoptimizationmethods
= Gradientbasedmethods= Steepestdescentmethod= Conjugategradientmethod= Quasi-Newtonmethods[willnotbediscussed]
= Stochasticbasedmethods= MetropolisMonteCarlomethod= Particleswarm/populationbasedmethods[willnotbediscussed]
OptimizationMethods
6/3/2019 Introduction toStructuralOptimization 8
RaymondAtta-Fynn
FirstaquickrefresheronTaylorseries:Supposethat𝑥 isaone-dimensionalvariableand𝑥r isaconstant.Ifthescalarfunction 𝐸 isdifferentiable,thentheTaylorexpansion of𝐸(𝑥 + 𝑎) is
𝐸 𝑥 + 𝑥r = 𝐸 𝑥r + 𝑥𝑑𝐸𝑑𝑥z{|{}
+ 𝑥T𝑑T𝐸𝑑𝑥T~
{|{}
+⋯ = 𝐸 𝑥r + 𝑥𝛻𝐸 𝑥r + 𝑥T𝛻T𝐸 𝑥r + ⋯
Nowsupposethat�⃗� isan𝑁-dimensionalvariablevectorand�⃗�r isaconstantvector.Then
𝐸 𝑥 + 𝑥r = 𝐸 𝑥r + 𝑥 � 𝐸 𝑥r +𝑥� � 𝛻T𝐸 𝑥r � 𝑥 +⋯
OptimizationMethods
6/3/2019 Introduction toStructuralOptimization 9
RaymondAtta-Fynn
Steepestdescentin1-dimension= Supposewewanttominimizea1-dimensionalfunction𝐸 𝑥 .
= Givenaninitialpoint𝑥r,thedirectionofsteepestdescent,i.e.directionofgreatestchangefrom𝑥r is−𝛻𝐸(𝑥r).
= Keypoint:ifwefollow−𝛻𝐸 inasmallenoughsteps,𝐸 isguaranteedtodecrease.Toseethis,considerthefirstorderTaylorexpansionof𝐸 𝑥r :
𝐸 𝑥r + 𝛿𝑥 = 𝐸 𝑥r + 𝛿𝑥𝛻𝐸 𝑥rwhere𝛿𝑥 isasmallchangein𝑥r [ignore (𝛿𝑥)T andhigherpowers]
= If𝛿𝑥 ischosentobe𝛿𝑥 = −𝛼𝛻𝐸 𝑥r ,where𝛼 isapositiveparametercalledthestepsize,thenthedecreasein𝐸 follows:
𝐸 𝑥r + 𝛿𝑥 = 𝐸 𝑥r − 𝛼 𝛻𝐸 𝑥r T < 𝐸 𝑥r
SteepestDescentAlgorithm
6/3/2019 Introduction toStructuralOptimization 10
RaymondAtta-Fynn
SteepestdescentinN-dimensions= WewanttominimizeaN-dimensional function𝐸 �⃗� ,where�⃗� ∈ 𝑅U isavectorof
dimensionN.
= Givenaninitialpoint�⃗�r,thedirectionofsteepestdescentfrom�⃗�risthevector−𝛻𝐸(�⃗�r).
= Taylorexpansion:thefirstorderTaylorexpansionof𝐸 �⃗�r :𝐸 �⃗�r + 𝛿�⃗� = 𝐸 �⃗�r + 𝛿�⃗� � 𝛻𝐸 �⃗�r
= Thechoiceof𝛿�⃗� = −𝛼𝛻𝐸 �⃗�r ,where𝛼 > 0,ensuresthat 𝐸 decreasesteadilytowardtheminimum.
SteepestDescentAlgorithm
6/3/2019 Introduction toStructuralOptimization 11
RaymondAtta-Fynn
SteepestDescentAlgorithm
6/3/2019 Introduction toStructuralOptimization 12
SteepestdescentalgorithmPickaninitialpoint�⃗�r𝑖 → 0𝛼 → 0.5𝜀 = 0.000001loop
−𝛻𝐸(�⃗��) → ∆if ∆ < 𝜀 stop𝛼 → 2𝛼
while𝐸 �⃗�� + 𝛼∆ ≥ 𝐸 �⃗��𝛼 → 𝛼 2⁄
endwhile�⃗�� + 𝛼∆→ �⃗���S𝑖 + 1 → 𝑖
endloop
RaymondAtta-Fynn
SteepestDescentAlgorithm
6/3/2019 Introduction toStructuralOptimization 13
Steepestdescentminimization:𝐸 𝑥S, 𝑥T = 𝑥ST + 𝑥TT
Theminimumvalueof𝐸 is𝐸��� = 0;thisoccursatthelocation𝑥S, 𝑥T = (0,0)
Leftplot: 3Dgraph.
Rightplot:correspondingprojectionontothe2Dplanespannedby𝑥Sand𝑥T (contourplot).
RaymondAtta-Fynn
SteepestDescentAlgorithm
6/3/2019 Introduction toStructuralOptimization 14
Steepestdescentminimization:Rosenbrock function𝐸 𝑥S, 𝑥T = (1− 𝑥S)T + 100(𝑥TT − 𝑥S)T
TheminimumvalueoftheRosenbrockfunctionis𝐸��� = 0;thisoccursatthelocation 𝑥S, 𝑥T =(1,1)
Leftplot: 3Dgraph.
Rightplot: Contourplotinthe2Dplanespannedby𝑥S and𝑥T.
RaymondAtta-Fynn
Steepestdescentadvantages= Easytoimplement.
= Manyothermethodsswitchtosteepestdescentwhentheydonotmakesufficientprogress.
Steepestdescentadvantages
= Picking thestepsize𝛼 isabitofadarkart.Asmall𝛼 makesthedeterminationofthesolutionlonger;alargeα canmakethealgorithmworse
= Theconvergenceofsteepestdescentalgorithmsclosetotheminimumcanbequiteslow.
SteepestDescentAlgorithm
6/3/2019 Introduction toStructuralOptimization 15
RaymondAtta-Fynn
Conjugategradientmethod= Thesteepestdescent minimizationalgorithm:
�⃗���S = �⃗�� − 𝛼�𝛻𝐸 �⃗�� = �⃗�r − 𝛼S𝛻𝐸 �⃗�S − 𝛼T𝛻𝐸 �⃗�T −⋯− 𝛼�𝛻𝐸 �⃗��Until𝛻𝐸 �⃗���S ≈ 0
where𝑖 = 0, 1, 2,…oftenfindsitselftakingstepsinthesamedirectionasearliersteps.
= Thismakesthesteepestdescentmethodwoefullyinefficient!Itwillbemoreefficientifastepistakenonlyonce(butoptimally).Thisliesattheheartoftheconjugategradientmethod.
= Originalphilosophyofconjugategradientmethod:pickasetofdirections{𝑑r,𝑑S,….,𝑑U�S}, knownasconjugatedirections,suchthatatonlyonestepistakenalongeachdirection𝑑� toreachtheminimum.
ConjugateGradientAlgorithm
6/3/2019 Introduction toStructuralOptimization 16
RaymondAtta-Fynn
Conjugategradientmethod:exactarithmetics= Foragivenfunction𝐸 �⃗� withN variables,youareguaranteedtoreachtheminimum𝐸 �⃗�∗ inexactlyN stepsif𝐸 �⃗� isquadratic.
= Specifically,givenaninitialpoint�⃗�r andasetofN conjugatedirections{𝑑r,𝑑S,….,𝑑U�S},𝐸attainsaminimumat�⃗� = �⃗�∗ givenby:
�⃗�∗ = �⃗�r + 𝛼r𝑑r + 𝛼S𝑑S +⋯+ 𝛼U�S𝑑U�S = �⃗�r +� 𝛼�𝑑�U�S
�|r𝛻𝐸 �⃗�∗ = 0
where𝛼� isthestepsizealongtheconjugatedirection𝑑� .
= Thustheemploymentoftheconjugategradientmethodboilstothedeterminationofthedirections{𝑑r,𝑑S,….,𝑑U�S} andthestepsizes{𝛼r,𝛼S,….,𝛼U�S}.
= Lateron,wewillpresentmethodsfordetermining{𝑑�}and{𝛼�}.
ConjugateGradientAlgorithm
6/3/2019 Introduction toStructuralOptimization 17
RaymondAtta-Fynn
Conjugategradientmethod:inpractice
= Advantage: Theconjugategradientmethodismuchfasterthanthesteepestdescentmethod;itrequiresmuchlessstepstoconverge.
= Disadvantage:(i) Itsimplementationisslightlymoreinvolvingcomparedtothesteepestdescentmethod;(ii) Duetoroundingerrors,theconjugategradientmethodmaytakelongertoconverge(iii) Forhighlydisorderedstructures,theconjugatemethodcanfailmiserably.
= Implementation:Wewillpresenttwoiterativeconjugategradientmethodsthatcanbeappliedinpractice;theyareFletcher–ReevesmethodandthePolak–Ribiere method.
ConjugateGradientAlgorithm
6/3/2019 Introduction toStructuralOptimization 18
RaymondAtta-Fynn
ConjugateGradientAlgorithm
6/3/2019 Introduction toStructuralOptimization 19
Fletcher–ReevesandPolak–Ribiere conjugategradientalgorithmStep1Pickaninitialpoint�⃗�r andcalculate�⃗�r = 𝛻𝐸(�⃗�r);set𝑑r = −�⃗�rStep2For 𝑖 = 0, 1, 2, …:
(a)Findthevalueof𝛼� whichminimizes 𝐸(�⃗�� + 𝛼�𝑑�)(b)Set�⃗���S = �⃗�� + 𝛼�𝑑� andcomputethegradient�⃗���S = 𝛻𝐸(�⃗���S)(c)Testforconvergence:if 𝛻𝐸 �⃗���S < 𝜀 then stop [𝜀 = 10��].(d)Computethenextconjugatedirection𝑑��S givenby𝑑��S = −�⃗���S + 𝛽�𝑑�,where
𝛽� =�⃗���S T
�⃗�� T[Fletcher–Reevesmethod]
𝛽� =�⃗���S − �⃗�� � �⃗���S
�⃗�� T[Polak–Ribieremethod;preferred]
Endfor
RaymondAtta-Fynn
ConjugateGradientAlgorithm
6/3/2019 Introduction toStructuralOptimization 20
conjugategradientmethodandthesteepestdescentmethodcomparison:Rosenbrockfunction
Leftplot:contourplotofsteepestdescentminimization;itrequires3300iterationstoconverge
Rightplot: contourplotofconjugategradientminimization;itrequiresonly15iterationstoconverge
RaymondAtta-Fynn
StochasticOptimization:MetropolisMonteCarloMethod(MMC)= TheMMC employsrandommoves tominimizeafunction;itisquitecheap [butnot
necessarilyefficient]asnogradientsarerequired.ItisbasedontheconceptofMarkovchains.
= Asequenceof𝑁 + 1successivemoves or events or states�⃗�r, �⃗�S, �⃗�T … �⃗�U�S, �⃗�U formaMarkovchainif thepresentstate�⃗�U dependsononlytheimmediatepaststate�⃗�U�Sregardlessofalltheotherpaststates�⃗�r, �⃗�S, �⃗�T … �⃗�U�T:
𝑃 �⃗�U �⃗�r, �⃗�S, �⃗�T … �⃗�U�S = 𝑃 �⃗�U �⃗�U�S= Here𝑃 𝐵 𝐴 istheconditionalprobabilitythattheevent𝐵 occursgiventhat𝐴 has
occurred.
= InMonteCarlolanguage,theconditionalprobability𝑃 𝐵 𝐴 isalsoknownasthetransitionprobabilityfromevent𝐴 toevent𝐵 (𝐴 isthepresentevent,while𝐵 futureevent).
MonteCarloAlgorithm
6/3/2019 Introduction toStructuralOptimization 21
RaymondAtta-Fynn
StochasticOptimization:MetropolisMonteCarloMethod(MMC)
= MMC operatesontwokeyprinciples,namely,egordicity anddetailedbalance.
= Egordicity: Foragivensystem,agivenstate�⃗�� canbereachedfromthestate�⃗�� inafinitenumberofsteps.
= Detailedbalance: Foragivensystem,theaveragenumberoftimesthestate�⃗�� canbereachedfromthestate�⃗�� equalstheaveragenumberoftimes�⃗��canbereachedfrom�⃗��.
MonteCarloAlgorithm
6/3/2019 Introduction toStructuralOptimization 22
RaymondAtta-Fynn
StochasticOptimization:MetropolisMonteCarloMethod(MMC)PhilosophybehindthepracticalapplicationofMMCminimization(i)Supposethatanatomicstructurebeginsinastatewithcoordinates�⃗�r andenergy𝐸(�⃗�r).Weassignafictitioustemperature𝑇 tothesystemtomeasureits“hotness.”
(ii)Conceptually,MMCoperatesbygraduallycooling thesystemtofroma“hot,unstable”state�⃗�r toa“cold,minimumenergy”state �⃗�S usingrandomatomicdisplacements.This“hot-to-cool”processinfallsunderageneralminimizationmethod knownassimulatedannealing.
(iii)Thetransitionprobability𝑃(�⃗�S �⃗�r from�⃗�r to�⃗�S isgivenbytheMetropoliscriterion:
𝑃(�⃗�S �⃗�r = min 1, 𝑒���e
where𝛽 = 1 (𝑘�𝑇)⁄ and𝑘� isafundamentalconstantknownasBoltzmann’sconstant.
MonteCarloAlgorithm
6/3/2019 Introduction toStructuralOptimization 23
RaymondAtta-Fynn
OptimizationMethods
6/3/2019 Introduction toStructuralOptimization 24
TheMetropolisMonteCarloalgorithmStep1: Pickafictioustemperature𝑇 andbegininaninitialstate�⃗�r withtotalenergy𝐸(�⃗�r).
Step2: Generateanewstate�⃗�S from�⃗�r viarandom displacementsoftheatomicpositions.Denotethetotalenergyof�⃗�S by𝐸(�⃗�S).
Step3: ComputetheenergydifferenceΔ𝐸 = 𝐸(�⃗�S) − 𝐸(�⃗�r) andcomputethetransitionprobabilityfromstate�⃗�r tostate�⃗�S as𝑃(�⃗�S �⃗�r = min 1, 𝑒���e ,where𝛽 = 1 (𝑘�𝑇)⁄ .
Step4: Generateauniformrandomnumber𝑟 suchthat0 ≤ 𝑟 < 1.(a)If𝑟 < 𝑃(�⃗�S �⃗�r ,thenreplace�⃗�r with�⃗�S and𝐸(�⃗�r) with𝐸(�⃗�S) andgotostep2.(a)If𝑟 ≥ 𝑃(�⃗�S �⃗�r ,thendiscard�⃗�S andgotostep2.
Additionalinformation:Asthesimulationproceeds,thetemperature𝑇 isgraduallyreduced.Convergenceisestablishedbycloselymonitoring𝐸.
RaymondAtta-Fynn
MonteCarloAlgorithm
6/3/2019 Introduction toStructuralOptimization 25
MetropolisMonteCarlomethodinaction:minimizingtheRosenbrock function
TheminimumvalueoftheRosenbrockfunctionis𝐸��� = 0;thisoccursatthelocation 𝑥S, 𝑥T =(1,1)
Leftplot: 3Dgraph.
Rightplot: Contourplotinthe2Dplanespannedby𝑥S and𝑥T.
RaymondAtta-Fynn
= Threeminimizationschemes,allofwhicharefairlyeasytoimplementincomputercodes,werepresented:(i)steepestdescent (ii)conjugategradient (iii)MetropolisMonteCarlo
= Thesteepestdescent andconjugategradient methodsaregradient-based (i.e.basedontheevaluationoffirstpartialderivative),whiletheMonteCarlo methoddoesnotrequiregradients.
= Forpracticalapplications,theconjugategradientmethodispreferred;steepestdescentcanbeusedasasupplement ininstanceswheretheconjugategradientmethodgets“stuck.”
= For“quickandapproximateresults,”theMonteCarlomethod, whichistheeasiesttoimplement,canbeemployed.
ConcludingRemarks
6/3/2019 Introduction toStructuralOptimization 26