ContentslistsavailableatScienceDirect
Computers and Chemical Engineering
journalhomepage:www.elsevier.com/locate/compchemeng
Optimal design of a structured fixed-bed reactor using geometry optimization and Stratoconception printing process
Alexis Courtais
a, François Lesage
a, Yannick Privat
b, Cyril Pelaingre
c, Abderrazak M. Latifi
a,∗aLaboratoire Réactions et Génie des Procédés, CNRS-ENSIC, Université de Lorraine, 1 rue de Grandville, BP20451, Nancy Cedex, 54001, France
bInstitut de Recherche Mathématique Avancée, CNRS, Université de Strasbourg, 7 rue René-Descartes, Strasbourg Cedex, 67084, France
cCentre Europen de Prototypage et Outillage Rapide, CIRTES, 29 bis voie de l’innovation, Saint-Dié-des-Vosges, 88100, France
a rt i c l e i nf o
Article history:
Received 22 December 2020 Revised 6 May 2021 Accepted 5 June 2021 Available online 10 June 2021 Keywords:
Shape optimization Adjoint system method Computational fluid dynamics OpenFOAM environment Fixed-bed reactor Additive manufacturing
a b s t r a c t
Theaimofthispaperistodeterminetheshapeofafixed-bedreactorwhichmaximizestheconversion rateundertheconstraintsofprocessmodelequations(i.e.continuity,Navier–Stokes,andmassbalance equations),energydissipation,iso-volume,andmanufacturing.Incompressiblefluid,laminarflowregime andsteady-stateconditionsinthereactorarethemainassumptions takenintoaccount.Theoptimiza- tionmethoddevelopedisbasedontheadjointsystemmethodandOpenFOAMframeworkisusedasCFD solvertocomputethestatevectoranditsadjointvariablesintroducedbytheoptimizationapproach.The algorithmdevelopedisthentestedontwodifferentcases, areactorwhereafirstorderhomogeneous reactiontakesplaceandanotheroneinvolvingasurfacereaction.Theoptimizationresultsshowasignif- icantimprovementoftheconversionrateby2.7%inthefirstcase,andby16%inthesecondone.Finally, initialandoptimalshapesaremanufacturedusinga3Dprintingtechnique.
© 2021ElsevierLtd.Allrightsreserved.
1. Introdution
The objective of shape optimization is to deform the outer boundaryofan objectinordertominimizeormaximizeaperfor- mancesindex,whilesatisfyinggivenconstraints.Historically,shape optimizationmethodshavebeenusedincutting-edgetechnologies mainly in advanced areas such asaerodynamics (Burgreen etal., 1994;Reutheretal.,1999;HicksandHenne,1978).However,they haverecentlybeenextendedtootherengineeringareaswherethe shapegreatlyinfluences theperformances.Forexample,inhydro- dynamics,theshapeofapipethatminimizestheenergydissipated bythefluidduetoviscousfrictionwasanalyzed(Tonomuraetal., 2010;HenrotandPrivat,2010;Courtaisetal.,2019).
Inchemical engineeringhowever,wherethe shapeofunitop- erations(e.g.reactors,tanks,stirrers,pipes)isanimportantdesign parameter,theshapeoptimizationhasnotbeenextensivelyinves- tigated. This important issue deserves therefore to be addressed andwillprobablyresultinaparadigmshiftinoptimaldesignand operationofprocesses.
Shapeoptimizationmethodscanbegroupedinto3mainfami- liesillustratedinFig.1:
∗Corresponding author.
E-mail address: abderrazak.latifi@univ-lorraine.fr (A.M. Latifi).
(a) The first family is parameter optimization (Lin et al., 2011;
Kundu,2007)wherethegeneralshapeofthe objecttodesign isknownandtheoptimizationmethodcan onlymodifysome parameterschosenbytheuser.Fig.1(a)presentstheshapeop- timizationofanagitatorwhereonlythethicknessandthean- gleofthebladesarethedecisionvariables.
(b) The second one is geometryoptimization where the decision variablesarenolongerdefinedbysomeparametersbutbythe boundaryof the optimized object(Courtaiset al., 2019; Hen- rotandPrivat,2010). Thiskindoffamilyallowsa deformation oftheglobalshape,but,itpreventstopologychanges.In2D,it meansthat the numberofholes orinclusionsremains invari- ableduringtheoptimizationprocess.Fig.1(b)presentsthede- terminationoftheobstacle shapethat minimizesthepressure drops.Sinceageometryalgorithmisused,theobstaclecannot beremoved.
(c) Thelastoneistopology optimizationwhichisan extensionof geometryoptimizationandallowstopologychanges(Dongand Liu,2020; Zhouetal.,2018).In Fig.1(c),the two-dimensional topology optimization of a heat exchanger is shown. In this case,thetopologyisoneofthedecisionvariables.
On theone hand,parameter optimization methods are by far the most developed in chemical engineering area since they are the most straightforward to implement,computationally lessex- pensive than the other methods, and the determined shapes are https://doi.org/10.1016/j.compchemeng.2021.107405
0098-1354/© 2021 Elsevier Ltd. All rights reserved.
Nomenclature
Latinsymbols
C concentrationfieldofthereactant mol.m−3 C set of constraints of the optimization problem
-
C sensitivity ofC with respect to the variation of mol.m−4
Ca adjointstateofC mol.m−3
CE energydissipationconstraint m5.s.3 Cin reactantinletconcentration mol.m−3 CV iso-volumeconstraint m3
D diffusion coefficient of the reactant in the solvent m2.s−1
dchannelmin minimalwidthofchannels m dobstaclemin minimalthicknessofobstacles m
G shapegradient -
J performanceindex -
k kineticconstant s−1
L Lagrangianoftheoptimizationproblem - n boundarynormalvector -
p kinematicpressurefield Pa.m3.kg−1
p sensitivity of p withrespect to the variation of Pa.m2.kg−1
pa pressure of the adjoint state to (U, p) Pa.m3.kg−1
Q inletflowrate m3.s−1 s.t. subjectto -
t stepoftheoptimizationmethod - U fluidflowvelocity m.s−1
U sensitivity ofU withrespect to thevariation of s−1
Ua velocityoftheadjointstateto(U,p) m.s−1 Uin fluid velocity profile imposed at the reactor inlet
m.s−1
V vector field representing the displacement of the
mesh m
V() volumeof m2
Symbolesgrecs
β
V volumeconstraintupdateparameter -β
E energyconstraintupdateparameter -γ
parameter allowing to adjust the diffusion of themeshwhenmovingit m2 freeboundaryofthedomain - in fluidinletof -
out fluidoutletof - lat lateralwallof -
δ
distancebetweentheboundaryoutandthecenter oftheadjacentcell m∂
unionoftheboundariesof -ε
0 energydissipationoftheinitialshape m5.s3λ
E Lagrange multiplier associated to the energy con- straint -λ
V Lagrange multiplier associated to the volume con- straint -ν
fluidkinematicviscosity m2.s−1studieddomain -
Indice
i iterationoftheshapeoptimizationalgorithm a refertoanadjointstate
in refertoreactorinlet
easily manufacturable since the general shape is chosen by the user.However, they donot allow significant modifications of the shape,and consequentlylead to pooroptimizationperformances.
Indeed,parameter optimization methods consist inreformulating theshape optimizationproblemasa staticoptimizationproblem, andthereforeprovidelimitedflexibilitysincethenumberofdeci- sionvariablesislow.Forexample,Hoseinietal.(2020)optimized theshape ofan agitatorthroughthree geometricalparameters of the blades such as the thickness and the vertical angle (Fig. 1), LiangandYuan(2020)modifiedtheconfigurationofaY-shapemi- croreactorthroughthepositionandthewidthofasuddencontrac- tionofthemicroreactorsection, andGrundtvigetal.(2017)opti- mizedtheconfigurationofabio-catalyticmicroreactorbyadapting thepositionof140boundarypointsandtheninterpolatingtobuild theouterboundaryofthereactor.
Onthe other hand,topology optimization approachessuch as the level-set (Kambampati et al., 2021) or the homogenization (Ozgucetal.,2021)methodsaremainlydevelopedforoptimalde- signofstructuresinmechanicalengineering.Theyallowtoexplore allpossibleshapesandtopologiesduringtheoptimizationprocess, andthereforeleadtointerestingperformanceimprovements.How- ever,thosemethods aremore CPUtime consumingandtheopti- malgeometrycouldbecomplexandnotstraightforwardtomanu- facture(Allaireetal.,2017).
Geometryoptimizationmethodsofferanadequatecompromise betweenthe advantagesanddrawbacksoftopology andparame- terapproaches.Indeed,theyallowtheanalysisofawide rangeof shapeswhile preserving the manufacturabilityof the final shape even if it can be complex in practice. For this purpose, the re- cent developmentof additive manufacturing techniques can pro- vide a 3D printing solution since they allow to extend the set of realistic shapes but require to consider some additional con- straints.Twooftheseconstraintsimposeaminimumthicknesson theprintedsolidpartandaminimumdistancebetweensolidele- ments.Apossiblemethodology fortheir treatments canbe found inAllaireetal.(2016),however,inthispaper,weprovideasimpler alternativewelladaptedtotheapplicationconsidered.
The presentwork isdevoted tothe developmentofa geome- tryoptimization algorithmusing theadjoint systemmethod. The resultingalgorithmisusedinoptimaldesignoffixed-bedreactors where
(
i)
afirst orderhomogeneousreactiontakes place, (HR)(ii)asurfacereactionlimitedbytheexternalmasstransferoccurs.
(SR)
Thesetwocaseswillthereafterbereferredtoas(HR)and(SR), respectively.Inbothcases,theobjectiveistofindtheshapeofthe packing which minimizes the average concentration of the reac- tantattheoutletofthereactor,i.e.maximizestheconversionrate ofthereactor,whilemeetingtheconstraintsof(i) processmodel, (ii)iso-volumemaintainingthesamehydraulicresidencetime be- tweeninitialandoptimalreactors,(iii)energydissipation,and(iv) manufacturing. The resulting optimal shapes will then be tested numericallybymeansofresidencetimedistributioncomputations.
Thepaperisorganizedasfollows.First,theoptimizationprob- lemsare defined(Section 2)andtheir mathematicalformulations arepresented(Section 3).Section4describestheimplementation ofthealgorithmwithinOpenFOAMframework.Finally,Section5is devotedtothepresentationofthenumericalresultsandtheman- ufacturedoptimalshapes.
Fig. 1. Example of optimized shapes using (a) parameter optimization - optimization of the angle and the thickness of an agitator blades ( Hoseini et al., 2020 ), (b) geometry optimization - determination of the obstacle shape that minimizes the pressure drops ( Dapogny et al., 2018 ) and (c) topology optimization - determination of the optimized topology and shape of a heat exchanger ( Dong and Liu, 2020 ).
Fig. 2. Initial shape of the reactor used for the optimization process 0. A symme- try axis is located in the reactor center on which symmetry boundary conditions are imposed.
2. Presentationoftheoptimizationproblemsconsidered 2.1. Casestudiesandtheirmodeling
In this work, the process considered is a fixed-bed reactor whereasingle-phaseliquidflows.Theinitialstructureofthepack- ing consistsofellipticalobstacles(whosehalfaxes are5mmand 2.5 mm) uniformly distributed in the reactor. Fig. 2 illustrates schematically the initial configuration of the reactor to be opti- mizedaswellasitsdimensions.
The reactor is denoted (see Fig. 2) andis delimitedby the union ofthe fluid inlet(in), outlet(out), lateralwall (lat) and free () boundaries. This last boundary represents the reactor packing and stands for the decision variable ofthe optimization problem. Itistheonlyboundarythat willevolveduringtheopti- mizationprocess.
The fluidflow inthereactorismodeledby themomentum balance describedby the Navier–Stokes andthecontinuity equa- tionsandtheassociatedboundaryconditions:(a)noslipcondition appliedonwallslatand,(b)aflowvelocityimposedatthein- let,and(c)thenormalstress tensorcomponentimposedequalto zeroattheoutlet. Thesystemofequationsis thereforeexpressed as:
−
ν
U+(
U·∇
U)
+∇
p=0 in(1a)
∇
·U=0 in(1b)
U=Uin on
in (1c)
U=0 on
lat∪
(1d)
σ (
U,p)
n=0 onout (1e)
wherenistheboundarynormalvector,
ν
isthekinematicviscos-ityandpthekinematicpressure(i.e.theabsolutepressuredivided bythefluiddensity),respectively.AccordingtoEqs. (1a)and(1b), thefluidflowisassumedstationary,incompressible,andtherela- tivepressureisimposedequaltozeroatthereactoroutlet.
σ
(U,p) isthestresstensordividedbythefluiddensity.Itisdefinedbyσ (
U,p)
=2νε (
U)
−pI withε (
U)
= 12
( ∇
U+( ∇
U)
T)
(2)whereIistheidentitymatrix.
At the inlet boundary in, the velocity profile is uniformand follows (Oy) direction. It is set to a small value in order to im- poselowparticleReynoldsnumber(seeEq. (3)) ensuringalami- narflowinthereactor.
Rep=udH
ν
(3)whereuisthesuperficialvelocityanddH= 4PS isthehydraulicdi- ameterwithS=
π
abthesurfaceoftheellipticalobstacles(aandbare thehalfaxes)andP≈
π
2(a2+b2)their perimeter.Inthe initialconfiguration,theparticleReynoldsnumberdoesnotexceed 7whichjustifiesthelaminarflowassumption.Itwillbeverifiedin theoptimalshapesofthereactor.
The mass transfer modelling is presented for the two cases (HR)and(SR)inthefollowingsubsections:
2.1.1. Firstcasestudy:homogeneousreaction
The first reaction considered is of type R→P, homogeneous and offirst orderwith respectto the reactant. Its kineticsis ex- pressedas:
r=kC (4)
wherekisthekineticconstantandCtheconcentrationofthere- actantR.Inthiscase,weassumethatthereactiononlytakesplace inthefluidphase(i.e.in),thepackingjustactsasastaticmixer.
Thus, themassbalanceonR isdescribedbythefollowingsystem ofPDEs:
−D
C+U·
∇
C+kC=0 in(5a)
C=Cin on
in (5b)
∂
C∂
n =0 onlat∪
out∪
(5c)
whereD isthemassdiffusioncoefficient ofthereactantRinthe solvent.
2.1.2. Secondcasestudy:surfacereaction
The second reactionis heterogeneous, limitedby the external mass transferandoccurs onwalls andlat. Itis assumedthat the packing andthe lateralwall lat are both catalystimpreg- natedandthereactionisveryfastatthesurfaceofcatalystleading to nullconcentration on those boundaries. All theseassumptions leadtothefollowingmassbalanceequations:
−D
C+U·
∇
C=0 in(6a)
C=Cin on
in (6b)
C=0 on
lat∪
(6c)
∂
C∂
n =0 onout (6d)
2.2. Shapeoptimizationproblems
Theshapeoptimizationproblemsaredefinedby:
• a performance index tobe minimized. It isdefined by theav- erageconcentration ofthe reactantatthe reactoroutlet. Such a performance indexis relevant sincethe conversion ratede- pendsontheaverageconcentrationofthereactantattheout- let.Itisgivenby:
J
()
=out
Cd
σ
(7)whereCisthesolutionof(5)or(6)dependingonthecase.
• Decision variables. In a shape optimization problem the deci- sionvariableistheshapeofthedomaindescribedbythefree boundary.
• a process model. It is described by the Navier–Stokes mo- mentum equations without turbulence model, the continuity Eq. (1)andthemassbalanceequations(5)or(6).
• a set of constraints. Here,four constraints are considered. The firstconstraintisan iso-volumeconstraintdefinedinorderto maintainthesameresidencetime betweeninitialandoptimal shapes.Thesecondconstraintisaninequalityconstraintonen- ergydissipationbythefluidduetoviscousfriction.Suchacon- straintisrelevantsincetheenergydissipationisproportionalto
thepressuredrop.Thetwoconstraintsaregivenbythefollow- ingrelations:
CV
()
=V()
−V(
0)
=0 (8)CE
()
=2ν
| ε (
U) |
2dx−2ν
0
| ε (
U) |
2dxE0
0 (9)
with
| ε
(U)|
2=ε
(U):ε
(U). The notation“:” isthe double in- nerproduct oftwo tensorsdefinedby A:B=3i,j=1Ai,jBi,j.In Eq. (8)and(9),V()representsthevolumeofand(U,p)is thesolutionofEq. (1).
Thetwolast constraintstakeintoaccount themanufacturabil- ityof the optimal shape of the object to be designed. These constraintsinvolveaminimumdistancebetweentwoobstacles andaminimumthicknessofobstacles.Sincethedifferentiation withrespect to the domain is a complex task (Feppon et al., 2020), these constraints are not included in the Lagrangian, theirtreatmentisdetailedinparagraph4.1.
The Lagrangian of the problem which aggregates the perfor- manceindex,thevolumeandenergyconstraintsisdefinedas:
L
(
,λ
V,λ
E)
=KcritJ()
+λ
VCV()
+λ
ECE()
(10)whereKcrit is aconstant ensuring dimensionalconsistency ofthe terms of the Lagrangian functional,
λ
V andλ
E are the Lagrange multipliers respectively associated to volume and energy con- straints.Inconclusion,theshapeoptimizationproblemisformulatedas:
min J
()
s.t.∈C
(
U,p)
solutionofEq.(1) C solutionofEqs.(5)or(6)(11)
whereC representsthesetofconstraintsgivenby
C:=
{
⊂R2|
CV()
=0andCE()
0}
. (12)3. Shapeoptimizationmethod:adjointsystemmethod
Themethoddevelopedtosolvetheformulatedshapeoptimiza- tionproblemisbasedongeometryoptimization.It isaniterative method which computes the gradient of the performance index andtheconstraintsbymeansoftheadjointsystemmethod.Since twosystemsofPDEs(i.e.systemsofmomentumandmassbalance equations)areinvolvedinthemodelofeachcasestudied,twoad- jointsystemsarethereforeintroduced.
3.1. FundamentalprincipleoftheHadamardmethod
Inthefieldofgeometryoptimization,theshapeofanobjectis optimized by varying its boundarieswhich can be classified into twocategories:
• fixed boundarieswhich willnot be distortedduringthe opti- mization process. In thisstudy, the boundaries in, out and latarefixed.
• free boundarieswhich are the decisionvariables of theprob- lem.Inourcases,thefreeboundaryis.
It is interesting to consider the largest possible free bound- ary in order to increase the degree of freedom of the optimiza- tion method. This will allow to reach a wider range of possible shapes, which will give better optimization performances. How- ever, itwill increase thenumber of localminima. The classifica- tionoftheboundariesisthechoiceoftheengineerwhowantsto optimizethe objectand dependsmainly onthe process involved
Fig. 3. Example of an iteration of the shape optimization method. t V (x ) is the small perturbation at point x ∈ ∂, irepresents the domain at iteration i .
(positionofthefluidinletandoutlet,externalboundaryoftheob- ject,etc.).
The methodusedin thisworkis aniterativemethodthat de- termines,fromaninitialshapeofanobject,asequenceofshapes that improve theperformances ofthe objectateach iteration by adapting thepositionofitsboundaries.ItisbasedonHadamard’s approach(Hadamard,1908)andreliesontheconceptofderivative withrespect tothedomain,also calledderivativein thesense of Hadamard(AllaireandSchoenauer,2007;HenrotandPierre,2005).
It consistsin determining at each iteration the sensitivity ofthe performance indexortheLagrangian withrespecttoasmallper- turbationoftheboundaries
∂
accordingtothefollowingrelation:i+1=
(
Id+tV)(
i)
(13)where Idis theidentity operator, t is the methodstep oftheit- erativealgorithm,iistheiterationindexandV isthevectorfield standingfortheperturbation.Fig.3illustratesthedisplacementof duringaniteration.
The approachisbasedontherecurrence formula(13)andthe objectiveofthemethodistodetermine,ateachiteration,thestep t andthevectorfieldV leadingtoadecreaseoftheLagrangian.
The derivativeinthesenseofHadamardisaconceptofdirec- tionderivative.TheLagrangianderivativefollowingthedirectionV iscomputedwiththefollowingformula(HenrotandPierre,2005):
L
(
,λ
V,λ
E)(
V)
=limt→0
L
(
t,λ
V,λ
E)
−L(
,λ
V,λ
E)
t (14)
witht=(Id+tV)().
3.2. Adjointsystemmethod
ThederivativeinthesenseofHadamardcanbedecomposedin the same wayasstandard derivatives.Thus, the differential with respectto thedomainofasumisequaltothesumofthediffer- entials:
L
(
,λ
V,λ
E)(
V)
=KcritJ()(
V)
+λ
VCV()(
V)
+λ
ECE()(
V)
(15) Standard differentiationformulae withrespect to the domain applied to each term (Allaireand Schoenauer, 2007; Henrot and Pierre,2005;Dapognyetal.,2018)yieldJ
()(
V)
= dtdout
Cdx
t=0
=
out
Cd
σ
(16)CV
()(
V)
= d dtt
1dx
t=0
−V
(
0)
=
∂
(
V·n)
dσ
(17)CE
()(
V)
= d dt2
ν
t
| ε (
U) |
2dxt=0
−E
(
0)
=2
ν
∂
| ε (
U) |
2(
V·n)
dσ
+4ν
ε (
U)
:ε (
U)
dx (18) In Eqs. (16), (17) and (18), U describes the sensitivity of U withrespect to the variation of. According to DeLa Sablonire etal.(2011)andHenrotandPrivat(2010),Uisthesolutionofthe followingsystemofequations:−
ν
U+(
U·∇ )
U+(
U·∇ )
U+∇
p=0 in(19a)
∇
·U=0 in(19b)
U=0 on
in∪
lat (19c)
U=−
∂
U∂
n(
V·n)
on(19d)
σ (
U,p)
n=0 onout (19e)
where ∂∂Un =
∇
Unisthepartialderivativewithrespecttothenor-maln.
Similarly, C represents the sensitivity of the concentration C with respect to the variation of the domain. For the (HR) case, Cisthe solutionofthe followingsystemofPDEs (Courtaisetal., 2021).
−D
C+U·
∇
C+U·∇
C+kC=0 in(20a)
C=0 on
in (20b)
∂
C∂
n =K(
C,V)
on(20c)
∂
C∂
n =0 onout∪
lat (20d)
with K(C,V)=−∂∂Cn22(V·n)+
∇
C·(∇
(V·n)−(∇
(V·n)·n)n). In theabovesystem, Eq. (20b)comesfromtheusualdifferentiation formulae, Eqs. (20a) and (20d) fromthe differentiation formula of a product and from a clever adaptation of Schwarz theorem (Henrot andPierre, 2005,Chapter 5), andEq. (20c) is a formula ofdifferentiationwithrespecttothedomainfora Neumann-type boundaryconditiononthefreeboundary(HenrotandPierre,2005, Chapter5).ForthecaseSR,Cisthesolutionofthefollowingsys- temofPDEs(Courtais,2021):−D
C+U·
∇
C+U·∇
C=0 in(21a)
C=0 on
in∪
lat (21b)
C=−
∂
C∂
n(
V·n)
on(21c)
∂
C∂
n =0 onout (21d)
Following Eqs. (16), (17) and (18), the derivative of the La- grangianrewritesasfollows:
L
(
,λ
V,λ
E)(
V)
=Kcrit
outCd
σ
+λ
V∂
(
V·n)
dσ
+2
νλ
E∂
| ε (
U) |
2(
V·n)
dσ
+2ε (
U)
:ε (
U)
dx (22)Theabove expressionisnotveryusableforpracticalpurposes.
Indeed, some terms ofEq. (22) donot depend explicitly onthe scalarproduct(V·n).ThedependenceisachievedthroughU.Un- derthisform,itiscomplextochooseanappropriateperturbation V leadingtoadecreaseoftheLagrangianfunctional.Itistherefore moresuitabletoexpresstheLagrangianderivativeinthefollowing form:
L
(
,λ
V,λ
E)(
V)
=∂G
(
,λ
V,λ
E)(
V·n)
(23)where G(,
λ
V,λ
E) is the shape gradient, a function definedon the boundaryof thedomain∂
that dependson thesolution of the Navier–Stokes equations (U,p) and the solution of the mass balancesystemC.Tocomputethegradient,adjointsystemmethod is used, basedon the introductionof two adjointstates: one as- sociated totheNavier–Stokesequations(Ua,pa) andtheotheras- sociatedtothemassbalancesystemCa.Finally,fromthevaluesof thefunctionG(,λ
V,λ
E),themeshdisplacementleadingtoade- creaseoftheLagrangianiscomputedsolvingthefollowingsystem (Courtais,2021):−
γ
V+V=0 in(24a)
V=0 on
in∪
out∪
lat (24b)
γ ∇
Vn=−G(
,λ
V,λ
E)
n on(24c)
where
γ
isa positiveparameter allowing todiffusemore orlessthe meshdisplacement.Thisparameter mustbe properlychosen.
Indeed, ifits value is too low,the diffusion of themesh will be smallandtheresultingfreeboundarysurfacewillnotbesmooth.
Onthe other hand,ifthevalue of
γ
ischosen toolarge,the dis-placementofthewholedomainwillmainlydependonhighshape gradientareas.
OncethevectorfieldV determined,themeshis movedaccord- ingtothediscretizedrecurrencerelation(13)expressedasfollows:
i+1=
(
X+tV)(
i)
(25)whereXisthevectorfieldofmeshpointscoordinatesatiteration i.
Finally, all that remains is to determine the shape gradient G(,
λ
V,λ
E).Since eachcaseinvolvesa particularmodel,theex- pression of the shape gradient andthe introduced adjoint states arepresentedseparately.3.3. Firstcase:homogeneousreaction
Courtaisetal.(2021)havedetailedall calculationsallowingto expresstheshapegradientinthefollowingform:
G(,λV,λE)=2ν(ε(U):ε(Ua)−λEε(U):ε(U))−Kcrit
KBCDCaC+λV
(26) whereKBCisaconstantpresentintheconcentrationoutletofthe adjointboundary conditions(28d)and(30c)allowing tohomoge- nize Eqs.(26),(28d)and(30c).InEq.(26),(Ua,pa) isthe adjoint stateof(U,p)definedasthesolutionofthefollowingsystem:
H
(
U,Ua)
+∇
pa=−KKcritBC
Ca
∇
C in(27a)
∇
·Ua=0 in(27b)
Ua=0 on
in∪
lat∪
(27c)
σ (
Ua,pa)
n+(
U·n)
Ua=4νλ
Eε (
U)
n onout (27d) whereH(U,Ua)=−
ν
Ua+(∇
U)TUa−∇
UaU+λ
E2ν
U andCa istheconcentrationoftheadjointstateofCdefinedasthesolution ofsystem:−D
Ca−U·
∇
Ca+kCa=0 in(28a)
Ca=0 on
in (28b)
∂
Ca∂
n =0 onlat∪
(28c)
Ca
(
U·n)
+D∂
Ca∂
n =KBC onout (28d)
Inthiswork,KBC issetto3×10−3 mol.m−2.s−1 inordertoal- lowthefieldsCandCahavingthesameorderofmagnitude.
3.4. Secondcase:heterogeneousreaction
Inthiscase,thesamereasoningasinthefirstcaseisdoneand theshapegradientrewritesintheform:
G
(
,λ
V,λ
E)
=2ν ( ε (
U)
:ε (
Ua)
−λ
Eε (
U)
:ε (
U))
+KcritKBCD
∂
Ca∂
n∂
Cn∂
n +λ
V (29)InEq.(29),Ua isthevelocityoftheadjointstate (Ua,pa)solu- tionofEq. (27)andCaistheconcentrationoftheadjointstateof Cdefinedasthesolutionofthefollowingsystem:
−D
Ca−U·
∇
Ca=0 in(30a)
Ca=0 on
in∪
lat∪
(30b)
Ca
(
U·n)
+D∂
Ca∂
n =KBC onout (30c)
4. Implementationoftheshapeoptimizationalgorithm
Table1presentstheoptimizationalgorithmusedtodetermine theoptimalshapeofthereactors.ItisimplementedwithinOpen- FOAM (Welleretal., 1998) whichisa free andopen-source plat- formallowingtosolvepartialdifferentialequationsusingC++pro- gramminglanguageandthefinitevolumemethod.Inordertolink iterationstoeach other,a pythonlibrarynamed
pyFoam
is used throughitsmeshutility“pyFoamMeshUtilityRunner.py”.The next subsections will detail the algorithm anddiscuss in particularitsaccuracy.
4.1. Meshdisplacement
Themanufacturingconstraintsaretreatedbypost-processingof thevectorfieldV afteritscomputation.
Table 1
Shape optimization algorithm.
Fig. 4. Illustration of the obstacle constraint treatment. V (x ) and V (x )modare re- spectively the mesh displacement vector before and after modification at point x .
Fig. 5. Schematic illustration of the skeleton of a rectangular object, the blue circles represent the maximal balls, the black dots their centers and the red line indicates the skeleton.
4.1.1. Obstaclethicknessconstraint
This first manufacturing constraint is of inequality type and imposes a minimal value on the local thickness of obstacles (dobstacle>dobstaclemin ). It is treated by a projection method in two main steps. The first one consistsin determiningthe local thick- nessatpointxandthesecondoneintheprojectionofvectorV(x). The main difficulty ofthis treatment isto compute the thick- ness.Itsestimationistrivialtothenakedeye,however,itsimple- mentation is complex in practice. Indeed, choosing the right di- rection to quantify this length is not an easy task. In thiswork, a thinsolid centeredinside theobstacles, calledskeleton,is con- structedandthethicknessoftheobstacleisdefinedasthedouble of thedistancebetweenits boundary anditsskeleton (Fig.4). In two dimensions,theskeleton ofan obstacleisthecurvewhichis equidistantfromtheobstacleoneachside(Fig.5),itsmathemati- caldefinitionisasfollows.
Definition 1. The skeleton ofan obstacleis definedastheset of centersofthemaximalballtotallyincludedintheobstacle.
Fig. 6. Voronoi diagram of a 10-point set.
Definition 2. Aball B1 included inaset F is maximal ifthereis noballB2alsoincludedinFcontainingB1strictly inthesenseof inclusion.
Inthiswork,theskeletonconstructionisbasedontheworkof Attali (1995)who built the skeleton ofa shape from its Voronoi diagram, considering the shape as a discrete set of points. The Voronoi diagram of a set of points E is determined from the Voronoiregions.Inthe2Dcase,theVoronoiregionofapointx∈E isdefinedasthe areawhere pointsbelonging toitare closest to pointxthanallotherpointsofE(Attali,1995).Itismathematically definedbelow.
Definition3. LetX asubsetofRdandP=
{
P1,P2,...,Pn}
⊂X aset ofpoints.TheVoronoiregionRkofapointPkisdefinedasfollows Rk={
x∈X|
d(
x,Pk)
<d(
x,Pj)
,∀
j=k}
whered(x,Pk)isthedistancebetweenPk andx.
Fig.6illustratestheVoronoidiagramofa10-pointset.Thisdia- gramconsistsoftwomainelements,theverticesdefinedasthein- tersectionofatleastthreeVoronoiregionsandtheedgesbounded bytwoverticesanddefinedastheboundarybetweentwoVoronoi regions.AccordingtoAttali(1995),theskeletoncanbe builtfrom
Fig. 7. Simplification of the Voronoi diagram into the skeleton: green points denote obstacle points and red lines denote Voronoi diagram ( a ) and the simplified skeleton ( b) and ( c).
bothverticesoredges.Inthiswork,itisbuiltfromedges because thisconstructionallowstoobtaindirectlytheskeletoncontraryto theotherwaywhichrequiresalaststepoflinearinterpolationbe- tweenthevertices.
Once theVoronoidiagram built(Fig.7(a)), itis reducedusing twostepsinordertoobtainthefinalskeleton:
• Edges which are not completely included in the obstacle are removed(Fig.7(b)).
• Asecondsimplificationiscarriedoutusingtwocriteria.(i)For all Voronoi vertices s, the first criterion is the minimumdis- tancebetweensandtheobstacle,calledr(s).(ii)Aspreviously mentioned, each point s hasat leastthree projections onthe obstacle,called p1, p2 and p3.The second criterionis defined asfollow
α (
s)
=max(
p1sp2,p1sp3,p2sp3)
(31)Theminimumvaluesofr(s)and
α
(s)arerespectively2×10−4 mand π2 (Fig.7(c)).The secondstepiscarriedout bymeansofatest onthemin- imumdistanced(x)betweenthefreeboundary andtheskeleton.
Ifthisdistanceislowerthan dobstaclemin2 andd(x)>d
x+tV(x)
then thevectorV(x)ismodifiedinordertobeparallel totheskeleton (Fig.4).TheresultingvectorisdenotedV(x)mod.
4.1.2. Constraintonchannelwidth
Theothermanufacturingconstraintimposesaminimalvalueon thewidthoffluidchannels.Itisalsotreatedintwomainstepsby aprojectionmethod.Foreachboundarypointx,thelocalchannel width is first computed by loopingover all boundary pointsbe- longingtoanotherobstacle.Theclosestpointbelongingtoanother boundaryisdenoted xnear.Thesecond stepconsistsincomputing theinnerproductofvectorsxxnear andV(x).Ifthisscalarproduct is positiveandd(x)=
||
xxnear||
<dchannelmin ,then thevectorV(x) is modifiedinordertobeorthogonaltoxxnear.Fig.8showsanillus- trationofthechannelconstrainttreatment.Fig. 8. Illustration of the treatment of the constraint on the channel width. V (x ) and V (x )modare, respectively, the mesh displacement vector before and after mod- ification at point x .
4.2. Meshingandremeshingofthedomain
OpenFOAM solves the PDEs using the finite volume method whichrequires a meshgeneration inorder to discretizethe gov- erningequations.Themeshingstepisimportantbecausethequal- ity of the solution depends strongly on the mesh quality. In thiswork, the meshing and the remeshing are carried out using
cfMesh
, an open-source library for automatic mesh generation.Then, the mesh quality is improved using
snappyHexMesh
, a meshgeneratorutilitysuppliedbyOpenFOAM.Theresultingmesh iscomposed of50,000to 120,000 computationalcellsdepending onthe case.Figure 9presents thegridindependencetest carried outforbothcases.Itshowstheevolutionoftheoutletconcentra- tion ofthe reactant versus the numberof cellsin the meshand validatestheindependenceofthecomputedsolutionwithrespect totheusedmeshdensity.Theshape gradientisafunctiondefinedonthefree boundary andinvolvesfirst andsecond orderderivativesof thedifferent variables(see Eqs. (26)and(29)). Thus,the neighborhoodofthe
Fig. 9. Grid independence test - Outlet reactant concentration versus the number of cells in the mesh.
Fig. 10. Illustration of (a) the potential configuration of some obstacles, (b) the for- mation process of tails at free boundary ends.
boundary has to be modeled with accuracy, therefore, two layer meshes are added atboundary for the homogeneous reaction case. Forthe (SR)case, 5layer meshesareadded atthereaction boundariesinordertoimprovethemodelingofmasstransferdif- fusioninthenear-wallregion.
Fig. 10(a) illustrates the configuration that obstacles may present duringthe optimization process. According tothe figure,
“tails” mayappearattheobstacleends.Thisphenomenonwasex- pectedfortheheterogeneousreactioncasesincethe“tails” appear- ance allowstoincrease thereactivesurfacewithoutmuchchange in reactor volume.However, those“tails” are not manufacturable using Stratoconception®printing process due to their small local thickness. The projection treatment of manufacturing constraints (Section4.1) doesnot preventtheformationofthese“tails” illus- tratedinFig.10(b).Inordertoensurethemanufacturabilityofthe object,the “tails” formedduringthe optimizationprocess arere- movedbymoving,oncedetected,allboundarypointsbelongingto the “tails” at the centerof their extreme pointsjust before per- formingtheremeshingstep.
4.3. Meshquality
Ateachiteration,themeshqualityischeckedtoknowwhether the volumediscretization willimpact thequality ofthe PDEsso- lution.This qualityverificationis carriedout throughthree crite- riaoftenusedinCFDarea.Thosecriteria,illustratedinFig.11,are (Holzinger,2015):
• Theaspectratio,definedintwodimensionsastheratioofthe biggest to thesmallestlength of acell. It isexpressed bythe ratio sl (Fig.11).
Fig. 11. Illustration of the mesh quality criteria.
• Themeshnon-orthogonality,definedastheanglebetweenthe vectorconnectingthecellcentersoftwoadjacentcellsandthe normalof thecommon face. InFig. 11,it is definedby angle
α
=arccos(|AAi·Cii||Ci|).
• Thefaceskewness,definedbytheratio ||dCi|
i| (seeFig.11),where
|
di|
is the distance betweenthe intersectionof the line con- nectingthe adjacent cell centers andtheir common face,and thecenterofthisface,|
Ci|
isthedistancebetweenthecentersofconsideredcells.
Ifthemaximumvalueoftheaspectratioishigherthan20,the meshnon-orthogonalityishigherthan65◦orthefaceskewnessis higherthan3.8,theshapeisremeshed.Thoseupperboundshave beenchosenbecauseOpenFOAMchecksthemeshqualitycomput- ing (amongothers) themaximal valuesoftheface skewnessand thenon-orthogonalityofthemesh.Ifthosevaluesarerespectively higherthan4 and70◦, themeshquality isnot validated.Slightly lowervalueshavebeenchosenforthemeshnon-orthogonalityand thefaceskewnesstoensurethat themaximumvaluesdefinedby OpenFOAM are not exceeded after each mesh displacement. The choiceoftheupperboundfortheaspectratioisbasedonitsval- uesintheinitialshapes.Dependingonthecase,themaximumas- pectratio inthe initial meshis between8 and15, thereforethe upperbound for thiscriterion hasbeen set to 20.However, this choiceisnotcriticalbecausethemajorityoftheremeshingprocess launchesisduetoaviolationofthecriteriaonnon-orthogonality andskewnessofthefaces.
4.4. Boundaryconditionsapproximation
The pressure-velocity couplings present in the Navier–Stokes Eq. (1)anditsadjointsystemEq.(27)arenumericallysolvedus- ingSIMPLEalgorithm(Patankar,1980).
The three outlet boundary conditions of the adjoint systems ((28d), (30c) and (27d)) are not usual boundary conditions and must be implementedwithin OpenFOAM usingthefollowing ap- proximations:
( ∇
Ua)
Tn≈Uapatch−Uainternδ
(32)∇
Can≈Capatch−Cainternδ
(33)whichallowstorewritetheboundaryconditionsasfollows:
Uapatch≈
νδ
−1Uaintern+4νλ
Eε (
U)
n+pan−ν∇
Uanνδ
−1+(
U·n)
(34) Capatch≈νδ
−1Caintern+KBCνδ
−1+(
U·n)
(35)where
δ
isthedistancebetweentheboundaryandtheinternalad-jacentcellcenter,Uapatch andCpatcha representrespectivelythead- joint velocityandthe adjointconcentration at theboundary, and Uaintern andCaintern theirvaluesintheinternaladjacentcellcenter.
The implementation of these boundary conditions within Open- FOAMispresentedwithfurtherdetailsinCourtais(2021). 4.5. Lagrangemultipliersupdateandconvergenceofthealgorithm
In thiswork,the optimizationalgorithm usedisbased onthe Uzawa method which consistsin the determination ofthe mesh displacementateachiterationconsideringtheLagrangemultipliers
λ
V andλ
E constant.Oncethemeshdiffusiondone, theLagrange multipliersareupdatedaccordingthefollowingequations:λ
kV+1=λ
kV+β
VCV()
(36)λ
kE+1=max0,
λ
kE+β
ECE()
(37)
where
β
V andβ
E aresmallpositiveparameters.Theformulation of relations (36) and (37) are different because the volume con- straint is of equality type while the energy constraint is an in- equalityone (see Karush–Kuhn–Tucker’sdualfeasibility condition Karush, 2014;KuhnandTucker,2014).Thisexplainswhyλ
V may benegativewhileλ
Ecannot.Finally,theconvergenceofthealgorithmiscarriedoutthrough thecomputationofthecoefficientofvariation(orrelativestandard deviation) ofthe last 100Lagrangian values.Ifthisratio islower than10−4,theconvergenceisachieved.
5. Mainresults
Thissectionisdevotedtothepresentationofnumericalresults obtainedusingthealgorithm describedintheprevious section.It consistsoftwosubsectionswheretheoptimizationresultsforthe cases(HR)and(SR)arepresented.Exceptforthekineticconstant k,thesimulationparameters arethesameforbothcasesandare showninTable2.
5.1. Homogeneousreaction
Figs.12(a)and11(b)showtheconcentrationprofilesofthere- actantintheinitialdesignandintheoptimalshape(withoutcon- sidering the manufacturing constraints) ofthe reactor. As can be
Table 2
Simulation parameters.
Parameters Values Units Equations
ν 10 −6 m 2. s −1 (1a), (26), (27) and (29)
U in 10 −2 m . s −1 (1c)
D 10 −9 m 2. s −1 (26), (28a), (29) and (30a)
k 10 −2 s −1 (5a)
γ 10 −4 m −2 (24a) and (24c)
K BC 3 ×10 −3 mol. m −2. s −1 (26), (27d), (28d), (29) and (30c) K crit 3 ×10 −5 m 6. s −3. mol −1 (10), (26) and (29)
Fig. 12. Homogenous reaction case: initial design of the fixed-bed reactor (a), op- timized shape without manufacturing constraint (b), optimized shape with man- ufacturing constraint (c), optimal shape manufactured by means of Stratoconcep- tion®process (d).
seen, a stagnation zone appears atthe inlet of the initial shape (light area in Fig. 12(a)). It corresponds to a region of the reac- tor where the reactant concentration is low resulting in low re- action rates.Consequently, thisstagnation volume is almost use- lessfortheconversion.Intheoptimalshapewithoutmanufactur- ingconstraints,thestagnationzonehasdisappeared.However,this reactorconfigurationcannotbemanufactured usingStratoconcep- tion®processduetotoothinobstaclesandsomeverysmallchan- nelwidths.
The optimization is then carried out taking into account the manufacturing constraintsandtheresultingshape isdisplayedin Fig.12(c).Similarly,thestagnationzonepresentintheinitialshape hasdisappearedandthesizeofobstaclesandchannelsoftheopti- mizedshapearesuchthattheycanbebuiltbymeansofStratocon- ception®process.Themanufacturedoptimalshapeofthereactoris showninFig.12(d).
Fig.13showstheconvergencehistoryoftheoptimizationpro- cess.Theenergyandvolumeconstraintsarebothsatisfiedatcon- vergenceanditisinterestingtonotethattheinequalityconstraint on the energy dissipated is active. It may therefore be interest- ingeither toincrease themaximumvalue associatedtothiscon- straint inorder toobtain a better conversion rate, orto perform multi-objectiveoptimizationofthereactorconsideringtwocriteria (i)theconversion rateand(ii) theenergydissipation.Fig.13also showsa decrease of almost 10% in the reactant concentration at thereactoroutlet, whichleadstoan improvementinthe conver-