TN-09_AdjointBasedSensitivityAnalysisDifferentiallyHeatedCavity
===============================================================
.. meta::
:description: technical note
:keywords: Adjoint-based,sensitivity,analysis,of,a,differentially-heated,cavity,Technical,Report,2068625-TN-09,Deliverable,5.3,Josh,Williams∗,,Ubaid,Ali,Qadri†,,Sue,Thorne‡,March,4,,2024,1,Introduction,Tokamak,reactors,aim,to,use,confined,plasma,to,create,energy,by,nuclear,fusion,[Nordlund,et,al.,,2018].,Due,to,the,complex,combination,of,interactions,at,multiple,length-scales,,flow,instabilities,can,arise,that,cause,reduced,performance,and,damage,to,the,reactor’s,walls,[Luce,,2011;,Mordijck,,2022].,The,interplay,between,multiple,interacting,design,and,operating,parameters,creates,a,difficult,optimisation,problem,to,maximise,power,output,of,future,tokamak,reactors.,Additionally,,the,complex,plasma,flow,is,prone,to,instabilities,that,limit,the,confinement,achieved,by,tokamaks.,Identifying,the,onset,of,instabilities,and,developing,passive/active,control,strategies,is,therefore,crucial,for,the,success,of,nuclear,fusion,reactors.,The,adjoint,method,has,been,used,extensively,in,stability,analysis,,uncertainty,quantification,,optimisa-,tion,and,control,problems,[Magri,,2019;,Kord,and,Capecelatro,,2019;,Qadri,et,al.,,2021].,Applications,and,recent,developments,in,the,adjoint,method,for,NEPTUNE-related,problems,were,reviewed,in,our,report,[Williams,et,al.,,2023].,In,this,report,,we,aimed,to,study,the,stability,of,a,differentially-heated,cavity,at,Rayleigh,numbers,near,the,stability,frontier.,We,study,the,adjoint,global,mode,alongside,the,direct,mode,obtained,from,classic,linear,stability,analysis,to,identify,the,most,sensitive,region,of,the,flow,(called,the,‘wavemaker’,by,Giannetti,and,Luchini,[2007].,The,sensitivity,of,the,eigenvalue,to,changes,in,the,wall,temperature,are,evaluated,with,varying,top,and,bottom,boundary,conditions.,The,proxy-app,accompanying,this,report,(deliverable,5.2),can,be,found,at,https://github.com/ExCALIBUR-NEPTUNE/NumericalAnalysis/tree/,main/Adjoint.,2,Methods,2.1,Flow,configuration,We,consider,a,differentially-heated,square,cavity,with,a,heated,left,wall,(TL,=,1),,a,cold,right,wall,(TR,=,0),and,gravity,acting,in,the,vertical,direction,(Figure,1a).,The,working,fluid,is,air,(P,r,=,0.71),,under,the,Boussinesq,approximation,where,the,temperature,acts,on,the,velocity,only,through,a,buoyancy,term,(density,and,viscosity,are,constant).,We,use,the,non-dimensional,equations,given,by,Le,Qu´er´e,and,Behnia,[1998],as,∇,·,u,=,0,+,u,·,∇u,=,−∇p,+,P,r,√,Ra,∇2u,+,P,rT,y,+,u,·,∇T,=,1,√,Ra,∇2T.,∂u,∂t,∂T,∂t,(1a),(1b),(1c),∗Josh,Williams,is,with,the,Hartree,Centre,,STFC,Royal,Observatory,Edinburgh,,Blackford,Hill,,Edinburgh,,EH9,3HJ,,UK.,†Ubaid,Ali,Qadri,is,with,the,Hartree,Centre,,STFC,Daresbury,Laboratory,,Warrington,,UK.,‡Sue,Thorne,is,with,the,Hartree,Centre,,STFC,Rutherford,Appleton,Laboratory,,Harwell,,UK.,1,(a),(b),Figure,1:,Flow,configuration,(a),and,wall-refined,mesh,(b),for,differentially,heated,cavity,problem.,Arrows,in,panel,(a),indicate,the,direction,of,fluid,motion,due,to,the,buoyancy,force,(gravity,acting,downwards).,Grey,lines,on,the,top,and,bottom,boundaries,are,used,as,these,can,be,assigned,to,be,conducting,or,insulating.,Left,and,right,boundaries,always,use,Dirichlet,boundary,conditions,with,TL,=,1,and,TR,=,0.,(a),(b),Figure,2:,Baseflow,from,vertical,slot,convection,with,conducting,top,and,bottom,boundary,conditions,at,Ra,=,2.1,×,106,and,P,r,=,0.71.,Panels,show,(a),temperature,and,(b),velocity.,All,simulations,were,performed,in,Nektar++,(https://www.nektar.info),[Cantwell,et,al.,,2015;,Moxey,et,al.,,2020],using,a,wall-refined,mesh,(Figure,1b),and,a,polynomial,order,6.,For,the,top,and,bottom,boundaries,,we,considered,conducting,and,insulating,boundary,conditions,for,temperature.,From,results,reported,by,UKAEA,[Threlfall,et,al.,,2023],,the,conducting,boundary,conditions,yields,a,lower,critical,Rayleigh,number,,Rac,and,a,simpler,stability,frontier.,The,conducting,boundary,conditions,give,a,linear,variation,of,T,across,the,top,and,bottom,boundaries,[Saglietti,et,al.,,2017],TT,(x),=,TB,=,TL,−,∆T,(x/L),,(2),where,TT,and,TB,are,the,temperatures,on,the,top,and,bottom,boundaries,,respectively.,∆T,is,the,temperature,difference,across,the,cavity,(∆T,=,1,in,this,study),,x,is,the,coordinate,in,the,horizontal,direction,,L,is,the,horizontal,length,of,the,cavity,(L,=,1,in,this,study).,The,critical,Rayleigh,number,of,the,flow,with,conducting,boundary,conditions,is,Rac,≈,2.1,×,106,,which,gave,the,baseflow,shown,in,Figure,2.,The,insulating,boundary,conditions,are,Neumann,boundary,conditions,,given,as,n,·,∇T,=,0,(3),at,the,top,and,bottom,boundaries,,where,n,is,a,unit,normal,vector,at,the,boundary.,The,critical,Rayleigh,number,of,the,flow,with,insulating,boundary,conditions,is,Rac,≈,1.8×108,,which,gave,the,baseflow,shown,in,Figure,3.,2,TL=1TR=0,(a),(b),Figure,3:,Baseflow,from,vertical,slot,convection,with,insulating,top,and,bottom,boundary,conditions,at,Ra,=,1.8,×,108,and,P,r,=,0.71.,Panels,show,(a),temperature,and,(b),velocity.,2.2,Stability,analysis,The,linearised,equations,are,then,′,∇,·,u,=,0,,′,∂tu,+,u,·,∇u,′,′,+,u,·,∇u,=,−∇p,+,P,r,√,Ra,′,∇2u,+,P,rT,′,y,,′,∂tT,+,u,·,∇T,′,′,+,u,·,∇T,=,1,√,Ra,∇2T,′,,,which,can,also,be,expressed,in,compact,notation,as,′,∂tq,′,=,Lq,(4a),(4b),(4c),(5),′,′,′,′,′,of,the,form,q,is,the,perturbed,state,vector,(q,]),,and,L,is,the,linear,differential,operator.,Eigenmodes,where,q,′,=,exp,(λt)ˆq,are,desired,to,assess,the,asymptotic,stability,of,perturbations,to,the,of,q,flow,,where,λ,=,σ,+,iω,is,the,complex,eigenvalue,and,ˆq,=,[ˆu,,ˆT,],is,the,direct,global,mode.,The,growth,rate,is,found,by,σ,=,Re(λ),and,frequency,is,ω,=,Im(λ).,=,[u,,,T,Similarly,,we,define,the,adjoint,state-vector,as,q+,and,the,adjoint,global,modes,as,ˆq+.,The,adjoint,global,modes,describe,the,receptivity,of,the,system,to,open-loop,forcing,(see,reviews,such,as,Schmid,and,Brandt,[2014],,Luchini,and,Bottaro,[2014],or,Magri,[2019]).,From,the,derivation,in,Appendix,A,,the,adjoint,equations,are,∇,·,u+,=,0,∂tu+,+,u,·,∇u+,+,u+,·,∇u,=,−∇p,+,P,r,√,Ra,′,∇2u,−,T,+∇T,∂tT,+,+,u,·,∇T,+,=,1,√,Ra,∇2T,+,+,P,r,(cid:0)u+,·,y(cid:1),(6a),(6b),(6c),We,are,interested,in,perturbations,to,the,left,wall,temperature,,δTL,,which,may,act,at,the,level,of,L),or,as,a,steady,forcing,on,the,baseflow,(δT,L).,The,former,is,derived,in,L,is,found,to,the,linearised,equations,(δT,Appendix,A,,where,the,sensitivity,gradient,of,the,eigenvalue,with,respect,to,changes,in,T,be,′,′,∂T,′,L,λ,=,T,+,L,=,1,√,Ra,∇T,+,·,n,(7),and,λ,is,the,eigenvalue,of,the,flow.,The,right-hand,side,can,be,computed,from,the,adjoint,global,mode,[Qadri,,2014].,3,The,process,of,finding,the,sensitivity,to,steady,forcing,on,the,baseflow,requires,the,definition,of,an,adjoint,baseflow,,q+,,which,is,derived,in,subsection,A.1.,The,adjoint,baseflow,equations,are,∇,·,u+,=,0,,u+,·,∇u,+,u,·,∇u+,=,−ˆu,·,∇ˆu+,−,ˆu+,·,∇ˆu,−,ˆT,+∇,ˆT,−,T,+,∇T,+,P,r,√,Ra,∇2u+,−,∇p+,,+,u,·,∇T,=,−ˆu,·,∇,ˆT,+,+,1,√,Ra,+,∇2T,+,P,r(y,·,u+),,(8a),(8b),(8c),where,the,global,modes,appear,on,the,right-hand,side,of,the,momentum,and,temperature,transport,equations,as,forcing,terms:,the,implementation,of,this,in,Nektar++,is,described,in,Appendix,B.,Due,to,this,,we,must,normalise,the,global,modes.,Following,Giannetti,and,Luchini,[2007],,we,normalise,the,direct,and,adjoint,global,modes,as,and,max,x,y∈Ω,|ˆq(x,,y)|,=,1,⟨ˆq+,,ˆq⟩,=,1.,(9),(10),The,normalisations,in,(9),and,(10),are,a,pre-processing,step,on,the,global,modes,in,the,process,of,setting,up,the,adjoint,baseflow,problem.,Additionally,,this,should,be,done,when,computing,the,‘wavemaker’,to,allow,the,structural,sensitivity,to,be,computed,as,the,product,of,the,direct,and,adjoint,eigenmodes,,S,=,ˆqˆq+.,The,adjoint,baseflow,wall,temperature,is,equal,to,the,sensitivity,of,the,eigenvalue,to,perturbations,in,T,L,,which,is,found,to,be,∂δT,L,λ,=,T,+,L,=,1,√,Ra,∇T,+,.,(11),2.3,Numerical,method,and,verification,Eigenvalues,of,the,direct,and,adjoint,governing,equations,were,found,using,a,modified,Arnoldi,algorithm,developed,by,Barkley,et,al.,[2008],for,time-stepper,codes,such,as,Nektar++.,We,found,this,to,require,fewer,iterations,of,the,outer,loop,(e.g.,full,computations,of,q,for,a,specified,TArnoldi),than,the,commonly,used,ARPACK,library,[Lehoucq,et,al.,,1998],,making,it,computationally,less,expensive.,The,number,of,steps,used,to,evolve,the,direct,and,adjoint,equations,was,determined,by,TArnoldi,,which,we,estimated,to,be,20%,of,the,instability,period,given,by,Le,Qu´er´e,and,Behnia,[1998],of,21,time,units,for,Ra,=,1.8,×,108,with,insulating,boundaries.,The,direct,and,adjoint,analyses,used,the,same,time-step,as,the,forward,simulations,(∆t,=,2,×,10−3,time,units).,′,The,accuracy,of,the,global,mode,calculations,can,be,assessed,by,comparing,the,direct,and,adjoint,eigenvalue,spectra,[Saglietti,et,al.,,2017],,where,the,real,and,imaginary,values,of,each,mode,should,overlap.,We,verify,this,for,P,r,=,0.71,and,Ra,=,1.5,×,106,with,conducting,boundary,conditions.,The,rationale,behind,this,choice,is,discussed,below.,As,shown,in,Figure,4,,the,eigenvalues,from,the,adjoint,and,direct,analysis,are,in,close,agreement.,The,mean,error,was,found,to,be,2.3,×,10−6.,This,accuracy,of,the,adjoint,sensitivity,gradient,(7),can,be,assessed,against,a,gradient,obtained,from,a,finite-difference,approximation,[Vishnampet,et,al.,,2015],,Figure,5.,The,gradient,error,should,scale,linearly,with,the,perturbed,value,δT,L,or,δT,L.,The,change,in,growth,rate,due,to,deviations,in,the,baseflow,temperature,,δT,L,,are,then,found,by,′,σ(T,L,+,δT,L),−,(cid:16),σ(T,L),+,δT,L,(cid:80),T,(cid:17),+,L,(xL),σ(T,L),ε,=,.,(12),This,requires,simulations,of,a,new,baseflow,for,each,T,L,+,δT,L,value.,Therefore,,to,minimise,the,com-,putational,overhead,,we,use,the,case,with,Rac,=,1.5,×,106,,P,r,=,0.71,and,conducting,top,and,bottom,walls,since,the,kinetic,energy,was,found,to,decay,to,a,constant,value,after,a,long,enough,time.,This,was,advantageous,as,it,avoided,using,the,(adaptive),selective,frequency,damping,method,[˚Akervik,et,al.,,2006;,Jordi,et,al.,,2015],,which,is,required,to,obtain,a,baseflow,for,unsteady,flows,and,can,be,time-consuming,to,converge,(although,this,method,is,used,later,for,higher,Ra,baseflows).,4,Figure,4:,Real,and,imaginary,components,from,adjoint,and,direct,global,modes,,shown,compared,to,a,unit,circle,(dotted,line).,Tests,were,performed,with,Rac,=,1.5,×,106,and,P,r,=,0.71,using,conducting,top,and,bottom,walls.,Figure,5:,Error,in,predicted,growth,rate,with,changes,in,δT,L,,compared,to,predictions,from,the,adjoint,gradient.,Tests,were,performed,with,Rac,=,1.5,×,106,and,P,r,=,0.71,using,conducting,top,and,bottom,L,=,10−9,−10−3,is,linear,(slope,=,0.99),and,becomes,walls.,The,(logarithm),slope,of,errors,in,the,range,δT,constant,at,sufficiently,small,perturbations,as,reported,by,Vishnampet,et,al.,[2015].,′,5,1.00.50.00.51.0Re1.00.50.00.51.0ImAdjointDirect12108642Residual1011109107105103TL107106105104103102101100,[%]linear,slope,(a),ˆT,(b),ˆT,+,(c),|ˆu|,(d),|ˆu+|,Figure,6:,Adjoint,and,direct,global,modes,with,conducting,top,and,bottom,wall,boundary,conditions,,near,the,critical,Rayleigh,number,Ra,=,2.1,×,106,,P,r,=,0.71,,replicating,conditions,from,Saglietti,et,al.,[2017].,Growth,rate,and,frequency,were,σ,=,1.56,×,10−3,and,ω,=,±0.229,,respectively.,3,Results,3.1,Adjoint,and,direct,global,modes,Figure,6(a,c),shows,the,largest,magnitude,direct,global,mode,of,the,conducting,boundary,problem,,which,is,a,complex,mode,of,σ,=,1.56,×,10−3,and,ω,=,±0.229.,Its,adjoint,counterpart,is,shown,in,Figure,6(b,d).,The,structure,of,both,the,adjoint,and,direct,modes,are,in,agreement,with,Saglietti,et,al.,[2017].,The,direct,temperature,eigenmode,is,strongest,at,the,start,of,the,thermal,boundary,layer,,whereas,the,direct,velocity,eigenmode,is,more,intense,as,the,boundary,layer,is,more,developed.,The,adjoint,eigenmodes,are,concentrated,on,the,horizontal,walls,,where,the,upper,boundary,of,the,baseflow,shows,an,interface,between,hot,fluid,carried,towards,the,cold,wall,by,its,inertia,,and,the,cooled,portion,of,the,conducting,boundary,(Figure,2,,upper,boundary).,The,same,is,true,for,the,lower,wall,,where,there,is,an,interface,between,the,heated,portion,of,the,conducting,wall,and,the,cold,fluid.,The,adjoint,eigenmodes,show,that,these,areas,are,most,receptive,to,temperature,and,velocity,forcing.,The,structural,sensitivity,of,the,conducting,boundary,configuration,shows,a,weak,sensitivity,along,the,vertical,boundaries,(Figure,7),,except,for,the,ˆT,·,ˆv+,component,,which,appears,to,have,a,stabilizing,effect,on,the,eigenmode,(due,to,the,negative,sign).,The,low,sensitivity,of,ˆv,and,ˆv+,modes,can,be,attributed,to,the,adjoint,modes,being,primarily,concentrated,along,the,horizontal,boundaries.,The,most,sensitive,regions,are,where,the,boundary,layer,attached,to,the,horizontal,walls,approaches,the,fixed,temperature,walls.,This,demonstrates,that,the,detachment,of,the,thermal,boundary,layer,in,the,baseflow,as,the,hot,fluid,convects,towards,the,cooled,half,of,the,domain,(x,>,0.5),is,the,main,source,of,instability.,The,largest,magnitude,direct,modes,for,the,insulating,boundary,problem,are,shown,in,Figure,8,(a,c),,and,their,adjoint,in,Figure,8,(b,d).,Our,predicted,period,of,oscillation,τ,=,2π/ω,=,21.92,agrees,well,with,Le,Qu´er´e,and,Behnia,[1998],,who,predicted,τ,between,21,and,22,,depending,on,Ra.,This,shows,the,least,stable,region,to,be,in,the,top,left,and,lower,right,corners,where,the,boundary,layer,detaches,(Figure,3).,The,adjoint,velocity,eigenmode,shows,an,intense,thin,layer,on,the,top,and,bottom,walls,,situated,near,the,corners,,where,the,baseflow,boundary,layer,separates,(Figure,8d).,The,structural,sensitivity,tensor,for,insulating,boundary,conditions,demonstrates,a,strong,sensitivity,in,the,two,opposing,corners,where,the,boundary,layer,detaches,(Figure,9).,The,ˆu,and,ˆu+,modes,appear,to,have,a,relatively,low,influence,due,to,the,coupling,between,T,and,v,,and,also,the,fact,that,the,insulating,conditions,impose,no,thermal,boundary,layer,on,the,horizontal,boundaries,(unlike,the,conducting,wall,configuration,,Figure,7).,3.2,Sensitivity,to,heated,wall,temperature,The,sensitivity,of,the,leading,eigenvalue,to,steady,and,unsteady,wall,temperature,variations,is,shown,in,Figure,10.,The,conducting,wall,configuration,shows,an,overall,stabilizing,effect,on,the,flow,for,steady,forcing,at,the,bottom,of,the,boundary,(Figure,10a).,Unsteady,forcing,provided,an,overall,destabilizing,effect,on,the,flow,,however,the,integral,of,the,gradient,over,the,wall,gave,a,value,of,0.18,and,a,maximum,value,of,0.3,which,was,significantly,lower,than,the,steady,forcing,integral,of,-0.8,and,a,(absolute),value,of,4.2,(in,the,negative,direction).,This,shows,the,largest,change,in,eigenvalue,would,be,obtained,by,steady,forcing,on,the,lower,half,of,the,wall,,particularly,near,the,onset,of,the,boundary,layer,at,y,≈,0.1.,Low,sensitivity,to,unsteady,forcing,was,also,found,by,Qadri,[2014],when,studying,the,effect,of,a,heated,ring,in,a,low-density,jet,(Figure,4.5,in,Qadri,[2014]).,6,Figure,7:,Wavemaker,from,vertical,slot,convection,with,conducting,top,and,bottom,boundary,conditions,at,Ra,=,2.1,×,106,and,P,r,=,0.71.,(a),ˆT,(b),ˆT,+,(c),|ˆu|,(d),|ˆu+|,Figure,8:,Adjoint,and,direct,global,modes,near,the,critical,Rayleigh,number,Ra,=,1.8,×,108,,P,r,=,0.71,,replicating,conditions,from,Le,Qu´er´e,and,Behnia,[1998],and,Threlfall,et,al.,[2023].,The,growth,rate,and,frequency,are,σ,=,−3.5,×,10−4,,and,ω,±,0.29.,7,Figure,9:,Wavemaker,from,vertical,slot,convection,with,insulating,top,and,bottom,boundary,conditions,at,Ra,=,1.8,×,108,and,P,r,=,0.71.,8,(a),Conducting,walls,(b),Insulating,walls,Figure,10:,Sensitivity,of,eigenvalue,with,respect,to,steady,and,unsteady,wall,temperature,forcing.,Panels,show,(a),conducting,horizontal,walls,(Ra,=,2.1×106),and,(b),insulating,horizontal,walls,(Ra,=,1.8×108).,The,insulating,horizontal,wall,configuration,shows,a,peak,sensitivity,to,steady,forcing,as,the,boundary,layer,departs,towards,the,upper,horizontal,wall,at,y,≈,0.85,(Figure,10b).,In,high-aspect,ratio,cavities,,Gadoin,et,al.,[2001],proposed,the,flow,is,most,sensitive,to,unsteady,forcing,at,start,of,the,boundary,layer,formation,(y/H,≈,1/3),,based,on,the,adjoint,global,modes.,In,contrast,,we,find,the,flow,is,most,receptive,to,being,destabilized,by,unsteady,forcing,at,y,≈,0.9,which,corresponds,to,the,peak,value,of,∇,ˆT,+,,which,is,due,to,(7).,The,oscillating,sensitivity,of,∂T,L,λ,between,0,<,y,<,0.7,(Figure,10b),can,be,attributed,to,the,internal,waves,that,appear,across,the,diagonal,structure,of,the,global,modes,(Figure,8).,Compared,to,the,conducting,wall,configuration,(Figure,10a),,the,absolute,value,of,peak,sensitivity,of,the,insulating,walls,to,steady,temperature,forcing,is,three,times,larger,(13.1,compared,to,4.3).,However,,the,integral,of,the,sensitivity,over,the,wall,surface,is,slightly,larger,for,the,conducting,wall,configuration,(-0.8),compared,to,the,insulating,wall,configuration,(-0.68).,If,practical,limitations,imposed,that,wall,temperature,forcing,could,only,be,applied,to,the,entire,boundary,,it,would,therefore,be,more,effective,in,the,case,of,conducting,boundary,conditions.,4,Conclusions,We,have,studied,the,global,stability,of,a,differentially-heated,square,cavity,under,conducting,and,in-,sulating,horizontal,boundary,conditions,,using,the,spectral,element,software,Nektar++.,To,find,the,sensitivity,of,the,eigenvalue,with,respect,to,wall,temperature,variations,,we,derived,a,continuous,adjoint,formulation.,Wall,temperature,sensitivity,profiles,showed,high,sensitivity,to,steady,forcing,when,in,both,flow,configurations,studied.,The,receptivity,to,unsteady,wall,temperature,forcing,was,significantly,lower,than,steady,forcing,,which,agrees,with,the,results,of,Qadri,[2014],in,low-density,jets.,In,the,insulating,configuration,,we,observed,a,peak,sensitivity,to,steady,forcing,on,the,upper,region,of,the,wall,where,the,boundary,layer,detaches,(y,≈,0.9),,which,acts,to,stabilize,the,flow.,The,peak,sensitivity,of,the,conducting,configuration,was,at,the,onset,of,the,boundary,layer,(y,≈,0.1),,which,also,acted,to,stabilize,the,flow.,The,peak,sensitivity,value,was,higher,for,an,insulating,wall,configuration,,although,the,integral,of,sensitivity,over,the,entire,boundary,was,similar.,As,the,adjoint,global,modes,of,the,conducting,wall,problem,were,mainly,focused,along,the,horizontal,boundaries,,temperature,or,horizontal,velocity,forcing,on,the,horizontal,boundary,may,yield,a,stronger,response,in,future,research.,Appendix,A,Continuous,adjoint,derivation,To,find,the,sensitivity,of,the,cost,function,,J,,,to,changes,in,the,linear,operator,,we,define,a,constrained,optimisation,problem,where,the,adjoint,variables,are,Lagrange,multipliers,constraining,the,solution,to,(4).,The,effect,of,changes,in,the,wall,temperature,investigated,in,this,study,will,act,on,the,baseflow,(considered,in,subsection,A.1),and,the,linear,perturbation,(considered,in,this,section).,We,write,the,9,420240.00.20.40.60.81.0yTLT0L100100.00.20.40.60.81.0yTLT0L,Lagrangian,as,′,+,u,·,∇u,′,+,u,′,′,·,∇u,+,∇p,−,P,rRa−1/2∇2u,′,+,P,rT,′,y⟩,′,L,=J,−,⟨u+,,∂tu,−,⟨p+,,∇,·,u,−,⟨T,+,,∂tT,−,[T,+,L,,,T,′,′,⟩,(xL,,t),−,T,′,L],,+,u,·,∇T,′,′,+,u,·,∇T,−,Ra−1/2∇2T,′,⟩,where,we,define,the,inner,products,as,⟨a(x,,t),,b(x,,t)⟩,=,[a(x,,t),,b(x,,t)],=,(cid:90),Ω,(cid:90),Γ,a(x,,t)T,b(x,,t)dΩ,a(x,,t)T,b(x,,t)dΓ.,Ω,is,the,simulation,domain,(internal,field),and,Γ,is,a,boundary.,(13),(14),(15),To,find,the,sensitivity,of,the,cost,function,to,changes,in,the,linear,operator,,we,must,calculate,partial,derivatives,of,L,with,respect,to,q+,and,q,.,The,sensitivity,is,′,δL,=,(cid:28),δL,′(cid:29),(cid:28),δL,′(cid:29),(cid:28),δL,′(cid:29),+,δu′,,,δu,(cid:28),δL,δu+,,,δu+,(cid:29),+,δp′,,,δp,(cid:28),δL,δp+,,,δp+,+,+,δT,′,,,δT,(cid:28),δL,(cid:29),δT,+,,,δT,+,+,(cid:20),δL,δT,′,L,(cid:29),+,,,δT,(cid:21),′,L,(cid:20),δL,δT,+,L,+,(cid:21),.,,,δT,+,L,Each,term,in,(16),must,then,be,expanded.,The,first,term,is,therefore,(cid:28),δL,δu′,,,δu,′(cid:29),=,(cid:28),δJ,′(cid:29),δu′,,,δu,(cid:68),u+,,∂tδu,(cid:68),p+,,∇δu,′(cid:69),−,−,−,(cid:68),T,+,,δu,′,·,∇T,(cid:69),,,′,+,u,·,∇δu,′,′,+,δu,·,∇u,−,P,rRa−1/2∇2δu,′(cid:69),which,can,be,written,after,integration,by,parts,as,(16),(17),(cid:28),δL,δu′,,,δu,′(cid:29),=,(cid:28),δJ,′(cid:29),δu′,,,δu,(cid:28),−,−,(cid:20),P,r,√,Ra,∂tu+,+,u,·,∇u+,+,u+,·,∇u,+,∇p+,+,∇u+,·,n,+,(cid:0)uu+(cid:1),·,n,+,p+n,+,T,+T,′,n,,δu,∇u+,+,T,+∇T,,,δu,′(cid:29),(18),P,r,√,Ra,′(cid:21),+,(cid:20),P,r,√,Ra,′(cid:21),u+,,∇δu,.,′,The,differentiation,of,the,functional,with,respect,to,δp,is,(cid:28),δL,′(cid:29),(cid:28),δJ,δp′,,,δp,=,δp′,,,δp,′(cid:29),(cid:68),−,∇,·,u+,,δp,′(cid:69),(cid:104),u+,·,n,,δp,′(cid:105),.,+,The,differentiation,of,the,functional,with,respect,to,δT,′,is,(cid:28),δL,δT,′,,,δT,′(cid:29),=,(cid:28),δJ,′(cid:29),δT,′,,,δT,(cid:68),u+,,P,ryδT,′(cid:69),−,(cid:10)p+,,0(cid:11),(cid:28),T,+,,∂tδT,′,+,u,·,∇δT,′,−,′(cid:29),∇2δT,1,√,Ra,−,−,(cid:104),T,+,L,,,δT,′(cid:105),,,−,10,(19),(20),which,after,integration,by,parts,gives,us,(cid:28),δL,δT,′,,,δT,′(cid:29),=,(cid:28),δJ,′(cid:29),δT,′,,,δT,(cid:28),−,∂tT,+,+,u,·,∇T,+,+,∇2T,+,−,P,r,(cid:0)y,·,u+(cid:1),,,δT,′(cid:29),1,√,Ra,∇T,+,·,n,+,T,+,L,,,δT,′(cid:21),(cid:20),T,+u,·,n,+,−,1,√,Ra,+,(cid:20),1,√,Ra,T,+n,,∇δT,′(cid:21),.,The,differentiation,of,the,functional,with,respect,to,δT,′,L,is,(cid:21),(cid:20),δL,δT,′,L,(cid:21),=,,,δT,′,L,(cid:20),δJ,δT,′,L,,,δT,′,L,(cid:104),−,′,T,+,L,,,δT,L,(cid:105),.,(21),(22),We,aim,to,find,the,sensitivity,of,the,eigenmode,to,changes,in,the,wall,temperature.,We,therefore,set,J,=,λ,,which,substitute,into,(22),to,give,(cid:20),δL,δT,′,L,(cid:21),,,δT,′,L,=,(cid:104),∂T,′,L,λ,,δT,′,L,(cid:105),(cid:104),−,′,T,+,L,,,δT,L,(cid:105),,,where,at,the,boundary,,we,obtain,(cid:16),∂T,′,L,λ,(cid:17),Γ,=,T,+,L,.,(23),(24),By,setting,u,=,0,at,the,wall,in,(21),(terms,in,[·,,δT,below:,′,]),and,combining,with,(24),,we,obtain,the,relationship,∂T,′,L,λ,=,T,+,L,=,1,√,Ra,∇T,+,·,n,,(25),which,can,be,obtained,from,the,adjoint,global,mode,[Qadri,,2014].,This,is,in,line,with,Meliga,et,al.,[2010],,who,studied,sensitivity,to,wall,temperature,(Tw),perturbations,in,compressible,flow.,They,derived,the,following,relationship:,∂Tw,λ,=,T,+,w,=,γ,P,rRe,∇T,+,·,n,,(26),where,γ/(P,rRe),is,the,diffusion,coefficient,in,the,temperature,transport,equation.,A.1,Base,flow,sensitivity,Steady,variations,in,the,wall,temperature,implies,the,Lagrangian,must,be,extended,to,include,so,called,“adjoint,baseflow”,fields,,q+.,The,functional,is,therefore,L,=λ,−,⟨u+,,λˆu,+,u,·,∇ˆu,+,ˆu,·,∇u,+,∇ˆp,−,P,rRa−1/2∇2,ˆu,+,P,r,ˆT,y⟩,(27),−,⟨p+,,∇,·,ˆu⟩,−,⟨T,+,,λ,ˆT,+,u,·,∇,ˆT,+,ˆu,·,∇T,−,Ra−1/2∇2,ˆT,⟩,−,⟨u+,,u,·,∇u,+,∇¯p,−,P,rRa−1/2∇2u,+,P,rT,y⟩,−,⟨p+,,∇,·,u⟩,+,−,⟨T,,,u,·,∇T,−,Ra−1/2∇2T,⟩,−,[T,+,L,,,T,(xL,,t),−,T,L].,11,To,find,the,sensitivity,of,the,cost,function,to,changes,in,the,linear,operator,,we,must,calculate,partial,derivatives,of,L,with,respect,to,q+,and,q,.,The,sensitivity,is,(cid:28),δL,′(cid:29),(cid:28),δL,(cid:28),δL,′(cid:29),′(cid:29),(cid:29),(cid:29),′,δT,′,,,δT,+,(cid:28),δL,δu,,,δu,+,,,δT,(cid:28),δL,δT,δL,=,+,(cid:28),δL,δT,+,,,δT,+,(cid:29),+,+,(cid:28),δL,δu,(cid:29),+,,,δu+,+,(cid:28),δL,δT,+(cid:29),,,δT,(28),+,(cid:29),(cid:21),+,′,L,,,δT,δu′,,,δu,(cid:20),δL,δT,′,L,(cid:28),δL,δu+,,,δu+,(cid:20),δL,(cid:21),δT,+,L,,,δT,+,L,+,+,+,(cid:21),+,,,δT,L,δp′,,,δp,(cid:20),δL,δT,L,(cid:28),δL,δp+,,,δp+,(cid:35),δL,+,L,,,δT,δT,+,L,(cid:34),+,(cid:29),+,Each,term,in,(28),must,then,be,expanded.,The,first,base,flow,term,is,therefore,(cid:28),δL,δu,(cid:29),,,δu,=∂δuλ,−,⟨u+,,δu,·,∇ˆu,+,ˆu,·,∇δu⟩,−,⟨T,+,,δu,·,∇,ˆT,⟩,−,⟨u+,,u,·,∇δu,+,δu,·,∇u,−,P,rRa−1/2∇2δu⟩,−,⟨p+,,∇,·,δu⟩,+,−,⟨T,,,δu,·,∇T,⟩,,(29),which,,after,integration,by,parts,gives,(cid:28),δL,δu,=∂δuλ,,,δu,(cid:29),(cid:28),−,u+,·,∇ˆu,+,ˆu,·,∇u+,+,T,+∇,ˆT,+,T,+,∇T,+,u+,·,∇u,+,u,·,∇u+,−,∇2u+,+,∇p+,,δu,(cid:29),.,P,r,√,Ra,(30),The,variations,with,respect,to,baseflow,temperature,can,be,expanded,as,(cid:29),,,δT,(cid:28),δL,δT,=∂δT,λ,−,⟨T,+,,ˆu,·,∇δT,⟩,−,⟨u+,,P,ryδT,⟩,−,⟨T,(cid:104),T,−,+,,,u,·,∇δT,−,Ra−1/2∇2δT,⟩,+,L,,,δT,(cid:105),,,(31),which,after,integration,by,parts,gives,(cid:28),δL,δT,,,δT,(cid:29),=∂δT,λ,−,⟨T,+,,ˆu,·,∇δT,⟩,(cid:68),ˆu,·,∇T,+,+,u,·,∇T,+,+,P,r(y,·,u+),−,Ra−1/2∇2T,(cid:69),+,,,δ,ˆT,(32),(cid:104),Ra−1/2∇T,+,+,T,+,L,,,δT,(cid:105),.,−,−,This,gives,the,following,equations,for,the,adjoint,base,flow:,∇,·,u+,=,0,,u+,·,∇u,+,u,·,∇u+,=,−ˆu,·,∇ˆu+,−,ˆu+,·,∇ˆu,−,ˆT,+∇,ˆT,−,T,+,∇T,+,P,r,√,Ra,∇2u+,−,∇p+,,+,u,·,∇T,=,−ˆu,·,∇T,+,+,1,√,Ra,+,∇2T,+,P,r(y,·,u+),,where,the,sensitivity,gradient,can,be,computed,from,the,temperature,gradient,at,the,boundary,as,T,+,L,=,1,√,Ra,+,∇T,=,∂δT,L,λ.,12,(33a),(33b),(33c),(34),Appendix,B,Proxy-app,usage,details,The,global,mode,forcing,in,(8),has,been,implemented,in,our,proxy-app,,and,can,be,called,in,the,Nektar++,xml,file,as:,,,,,,,,...,,,GlobalModeForcing,,,...,,This,required,the,addition,of,a,new,forcing,term,in,the,modified,Navier-Stokes,solver,(ForcingGlobalMode.,cpp,,alongside,the,necessary,file).,This,consists,of,two,steps,at,initialisation:,(i),read,adjoint,and,direct,global,modes;,(ii),apply,normalisations,in,(9),and,(10).,Then,,at,each,step,the,forcing,terms,are,computed,and,applied.,For,simplicity,,this,is,done,at,each,step,as,this,was,closer,to,the,existing,adjoint-related,code,such,as,AdjointAdvection.cpp,and,other,forcing,terms.,However,,since,the,fields,are,stationary,(they,are,obtained,from,previously,computed,flows),,the,calculation,of,derivatives,and,summation,of,each,term,could,be,done,at,the,beginning,(unless,a,time-varying,global,mode,was,used).,References,E.,˚Akervik,,L.,Brandt,,D.,S.,Henningson,,J.,Hœpffner,,O.,Marxen,,and,P.,Schlatter.,Steady,solutions,of,the,navier-stokes,equations,by,selective,frequency,damping.,Physics,of,fluids,,18(6),,2006.,D.,Barkley,,H.,M.,Blackburn,,and,S.,J.,Sherwin.,Direct,optimal,growth,analysis,for,timesteppers.,International,journal,for,numerical,methods,in,fluids,,57(9):1435–1458,,2008.,C.,D.,Cantwell,,D.,Moxey,,A.,Comerford,,A.,Bolis,,G.,Rocco,,G.,Mengaldo,,D.,De,Grazia,,S.,Yakovlev,,J.-,E.,Lombard,,D.,Ekelschot,,et,al.,Nektar++:,An,open-source,spectral/hp,element,framework.,Computer,physics,communications,,192:205–219,,2015.,E.,Gadoin,,P.,Le,Qu´er´e,,and,O.,Daube.,A,general,methodology,for,investigating,flow,instabilities,International,Journal,for,in,complex,geometries:,application,to,natural,convection,in,enclosures.,Numerical,methods,in,fluids,,37(2):175–208,,2001.,F.,Giannetti,and,P.,Luchini.,Structural,sensitivity,of,the,first,instability,of,the,cylinder,wake.,Journal,of,Fluid,Mechanics,,581:167–197,,2007.,B.,E.,Jordi,,C.,J.,Cotter,,and,S.,J.,Sherwin.,An,adaptive,selective,frequency,damping,method.,Physics,of,Fluids,,27(9),,2015.,A.,Kord,and,J.,Capecelatro.,Optimal,perturbations,for,controlling,the,growth,of,a,Rayleigh–Taylor,instability.,Journal,of,Fluid,Mechanics,,876:150–185,,2019.,P.,Le,Qu´er´e,and,M.,Behnia.,From,onset,of,unsteadiness,to,chaos,in,a,differentially,heated,square,cavity.,Journal,of,fluid,mechanics,,359:81–107,,1998.,R.,B.,Lehoucq,,D.,C.,Sorensen,,and,C.,Yang.,ARPACK,users’,guide:,solution,of,large-scale,eigenvalue,problems,with,implicitly,restarted,Arnoldi,methods.,SIAM,,1998.,T.,Luce.,Realizing,steady-state,tokamak,operation,for,fusion,energy.,Physics,of,Plasmas,,18(3):030501,,2011.,13,P.,Luchini,and,A.,Bottaro.,Adjoint,equations,in,stability,analysis.,Annual,Review,of,fluid,mechanics,,46:493–517,,2014.,L.,Magri.,Adjoint,methods,as,design,tools,in,thermoacoustics.,Applied,mechanics,reviews,,71(2),,2019.,P.,Meliga,,D.,Sipp,,and,J.-M.,Chomaz.,Open-loop,control,of,compressible,afterbody,flows,using,adjoint,methods.,Physics,of,Fluids,,22(5),,2010.,S.,Mordijck.,Taking,control,of,fusion,reactor,instabilities.,Physics,,15:154,,2022.,D.,Moxey,,C.,D.,Cantwell,,Y.,Bao,,A.,Cassinelli,,G.,Castiglioni,,S.,Chun,,E.,Juda,,E.,Kazemi,,K.,Lack-,hove,,J.,Marcon,,et,al.,Nektar++:,Enhancing,the,capability,and,application,of,high-fidelity,spectral/hp,element,methods.,Computer,Physics,Communications,,249:107110,,2020.,K.,H.,Nordlund,et,al.,European,research,roadmap,to,the,realisation,of,fusion,energy.,2018.,URL,https://,euro-fusion.org/wp-content/uploads/2022/10/2018_Research_roadmap_long_version_01.pdf.,U.,A.,Qadri.,Global,stability,and,control,of,swirling,jets,and,flames.,PhD,thesis,,University,of,Cambridge,,2014.,URL,https://www.repository.cam.ac.uk/handle/1810/245143.,U.,A.,Qadri,,L.,Magri,,M.,Ihme,,and,P.,J.,Schmid.,Using,adjoint-based,optimization,to,enhance,ignition,in,non-premixed,jets.,Proceedings,of,the,Royal,Society,A,,477(2245):20200472,,2021.,C.,Saglietti,,P.,Schlatter,,A.,Monokrousos,,and,D.,S.,Henningson.,Adjoint,optimization,of,natural,convection,problems:,differentially,heated,cavity.,Theoretical,and,Computational,Fluid,Dynamics,,31:,537–553,,2017.,P.,J.,Schmid,and,L.,Brandt.,Analysis,of,fluid,systems:,Stability,,receptivity,,sensitivity.,Applied,Mechanics,Review,,66(2):024803,,2014.,E.,Threlfall,,S.,Powell,,and,W.,Arter.,Uncertainty,quantification,code,integration,,acceptance,and,operation,1.,techreport,CD/EXCALIBUR-FMS/0073-M5c1,,UK,Atomic,Energy,Authority,,2023.,R.,Vishnampet,,D.,J.,Bodony,,and,J.,B.,Freund.,A,practical,discrete-adjoint,method,for,high-fidelity,compressible,turbulence,simulations.,Journal,of,Computational,Physics,,285:173–192,,2015.,J.,Williams,,U.,A.,Qadri,,and,S.,Thorne.,Review,of,adjoint,method,in,plasma,physics,for,NEPTUNE.,Technical,Report,2068625-TN-08,,UKAEA,,2023.,14
:pdfembed:`src:_static/TN-09_AdjointBasedSensitivityAnalysisDifferentiallyHeatedCavity.pdf, height:1600, width:1100, align:middle`