TN-04-3_ConvergenceSolutions2D1VIonDriftKineticEquationWallBoundaryConditionsManufacture ======================================================================================== .. meta:: :description: technical note :keywords: Report,2070839-TN-04,1,Convergence,of,the,solutions,of,the,2D-1V,ion,drift,kinetic,equation,with,wall,boundary,conditions:,manufactured,solutions,tests,M.,R.,Hardman1,2,,J.,Omotani3,,M.,Barnes2,,S.,L.,Newton3,,and,F.,I.,Parra4,1,Tokamak,Energy,Ltd,,173,Brook,Drive,,Milton,Park,,Abingdon,,OX14,4SD,,United,Kingdom,2,Rudolf,Peierls,Centre,for,Theoretical,Physics,,University,of,Oxford,,Clarendon,Laboratory,,Parks,Road,,Oxford,OX1,3PU,,United,Kingdom,3,Culham,Centre,for,Fusion,Energy,,Culham,Science,Centre,,Abingdon,,Oxon,,OX14,3DB,,United,Kingdom,4,Princeton,Plasma,Physics,Laboratory,,P.O.,Box,451,,Princeton,,New,Jersey,08540,,United,States,E-mail:,michael.hardman@tokamakenergy.co.uk,1.,Introduction,The,aim,of,this,report,is,to,describe,an,investigation,into,the,convergence,of,2D,edge,plasma,model,with,collisionless,kinetic,ions,and,wall,boundary,conditions.,Previous,reports,introduced,tests,using,the,method,of,manufactured,solutions,–,these,tests,highlighted,poor,convergence,of,the,numerical,implementation,of,the,‘moment,kinetics’,model,in,the,presence,of,wall,boundaries,in,two,spatial,dimensions.,In,this,document,,we,will,demonstrate,the,causes,of,the,observed,poor,convergence.,One,source,of,poor,convergence,is,due,to,the,interaction,between,the,choice,of,numerical,scheme,and,the,form,of,the,ion,wall,boundary,condition.,We,show,that,this,issue,can,be,adequately,resolved,by,a,judicious,choice,of,numerical,resolutions,in,the,simulations,that,we,have,carried,out.,The,second,source,of,convergence,issues,is,due,to,a,wave-like,instability,that,emerges,in,simulations,with,a,radial,coordinate,and,a,temperature,gradient,in,the,coordinate,that,measures,distance,to,the,wall,plate.,This,instability,can,be,suppressed,with,adequate,numerical,dissipation,in,the,model.,The,report,is,structured,as,follows.,First,,in,the,next,section,,we,introduce,the,non-dimensionalised,form,of,the,model,which,we,solved,numerically.,In,section,3,,we,introduce,a,manufactured,solution,test,appropriate,for,testing,the,evolution,of,the,charged,particle,distribution,function.,In,section,4,,we,show,the,results,of,this,test,into,contrasting,cases:,first,,when,there,is,no,radial,electric,field,and,we,find,good,convergence,,and,second,when,a,constant-in-time-and-space,radial,electric,field,is,imposed,,causing,poor,convergence,with,increasing,resolution.,In,section,5,,we,propose,an,optimisation,to,address,these,numerical,difficulties,in,1D.,In,section,6,we,discuss,Report,2070839-TN-04,2,whether,or,not,this,solution,might,be,generalised,to,the,full,2D,model.,In,section,7,we,carry,out,a,manufactured,solution,test,in,the,2D,model,that,is,designed,to,avoid,the,convergence,issues,highlighted,in,the,rest,of,this,report.,We,find,that,the,simulation,is,dominated,by,an,instability,that,may,be,of,numerical,or,physical,origin.,Radial,numerical,diffusion,is,used,to,suppress,the,instability,and,demonstrate,convergence.,In,section,8,,we,utilise,the,radial,numerical,diffusion,to,demonstrate,that,the,numerical,implementation,converges,in,a,2D,manufactured,solution,test,which,has,a,nonzero,radial,electric,field,at,the,wall,boundaries.,This,result,demonstrates,that,the,model,is,correctly,implemented,using,the,chosen,methods.,In,section,9,,we,test,the,convergence,of,physical,solutions,to,the,model,equations,where,the,source,of,ions,is,due,to,a,constant,,uniform,ionisation,of,neutral,particles.,Finally,,in,section,10,,we,discuss,our,results.,The,input,files,for,the,tests,presented,in,this,report,are,named,in,Appendix,A,(grouped,by,figure),and,found,in,supporting,documentation.,2.,The,model,ion,drift,kinetic,equations,The,system,that,we,consider,consists,of,a,single,ion,species,of,charge,e,and,mass,mi,,and,an,electron,species,that,is,modelled,as,having,a,Boltzmann,response.,The,magnetic,field,is,taken,to,be,helical,,with,the,form,B,=,Bzˆz,+,Bζ,ˆζ,,(1),where,(r,,z,,ζ),are,cylindrical,coordinates,,and,Bz,and,Bζ,are,constant,in,z,,r,,and,ζ.,See,figure,1.,The,coordinate,ζ,is,the,analogue,of,the,toroidal,angle,in,a,more,realistic,tokamak,open-field,line,geometry,,and,z,is,the,analogue,of,the,vertical,coordinate.,We,take,the,ions,to,be,collisionless,for,simplicity.,We,apply,wall,boundary,conditions,in,z.,In,sections,4-6,we,solve,a,1D,model,that,does,not,include,a,radial,domain.,In,section,7,,we,solve,the,model,with,a,radial,domain,and,we,impose,periodic,boundary,conditions,in,r.,We,assume,that,the,plasma,equilibrium,is,independent,of,ζ.,In,Table,1,,we,define,normalised,and,reference,quantities.,Consistent,with,previous,reports,,normalised,variables,are,denoted,with,a,tilde.,In,terms,of,the,normalised,variables,,the,model,system,of,equations,takes,the,following,form.,The,collisionless,drift-kinetic,equation,for,ions,is,(cid:16),+,bz,˜v(cid:107),−,∂,(cid:101)Fi,∂˜t,ρ∗,2,(cid:101)Er,(cid:17),∂,(cid:101)Fi,∂,˜z,+,ρ∗,2,(cid:101)Ez,∂,(cid:101)Fi,∂˜r,+,bz,(cid:101)Ez,2,∂,(cid:101)Fi,∂˜v(cid:107),=,(cid:101)Si,+,νr,∂2,(cid:101)Fi,∂˜r2,+,νv,∂2,(cid:101)Fi,∂˜v2,(cid:107),,,(2),where,and,νr,and,νv,are,numerical,viscosity,coefficients,,and,ρ∗,=,cref/LrefΩref,is,a,small,parameter,that,measures,the,size,of,the,ion,gyro-orbits,compared,to,the,macroscopic,size,of,the,system.,Note,that,bz,is,also,a,small,parameter,in,the,formal,ordering,of,the,2D,model,[1,,2].,The,quasineutrality,condition,takes,the,form,(cid:101)ni,=,(cid:101)ne,=,(cid:101)Ne,exp,(cid:32),(cid:33),,,(cid:101)φ,(cid:101)Te,(3),Report,2070839-TN-04,3,Figure,1:,The,form,of,the,magnetic,field,and,the,left-handed,coordinates,(r,,z,,ζ),in,terms,of,the,right-handed,cartesian,(x,,y,,z).,Taken,from,[1].,and,is,used,to,determine,the,potential,(cid:101)φ.,The,normalised,electric,fields,are,derived,from,the,potential,,and,are,defined,by,(cid:101)Ez,=,−,∂,(cid:101)φ,∂,˜z,,,and,(cid:101)Er,=,−,∂,(cid:101)φ,∂˜r,.,and,the,ion,density,is,defined,by,(cid:101)ni,=,1,√,π,(cid:90),∞,(cid:90),∞,d˜v(cid:107),−∞,0,2d˜v⊥˜v⊥,(cid:101)Fi.,(4),(5),The,boundary,condition,on,the,ion,distribution,function,is,that,no,particles,return,from,the,wall,,i.e.,,(cid:101)Fi(˜z,=,−,˜Lz/2,,˜v(cid:107),>,ρ∗,(cid:101)Er/2bz,,˜v⊥,,˜t),=,0,(cid:101)Fi(˜z,=,˜Lz/2,,˜v(cid:107),<,ρ∗,(cid:101)Er/2bz,,˜v⊥,,˜t),=,0,,(6),where,˜Lz,=,Lz/Lref.,Note,that,this,boundary,condition,implies,that,a,source,of,ions,is,required,for,a,nontrivial,steady-state,solution.,Since,we,wish,to,avoid,the,complication,of,including,a,neutral,species,for,the,purposes,of,this,report,,we,achieve,a,steady-,state,solution,by,imposing,appropriate,sources,(cid:101)Si.,The,remainder,of,this,report,is,an,investigation,into,how,the,boundary,condition,(6),interacts,with,the,spectral-element,numerical,method,chosen,to,implement,these,equations.,It,is,useful,to,think,in,terms,of,the,total,ion,velocity,in,the,˜z,direction,˜vz(˜v(cid:107),,˜z,,˜r),=,bz,˜v(cid:107),−,ρ∗,2,(cid:101)Er(˜z,,˜r),,(7),Report,2070839-TN-04,4,norm.,variable,˜t,definition,t(cref/Lref),˜z,˜r,˜v(cid:107),˜v⊥,˜vz,˜vr,˜vζ,(cid:101)Ne,˜ns,(cid:101)φ,(cid:101)Er,(cid:101)Ez,˜Rin,˜Rion,(cid:101)Fs,(cid:101)Ss,ρ∗,bz,z/Lref,r/Lref,v(cid:107)/cref,v⊥/cref,vz/cref,vr/cref,vζ/cref,Ne/nref,ns/nref,eφ/Tref,eLrefEr/Tref,eLrefEz/Tref,Rin(nrefLref/cref),Rion(nrefLref/cref),Fs(c3,refπ3/2/nref),refπ3/2Lref/nrefcref),cref/LrefΩref,Ss(c3,Bz/B,ref.,quantity,definition,Lref,Tref,nref,cref,mi,Bref,Ωref,ref.,length,(m),ref.,temperature,(KeV),ref.,density,(m−3),(cid:112)2Tref/mi,(ms−1),ion,mass,(kg),ref.,B,(T),eBref/mi,(s−1),Table,1:,Definitions,for,normalised,and,reference,quantities,used,in,the,report.,where,we,have,indicated,that,˜vz,is,a,function,of,(˜v(cid:107),,˜z,,˜r),because,(cid:101)Er,is,a,function,of,position.,Note,that,in,general,,if,the,magnetic,field,B,varies,with,position,,then,(˜z,,˜r),dependence,will,also,arise,from,the,geometrical,coefficients,appearing,in,equation,(7).,It,is,important,to,note,that,as,a,consequence,of,this,dependence,on,position,,the,boundary,condition,(6),must,be,applied,on,a,potentially,non-trivial,(˜v(cid:107),,˜r),contour,in,phase,space.,This,detail,will,be,important,in,the,following,discussion.,The,model,described,above,solves,for,(cid:101)Fi,=,(cid:101)Fi(˜v(cid:107),,˜v⊥,,˜z,,˜r).,The,coordinate,˜v⊥,is,a,conserved,quantity,because,of,the,assumption,of,a,spatially,homogeneous,magnetic,field,strength,B.,In,addition,,˜v⊥,does,not,appear,anywhere,explicitly,in,the,coefficients,of,the,drift,kinetic,equation.,This,is,a,result,of,the,fact,that,we,have,neglected,the,neutral,species.,We,can,reduce,the,complexity,and,computational,time,of,our,simulations,by,marginalising,over,the,˜v⊥,coordinate,by,solving,for,the,distribution,(cid:101)fi(˜v(cid:107),,˜z,,˜r),=,(cid:90),∞,0,2d˜v⊥˜v⊥,(cid:101)Fi(˜v(cid:107),,˜v⊥,,˜z,,˜r).,(8),Report,2070839-TN-04,5,We,make,use,of,this,reduction,in,the,remainder,of,this,report,by,choosing,the,initial,(cid:101)Fi(˜v(cid:107),,˜v⊥,,˜z,,˜r),such,that,(cid:101)Fi(˜v(cid:107),,˜v⊥,=,0,,˜z,,˜r),=,(cid:90),∞,0,2d˜v⊥˜v⊥,(cid:101)Fi(˜v(cid:107),,˜v⊥,,˜z,,˜r),,(9),and,evolving,(cid:101)Fi(˜v(cid:107),,˜v⊥,=,0,,˜z,,˜r).,3.,Testing,the,numerical,implementation,with,the,method,of,manufactured,solutions,To,test,the,numerical,implementation,of,the,system,described,above,,we,prescribe,a,manufactured,solution,that,satisfies,the,ion,boundary,conditions,,and,then,proceed,to,compute,symbolically,the,appropriate,(cid:101)Si,that,would,maintain,this,solution.,Then,,we,use,this,symbolically,computed,(cid:101)Si,in,our,numerical,implementation,,and,confirm,that,the,numerical,solution,remains,close,to,the,prescribed,symbolic,solution.,For,maximum,simplicity,,we,carry,out,only,steady-state,tests,with,no,explicit,time,dependence,in,the,manufactured,solutions.,In,what,follows,,we,perform,a,numerical,simulations,for,a,fixed,time,˜t,=,1,for,varying,resolutions.,We,check,that,the,numerical,solution,is,consistent,with,the,target,manufactured,solution,by,confirming,that,the,numerical,error,reduces,towards,zero,as,the,resolution,increases.,To,measure,the,error,between,the,numerical,solution,and,the,target,manufactured,solution,,we,introduce,the,following,measures.,We,define,an,error,on,the,ion,density,(cid:115)(cid:80),(cid:15)((cid:101)ni),=,i,j,|(cid:101)ni(zi,,rj),−,(cid:101)nM,S,i,(zi,,rj)|2,,,(10),NrNz,i,where,(cid:101)nM,S,is,the,target,manufactured,density,,and,Nr,and,Nz,are,the,total,number,of,points,in,the,r,and,z,grids,,respectively.,We,define,similar,errors,on,the,(cid:101)φ,and,(cid:101)Ez,,these,are,and,(cid:15)((cid:101)φ),=,(cid:15)(,(cid:101)Ez),=,(cid:115)(cid:80),i,j,|(cid:101)φ(zi,,rj),−,(cid:101)φM,S(zi,,rj)|2,NrNz,,,(cid:115)(cid:80),i,j,|,(cid:101)Ez(zi,,rj),−,(cid:101)EM,S,z,NrNz,(zi,,rj)|2,,,(11),(12),respectively.,We,define,an,error,on,the,ion,distribution,function,(cid:118),(cid:117),(cid:117),(cid:116),(cid:15)(,(cid:101)Fi),=,(cid:80),i,j,k,l,|,(cid:101)Fi(v(cid:107)i,,v⊥j,,zk,,rl),−,(cid:101)F,M,S,i,Nv(cid:107)Nv⊥NrNz,(v(cid:107)i,,v⊥j,,zk,,rl)|2,,,(13),where,Nv(cid:107),and,Nv⊥,are,the,total,number,of,points,in,the,v(cid:107),and,v⊥,grids,,respectively.,The,errors,(cid:15)((cid:101)ns),,(cid:15)(,(cid:101)Fi),,and,(cid:15)(,(cid:101)Fn),measure,the,average,error,per,point,in,the,array,of,the,numerical,solution.,Report,2070839-TN-04,6,As,noted,previously,[3],,Julia,has,support,for,elements,of,symbolic,algebra,via,the,Symbolics.jl,package,[4,,5].,This,allows,us,to,partially,automate,the,process,of,calculating,the,manufactured,sources.,Currently,,the,Symbolics.jl,package,supports,symbolic,differentiation,,allowing,for,a,great,reduction,in,the,effort,of,developing,manufactured,solutions,tests.,Unfortunately,,symbolic,integration,is,not,yet,supported,by,the,Symbolics.jl,package,,so,the,target,manufactured,solutions,must,be,chosen,to,be,sufficiently,simple,to,integrate,by,hand.,We,must,construct,a,manufactured,ion,distribution,function,that,satisfies,the,necessary,boundary,conditions.,We,can,achieve,this,by,constructing,a,distribution,function,from,the,velocity,coordinate,v(cid:107),=,˜v(cid:107),−,αρ∗,(cid:101)Er/2bz,,where,α,takes,the,values,of,0,or,1,depending,on,the,type,of,test,carried,out.,We,choose,(cid:34),(cid:101)Fi,=,H,(cid:0)v(cid:107),(cid:1),vp,(cid:107),(cid:19),(cid:18),1,2,+,˜z,˜Lz,n+(˜z,,˜r),+,H,(cid:0)−v(cid:107),(cid:1),vp,(cid:107),(cid:18),1,2,(cid:19),(cid:18)1,2,−,+,(cid:19),(cid:19),˜z,˜Lz,˜z,˜Lz,n−(˜z,,˜r),(cid:35),n0(˜z,,˜r),exp,(cid:0)−v2,(cid:107),−,˜v2,⊥,(cid:1),,,(14),+,(cid:18)1,2,−,˜z,˜Lz,with,p,a,power,chosen,to,be,either,p,=,2,or,4,,and,H,(x),the,Heaviside,function,,taking,the,values,1,for,x,>,0,and,0,for,x,<,0.,In,the,Julia,implementation,H,(0),=,1/2.,Note,that,the,forward,going,part,of,the,distribution,vanishes,at,˜z,=,−Lz/2,and,the,backward,going,part,vanishes,at,˜z,=,Lz/2,–,ensuring,that,condition,(6),holds.,The,velocity,space,dependence,is,chosen,so,that,∂,(cid:101)Fi/∂˜v(cid:107),=,0,at,˜vz(˜v(cid:107),,˜z,=,±Lz/2,,˜r),=,0.,This,also,has,the,effect,that,this,manufactured,solution,marginally,satisfies,the,Chodura,condition,[6],for,α,=,0,and,p,=,2,,and,oversatisfies,the,Chodura,condition,for,α,=,0,and,p,=,4.,See,appendix,Appendix,B,for,a,further,discussion.,The,option,of,using,p,=,4,has,been,introduced,to,permit,the,later,addition,of,a,˜v(cid:107),diffusion,operator,into,the,drift,kinetic,equation.,For,p,=,2,,the,manufactured,solution,is,only,continuous,at,˜v(cid:107),=,0,up,to,and,including,the,first,derivative,in,˜v(cid:107),,whereas,for,p,=,4,the,manufactured,solution,is,continuous,at,˜v(cid:107),up,to,and,including,the,third,derivative,in,˜v(cid:107).,In,principle,,we,could,specify,any,functions,for,n+(˜z,,˜r),,n−(˜z,,˜r),and,n0(˜z,,˜r),that,satisfy,the,radial,boundary,conditions.,To,specify,the,ion,density,,needed,to,compute,the,potential,via,quasineutrality,,we,compute,the,velocity,integral,of,equation,(14),analytically.,The,result,is,(cid:101)ni,=,an+(˜z,,˜r),(cid:19),(cid:18),1,2,+,˜z,˜Lz,+,an−(˜z,,˜r),(cid:18),1,2,+,n0(˜z,,˜r),(cid:18),1,2,+,−,(cid:19),˜z,˜Lz,(cid:19),(cid:18)1,˜z,˜Lz,2,(15),−,(cid:19),,,˜z,˜Lz,where,a,=,1/4,if,p,=,2,and,a,=,3/8,if,p,=,4.,Finally,,we,specify,forms,for,n±,and,n0,that,allow,us,to,study,cases,with,periodic,boundary,conditions,in,˜r.,These,are,(cid:34)(cid:18),(cid:19)1/2(cid:35),n±,=,exp,(cid:15),+,∓,n0,,(16),1,2,˜z,˜Lz,Report,2070839-TN-04,and,(cid:20),n0,=,exp,1,+,1,20,sin,(cid:18),2π˜r,˜Lr,(cid:19),(cid:18),(1,−,α),cos,(cid:19),(cid:18)π˜z,˜Lz,(cid:19)(cid:21),+,α,,,with,˜Lr,=,Lr/Lref.,4.,Tests,in,1D:,neglecting,the,radial,dimension,7,(17),The,simplest,test,of,the,model,is,to,examine,the,case,where,we,assume,that,the,plasma,is,homogeneous,in,the,radial,direction.,Then,,(cid:101)Er,=,0,and,v(cid:107),=,˜v(cid:107).,For,this,test,,we,take,˜r,=,0,and,hence,(cid:34),(cid:18),(cid:19)1/2(cid:35),n±,=,exp,1,+,(cid:15),+,1,2,∓,˜z,˜Lz,,,(18),(19),with,(cid:15),=,0.1,,and,n0,=,exp[1].,These,functions,are,chosen,so,that,(cid:101)Ez,=,O,(cid:18)(cid:16),(cid:15),+,1/2,∓,˜z/,˜Lz,(cid:17)−1/2(cid:19),as,˜z,→,±,˜Lz/2,–,this,is,inspired,by,the,properties,of,collisional,sheaths,[7],and,magnetic,presheaths,[6].,The,parameter,(cid:15),is,required,to,prevent,(cid:101)Ez,diverging,to,infinity,within,the,numerical,simulation,domain.,We,take,νr,=,νv,=,0,for,simplicity.,In,figure,2,,we,show,the,result,of,carrying,out,this,test,for,Ngrid,=,17,points,per,element,and,equal,number,of,elements,in,each,coordinate,dimension.,We,take,the,time,step,to,be,∆˜t,=,0.004/Nelement.,We,note,the,excellent,convergence,shown,in,figure,2:,the,scaling,of,the,numerical,errors,is,linear,on,a,log-log,plot,,consistent,with,spectral,accuracy.,The,high-order,spectral,convergence,seen,in,figure,2,is,extremely,sensitive,to,the,location,in,˜v(cid:107),where,the,boundary,condition,(14),is,imposed.,Recall,that,this,location,is,determined,by,the,algebraic,equation,˜vz(˜v(cid:107),,˜r),=,0,,where,˜vz,is,defined,in,equation,(7).,We,can,see,how,a,nonzero,radial,electric,field,interacts,with,the,boundary,condition,(14),by,imposing,a,constant,(cid:101)Er,=,0.5,in,the,manufactured,solution,test,described,above.,We,take,α,=,1,so,that,the,manufactured,solution,satisfies,the,ion,wall,boundary,condition.,The,results,of,this,test,are,shown,in,figure,3.,Note,that,we,keep,the,same,resolution,parameters,as,the,test,described,in,figure,2,,and,we,keep,the,same,formulae,for,n±,,and,n0.,Despite,using,the,same,numerical,resolutions,,figure,3,shows,much,larger,numerical,errors,than,figure,2.,We,can,see,that,the,errors,are,reducing,slowly,with,increasing,numerical,resolution,,but,the,trends,of,the,errors,are,troubling,,potentially,indicating,that,the,errors,will,not,reach,machine,precision,levels,even,with,very,large,resolution.,The,errors,in,(cid:101)Ez,are,much,larger,than,in,the,other,fields,,suggesting,that,any,physics,simulation,with,a,nonzero,(cid:101)Er,would,suffer,severe,numerical,difficulties.,This,is,consistent,with,behaviour,reported,previously,when,a,radial,domain,and,nonzero,(cid:101)Er,were,included.,We,can,improve,on,the,trend,of,the,convergence,shown,in,figure,3,by,using,low-,order,elements.,In,figure,4,we,show,the,results,of,the,MMS,test,where,we,have,used,Ngrid,=,5,in,the,˜v(cid:107),and,˜z,dimensions,,and,increased,the,number,of,elements,to,match,the,number,of,points,as,in,the,cases,in,figure,3,for,a,fair,comparison.,We,see,that,Report,2070839-TN-04,8,Figure,2:,Manufactured,solution,test,using,the,prescribed,solution,(14),as,an,initial,condition,with,consistent,source,Si,computed,analytically,from,equation,(2).,We,take,(cid:101)Er,=,0,and,neglect,the,radial,dimension,by,taking,n±,and,n0,as,in,equations,(18),and,(19).,We,take,ρ∗,=,bz,=,(cid:101)Te,=,(cid:101)Ne,=,1.0.,Each,element,has,Ngrid,=,17,points,in,and,we,take,the,˜v(cid:107),and,˜z,dimensions,to,have,an,equal,number,of,elements,Nelement.,We,take,the,maximum,˜v(cid:107),=,6.,We,run,for,250,×,Nelement,steps,with,∆˜t,=,0.004/Nelement,so,that,the,final,˜t,=,1.,Figure,3:,The,same,test,a,presented,in,figure,2,but,with,(cid:101)Er,=,0.5.,We,continue,to,neglect,other,aspects,of,the,radial,dimension,–,only,a,constant,(cid:101)Er,is,imposed.,This,is,equivalent,to,shifting,the,˜v(cid:107),grid,by,an,amount,ρ∗,(cid:101)Er/2bz.,Note,that,the,spectral,convergence,of,the,code,is,destroyed,by,this,shift,,with,particularly,troubling,errors,in,(cid:101)Ez,,and,no,clear,linear,trend,on,the,log-log,scale.,Report,2070839-TN-04,9,using,low-order,elements,allows,us,to,recover,an,almost,linear,scaling,for,the,errors,on,the,log-log,scale,,although,the,absolute,values,of,the,errors,are,not,improved,for,the,resolutions,used,here.,It,is,expected,that,a,low-order,method,should,require,more,points,to,reach,the,same,level,of,residual,errors.,A,further,improvement,can,clearly,be,Figure,4:,The,same,test,a,presented,in,figure,3,but,with,Ngrid,=,5,instead,of,Ngrid,=,17.,Using,these,low-order,elements,,we,recover,an,almost,linear,scaling,of,the,errors,,suggesting,that,with,adequate,resolution,,the,nonspectral,behaviour,due,to,the,wall,boundary,condition,can,be,avoided.,obtained,by,simply,using,higher,resolution,in,the,low-order,scheme.,We,find,that,it,is,most,important,to,use,high,˜v(cid:107),resolution.,In,figure,5,we,show,the,result,of,increasing,the,number,of,˜v(cid:107),elements,by,a,factor,of,4,compared,to,the,number,of,˜z,elements,,at,fixed,Ngrid,=,5.,The,errors,are,reduced,by,almost,two,orders,of,magnitude.,We,adopt,this,partition,between,spatial,and,velocity,resolution,when,we,simulate,2D,cases.,5.,Resolution,of,the,inaccurate,behaviour,of,spectral,methods,on,nonpolynomial,functions,We,can,understand,the,behaviour,seen,in,the,1D-1V,manufactured,solutions,test,if,we,consider,a,simple,test,case.,Noting,that,the,manufactured,solution,involves,the,Heaviside,function,H,(x),,we,anticipate,that,numerical,differentiation,of,the,manufactured,solution,is,likely,to,introduce,numerical,artifacts,into,the,solution.,This,is,not,entirely,artificial,,as,the,real,solution,must,obey,the,boundary,condition,(14),,and,so,the,real,solution,will,have,a,discontinuity,in,a,higher,order,derivative,when,a,spectral,representation,is,used.,With,this,in,mind,,we,consider,the,function,f,(x),=,H,(x),x2,,(20),Report,2070839-TN-04,10,Figure,5:,The,same,test,a,presented,in,figure,3,but,with,Ngrid,=,5,instead,of,Ngrid,=,17,and,Nelement(˜z),=,Nelement(˜v(cid:107))/4.,represented,on,the,Chebyshev,polynomial,colocation,grid,in,a,single,element.,We,then,compare,the,numerical,result,of,differentiating,this,function,using,the,Chebyshev,transforms,to,the,exact,result,df,dx,=,(cid:40),0,2x,x,<,0,x,≥,0,.,(21),This,comparison,is,given,in,figure,6,using,Ngrid,=,9,points,in,the,Chebyshev,grid.,We,note,that,whilst,the,first,derivative,is,continuous,at,the,origin,x,=,0,,the,second,derivative,of,the,function,f,(x),is,discontinuous,at,x,=,0.,The,result,is,that,the,differentiation,using,the,spectral,method,introduces,Gibbs,phenomena,everywhere,within,the,element.,This,phenomenon,can,be,avoided,if,we,take,care,to,take,the,derivative,with,information,from,the,region,of,the,function,where,f,(x),>,0.,This,could,be,achieved,by,using,a,cubic,spline,within,the,element,to,fit,the,function,in,the,appropriate,region,of,x,and,then,take,the,derivative,to,be,that,given,by,the,cubic,spline,fit.,This,is,illustrated,in,figure,7,,where,the,Dierckx,package,is,used,to,compute,a,derivative,using,only,data,from,within,the,spline,fit,domain.,6.,Complications,arising,in,the,2D,case,In,the,previous,section,,we,proposed,a,solution,to,the,problem,of,taking,a,derivative,of,a,function,that,has,the,form,given,by,equation,(20).,Although,we,have,not,implemented,this,solution,in,‘moment,kinetics’,,this,optimisation,could,increase,the,accuracy,of,derivatives,within,the,elements,where,a,boundary,condition,is,applied,on,internal,points.,In,this,section,we,demonstrate,that,there,is,a,more,subtle,problem,in,generalising,this,solution,to,the,2D,case,where,we,must,include,a,radial,dimension,˜r.,Consider,figure,Report,2070839-TN-04,11,Figure,6:,Simple,test,using,the,spectral,method,to,calculate,df,/dx,(df,num),with,a,comparison,to,the,exact,derivative,(df,exact).,Note,the,presence,of,Gibbs,ringing,because,the,element,boundary,does,not,coincide,with,where,f,(x),=,0.,Figure,7:,Simple,test,using,the,spectral,method,to,calculate,df,/dx,(df,num),with,a,comparison,to,the,exact,derivative,(df,exact),and,a,derivative,taken,using,a,cubic,spline,over,the,positive,data,(df,spline).,Report,2070839-TN-04,12,8.,The,figure,shows,the,phase,space,of,the,distribution,function,Fi,at,the,wall,plates,˜z,=,±,˜Lz/2.,We,note,that,the,radial,electric,field,(cid:101)Er(˜z,,˜r),will,have,a,different,functional,form,at,each,of,the,wall,plates,,and,that,the,sign,of,the,˜v(cid:107),axis,depends,on,whether,one,inspects,the,upper,or,lower,wall,plate,in,˜z.,In,the,1D,problem,previously,considered,in,this,report,,we,have,attempted,to,address,the,situation,where,the,contour,of,˜vz(˜v(cid:107),,˜r),=,0,is,a,straight,line,in,the,(˜v(cid:107),,˜r),plane,,parallel,to,the,˜r,axis,crossing,˜r,=,0,at,a,fixed,value,of,˜v(cid:107),(cid:54)=,0.,In,the,2D,case,the,˜vz(˜v(cid:107),,˜r),=,0,contour,may,take,a,nontrivial,form,,meaning,that,we,must,take,care,when,taking,˜r,derivatives,of,(cid:101)Fi.,This,is,because,we,have,observed,that,it,is,important,to,avoid,taking,a,derivative,on,(cid:101)Fi,data,that,is,enforced,to,be,zero,by,the,boundary,condition,,and,a,radial,derivative,in,the,region,of,˜v(cid:107),near,the,boundary,will,necessarily,do,this,using,the,default,spectral,element,method.,The,resolution,of,this,problem,is,not,obvious.,One,possible,solution,would,be,to,use,the,cubic,spline,method,proposed,in,the,last,section,for,both,the,˜r,and,˜v(cid:107),coordinates,separately.,However,,care,would,be,required,to,make,sure,that,multiple,crossings,of,the,˜vz(˜v(cid:107),,˜r),=,0,contour,did,not,occur,in,each,˜r,element.,This,may,be,difficult,to,ensure,in,a,turbulent,problem,when,oscillations,in,(cid:101)Er,in,˜r,should,be,expected.,Another,solution,could,be,to,change,from,˜v(cid:107),to,˜vz,coordinates,when,solving,the,ion,drift,kinetic,equation.,This,is,also,problematic,for,an,explicit,code,,because,changing,to,these,coordinates,would,require,the,knowledge,of,∂,(cid:101)Er/∂˜t,before,integrating,(cid:101)Fi(˜tn),in,time,to,find,(cid:101)Fi(˜tn+1).,A,final,solution,could,be,to,regrid,the,distribution,function,˜v(cid:107),elements,near,the,˜vz(˜v(cid:107),,˜r),=,0,boundary,so,that,the,radial,derivatives,could,be,computed,by,first,taking,∂,(cid:101)Fi/∂˜r|˜vz,and,then,use,the,chain,rule,to,compute,∂,(cid:101)Fi/∂˜r|˜v(cid:107).,In,light,of,the,fact,that,(cid:101)Er,varies,with,˜z,,the,regriding,must,necessarily,be,local,to,each,of,the,wall,plates.,Whether,or,not,this,method,will,improve,the,convergence,in,practice,is,not,clear,until,an,implementation,is,attempted.,Finally,,we,comment,that,the,convenient,assumption,of,∂,(cid:101)Fi/∂˜v(cid:107),on,˜vz(˜v(cid:107),,˜r),=,0,that,was,built,into,the,manufactured,solution,(14),also,implies,that,∂,(cid:101)Fi/∂˜v(cid:107),=,0,on,˜vz(˜v(cid:107),,˜r),=,0.,This,fact,means,that,for,solutions,of,the,form,of,(14),we,are,able,to,treat,the,˜r,and,˜v(cid:107),derivatives,using,the,same,boundary,conditions,in,the,elements,including,the,˜vz(˜v(cid:107),,˜r),=,0,contour.,7.,Extending,the,1D,test,to,2D,whilst,avoiding,discontinuities,off,element,boundaries,Having,developed,some,intuition,for,the,limitations,inherent,in,the,spectral-element,scheme,,it,is,interesting,to,consider,a,test,of,the,2D,model,that,avoids,the,problems,associated,with,having,(cid:101)Er,(cid:54)=,0,at,the,wall,boundaries.,Choosing,α,=,0,and,p,=,4,in,the,manufactured,solution,(14),provides,such,a,test.,The,distribution,function,is,constructed,with,H,(cid:0)˜v(cid:107),(cid:1),,meaning,that,the,discontinuities,in,the,˜v(cid:107),derivatives,of,the,function,are,on,element,boundaries.,With,the,choice,of,α,=,0,,using,the,quasineutrality,relation,(3),,,and,the,definition,(4),,one,can,use,equations,(15)-(17),to,verify,that,(cid:101)Er,=,0,at,˜z/,˜Lz,=,±1/2.,This,ensures,that,the,manufactured,solution,is,consistent,with,the,Report,2070839-TN-04,13,Illustration,of,the,form,of,the,distribution,function,at,˜z,=,±Lz/2,,as,a,Figure,8:,consequence,of,the,wall,boundary,condition,(6).,The,fact,that,(cid:101)Er,=,(cid:101)Er(˜r),at,˜z,=,±Lz/2,means,that,the,contour,at,which,(cid:101)Fi,=,0,may,not,be,a,straight,line,in,the,(˜v(cid:107),,˜r),plane.,Note,that,because,(cid:101)Er(˜r),does,not,necessarily,have,the,same,functional,form,at,˜z,=,±Lz/2,,this,phase,space,map,will,be,different,at,each,of,˜z,=,±Lz/2.,wall,boundary,condition,(14).,Choosing,α,=,0,and,p,=,4,,the,manufactured,solution,(14),has,none,of,the,features,that,caused,poor,numerical,convergence,in,the,1D,test,cases,with,a,nonzero,(cid:101)Er.,The,radial,electric,field,is,allowed,to,be,nonzero,in,the,plasma,,but,it,vanishes,at,the,wall,,and,the,distribution,function,has,no,discontinuous,derivatives,except,at,v(cid:107),element,boundaries.,Therefore,,we,might,expect,that,numerical,simulations,of,this,manufactured,solution,should,show,the,same,convergence,properties,as,in,figure,2.,However,,we,find,that,this,manufactured,solution,is,unstable,in,the,absence,of,numerical,diffusion,,as,we,now,discuss.,In,the,1D,case,described,in,figure,2,,we,were,able,to,obtain,good,numerical,convergence,for,relatively,few,elements,in,the,spatial,and,velocity,dimensions.,This,is,not,observed,in,the,2D,case.,Instead,,regardless,of,the,resolution,,if,νr,=,0,,we,typically,see,an,exponential,growth,in,the,error,with,time,,coinciding,with,the,growth,of,oscillatory,structures,in,(cid:101)Er,and,(cid:101)Ez.,The,simulation,eventually,crashes,when,these,structures,become,large,enough,to,force,the,pressure,to,be,negative.,To,illustrate,this,behaviour,with,a,concrete,example,,we,choose,νr,=,νv,=,0,,ρ∗,=,bz,=,(cid:101)Te,=,(cid:101)Ne,=,1.0,,Nelement,=,16,and,Ngrid,=,5,for,the,spatial,(˜z,,˜r),dimensions,,increasing,Report,2070839-TN-04,14,and,we,take,Nelement,=,64,and,Ngrid,=,5,for,the,˜v(cid:107),dimension.,These,resolution,choices,are,based,on,the,desire,to,use,a,lower,order,method,in,(˜z,,˜r,,˜v(cid:107)),as,discussed,in,section,4.,In,figure,9,,we,show,the,results,of,integrating,to,a,time,˜t,=,0.65,with,a,timestep,size,of,∆˜t,=,0.001.,We,find,exponentially,growing,errors,between,the,numerical,and,symbolic,functions,,and,a,wave-like,structure,in,the,(˜z,,˜r),plane.,This,may,indicate,the,presence,of,a,physical,instability,to,the,target,solution,(15).,We,note,that,increasing,the,(˜z,,˜r),resolutions,causes,the,spatial,period,of,the,wave,form,to,get,smaller,and,the,growth,of,the,errors,to,be,faster.,Typically,the,wave,occurs,on,a,scale,comparable,to,the,individual,elements.,This,may,be,consistent,with,the,fact,that,drift-kinetic,instabilities,have,no,cut-off,at,high,wavenumbers.,A,full,demonstration,of,the,nature,of,the,instability,seen,in,figure,9c,requires,a,micro-stability,calculation,around,the,equilibrium,(14).,This,exercise,is,left,for,future,work.,For,now,,we,carry,out,the,manufactured,solutions,test,for,the,case,with,α,=,0,,p,=,4,,taking,Ngrid,=,5,for,the,˜z,,˜r,and,˜v(cid:107),dimensions,,scanning,in,Nelement(˜z),=,Nelement(˜r),=,Nelement(˜v(cid:107))/4,taking,∆˜t,=,0.016/Nelement(˜z),and,evolving,the,solution,until,a,time,of,˜t,=,1.,We,suppress,the,instability,using,radial,diffusion,with,νr,=,0.01,,keeping,νv,=,0.,The,result,of,this,scan,is,shown,in,figure,10.,We,can,see,that,the,radial,numerical,dissipation,has,allowed,us,to,obtain,a,performance,in,this,2D,example,that,is,comparable,to,the,performance,obtained,in,1D,in,figure,5.,8.,The,2D,MMS,test,where,(cid:101)Er,(cid:54)=,0,at,the,wall,We,are,now,in,a,position,to,turn,to,the,MMS,test,where,we,allow,(cid:101)Er,to,be,non-,zero,at,the,wall,boundaries.,This,means,that,we,choose,α,=,1,in,the,manufactured,solution,(14).,We,continue,to,take,p,=,4,and,ρ∗,=,bz,=,(cid:101)Te,=,(cid:101)Ne,=,1.0,as,in,the,other,tests,presented,in,this,report.,We,use,identical,numerical,resolutions,as,for,the,test,presented,in,figure,10,,to,generate,a,like-for-like,comparison.,The,result,is,shown,in,figure,11,,which,demonstrates,that,the,numerical,implementation,of,the,model,is,adequate,provided,that,sufficient,numerical,resolution,and,low-order,elements,are,used,to,resolve,the,physical,phenomena,of,interest.,Here,,we,have,applied,radial,numerical,dissipation,with,νr,=,0.01,(and,νv,=,0.0),to,suppress,the,instability,described,in,the,last,section.,It,is,interesting,to,plot,the,ion,distribution,function,(cid:101)Fi(˜v(cid:107),,˜r),at,the,wall,boundary,to,connect,to,the,discussion,in,section,6.,Figure,12,shows,a,sinusoidal,structure,in,the,distribution,function,which,corresponds,to,the,form,of,v(cid:107),=,˜v(cid:107),−,ρ∗,(cid:101)Er/2bz.,The,distribution,is,plotted,at,˜t,=,1,for,the,highest,resolution,given,in,figure,11.,It,is,clear,that,sufficient,resolution,must,be,supplied,to,adequately,resolve,the,v(cid:107),=,0,contour,using,the,rectangular,(˜v(cid:107),,˜r),spectral-element,grid.,Whether,or,not,the,numerical,optimisations,described,in,section,6,are,ultimately,required,will,be,determined,by,experience,using,the,current,numerical,implementation,in,situations,where,the,model,includes,radial,inhomogeneity,and,Dirichlet,boundary,conditions.,We,will,explore,this,question,with,these,features,in,future,work.,Report,2070839-TN-04,15,(a),(c),(e),(b),(d),(f),Figure,9:,Plots,of,(cid:15)(,(cid:101)fi),,(cid:15)(,(cid:101)Er),,and,(cid:101)Er,at,˜t,=,0.65,for,the,manufactured,solutions,test,described,in,section,7,using,(14).,Note,the,exponential,growth,in,the,errors,(plots,(a),&,(b)),suggestive,of,an,instability,,and,(c),the,wave-like,structure,forming,in,(cid:101)Er.,When,radial,numerical,diffusion,is,imposed,with,νr,=,0.01,(d),,the,wave,is,stabilised,and,the,simulation,can,be,extended,to,˜t,=,1.0,,with,minimal,errors,((e),&,(f)).,Report,2070839-TN-04,16,Figure,10:,The,MMS,test,with,α,=,0,,p,=,4,,ρ∗,=,bz,=,(cid:101)Te,=,(cid:101)Ne,=,1.0,,with,Ngrid,=,5,and,Nelement(˜z)Nelement(˜r),=,Nelement(˜v(cid:107))/4.,Numerical,diffusion,in,the,radial,direction,is,applied,,with,νr,=,0.01,,and,νv,=,0.,Performance,comparable,to,that,shown,in,figure,5,is,obtained,at,Nelement(˜z),=,16.,Figure,11:,The,MMS,test,with,α,=,1,,p,=,4,,ρ∗,=,bz,=,(cid:101)Te,=,(cid:101)Ne,=,1.0,,with,Ngrid,=,5,and,Nelement(˜z)Nelement(˜r),=,Nelement(˜v(cid:107))/4.,Performance,is,demonstrated,that,is,comparable,to,that,shown,in,figure,10.,Report,2070839-TN-04,17,Figure,12:,The,ion,distribution,function,(cid:101)Fi,as,a,function,of,(˜v(cid:107),,˜r),at,the,wall,boundary,˜z/,˜Lz,=,−1/2.,Compare,to,figure,8.,9.,Convergence,of,physical,solutions,sourced,by,a,constant,ionisation,rate:,a,cautionary,tale,So,far,in,this,report,,we,have,considered,manufactured,solutions,where,the,distribution,function,is,carefully,chosen,to,satisfy,the,boundary,conditions,and,source,an,electric,field,that,does,not,diverge,anywhere.,However,,in,sheath,problems,it,is,typical,for,the,electric,field,to,diverge,near,the,wall,[6].,In,this,section,,we,examine,simulations,where,the,source,is,a,constant,,and,uniform,ionisation,collisions.,We,take,the,source,fuelling,of,ions,through,electron-neutral,function,to,be,Si,=,2,exp[−4˜v2,(cid:107)].,(22),We,consider,a,1D,simulation,where,(14),is,the,initial,condition,(with,α,=,0),and,p,=,4,,ρ∗,=,bz,=,(cid:101)Te,=,(cid:101)Ne,=,1.0,,Ngrid(˜r),=,Nelement(˜r),=,1,,Ngrid,=,5,for,the,˜z,and,˜v(cid:107),dimensions,,and,take,Nelement(˜z),=,Nelement(˜v(cid:107))/4.,We,take,νr,=,0,and,νv,=,0.01.,We,run,for,1250Nelement(˜z),steps,with,∆˜t,=,0.016/Nelement(˜z).,The,total,normalised,time,of,˜t,=,20,was,found,to,be,adequate,to,reach,a,steady-state,solution.,In,figure,13,,we,show,the,result,of,scanning,in,Nelement(˜z),=,Nelement(˜v(cid:107))/4.,Figure,13a,shows,that,(cid:101)φ,converges,in,the,domain.,The,slowest,convergence,is,observed,at,the,wall,boundaries:,figure,13b,indicates,that,(cid:101)φ,will,converge,with,sufficient,˜z,resolution.,However,,figure,13c,(cid:101)Ez,is,diverging,near,the,wall,boundaries,,although,good,convergence,is,observed,in,most,of,the,domain.,Figure,13d,shows,that,(cid:101)Ez,will,become,infinite,at,the,wall,as,Nelement(˜z),→,∞.,The,fact,that,(cid:101)φ,does,appear,to,converge,indicates,that,the,residual,errors,in,the,numerical,approximation,of,the,solution,are,reducing,,and,so,the,(cid:17)q,numerical,solution,can,plausibly,represent,a,physical,solution,where,(cid:101)φ,∝,1/2,∓,˜z/,˜Lz,(cid:16),Report,2070839-TN-04,18,(a),(c),(b),(d),Figure,13:,Plots,showing,the,behaviour,of,the,electrostatic,potential,(cid:101)φ,and,the,electric,field,(cid:101)Ez,in,1D,simulations,where,the,source,of,ions,is,given,by,equation,(22),and,the,initial,condition,is,given,by,(14),with,˜r,=,0,,α,=,0,p,=,4,,and,ρ∗,=,bz,=,(cid:101)Te,=,(cid:101)Ne,=,1.0.,We,take,νr,=,0,and,νv,=,0.01.,We,take,Ngrid,=,5,for,both,the,˜z,and,˜v(cid:107),dimensions,,with,Nelement(˜z),=,Nelement(˜v(cid:107))/4,,and,we,use,∆˜t,=,0.016/Nelement(˜z),with,a,total,normalised,time,of,˜t,=,20.,The,curves,are,labelled,by,Nelement(˜z).,Note,that,whilst,(cid:101)φ,appears,to,be,converging,for,increasing,resolution,,(cid:101)Ez,is,diverging,at,the,wall,boundaries.,as,˜z,˜Lz,→,±1/2,,with,q,real,and,satisfying,1,>,q,>,0.,The,fact,that,(cid:101)Ez,diverges,in,these,solutions,should,be,taken,into,account,when,making,benchmarks,or,comparisons.,10.,Discussion,In,this,report,we,have,explored,in,detail,the,convergence,of,the,spectral-element,numerical,implementation,of,the,drift-kinetic,‘moment,kinetics’,model.,We,have,focused,on,the,difficulties,in,solving,the,ion,drift,kinetic,equation,in,the,standard,drift,kinetic,representation,in,1D-1V,(˜z,,˜v(cid:107)),and,2D-1V,(˜z,,˜r,,˜v(cid:107)),cases,with,wall,boundary,conditions.,We,have,found,that,the,most,robust,convergence,in,our,manufactured,solutions,test,can,be,achieved,using,low-order,elements,and,high,˜v(cid:107),resolution.,We,have,demonstrated,that,the,ion,drift,kinetic,2D1V,model,shows,only,small,residual,errors,when,a,radial,electric,Report,2070839-TN-04,19,field,is,included,in,the,model,,provided,that,adequate,radial,numerical,dissipation,is,imposed,to,stabilise,a,wave-like,instability.,Increasing,the,size,of,the,radial,variation,in,the,manufactured,solutions,requires,a,greater,level,of,radial,numerical,dissipation,for,a,successful,test.,This,is,consistent,with,the,wave-like,instability,having,a,physical,drive,in,the,imposed,manufactured,solution.,In,addition,to,the,manufactured,solution,tests,,we,have,also,shown,the,result,of,evolving,the,ion,distribution,function,to,steady,state,using,a,constant,,uniform,ionisation,source.,These,simulations,require,the,use,of,parallel,velocity,numerical,dissipation,to,avoid,oscillations,in,the,profiles,as,a,function,of,˜z,,perhaps,due,to,phase,mixing,or,a,bump-on-tail,instability.,Future,work,will,involve,exploring,the,addition,of,radial,inhomogeneity,,vertical,inhomogeneity,,and,a,hierarchy,of,ion-ion,collision,operators.,The,ion-ion,collision,operator,is,crucial,for,providing,a,physical,justification,for,the,numerical,diffusion,imposed,in,the,simulations,described,here.,Radial,diffusion,naturally,arises,from,ion-ion,collisions,interupting,Larmor,and,radial,magnetic,drift,orbits,,whereas,parallel,velocity,diffusion,arises,directly,from,pitch,angle,scattering.,As,our,simulations,here,have,no,clear,reference,length,scale,,it,is,difficult,to,estimate,whether,or,not,the,numerical,diffusion,that,we,have,imposed,this,consistent,with,the,physical,rate,of,collisions,in,a,realistic,device,–,realistic,geometry,and,more,accurate,collision,models,will,address,this,issue.,Appendix,A.,Supporting,documentation,for,the,manufactured,solutions,tests,The,simulations,used,to,create,the,data,presented,in,this,report,were,gen-,erated,by,the,branch,https://github.com/mabarnes/moment_kinetics/compare/,radial-vperp-standard-DKE-Julia-1.7.2-mpi,,with,the,latest,commit,at,the,time,of,writing,being,15d4b3a.,In,this,appendix,we,give,URL,links,to,the,input,files,used,to,generate,the,simulation,data.,To,run,a,simulation,use,the,following,command,$,julia,-O3,--project,run_moment_kinetics.jl,input.toml,To,post,process,the,simulation,data,and,to,generate,the,plots,in,this,report,run,the,following,commands,(after,selecting,the,appropriate,test,options):,$,julia,-O3,--project,run_MMS_test.jl,$,julia,-O3,--project,run_evolve_convergence_test.jl,In,supplementary,data,(data/input_file_data),we,include,input,files,simulations,presented,here,and,a,script,for,plotting,figures,6,and,7,(data/scripts/run_derivatives_test.jl).,The,simulation,inputs,used,to,generate,figure,2,were,1D-wall_MMS_nel_r_1_z_2_vpa_2_vperp_1,1D-wall_MMS_nel_r_1_z_4_vpa_4_vperp_1,Report,2070839-TN-04,20,1D-wall_MMS_nel_r_1_z_8_vpa_8_vperp_1,1D-wall_MMS_nel_r_1_z_16_vpa_16_vperp_1.,The,simulation,inputs,used,to,generate,figure,3,were,1D-wall_MMSEr_nel_r_1_z_2_vpa_2_vperp_1,1D-wall_MMSEr_nel_r_1_z_4_vpa_4_vperp_1,1D-wall_MMSEr_nel_r_1_z_8_vpa_8_vperp_1,1D-wall_MMSEr_nel_r_1_z_16_vpa_16_vperp_1.,The,simulation,inputs,used,to,generate,figure,4,were,1D-wall_MMSEr_ngrid_5_nel_r_1_z_8_vpa_8_vperp_1,1D-wall_MMSEr_ngrid_5_nel_r_1_z_16_vpa_16_vperp_1,1D-wall_MMSEr_ngrid_5_nel_r_1_z_32_vpa_32_vperp_1,1D-wall_MMSEr_ngrid_5_nel_r_1_z_64_vpa_64_vperp_1.,The,simulation,inputs,used,to,generate,figure,5,were,1D-wall_MMSEr_ngrid_5_nel_r_1_z_8_vpa_32_vperp_1,1D-wall_MMSEr_ngrid_5_nel_r_1_z_16_vpa_64_vperp_1,1D-wall_MMSEr_ngrid_5_nel_r_1_z_32_vpa_128_vperp_1,1D-wall_MMSEr_ngrid_5_nel_r_1_z_64_vpa_256_vperp_1.,The,simulation,inputs,used,to,generate,figure,9,were,2D-wall_MMS_ngrid_5_nel_r_16_z_16_vpa_64_vperp_1,2D-wall_MMS_ngrid_5_nel_r_16_z_16_vpa_64_vperp_1_diss.,The,simulation,inputs,used,to,generate,figure,10,were,2D-wall_MMS_ngrid_5_nel_r_2_z_2_vpa_8_vperp_1_diss,2D-wall_MMS_ngrid_5_nel_r_4_z_4_vpa_16_vperp_1_diss,2D-wall_MMS_ngrid_5_nel_r_8_z_8_vpa_32_vperp_1_diss,2D-wall_MMS_ngrid_5_nel_r_16_z_16_vpa_64_vperp_1_diss.,The,simulation,inputs,used,to,generate,figure,11,were,2D-wall_MMSEr_ngrid_5_nel_r_2_z_2_vpa_8_vperp_1_diss,2D-wall_MMSEr_ngrid_5_nel_r_4_z_4_vpa_16_vperp_1_diss,2D-wall_MMSEr_ngrid_5_nel_r_8_z_8_vpa_32_vperp_1_diss,2D-wall_MMSEr_ngrid_5_nel_r_16_z_16_vpa_64_vperp_1_diss.,The,simulation,inputs,used,to,generate,figure,12,were,2D-wall_MMSEr_ngrid_5_nel_r_16_z_16_vpa_64_vperp_1_diss.,The,simulation,inputs,used,to,generate,figure,13,were,1D-wall_evolve_ngrid_5_nel_r_1_z_8_vpa_32_vperp_1,1D-wall_evolve_ngrid_5_nel_r_1_z_16_vpa_64_vperp_1,1D-wall_evolve_ngrid_5_nel_r_1_z_32_vpa_128_vperp_1,1D-wall_evolve_ngrid_5_nel_r_1_z_64_vpa_256_vperp_1.,Report,2070839-TN-04,21,Appendix,B.,Oversatisfying,the,Chodura,condition,in,the,Wall,BC,MMS,test,For,a,stable,sheath,to,exist,at,the,wall,boundary,of,a,2D,configuration,where,Er,=,0,on,the,wall,boundary,,the,ion,distribution,function,at,the,sheath,entrance,(z,=,±Lz/2),must,satisfy,the,kinetic,Chodura,condition,[6].,The,Chodura,condition,is,the,requirement,that,Z,(cid:90),v2,BFi(z,=,zw,,v),v2,(cid:107),d3v,≤,Te,e,dne,dφ,(cid:12),(cid:12),(cid:12)φ=φw,,,(B.1),where,Z,is,the,ion,charge,and,vB,=,(cid:112)ZTe/mi,is,the,Bohm,velocity.,The,integration,range,in,(B.3),is,taken,appropriately,depending,on,which,of,the,z,=,±Lz/2,boundaries,are,under,consideration.,We,now,consider,the,manufactured,solution,(14).,We,also,assume,Te,=,Ti,=,Tref,and,Z,=,1.,Note,that,for,a,Boltzmann,electron,response,the,quantity,Te,e,dne,dφ,(cid:12),(cid:12),(cid:12)φ=φw,=,ni(z,=,zw).,(B.2),In,terms,of,normalised,variables,,the,Chodura,condition,thus,becomes,the,constraint,1,2,(cid:90),(cid:90),(cid:101)Fi(z,=,zw),˜v2,(cid:107),2˜v⊥√,π,d˜v⊥d˜v(cid:107),≤,(cid:101)ni(z,=,zw),,.,(B.3),We,choose,to,inspect,the,condition,at,z,=,Lz/2.,We,must,evaluate,the,integral,1,√,π,(cid:90),∞,0,exp,(cid:0)−˜v2,(cid:107),(cid:1),d˜v(cid:107),=,1,2,.,With,this,,we,see,that,1,2,(cid:90),(cid:90),(cid:101)Fi(z,=,Lz/2),˜v2,(cid:107),2˜v⊥√,π,d˜v⊥d˜v(cid:107),=,1,4,n+(r).,(B.4),(B.5),Comparing,to,the,result,for,the,ion,density,,equation,(15),,we,see,that,the,condition,(B.3),is,satisfied,with,the,equality,when,α,=,0,and,p,=,2,–,in,other,words,,the,condition,is,marginally,satisfied.,It,is,interesting,to,try,to,construct,a,distribution,function,where,the,condition,(B.3),is,oversatisfied.,One,candidate,distribution,function,is,(14),with,α,=,0,and,p,=,4.,Using,the,integrals,1,√,π,(cid:107),exp,(cid:0)−˜v2,˜v2,(cid:107),(cid:1),d˜v(cid:107),=,1,4,,,and,1,√,π,(cid:107),exp,(cid:0)−˜v2,˜v4,(cid:107),(cid:1),d˜v(cid:107),=,3,8,,,(cid:90),∞,0,(cid:90),∞,0,(B.6),(B.7),Report,2070839-TN-04,we,find,the,results,(15),(for,p,=,4),and,1,2,(cid:90),(cid:90),(cid:101)Fi(z,=,Lz/2),˜v2,(cid:107),2˜v⊥√,π,d˜v⊥d˜v(cid:107),=,1,8,n+(r).,22,(B.8),These,results,allow,us,to,see,that,the,Chodura,condition,is,oversatisfied,,by,virtue,of,the,fact,that,n+/8,<,3n+/8.,We,can,also,evaluate,the,particle,fluxes,,with,the,results,that,when,p,=,4,(cid:101)Γ−Lz/2,=,bzn−(r),√,π,,,and,(cid:101)ΓLz/2,=,bzn+(r),√,π,.,To,evaluate,the,fluxes,,we,have,used,the,integrals,1,√,π,1,√,π,(cid:90),∞,0,(cid:90),∞,0,˜v(cid:107),exp,(cid:0)−˜v2,(cid:107),(cid:1),d˜v(cid:107),=,(cid:107),exp,(cid:0)−˜v2,˜v3,(cid:107),(cid:1),d˜v(cid:107),=,1,√,π,(cid:90),∞,0,(cid:107),exp,(cid:0)−˜v2,˜v5,(cid:107),(cid:1),d˜v(cid:107),=,1,√,2,π,1,√,2,π,,,,,1,√,π,.,and,(B.9),(B.10),(B.11),(B.12),[1],Parra,F,I,,Barnes,M,and,Hardman,M,R,2021,Excalibur/Neptune,Report,2047357–TN–07–01,M1.4,[2],Parra,F,I,,Barnes,M,and,Hardman,M,R,2021,Excalibur/Neptune,Report,2047357–TN–09–01,M1.6,[3],Barnes,M,2022,Excalibur/Neptune,Report,2047357–TN–12,[4],Gowda,S,,Ma,Y,,Cheli,A,,Gwozdz,M,,Shah,V,B,,Edelman,A,and,Rackauckas,C,2021,arXiv,preprint,arXiv:2105.03949,[5],URL,https://symbolics.juliasymbolics.org/dev/,[6],Geraldini,A,,Parra,F,I,and,Militello,F,2018,Plasma,Phys.,Control.,Fusion,60,125002,[7],Abazorius,M,2023,University,of,Oxford,DPhil,Thesis :pdfembed:`src:_static/TN-04-3_ConvergenceSolutions2D1VIonDriftKineticEquationWallBoundaryConditionsManufacture.pdf, height:1600, width:1100, align:middle`