TN-17_ProgressImplementationSystem26EquationsWithinNektarFramework ================================================================== .. meta:: :description: technical note :keywords: Report,2047356-TN-17,(D5.3):,Progress,on,implementation,of,system,2-6,equations,David,Moxey,,King’s,College,London,Ben,Dudson,,Peter,Hill,,Ed,Higgins,,David,Dickinson,&,Steven,Wright,,University,of,York,15th,December,2022,Contents,1,Executive,summary,2,Introduction,3,Initial,solver,for,Blob2D,example,3.1,Discretisation,strategy,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,3.2,Test,case,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,4,Conclusions,and,outlook,1,Executive,summary,1,1,3,3,3,4,This,report,briefly,outlines,the,initial,efforts,on,implementing,the,system,2-6,equation,set,within,the,Nektar++,framework.,In,particular,,we,discuss,changes,made,to,the,equation,set,since,the,previous,deliverable,,and,outline,a,prototype,solver,for,a,simplified,set,of,equations,,as,well,as,the,future,development,pathway,for,system,2-6.,2,Introduction,In,the,initial,phase,of,the,NEPTUNE,project,,the,goal,of,the,team,at,KCL,and,ICL,has,been,to,enable,the,production,of,a,prototype,code,,based,on,the,Nektar++,framework,,for,a,set,of,spatially,2D,plasma,model,incorporating,velocity,space,effects.,As,outlined,in,previous,deliverables,,and,as,taken,from,the,initial,equations,document,supplied,at,the,beginning,of,NEPTUNE,[1],,these,were,formulated,in,the,system,2-6,equations.,As,discussed,in,the,previous,report,[2],,this,system,was,highly,complex,involving,not,only,a,large,number,of,parameters,,variables,and,equations,,but,a,large,amount,of,domain-specific,knowledge,in,terms,of,the,underlying,physics.,In,addition,the,following,issues,were,identified:,•,the,lack,of,an,existing,code,for,these,equations,,which,does,not,provide,an,easy,route,to,validation,of,the,code;,•,the,equations,in,their,current,form,may,be,challenging,to,discretise,under,the,typical,high-order,approaches,,and,some,aspects,are,unclear,(e.g.,numerical,flux,terms);,1,•,there,seemed,to,be,limited,opportunity,to,produce,simplified,versions,of,this,equation,set,to,naturally,’build-up’,the,complexity,of,the,solver,and,test,numerical,approaches,in,a,more,constrained,fashion.,As,part,of,discussions,with,UKAEA,and,the,NEPTUNE,partners,,we,have,therefore,aimed,to,define,a,new,equation,set,which,can,address,at,least,a,subset,of,these,issues.,Noting,the,development,of,Hermes,[3],at,the,University,of,York,,these,discussions,led,to,an,adjustment,in,the,latest,equations,document,[4],,considering,a,system,modelled,as,a,modified,version,of,those,found,in,the,latest,Hermes3,code,[5]:,(1),(2),(3),(4),∂ne,∂t,∂pe,∂t,∂pi,∂t,∂ω,∂t,where,=,−∇,·,(nevE×B),+,∇,·,jsh,+,necs,L∥,+,Sn,e,=,−∇,·,(pevE×B),−,=,−∇,·,(pivE×B),−,+,Sp,e,+,Df,pe∇,·,(κe⊥ne∇⊥kTe),+,Sp,i,+,Df,pi∇,·,(κi⊥ni∇⊥kTi),1,|qe|,γepecs,L∥,γepics,L∥,(cid:20),(cid:21),b,B,+,∇,·,jsh,+,Df,vs∇,·,ν∇⊥ω,=,−∇,·,(ωvE×B),+,∇,·,(pe,+,pi)∇,×,(cid:88),α,(cid:88),p,=,ρm,=,nαkTα,Aαmunα,cs,=,ne,=,α,(cid:114),p,ρm,(cid:88),α̸=e,Zαnα,=,Zini,ω,=,∇,·,∇,·,jsh,=,−,(cid:20),mi,Zi|qe|B2,∇⊥,|qe|Φ,kTref,|qe|necs,L∥,(cid:18),Nref|qe|Φ,+,(cid:19)(cid:21),1,Zi,pi,The,terms,above,are,left,undefined,for,brevity,,but,can,be,found,in,the,latest,equations,docu-,ment,[4].,This,set,of,equations,provides,a,more,flexible,approach,to,developing,a,solver:,•,there,is,a,known,reference,code,with,documented,examples;,•,the,terms,above,are,more,amenable,to,discretisation,and,numerical,fluxes,are,more,readily,defined;,•,moreover,there,is,a,tranche,of,equations,of,increasing,complexity,that,can,be,used,as,a,basis,for,development.,As,a,pathway,to,development,,we,therefore,plan,to,first,implement,simpler,models,with,the,numerical,hallmarks,of,the,system,above:,namely,,the,Blob2D,examples,,starting,from,a,single,species,isothermal,model,,and,then,moving,onto,versions,incorporating,multiple,species,and,full,turbulence,case.,These,are,found,on,the,Hermes3,website,[6].,The,rest,of,this,document,therefore,sets,out,initial,progress,in,the,implementation,of,the,first,(and,simplest),of,these,examples.,2,3,Initial,solver,for,Blob2D,example,As,a,first,step,,we,have,implemented,a,sample,solver,for,the,isothermal,transport,of,a,seeded,plasma,filament.,This,is,governed,by,the,equation,set,=,−∇,·,(nevE×B),+,1,e,∇,·,jsh,,(cid:18),=,−∇,·,(ωvE×B),+,∇,·,pe∇,×,∂ne,∂t,∂ω,∂t,1,B2,∇2ϕ,=,ω,,(cid:19),b,B,+,∇,·,jsh,,(5),(6),(7),where,•,pe,=,eneTe,is,the,pressure;,•,∇,·,jsh,=,neϕ/L∥,is,the,sheath,closure,In,addition,,we,look,to,implement,the,diamagnetic,drift,term,as,(cid:18),∇,·,pe∇,×,(cid:19),b,B,=,eTe,R2,∂ne,∂y,,,where,∇,×,(b/B),=,(0,,1,R2,),and,R,is,a,constant.,We,use,the,constants:,•,e,=,−1,is,the,electron,charge;,•,B,=,0.35,T;,•,Te,is,a,fixed,electron,temperature,(5,eV);,•,L∥,=,10,m,is,the,connection,length;,•,R,=,1.5,m,3.1,Discretisation,strategy,Functionally,these,equations,are,similar,in,form,to,the,Hasegawa-Wakatani,equations,,for,which,a,solver,based,on,Nektar++,already,exists,[7].,We,therefore,adopt,the,following,procedure,,using,an,explicit,timestepping,scheme:,•,Compute,the,potential,ϕ,by,solving,equation,(7),in,a,continuous,discretisation.,•,Use,this,to,compute,the,drift,velocity,vE×B,=,B−1(∂yϕ,,−∂xϕ).,•,Evaluate,the,terms,−∇,·,(nevE×B),and,−∇,·,(ωvE×B),using,a,DG,discretisation.,•,Finally,evaluate,all,other,source,terms.,This,solver,is,encapsulated,in,the,nektar-driftplane,solver,[8],3.2,Test,case,Following,the,test,case1,,we,set,up,a,basic,simulation,of,a,filament,,using,the,following,simulation,parameters:,•,The,domain,is,taken,as,Ω,=,[−0.5,,0.5]2,,with,periodic,boundary,conditions,used,on,all,sides.,1Test,case,found,here:,https://github.com/bendudson/hermes-3/tree/master/examples/blob2d,3,(a),t,=,0,(b),t,=,2,(c),t,=,4,Figure,1:,Example,of,Blob2D,simulation,with,snapshots,of,number,density,ne,at,three,time,intervals.,•,A,mesh,of,quadrilateral,elements,at,order,5,is,used,to,discretise,Ω.,•,Fourth,order,Runge-Kutta,timestepping,is,used,with,∆t,=,2,×,10−4.,•,The,various,parameter,values,above,are,passed,into,the,simulation,in,the,session,file.,•,As,initial,condition,we,use,ω,=,0,and,set,ne(x,,y,,0),=,1,+,h,exp,−,(cid:18),(cid:19),x2,+,y2,w2,where,h,=,0.5,and,w,=,0.05,as,in,the,Hermes3,example.,The,simulation,is,encapsulated,in,the,examples/blob2d,directory,of,the,drift,plane,solver,,and,can,be,run,either,in,serial,or,in,parallel,,using,e.g.,mpirun,-n,28,DriftPlaneSolver,driftwave.xml,square.xml.,A,sample,of,the,output,as,the,solution,evolves,in,time,can,be,seen,in,figure,1.,Visually,,there,is,a,clear,similarity,between,the,Hermes-3,output:,however,there,are,a,few,differences,that,require,additional,investigation:,•,Hermes-3,uses,a,mixture,of,periodic,and,Neumann,boundary,conditions;,•,The,Hermes-3,test,case,uses,a,Gaussian,centred,initially,at,x,=,−0.25,,rather,than,x,=,0,which,is,investigated,here;,•,the,coefficient,in,front,of,the,dn/dy,term,of,eq.,(6),is,difficult,to,determine,precisely,from,Hermes-3,and,may,explain,some,of,the,visual,differences.,4,Conclusions,and,outlook,This,deliverable,has,briefly,outlined,the,likely,development,route,for,the,revised,system,2-6,equations.,There,is,a,relatively,clear,development,pathway,,in,combination,with,partners,at,UKAEA,and,University,of,York.,•,Consider,the,addition,of,artificial,diffusion,terms,to,the,Blob2D,solver,,akin,to,the,diffu-,sion,noted,in,eqs.,(2),,(3),and,(4).,Use,of,an,explicit-in-time,diffusion,term,is,likely,to,add,increasingly,severe,timestep,restrictions.,Therefore,it,may,be,beneficial,to,consider,a,semi-implicit,approach,for,the,addition,of,diffusion.,4,•,Implementation,of,the,Hermes-3,Blob2D-Te-Ti,equations,,and,the,turbulent,version,of,these.,•,Finally,,extension,to,the,full,system,2-6,equations.,At,each,step,,numerical,performance,can,be,examined,in,detail,and,compared,against,the,equivalent,Hermes-3,solvers,,up,to,the,implementation,of,the,full,system,2-6.,References,[1],Wayne,Arter.,Equations,for,NEPTUNE,Proxyapps,(Version,1.00).,Technical,report,,UK,Atomic,Energy,Authority,,2020.,[2],D.,Moxey,,B.,Dudson,,P.,Hill,,E.,Higgins,,D.,Dickinson,,and,S.,Wright.,Report,2047356-tn-,13,(d5.1,+,d5.2):,Spatially,2-d,plasma,model,incorporating,velocity,space,effects.,Technical,report,,King’s,College,London,and,University,of,York,,March,2022.,[3],Benjamin,Daniel,Dudson,and,Jarrod,Leddy.,Hermes:,global,plasma,edge,fluid,turbulence,simulations.,Plasma,Physics,and,Controlled,Fusion,,59(5):054010,,2017.,[4],Wayne,Arter.,Equations,for,NEPTUNE,Proxyapps,(Version,1.23).,Technical,report,,UK,Atomic,Energy,Authority,,2022.,[5],Hermes,plasma,edge,simulation,model:,Hermes-3,,a,hot,ion,multifluid,drift-reduced,model.,https://github.com/bendudson/hermes-3.,Accessed,15th,December,2022.,[6],Hermes-3,examples.,https://hermes3.readthedocs.io/en/latest/examples.html.,Ac-,cessed,15th,December,2022.,[7],Nektar++,drift-wave,solver.,https://github.com/ExCALIBUR-NEPTUNE/,nektar-driftwave.,Accessed,15th,December,2022.,[8],Nektar++,drift-plane,solver.,https://github.com/ExCALIBUR-NEPTUNE/,nektar-driftplane.,Accessed,15th,December,2022.,5 :pdfembed:`src:_static/TN-17_ProgressImplementationSystem26EquationsWithinNektarFramework.pdf, height:1600, width:1100, align:middle`