June16thto19th, 2019, Eindhoven, The Netherlands.c 2019ElsevierB.V.Allrightsreserved.
Adjoint system method in shape optimization of some typical fluid flow patterns
Alexis Courtais
a,*, Franc¸ois Lesage
a, Yannick Privat
b, Pascal Frey
cand Abder- razak Latifi
aaLaboratoireR´eactionsetG´eniedesProc´ed´es, CNRS, Universit´edeLorraine, Nancy, France
bInstitutdeRechercheMath´ematiqueAvanc´ee, CNRS, Universit´edeStrasbourg, Strasbourg, France
cLaboratoireJacques-LouisLions, CNRS, SorbonneUniversit´es, Paris, France [email protected]
Abstract
Inthispapera shape optimization approach basedonthe Hadamard geometric optimization method isdeveloped.Fourcase studiesrepresentingtypical fluidflowpatternsin fluid dynamics,i.e.flow aroundan obstacle, flowin a90◦or 180◦elbowpipe andflowin adyadictree, are considered.
Low velocities are imposedat theinletof each case studyin orderto operatein laminarflow regime. The objectiveistodeterminethe shapethatminimizesthe energydissipatedby viscous friction subjectedtothe Navier-Stokes equations andtoiso-volumic constraint.Therequired gra- dients oftheperformanceindexandconstraintwithrespect tothe shape are computedby means ofthe adjointsystem method. The momentum equations areimplementedandsolvedusingthe OpenFOAM CFD software, andthe solver’’adjointShapeOptimizationFoam’’is modifiedin or- derto computethe solution oftheresultingoptimizationproblems.The optimal shapes obtained inthe fourcase studies arein verygoodagreementwiththe available literature works.Moreover, they allow a significantreduction ofthedissipatedenergyrangingfrom10.8 to53.3%.
Keywords:Shape optimization, Ajointsystem, Energydissipation, CFD, OpenFOAM
1. Introduction
Chemicalindustryis morethan everconstrainedtoinvest inresearch andinnovationtoremain competitive.This competitiveness necessarilyrequiresthedevelopmentof more flexible,intensi- fied, efficientandcompact processes. The shape ofthe unitsinvolvedintheseprocessesis very often criticaltotheirefficiency and represents majorscientific,technical andtechnological chal- lenges. Shape optimizationis atechnologythat is quite appropriateto meet these challenges. It consists of a setoftechniques andmethods allowingto findthe bestshape of an object thatopti- mizes a costfunction oraperformanceindexwhile satisfying given constraints.Originally, shape optimization has beendevelopedforaerodynamicindustry andparticularly foraircrafts.Morere- cently,ithas been usedin chemical engineeringtodeterminethe optimal shape of apipe (Henrot andPrivat, 2010) ormicrochannels (Tonomura etal., 2010).
Thispaperpresentsthedevelopmentof a shape optimization approach basedon adjointsystem method.The latteris usedtoderivethe shapegradientneededinthe optimal shapedetermination.
OpenFOAM softwareis usedas CFD solverforthe flow model ,i.e.the Navier-Stokes equations, andadjointsystem equations.
http://dx.doi.org/10.1016/B978-0-12-818634-3.50146-6
2. Case studies and modeling
The optimization approachdevelopedinthispaperistestedon four2D case studies: flow around an obstacle, flowin a90◦or 180◦elbowpipe andflowin adyadictree. Eachinitialdomain, Ω0, ofthe case studiesispresentedon Fig. 1. The boundary∂ΩofthedomainΩisgiven by
∂Ω=Γin∪Γout∪Γlat∪Γ, where
- Γinistheinletofthedomain on which a quadratic velocityprofileisimposed. Thus,the laminarflowis alreadydevelopedat theinletboundary (Eq (1c)).
- Γoutisthe outletofthedomain on whichthe normal componentofthe stresstensoris equal to zero (Eq (1e)).
- Γlatisthe fixededge ofthedomain on which a no-slipconditionis applied(Eq (1d)).
- Γisthe free boundary ofthedomain, i.e. the unknown ofthe shape optimizationprob- lem. Moreover,it isthe boundarythatwill evolve overtheiterations ofthe optimization algorithm.A no-slipconditionis appliedonthis boundary (Eq (1d)).
In each case, the velocityis set to a value leadingto Reynolds numbers lowerthan500,thus ensuringthat the flowis laminar.The condition of zero absolutepressureisimposedat the outlet boundary.The system of Navier-Stokes equationsdescribingthe fluidflowisgiven as
⎧⎪
⎪⎪
⎪⎪
⎪⎨
⎪⎪
⎪⎪
⎪⎪
⎩
−νΔUUU+ (UUU·∇UUU) +∇p=0 inΩ
∇·UUU=0 inΩ UUU=UUUin onΓin
U
UU=0 onΓlat∪Γ σ(UUU,p).n=0 onΓout
(1a) (1b) (1c) (1d) (1e) Inthe above system,σ(UUU,p)isthe stresstensor,given by :
σ(UUU,p) =2νε(UUU)−pI with ε(UUU) =1
2(∇UUU+ (∇UUU)T). (2) whereν isthe fluidkinematic viscosity, Itheidentity matrix,UUUandprespectivelythe velocity andthe absolutepressure ofthe fluidandε(UUU)the straintensor.
3. Shape optimization formulation
3.1.Optimization problem
Inthis work,the objectiveistodeterminethe shape ofthe fouraforementionedcase studiesthat minimizes the energydissipatedbythe fluid duetothe work of viscous forces. Such a crite- rionisrelevant inpractice sincethe energydissipatedisdirectlyrelatedtopressure losses. The performanceindexisthereforedefinedas
J(Ω) =2ν
Ω|ε(UUU)|2dx (3)
This optimizationproblemis subjectedto Navier-Stokes equations (1) andtothe volume constraint given by Eq.(4).It is solvedusingthe adjointsystem method.
C(Ω) =V(Ω)−V(Ω0) =0 (4)
Γ
inΓ Γ
latΓ
outΩ
0 . 2 0 . 1
0 . 1 (a)
Γ
inΓ
Γ
outΓ
outΩ 0 . 3
0 . 1 0 . 3
0 . 1 (b)
Γ
inΓ Γ
latΓ
outΩ 1
1 . 5 0 . 2
(c)
Γ
inΓ Ω Γ
out0 .1 0 . 4 (d)
Figure1: Initial shapes ofthe fourcase studies, (a) flowin a180◦elbowpipe, (b) flowin adiadyc tree, (c) flow aroundan obstacle, (d) flowin a90◦elbowpipe.
3.2. Adjointsystem method
The shape optimization approachdevelopedinvolvesthedifferentiation withrespect tothedomain also called derivativeinthe sense of Hadamard(Allaire, 2007; HenrotandPierre, 2005).Itconsists in movingallthe meshpoints accordingtothe followinginduction formula
Ωi+1= (XXX+tVVV)(Ωi) (5) whereXXX isthe vectorof meshpoints coordinates at iterationi,tthe method’s stepandVVV isthe vectorfield describingthe meshdisplacement.The objective ofthe methodisto computetandVVV. Letusintroducethe lagrangian functionaldefinedas
L(Ω) =J(Ω) +λC(Ω) =2ν
Ω|ε(UUU)|2dx+λ(V(Ω)−V(Ω0)) (6) whereλ isthe Lagrange multiplier.
Onthe otherhand, letVVV: IRd→IRd be aregularvectorfield. Thederivative ofthe Lagrangian L(Ω)inthedirection ofVVVisdefinedby (HenrotandPrivat, 2010)
L(Ω)(VVV) =<dL(Ω),VVV>=lim
t→0
L(Ωt)−L(Ω)
t , with Ωt= (XXX+tVVV)(Ω). (7) Toimplement the shape optimization algorithm,it is necessaryto expressthe Lagrangianderiva- tiveinthe followingform
L(Ω)(VVV) =
∂Ω(G+λ)(VVV·nnn) (8)
whereGisthe shapegradient,i.e.a functiondefinedonthe boundary ofthedomainΩdepending onUUU butnotonthe vectorfieldVVV. Underthis form,itwill be easytodetermine a new mesh choice leadingto adecrease ofthe Lagrangian. The adjointmethodis basedontheintroduction of an adjointstate (UUUa,pa).Straightforwardcomputations (see (HenrotandPrivat, 2010) formore details) leadtothe followingshapederivative ofthe Lagrangian functional expressedas
L(Ω)(VVV) =
∂Ω(2ν(ε(UUU):ε(UUUaaa)−ε(UUU):ε(UUU)) +λ)(VVV·nnn)dσ (9) Thus,the shapegradient isgiven by
G=2ν(ε(UUU):ε(UUUaaa)−ε(UUU):ε(UUU)) (10) whereUUUaaa is the velocity ofthe adjointstate (UUUaaa,pa)definedas the solution ofthe following equations
⎧⎪
⎪⎪
⎪⎨
⎪⎪
⎪⎪
⎩
−νΔUUUa+ (∇UUU)TUUUaaa−∇UUUaaaUUU+∇pa=2νΔUUU dansΩ
∇·UUUaaa=0 dansΩ
UUUaaa=0 surΓin∪Γlat∪Γ σ(UUUaaa,pa)nnn+ (UUU·nnn)UUUaaa=4νε(UUU)nnn surΓout
(11a) (11b) (11c) (11d) known as adjointsystem equations.Finally,the meshdisplacementVVV is computedby solvingthe followingsystem
⎧⎪
⎨
⎪⎩
−ΔVVV+VVV=0 dansΩ V
V
V=0 surΓin∪Γout∪ΓLat
∇VVVnnn=−(G+λ)nnn surΓ
(12a) (12b) (12c)
4. Implementation of the optimization algorithm
Initial shape : run blockMesh orsnappyHexMexhΩ0
Converged? no
yes
Simple loop to solve Navier- Stokes equations (UUU,p) andad-
jointequations (UUUaaa,pa)inΩi
Computation ofthe shapegradientG Meshdisplacement: run modifyMeshΩi+1
Optimizedshape
OptimizationFoam Figure 2: Shape optimization algorithm
The CFD equations areimplementedusing C++ language within OpenFOAM software (Welleretal.,1998).The latteris a free and open source software which allowsto solve partialdifferential equations (Navier-Stokes and adjoint equations Eq. (1) and (11)) usingfinite volume method. OpenFOAM supplies a solverwhich solvesthe Navier- Stokes andan ajdointsystem fortopologic optimization. This solver is named ’’ad- jointShapeOptimizationFoam’’. The latter is modifiedandenrichedin ordertoimple- ment the optimization algorithm and deter- minethe bestshapein each ofthe fourcon- sideredcase studies. The algorithmisde- tailedin Fig.2. Ateachiteration, atestof the quality ofthe meshis carriedout through the aspectratio. In 2D,the aspectratiois definedastheratio ofits longersidetoits shorter side. If theratio istoo large, i.e.
higherthan5,thedomainisremeshed.
Figure3: Initial shape ofthe180◦elbow Figure4: Optimizedshape ofthe180◦elbow
Figure5: Initial shape ofthedyadictree Figure 6: Optimal shape ofthedyadictree
Figure7: Initial shape ofthe obstacle Figure8: Optimal shape ofthe obstacle
Figure9: Initial shape ofthe90◦elbow Figure10: Optimal shape ofthe90◦elbow
5. Main results
Initial shapes andvelocitydistributions arepresentedin Figs.3,5,7and 9, andoptimizedshapes are shownin Figs. 4, 6,8and 10. In each case, movingthe free boundary allows areduction
Table1: Performances ofthe optimization apprch Case Iterations Simulationtime Reduction of
dissipatedenergy
Reduction of pressure losses
180◦elbow 300 40 min 30.7% 33.3%
Dyadictree 550 1h 01 53.3% 40.4%
Obstacle 200 9mn14 10.8% 15.4%
90◦elbow 80 2 mn30 27% 24%
ofthe velocitydistributiondueto anincreaseinthe width ofthe channel (forthe elbows andthe dyadictree) orto adecrease ofthe width ofthe obstacle. Thus,thereduction ofthe velocity andtheincrease ofthe section leadto areduction ofthe velocitygradientand, consequently,to a reduction oftheperformanceindex.Allthe optimal shapes obtainedinthis study arein verygood agreementwiththe literature works (Tonomura etal., 2010; Dapogny etal., 2017).
The performances of the optimization approach foreach case study arepresented in Table 1.
Dependingonthe case, a significantreduction ofthedissipatedenergyis observed, between10.8 and 53.3%.Sincethe energydissipatedbythe fluidandthepressuredrops arerelated, adecrease ofpressure losses is also observedin similarproportions, i.e. between15.4and40.4%. The dyadictree caseisthe mostcostlyinterms of computationtime.Indeed,thegeometryinthatcase undergoes huge changes, andtherefore, one hasto finelyremesh manytimes.Inthis case,the flow seemstoprivilege one ofthetwo branches.The small one cannotberemove becausethe outlet is a fixedboundary andthegeometic algorithm cannotmodifythetopology ofthedomain.
From a numericalpointof view,the case ”flow aroundan obstacle”isthe mostdifficult toimple- ment.Indeed,theinitial Lagrange multipliermustbeproperly chosenin orderto avoidtheremoval ofthe obstacle which would result in wrongsimulationsduetoinvalidmeshes.To overcomethis problem,theinitial Lagrange multiplierλ0is set to a value higherthanthe absolute value of shape gradientG.
6. Conclusion
Inthis work, a shape optimization approach has beendevelopedandimplementedwithin Open- FOAM software.Fourcase studiesrepresentingtypical fluidflowpatternsin fluid dynamics were considered. The objective wastodeterminethe shapethatminimizesthe energydissipatedby viscous friction while meetingthe volume constraintandsatisfyingthe momentum equations. A significantreduction ofpressure losses was observedin each case study which willresult inim- portantenergy savings. The comingworks will focus on shape optimization of a mass orheat exchangers andthe mixingin a stirredtank.
References
G.Allaire, 2007.Conception optimalede structures.Vol. 58of Math´ematiques etApplications.Berlin: Springer.
C.Dapogny, P.Frey, F.Omn`es, Y.Privat, 2017.Geometrical shape optimizationin fluidmechanics usingfreefem++.
Structural andMultidisciplinary Optimization,1-28.
A.Henrot, M.Pierre, 2005.Variation etoptimisationde formes.Vol.48of Math´ematiques etApplications.Springer- Verlag,Berlin.
A.Henrot, Y.Privat, 2010.What isthe optimal shape of apipe? Archive forRational Mechanics andAnalysis,196 (1), 281–302.
O.Tonomura, M.Kano, S.Hasebe, 2010.Shape optimization of microchannels usingcfdandadjointmethod.Computers andChemical Engineering, 28,37-42.
H.G.Weller, G.Tabor, H.Jasak, C.Fureby,1998.Atensorial approachto computational continuum mechanics using object-orientedtechniques.Computersinphysics12 (6), 620–631.