CD-EXCALIBUR-FMS0046-M2.1.2_SurfaceMeshGeneration ================================================= .. meta:: :description: technical note :keywords: ExCALIBUR,Surface,mesh,generation,M2.1.2,The,report,describes,work,for,ExCALIBUR,project,NEPTUNE,at,Milestone,2.1.2.,It,comprises,the,document,2048465-TN-01[1],(16,pp),as,of,September,12,,2021.,Accurate,surface,meshing,is,required,for,NEPTUNE,in,order,to,represent,faithfully,the,compli-,cated,geometry,of,the,first,wall,and,various,plasma-facing,components,inside,a,tokamak.,Due,to,the,paradigm,shift,in,favour,of,high-order,representations,for,physical,degrees,of,freedom,(em-,bodied,specifically,in,spectral,/,hp,finite,element,methods),,it,is,expected,that,a,high-order,repre-,sentation,of,the,geometry,also,will,be,necessary,in,order,to,realize,potential,gains,in,numerical,accuracy,and,performance.,In,practice,,this,means,meshing,curved,surfaces,using,curved,/,non-,planar,facets.,This,report,outlines,the,some,of,the,relevant,capabilities,that,exist,within,the,mesh,generation,software,NekMesh,(which,is,an,integral,part,of,the,Nektar++,modern,spectral,/,hp,fi-,nite,element,framework[2]),,as,well,as,presenting,some,initial,tests,performed,with,the,aims,of,assessing,current,performance,and,highlighting,potential,pitfalls.,An,opening,section,explains,several,meshing,fundamentals,in,terms,of,the,specific,techniques,implemented,within,NekMesh.,These,include,the,required,inputs,to,the,software,,which,take,the,form,of,a,CAD,representation,and,a,specification,of,the,required,element,density,of,the,output,mesh,(the,latter,,along,with,the,number,of,intra-element,degrees,of,freedom,,specifies,the,level,of,accuracy,expected,in,the,simulation,,with,more,elements,giving,higher,accuracy,at,the,expense,of,added,computation,time).,The,Nekmesh,software,uses,a,Delaunay,triangulation,library,to,create,a,planar,,linear,mesh,which,is,then,used,to,mesh,2D,surfaces,embedded,in,3D;,an,automatic,approach,is,used,to,increase,element,density,in,response,to,local,curvature.,Techniques,for,”ele-,vating”,a,linear,(i.e.,straight-sided,,planar-facetted),surface,mesh,to,a,high-order,(i.e.,curved),one,are,presented,,including,a,discussion,of,how,to,choose,the,positions,of,sub-element,geometrical,nodes,,and,also,mention,of,diagnostics,for,the,quality,of,the,resulting,mesh.,Of,the,latter,,it,is,anticipated,that,the,agreement,between,the,surface,normals,of,the,mesh,and,those,of,the,original,CAD,representation,is,to,be,an,important,figure,of,merit.,A,subsequent,section,contains,two,specific,examples,of,the,construction,of,high-order,surface,meshes,using,NekMesh,and,a,scrutiny,of,these,as,regards,mesh,quality.,Code,extracts,here,provide,insight,into,the,use,and,the,structure,of,NekMesh,(in,particular,,a,particular,strength,of,the,software,-,the,preservation,of,the,CAD,information,for,quality,assessment,purposes,-,is,demonstrated).,A,mesh,diagnostics,module,added,to,NekMesh,specifically,for,the,purposes,of,this,report,is,exhibited.,It,is,emphasized,that,the,optimization,of,the,intra-element,node,locations,targets,purely,the,geodesics,of,the,underlying,surface,,and,not,the,normals,,further,motivating,an,examination,of,the,accuracy,of,the,latter.,The,examples,include,a,sphere,,where,the,CAD,representation,is,a,sextet,of,NURBS,surfaces;,in,this,case,,meshes,of,orders,two,(quadratic),,three,,and,four,,using,a,range,of,element,densities,,show,maximum,surface,deviations,between,the,mesh,nodes,and,the,CAD,model,to,be,near,machine,tolerance,,while,the,maximum,deflection,of,the,surface,normal,from,the,CAD,is,within,the,accuracy,stipulated,in,NEPTUNE,(<,0.1◦),for,all,but,the,lowest-resolution,meshes;,also,,increasing,the,order,or,element,density,gives,monotonic,improvement,in,both,figures,of,merit.,A,more,complex,exemplar,geometry,is,a,box-shaped,frame,comprising,twelve,identical,cylindrical,members;,here,,the,conclusions,are,broadly,the,same,,save,for,the,fact,that,the,surface,normal,comparison,shows,some,large,(90◦),discrepancies,for,the,higher-order,cases,(orders,four,and,five).,The,authors,give,evidence,that,that,these,anomalies,occur,at,the,jointings,of,the,individual,members,in,the,structure.,With,the,caveat,of,the,discovery,of,this,issue,,the,findings,support,the,overall,conclusion,that,high-quality,curved,surface,meshes,are,achievable,using,NekMesh,,for,at,least,simple,geometries.,Acknowledgement,The,support,of,the,UK,Meteorological,Office,and,Strategic,Priorities,Fund,is,acknowledged.,References,[1],D.,Moxey,,C.,Cantwell,,and,S.,Sherwin.,Surface,mesh,generation.,Technical,Report,2048465-,TN-01-1,,UKAEA,Project,Neptune,,2021.,[2],D.,Moxey,et,al.,Nektar++,website.,https://www.nektar.info,,2020.,Accessed:,June,2020.,UKAEA,REFERENCE,AND,APPROVAL,SHEET,Client,Reference:,UKAEA,Reference:,CD/EXCALIBUR-FMS/0046,Issue:,Date:,1.00,September,12,,2021,Project,Name:,ExCALIBUR,Fusion,Modelling,System,Prepared,By:,Name,and,Department,Wayne,Arter,Ed,Threlfall,Signature,N/A,N/A,Date,September,12,,2021,September,12,,2021,BD,Reviewed,By:,Rob,Akers,September,12,,2021,Advanced,Dept.,Manager,Computing,Approved,By:,Rob,Akers,September,12,,2021,Advanced,Dept.,Manager,Computing,Report,2048465-TN-01-1:,Surface,mesh,generation,David,Moxey,,University,of,Exeter,Chris,Cantwell,&,Spencer,Sherwin,,Imperial,College,London,12th,May,2021,Contents,1,Executive,summary,1.1,Changelog,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,2,Introduction,3,High-order,surface,mesh,generation,3.1,CAD,representation,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,3.2,Mesh,sizing,specification,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,3.3,Surface,mesh,generation,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,3.3.1,Curve,discretisation,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,3.3.2,Surface,discretisation,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,3.3.3,High-order,surface,mesh,generation,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,4,Test,cases,4.1,Methodology,and,NekMesh,code,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,4.2,Spherical,geometry,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,4.3,Cuboid,box,section,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,5,Conclusions,and,future,directions,1,Executive,summary,1,1,2,2,2,3,3,4,4,5,7,8,11,12,14,This,report,focuses,on,the,initial,phase,of,work,undertaken,by,the,University,of,Exeter,and,Imperial,College,London,to,investigate,challenges,for,generation,of,high-order,meshes,for,the,In,this,first,report,that,comprises,deliverable,1.3,of,our,workplan,,we,NEPTUNE,project.,assess,surface,mesh,quality,attained,during,the,high-order,mesh,generation,process,,with,a,particular,focus,on,the,maximum,deflection,angle,of,surface,normal,from,the,underlying,CAD,representation.,1.1,Changelog,•,12/5/21:,Initial,version.,1,2,Introduction,Although,the,use,of,high-order,finite,element,methods,,such,as,the,spectral/hp,element,method,[1],,have,continued,to,gain,popularity,in,recent,years,owing,to,their,favourable,numerical,and,com-,putational,efficiency,properties,,it,is,well,known,that,a,significant,challenge,in,the,deployment,of,such,methods,in,broader,industrial,and,scientific,environments,is,handling,the,complex,ge-,ometries,that,are,typically,required,within,these,settings:,in,other,words,,in,order,to,run,a,high-order,simulation,,one,first,requires,a,high-order,mesh.,Such,meshes,must,not,only,ac-,curately,represent,the,geometry,of,interest,,by,curving,straight-sided,elements,to,align,them,with,the,underlying,boundary,,but,also,consider,physics-specific,challenges,,such,as,the,use,of,boundary,layers,in,fluid,dynamics,to,resolve,high-shear,regions.,Within,NEPTUNE,,it,is,clear,that,a,key,challenge,to,overcome,is,not,only,the,development,of,solvers,to,accurately,simulate,challenging,equations,of,state,,but,also,to,handle,challenging,geometries,which,further,must,accommodate,features,such,as,magnetic,field,lines,that,impinge,on,surfaces,at,shallow,angles,of,attack,of,order,2◦.,From,this,perspective,,it,is,not,only,necessary,to,ensure,accruate,surface,alignment,,but,also,to,investigate,the,accuracy,of,face-interior,surface,normals,from,high-order,surface,meshes.,In,this,report,,we,will,investigate,the,quality,of,surface,mesh,generation,from,the,open-source,high-order,mesh,generator,NekMesh,,which,is,a,pre-processing,tool,based,on,the,spectral/hp,element,framework,Nektar++,[2,,3].,In,particular,,we,will,focus,on,assessment,from,the,per-,spective,of,two,metrics:,the,deflection,of,surface,normals,from,the,‘exact’,normals,as,specified,by,the,underlying,CAD,surface;,and,the,maximum,distance,of,the,mesh,from,the,CAD,surface,evaluated,at,each,solution,point.,In,this,manner,,we,can,identify,areas,for,potential,improve-,ment,with,regards,to,these,metrics,,which,are,discussed,in,section,5.,The,rest,of,this,report,is,structured,as,follows.,A,brief,introduction,and,overview,of,the,a,posteriori,high-order,surface,mesh,generation,process,is,discussed,in,section,3.,In,section,4,,we,consider,two,simple,example,geometries,to,assess,surface,mesh,quality,for,known-good,geometries.,Finally,,section,5,draws,some,brief,conclusions,and,areas,for,future,work.,3,High-order,surface,mesh,generation,In,this,section,,we,briefly,outline,the,various,technologies,and,algorithms,used,to,generate,a,high-order,mesh,within,NekMesh.,Starting,with,a,CAD,representation,of,the,geometry,,we,outline,how,a,linear,surface,mesh,is,first,constructed,from,a,mesh,sizing,distribution,,and,then,how,additional,degrees,of,freedom,are,introduced,so,as,to,elevate,the,mesh,to,higher,orders.,A,complete,description,,as,this,pertains,to,NekMesh,,can,be,found,in,reference,[4].,3.1,CAD,representation,Typically,the,geometry,of,interest,is,modelled,using,a,computer-aided,design,(CAD),system,and,represented,by,a,BRep,(boundary,representation).,A,BRep,is,a,top-down,definition,of,the,computational,domain,,where,it,is,viewed,as,a,volume,of,three-dimensional,space,interior,to,a,boundary,that,can,be,interpreted,as,a,closed,shell,or,curved,polyhedron.,Its,faces,are,regions,defined,on,surfaces,interior,to,curved,polygons,also,lying,on,those,surfaces.,These,polygons,are,composed,by,a,set,of,edges,,which,in,turn,are,segments,of,a,curve,,which,themselves,are,bounded,by,points.,The,points,are,represented,by,their,3D,Cartesian,coordinates.,Curves,and,surfaces,are,usually,defined,in,CAD,systems,through,a,parametric,representation,in,the,form,of,non-uniform,rational,B-splines,(NURBS).,These,representations,provide,a,mapping,between,2,parametric,coordinates,in,a,lower,dimensional,space,to,the,3D,space,,so,that,for,example,a,curve,is,represented,as,a,map,between,a,parametric,coordinate,t,∈,[tmin,,tmax],and,its,Cartesian,coordinate,c(t),,or,a,surface,between,(u,,v),∈,[umin,,umax],×,[vmin,,vmax],and,coordinate,r(u,,v).,The,handling,and,computational,implementation,of,such,representations,is,highly,complex,in,practice,,and,one,of,the,main,challenges,for,mesh,generation,is,ensuring,a,watertight,BRep,that,is,suitable,for,meshing.,Due,to,this,complexity,,the,starting,point,for,NekMesh,is,the,assumption,of,such,a,watertight,BRep;,furthermore,,access,to,points,,curves,,surfaces,and,their,various,properties,(such,as,calculating,derivatives,,normals,or,projections),is,accessed,via,a,suitable,external,CAD,engine.,Although,several,commercial,CAD,engines,are,available,,in,order,to,broaden,access,to,high-order,mesh,generation,routines,,NekMesh,utilises,the,open-source,CAD,framework,OpenCASCADE,[5].,In,this,report,we,limit,ourselves,to,the,use,of,OpenCASCADE;,however,,it,is,notable,that,NekMesh,accesses,CAD,engines,through,a,lightweight,wrapper,,which,means,that,other,engines,can,be,incorporated,in,an,API-independent,manner.,3.2,Mesh,sizing,specification,Before,any,mesh,construction,can,commence,,a,prerequisite,is,to,specify,a,mesh,sizing,distribu-,tion,that,indicates,the,desired,density,of,elements,within,the,curves,and,surfaces,of,the,BRep.,In,NekMesh,,the,goal,is,to,do,this,in,a,manner,that,is,as,automatic,as,possible;,i.e.,using,as,few,parameters,as,possible.,We,therefore,adopt,a,curvature-based,refinement,approach,,in,which,the,underlying,assumption,is,that,regions,of,higher,curvature,generally,require,a,smaller,element,size,in,order,to,resolve,them.,We,briefly,outline,this,approach,here,,but,further,details,can,be,found,in,[6].,The,radius,of,curvature,,R,,at,a,point,on,the,surface,is,the,radius,of,a,circle,that,has,“optimal”,osculating,contact,with,the,surface.,A,measure,of,how,well,a,mesh,of,size,δ,represents,the,surface,will,be,given,by,the,ratio,(cid:15),=,c/R,,where,c,is,the,maximum,distance,between,the,mesh,element,and,the,surface.,If,we,approximate,the,surface,by,its,osculating,circle,we,can,relate,the,mesh,sizing,,the,radius,of,curvature,,and,the,ratio,(cid:15),through,δ,=,2R(cid:112)(cid:15)(2,−,(cid:15)),,(1),where,now,(cid:15),can,be,interpreted,as,a,user-defined,parameter,that,controls,the,mesh,resolution,with,respect,to,surface,curvature.,For,instance,,decreasing,(cid:15),will,increase,the,number,of,elements,specified,for,a,given,curvature.,In,practice,,the,radius,of,curvature,is,calculated,as,R,=,min,(cid:8)k1,−1(cid:9),where,k1,and,k2,are,the,principal,curvatures,obtained,from,the,metric,and,curvature,tensors,(or,first,and,second,fundamental,forms),of,the,parametric,form,of,the,CAD,surfaces.,This,leads,to,an,isotropic,mesh,specification,since,the,directionality,of,the,curvature,is,not,considered,,but,extension,to,anisotropic,meshes,is,possible.,−1,,k2,Since,the,radius,of,curvature,has,the,range,R,∈,[0,,∞),,where,R,=,∞,corresponds,to,a,flat,surface,,we,must,set,bounds,on,δ,,so,that,δ,∈,[δmin,,δmax].,The,parameter,δmin,limits,the,density,of,elements,in,regions,of,high,curvature,,while,δmax,is,the,global,maximum,element,size.,The,three,constants,δmin,,δmax,and,(cid:15),represent,the,only,user-specified,parameters,required,for,the,automatic,mesh,specification,process.,To,specify,a,spatial,distribution,of,mesh,sizing,,the,three-dimensional,domain,is,spatially,subdivided,and,smoothed,from,the,BRep,through,the,use,of,an,octree,structure.,3.3,Surface,mesh,generation,The,surface,mesh,is,generated,via,a,bottom-up,approach,,wherein,mesh,vertices,are,fixed,to,the,vertices,of,the,CAD,(0D);,curves,are,then,meshed,in,their,1D,parameter,space,using,the,3,bounding,vertices;,and,the,the,2D,parameter,spaces,of,the,surfaces,are,then,meshed,,using,the,curve,meshes,as,boundaries.,Should,a,volume,mesh,be,desired,,the,resulting,interior,volume,is,constructed,using,the,surface,mesh,as,its,exterior,constraint.,So,far,,none,of,the,techniques,discussed,above,are,related,to,high-order,meshes,in,particular:,indeed,bottom-up,mesh,generation,is,typically,adopted,in,standard,linear,mesh,generation,frameworks.,However,,when,elevating,a,linear,to,high-order,mesh,,maintaining,the,connection,between,mesh,vertices,and,their,corresponding,parametric,coordinates,within,CAD,vertices,,curves,and,surfaces,is,critical,in,ensuring,that,optimal,node,locations,can,be,found,for,the,new,degrees,of,freedom,needed,to,construct,high-order,elements.,A,key,motivation,for,the,development,of,NekMesh,is,that,when,using,external,open-source,or,commerical,linear,mesh,generation,technology,,such,a,connection,is,typically,lost,in,the,resultant,surface,mesh.,Use,of,this,bottom-up,approach,therefore,ensures,that,the,CAD,information,associated,with,all,the,vertices,,edges,and,faces,in,the,surface,mesh,is,kept,and,can,be,utilised,easily,in,the,high-order,stages,of,the,meshing,pipeline.,In,the,remainder,of,this,section,we,discuss,the,(linear),discretisation,of,curves,and,surfaces,,and,then,outline,the,high-order,mesh,generation,process.,3.3.1,Curve,discretisation,The,discretisation,of,a,CAD,curves,c(t),into,linear,segments,approximately,compliant,with,the,spacing,specified,by,the,mesh,control,system,is,achieved,through,a,distribution,function.,If,the,mesh,spacing,at,a,point,c(t),is,δ,,then,the,number,of,subdivisions,generated,in,a,small,interval,of,length,ds,in,its,neighbourhood,,so,δ,is,approximately,constant,,is,ds/δ.,Further,,if,ds,corresponds,to,the,arc,length,of,the,curve,,the,total,number,of,subdivisions,for,an,interval,tmin,≤,t,≤,tk,will,be,I(tk),=,(cid:90),tk,tmin,1,δ(t),(cid:13),(cid:13),(cid:13),(cid:13),dc,dt,(cid:13),(cid:13),(cid:13),(cid:13),dt,(2),The,positions,tk;,k,=,1,,.,.,.,,,Ne,−,1,of,the,internal,nodes,to,be,created,are,the,solutions,of,the,equation,φ(tk),=,Ne,I(tk),I(tmax),=,k,;,k,=,1,,.,.,.,,,Ne,−,1,(3),where,φ(t),is,the,distribution,function,and,Ne,denotes,the,number,of,sides,generated,on,the,curve.,Its,value,is,chosen,to,be,the,nearest,integer,value,to,I(tmax).,The,solution,of,equation,(3),requires,first,to,approximate,the,distribution,of,δ(t),in,equation,(2),by,sampling,the,mesh,spacing,along,the,curve.,The,samples,are,chosen,to,be,equally,spaced,along,the,curve,at,a,distance,smaller,than,δmin.,The,integral,is,then,evaluated,using,a,suitable,quadrature,and,the,solution,to,equation,(3),is,obtained,via,Newton,iteration.,More,details,of,the,method,are,given,in,reference,[7].,3.3.2,Surface,discretisation,Meshing,the,surfaces,in,the,bottom-up,meshing,process,requires,the,meshing,of,a,2D,domain,,the,parametric,space,of,the,surface,,which,is,bound,by,the,mesh,vertices,and,edges,as,defined,by,the,curve,discretisations.,NekMesh,utilises,an,adapted,version,of,the,code,Triangle,,a,2D,Delaunay,mesh,generation,library,[8],,to,deal,with,the,specific,aspects,of,surface,mesh,generation.,The,reason,for,choosing,the,Delaunay,method,is,that,it,guarantees,a,unique,triangulation,for,a,given,set,of,points,,provided,the,circumcircle,passing,through,the,three,vertices,of,any,triangle,in,the,mesh,does,not,contain,another,point,in,the,mesh,,with,the,co-,circular,case,requiring,special,handling,to,account,for,floating-point,arithmetic.,Further,,the,4,implementation,via,robust,geometric,predicates,[9],of,the,circumcircle,test,,the,incremental,point,insertion,and,boundary,sides,recovery,algorithms,in,Triangle,ensures,that,the,mesh,is,valid,at,each,stage,of,the,generation,process.,The,main,drawback,of,the,Delaunay,approach,for,the,purposes,of,surface,mesh,generation,is,that,it,tends,to,create,a,high,quality,,isotropic,triangulation,in,the,2D,space.,Therefore,the,3D,mesh,will,inherit,the,distortion,of,the,parameter,space,and,elements,defined,in,the,2D,parameter,space,may,become,stretched,and,distorted,in,3D,space.,This,effect,depends,on,how,the,surface,is,parameterised;,approaches,to,mitigate,this,can,be,found,in,[4].,The,method,used,for,generating,meshes,on,individual,surfaces,throughout,this,work,proceeds,as,follows.,Beginning,with,the,discretisation,of,the,CAD,curves,which,represent,the,boundary,of,the,surface,,a,set,of,mesh,nodes,and,edges,are,determined.,Triangle,is,used,to,obtain,an,initial,triangulation,of,these,boundary,points,in,the,parameter,space.,New,mesh,points,are,then,determined,by,looking,over,the,triangles,of,the,mesh,in,3D,space.,If,any,side,of,the,2δ(x),,where,x,is,taken,to,be,the,midpoint,of,the,side,,a,triangle,is,greater,in,length,than,new,point,is,defined,at,the,centre,of,the,triangle.,The,set,of,points,,interior,and,boundary,,are,then,re-meshed.,The,process,is,repeated,until,all,the,sides,in,the,triangulation,conform,to,the,mesh,spacing,specification.,In,order,to,enhance,the,quality,of,the,resultant,mesh,,various,local,refinement,strategies,are,employed:,notably,,the,use,of,edge,swapping,dependent,on,optimal,valance,and,minimum,angle,,and,mesh,smoothing,,which,modifies,the,positions,of,the,interior,nodes,without,changing,the,connectivity,of,the,grid.,√,3.3.3,High-order,surface,mesh,generation,A,high-order,element,Ωe,of,a,surface,triangulation,of,order,P,is,represented,through,a,polyno-,mial,mapping,χe,:,ˆΩ,→,Ωe,,where,ˆΩ,=,{(ξ1,,ξ2),|,ξ1,,ξ2,∈,[−1,,1],,ξ1,+,ξ2,≤,0},is,a,reference,sim-,plex,and,ξ,=,(ξ1,,ξ2),denotes,a,coordinate,in,ˆΩ.,Furthermore,,this,mapping,is,typically,written,using,collocated,Lagrange,interpolants,(cid:96)n(ξ),that,depend,on,a,choice,of,N,=,(P,+,1)(P,+,2)/2,cubature,points,{ξn,|,ξn,∈,ˆΩ,,1,≤,n,≤,N,},,such,as,the,α-optimised,points,of,Hesthaven,or,a,distribution,of,Fekete,points,,both,discussed,in,[10].,In,this,manner,,world-space,coordinates,x,may,be,written,through,the,expansion,x,=,χe(ξ),=,N,(cid:88),n=1,xn(cid:96)n(ξ).,The,challenge,therefore,is,to,determine,a,set,of,spatial,coordinates,xn,which,correspond,to,each,cubature,point,ξn,,so,that,‘high,quality’,surface,meshes,are,defined,,using,a,definition,of,quality,that,aligns,with,the,problem,of,interest.,It,is,well,known,that,inaccuracies,in,the,representation,of,the,geometric,boundary,have,a,significant,impact,on,the,flow,solution,in,high-order,simulations.,These,inaccuracies,include,highly,distorted,surface,elements,,mesh,nodes,being,a,significant,distance,from,the,true,CAD,surface,,and,under-representation,of,the,geometric,curvature,due,to,using,an,insufficiently,polynomial,order,with,too,large,a,element.,In,the,problems,of,interest,to,NEPTUNE,,we,may,also,add,to,this,list,that,surface,normals,that,result,from,the,high-order,element,,i.e.,n(ξ),=,∂χe,∂ξ1,∂χe,∂ξ1,(cid:13),(cid:13),(cid:13),(cid:13),×,×,∂χe,∂ξ2,∂χe,∂ξ2,(cid:13),(cid:13),(cid:13),(cid:13),(4),should,be,closer,than,0.1◦,to,those,normals,observed,using,the,CAD,engine.,5,If,the,vertex,locations,of,the,linear,surface,mesh,are,taken,to,be,fixed,,producing,a,high-,order,surface,can,be,accomplished,simply,by,using,an,affine,mapping,of,the,triangle,in,the,2D,parameter,plane,to,the,reference,triangle,of,a,high-order,element.,This,can,then,be,used,to,locate,the,new,high-order,nodes,in,the,parameter,space,,which,are,then,projected,into,3D,using,the,CAD,engine.,However,,this,means,that,the,high-order,triangles,will,inherit,the,distortion,of,the,CAD,surface,,lowering,the,quality,of,the,mesh,and,in,some,cases,causing,invalid,elements.,Curve,discretization.,The,rest,of,this,section,presents,a,method,to,take,the,high-order,surface,mesh,made,using,the,affine,mapping,approach,and,optimise,the,location,of,the,high-,order,nodes,to,reduce,CAD,induced,distortion.,This,is,done,by,modelling,the,mesh,entities,as,spring,networks,and,minimising,the,spring,energy,,in,a,similar,approach,to,the,work,of,[11].,This,is,expressed,mathematically,as,finding,min,xn,f,=,min,(cid:88),s,(cid:107)x1,−,x2(cid:107)2,ws,,,(5),which,states,that,f,,,the,spring,energy,,is,the,sum,over,all,the,springs,in,the,system,,where,x1,and,x2,are,the,3D,locations,of,the,nodes,at,the,ends,of,the,springs,and,ws,is,the,inverse,of,the,spring,stiffness,,which,is,calculated,as,a,function,of,the,nodal,distribution,being,targeted.,Because,the,linear,mesh,vertices,are,held,fixed,during,this,procedure,,the,problem,can,be,reduced,to,an,entity-by-entity,approach.,First,optimising,mesh,edges,that,lie,on,curves;,then,edges,that,lie,on,surfaces;,and,finally,interior,triangle,faces,that,lie,on,CAD,surfaces.,In,the,first,case,(edges,on,CAD,curves),,the,problem,is,a,1D,optimisation,of,spring,system,in,the,curve’s,parameter,space,t.,f,=,P,(cid:88),i=1,(cid:107)c(ti+1),−,c(ti)(cid:107)2,wi,,,(6),Where,i,is,one,of,the,P,+,1,nodes,along,the,high-order,edge.,Here,,P,is,the,polynomial,order,of,the,mesh,being,created,and,wi,=,zi+1,−,zi,,where,zi,is,the,i-th,entry,in,the,distribution,of,nodal,points,in,the,where,−1,≤,z,≤,1.,The,initial,values,of,t,are,obtained,from,the,linear,1D,mapping,ti,=,t1,(cid:19),(cid:18)1,−,zi,2,+,tP,+1,(cid:19),(cid:18),1,+,zi,2,i,=,1,,...,,P,+,1.,(7),where,t1,and,tP,+1,are,the,parametric,coordinates,of,the,end,nodes,of,the,edge,,which,are,the,vertices,in,the,linear,mesh,and,are,considered,to,be,fixed.,Surface,discretization.,Performing,the,optimisation,of,the,edges,which,lie,on,the,CAD,surfaces,follows,a,similar,procedure,but,is,formulated,in,the,2D,parameter,plane,,i.e,f,=,P,(cid:88),i=1,(cid:107)r(ui+1,,vi+1),−,r(ui,,vi)(cid:107)2,wi,.,(8),This,procedure,reduces,the,distortion,found,in,the,high-order,edges,by,minimising,the,length,of,the,edge;,that,is,,the,optimised,high-order,edge,will,lie,approximately,on,the,geodesic,between,the,two,end,points,on,the,surface.,The,procedure,for,optimising,the,location,of,face,interior,nodes,requires,a,slightly,alternative,approach.,The,system,is,considered,as,a,set,of,freely,movable,nodes,,consisting,of,those,nodes,6,Figure,1:,Distribution,of,spring-node,system,for,face-interior,nodes,within,a,high-order,P,=,4,Fekete,distribution.,lying,on,the,interior,of,the,triangle,,and,a,set,of,fixed,nodes,which,lie,on,the,edges.,Each,of,the,free,nodes,is,connected,to,a,system,of,six,surrounding,nodes,by,springs,,and,this,is,the,system,which,is,minimised.,In,a,triangle,of,order,P,,,there,are,(P,−,2)(P,−,1)/2,interior,nodes.,The,function,f,is,(P,−2)(P,−1)/2,(cid:88),6,(cid:88),f,=,i=1,s,(cid:107)r(ui,,vi),−,r(us,,vs)(cid:107)2,ws,,,(9),where,ws,is,calculated,as,the,distance,between,the,two,nodes,in,a,reference,equilateral,triangle,,shown,in,figure,1,along,with,the,connectivity,of,the,springs.,The,choice,of,a,six,spring,system,means,that,the,method,is,applicable,to,any,point,distribution,at,any,order.,For,example,,figure,1,shows,a,P,=,4,triangle,with,a,Gauss-Lobatto-Legendre,distribution,along,the,edges,and,a,triangular,Fekete,distribution,for,the,face,interior,points.,The,optimisation,of,the,energy,itself,must,be,performed,numerically.,A,number,of,optimisation,algorithms,are,suitable,,since,the,function,readily,admits,analytic,derivatives.,However,,since,each,CAD,entity,is,typically,defined,using,a,bounded,parametric,space,,this,imposes,some,limits,in,terms,of,constrained,optimisation.,In,practice,therefore,,we,have,found,that,a,bounded,version,of,the,BFGS,algorithm,[12],is,well-suited,to,this,problem,and,produces,optimal,locations,after,only,a,few,iterations.,4,Test,cases,Since,surface,normal,representation,is,a,key,quality,,a,notable,omission,in,the,high-order,gen-,eration,process,above,is,that,the,functional,f,defined,in,equation,(5),,which,is,used,to,optimise,for,node,locations,,is,designed,to,only,target,geodesics,of,the,underlying,surface:,no,particular,emphasis,is,given,in,the,optimisation,to,other,metrics,,such,as,normal,deflection.,Therefore,there,remains,a,question,of,whether,this,approach,is,well-suited,for,the,specific,NEPTUNE,applications.,In,this,section,,we,attempt,to,investigate,this,through,the,use,of,two,simple,geometries.,The,first,is,a,straightforward,sphere,,for,which,we,would,expect,excellent,agreement,with,the,exact,7,and,CAD,normals.,The,second,geometry,is,a,more,complex,box,section,,which,comprises,several,cylindrical,sections,arranged,in,a,cuboid,structure,with,weldments,at,each,corner.,This,provides,a,more,challenging,test,,although,still,being,relatively,simple.,Moreover,,each,case,contains,only,curved,surfaces,,since,preliminary,investigation,showed,that,planar,surfaces,clearly,present,far,less,of,a,challenge,from,this,perspective.,Each,problem,is,then,be,examined,at,a,variety,of,mesh,densities,and,polynomial,orders.,However,,before,presenting,the,results,,we,first,take,the,opportunity,to,discuss,the,implementation,of,a,new,module,within,NekMesh,undertaken,during,this,work,package,to,calculate,the,desired,metrics.,4.1,Methodology,and,NekMesh,code,In,NekMesh,,we,adopt,a,‘pipeline’,framework,,whereby,either,CAD,or,the,resulting,linear/high-,order,meshes,are,translated,through,a,series,of,modules.,Each,module,has,a,specific,purpose:,be,that,to,input,(e.g.,read,an,existing,mesh,,generate,a,surface,mesh,from,CAD,,etc);,process,a,mesh,(e.g.,elevate,a,linear,mesh,to,high,order),or,to,write,the,mesh,to,a,number,of,known,formats.,Programattically,,a,module,is,represented,as,an,abstract,base,class,Module,,and,the,Mesh,object,is,passed,to,a,virtual,Process,function,that,allows,the,module,to,run,its,task.,For,this,deliverable,a,new,CADMetrics,module,was,designed,to,compute,the,desired,metrics,by,evaluating,surface,normals,of,high-order,elements,and,comparing,their,deflection,to,those,given,by,the,CAD,engine.,As,a,secondary,assessment,,we,also,consider,the,maximum,displacement,from,the,CAD,surface.,The,first,task,is,to,determine,the,order,of,the,incoming,mesh,,and,from,this,obtain,the,distri-,bution,of,cubature,points,ξn,within,the,reference,element,ˆΩ.,Process,function,inside,CADMetrics,module.,//,Assume,all,elements,have,homogeneous,order,and,are,triangles,embedded,in,//,3D,space.,auto,elmt0,=,m_mesh->m_element[2][0];,int,order,=,elmt0->GetEdge(0)->m_edgeNodes.size(),+,1;,int,npts,=,(order,+,1),*,(order,+,2),/,2;,//,Get,points,type,(e.g.,Fekete,,electrostatic),LibUtilities::PointsType,pt,=,elmt0->GetCurveType();,//,Get,the,points,themselves,from,the,points,manager.,LibUtilities::PointsSharedPtr,pts,=,LibUtilities::PointsManager()[,LibUtilities::PointsKey(order,+,1,,pt)];,//,Get,positions,of,cubature,points,in,standard,element.,Array,r(npts),,s(npts);,pts->GetPoints(r,,s);,Ultimately,,we,will,require,the,computation,of,the,surface,normal:,this,necessitates,the,compu-,tation,of,the,derivatives,of,the,mapping,χe,for,each,element,Ωe.,This,can,be,achieved,through,the,computation,of,the,derivative,matrices,D0,and,D1,,which,when,multiplied,by,the,coordi-,nate,vector,{xn}N,n=1,will,yield,partial,derivatives,with,respect,to,ξ1,and,ξ2,,accordingly.,Given,the,locations,of,the,nodal,points,,we,can,use,the,broader,Nektar++,library,to,construct,a,NodalUtilTriangle,object,,which,computes,these,matrices,for,us.,8,Calculating,derivative,matrices.,//,Build,derivative,matrices,from,Vandermonde,matrix,using,//,the,NodalUtilTriangle,class.,std::unique_ptr,triutil,=,std::make_unique(order,,r,,s);,//,Compute,derivative,matrices,for,each,coordinate,direction.,auto,D0,=,triutil->GetDerivMatrix(0);,auto,D1,=,triutil->GetDerivMatrix(1);,Then,we,simply,loop,over,each,element,and,call,a,utility,member,function,,ElementStats,,which,will,compute,the,desired,statistics,for,this,element.,Computing,elemental,statistics.,//,Loop,over,all,2D,surface,elements,,compute,normal,deflection,at,each,//,quadrature,point,and,surface,distance,at,each,point,,then,place,into,//,angs,and,dists,vectors,accordingly.,std::vector,angs,,dists;,int,cnt,=,0;,for,(auto,&elmt,:,m_mesh->m_element[2]),{,ElementStats(elmt,,D0,,D1,,angs,,dists);,++cnt;,},Inside,ElementStats,,we,first,obtain,the,list,of,coordinates,{xn}N,n=1,that,has,been,generated,by,the,surface,meshing,process,outlined,in,section,3.3.2,,and,then,multiply,by,the,derivative,matrices,to,obtain,the,desired,vectors,for,the,normal,calculation.,Compute,derivatives.,//,Get,a,vector,of,element,coordinates.,std::vector,nodes;,elmt->GetCurvedNodes(nodes);,int,npts,=,nodes.size();,//,Construct,coordinate,vectors,from,this,list.,NekVector,xc(npts),,yc(npts),,zc(npts);,for,(int,i,=,0;,i,<,npts;,++i),{,xc[i],=,nodes[i]->m_x;,yc[i],=,nodes[i]->m_y;,zc[i],=,nodes[i]->m_z;,},//,Compute,derivatives.,NekVector,xd0,=,(*D0),*,xc,,xd1,=,(*D1),*,xc;,NekVector,yd0,=,(*D0),*,yc,,yd1,=,(*D1),*,yc;,9,NekVector,zd0,=,(*D0),*,zc,,zd1,=,(*D1),*,zc;,Looping,over,each,point,,we,then,compute,the,surface,normal,as,given,in,equation,(4).,Computing,surface,normals.,//,Compute,surface,normal,from,curl,at,each,point.,NekDouble,N0,=,yd0[i],*,zd1[i],-,zd0[i],*,yd1[i];,NekDouble,N1,=,zd0[i],*,xd1[i],-,xd0[i],*,zd1[i];,NekDouble,N2,=,xd0[i],*,yd1[i],-,yd0[i],*,xd1[i];,NekDouble,norm_abs,=,sqrt(N0,*,N0,+,N1,*,N1,+,N2,*,N2);,N0,/=,norm_abs;,N1,/=,norm_abs;,N2,/=,norm_abs;,Finally,,we,can,then,loop,over,each,CAD,surface,that,a,node,is,attached,to,,and,query,the,CAD,surface,at,the,parametric,coordinates,stored,for,that,node.,We,note,that,a,node,might,well,be,attached,to,a,number,of,surfaces,if,it,happens,to,be,on,a,curve,that,connects,surfaces,,or,indeed,a,vertex,that,connects,multiple,curves;,we,therefore,assume,the,evaluation,that,gives,us,the,lowest,value,of,the,normal,deflection,is,the,‘best’,,although,in,theory,for,smooth,surfaces,these,differences,should,be,minimal.,Querying,the,CAD,engine,and,computing,desired,metrics.,std::vector,tmpangs,,tmpdists;,for,(auto,&surfpair,:,nodes[i]->CADSurfList),{,//,CAD,surface,object.,CADEngine::CADSurf,surf,=,surfpair.second.first.lock();,//,Location,of,(u,,v),within,parametric,space.,auto,uv,=,surfpair.second.second;,//,Calculate,CAD,normal,and,position.,auto,cadN,=,surf->N(uv),,cadP,=,surf->P(uv);,if,(ang,!=,ang),{,//,Occasionally,CAD,engine,fails,to,evaluate,normal...,continue;,},//,Calculate,distance.,tmpdists.push_back(,sqrt(,(cadP[0],-,xc[i]),*,(cadP[0],-,xc[i]),+,(cadP[1],-,yc[i]),*,(cadP[1],-,yc[i]),+,(cadP[2],-,zc[i]),*,(cadP[2],-,zc[i]),));,10,//,Calculate,normal,deflection,angle.,NekDouble,ang,=,std::acos(,N0,*,cadN[0],+,N1,*,cadN[1],+,N2,*,cadN[2]);,std::vector,tmpangs2,=,{,std::abs(ang),,std::abs(M_PI-ang),,std::abs(ang-M_PI),};,//,Check,also,pi,-,angle,,in,case,normal,is,reversed,in,orientation.,tmpangs.push_back(*std::min_element(tmpangs2.begin(),,tmpangs2.end()));,},//,Store,lowest,answers.,dists.push_back(*std::min_element(tmpdists.begin(),,tmpdists.end()));,angs.push_back(*std::min_element(tmpangs.begin(),,tmpangs.end()));,The,module,concludes,by,simply,printing,out,the,surface,area,and,the,desired,statistics.,Compute,and,print,desired,statistics.,//,Compute,total,surface,area,int,nCadSurf,=,m_mesh->m_cad->GetNumSurf();,NekDouble,totarea,=,0.0;,for,(int,i,=,0;,i,<,nCadSurf;,++i),{,totarea,+=,m_mesh->m_cad->GetSurf(i+1)->Area();,},m_log(INFO),<<,"Surface,area:,",<<,totarea,<<,std::endl;,//,Compute,maximum,and,average,normal,angle,deflection.,NekDouble,avgang,=,std::accumulate(angs.begin(),,angs.end(),,0.0),/,angs.size();,m_log(INFO),<<,"Max.,angle,:,",<<,rad2deg(*std::max_element(angs.begin(),,angs.end())),<<,std::endl;,m_log(INFO),<<,"Avg.,angle,:,",<<,rad2deg(avgang),<<,std::endl;,//,Compute,maximum,distance,to,CAD,surface.,m_log(INFO),<<,"Max.,dist.,:,",<<,*std::max_element(dists.begin(),,dists.end()),<<,std::endl;,4.2,Spherical,geometry,The,first,test,case,is,a,simple,sphere,of,diameter,1,with,corresponding,surface,area,of,π,,shown,in,figure,2.,The,CAD,is,comprised,of,six,equally,sized,tensor-product,patches,of,NURBS,surfaces.,Each,edge,is,a,great,circle,of,the,sphere,,and,thus,this,yields,an,exact,representation,11,(a),Sphere,defined,using,6,NURBS,surfaces.,(b),Resultant,high-order,mesh,at,P,=,4.,Figure,2:,Simple,sphere,surface,in,(a),BRep,form,,where,dashed,lines,show,surfaces,and,solid,lines,show,curves;,(b),meshed,form,,after,high-order,mesh,generation,at,polynomial,order,P,=,4,with,δ,=,0.1.,of,the,sphere,as,well,as,removes,effects,of,surface,distortion,owing,to,the,use,of,e.g.,degenerate,patches.,For,this,series,of,simulations,,we,prescribe,δmin,=,δmax,=,(cid:15),=:,δ,with,a,fixed,value,of,δ,=,0.1,,0.05,,0.01,and,0.005,,so,that,all,meshes,are,uniform,in,element,size.,This,yields,mesh,densities,of,between,814,and,333,714,elements,,or,between,259,and,106,224,elements,per,surface,area,unit.,The,resultant,statistics,for,this,case,can,be,found,in,table,1.,Broadly,,this,case,is,rather,as,one,would,expect,to,see;,in,virtually,all,cases,,the,maximum,normal,deflection,angle,θmax,is,well,below,the,required,0.1◦,in,virtually,all,cases,,as,is,the,average,θavg;,furthermore,,as,the,element,or,nodal,point,density,is,increased,,either,as,the,curvature,bound,δ,is,reduced,or,the,polynomial,order,increased,,there,is,a,broad,reduction,in,all,metrics,,as,expected.,Uniformly,the,surface,distance,is,near,machine,tolerance.,4.3,Cuboid,box,section,In,this,section,,we,evaluate,normals,for,a,cuboid,box,section,,the,BRep,of,which,can,be,depicted,visually,in,figure,3(a).,This,geometry,contains,more,complexity,,in,that,it,comprises,12,cylindrical,sections,arranged,in,a,cuboid,section,,which,are,connected,with,weldments,at,each,corner.,Consequently,the,BRep,contains,24,faces,and,82,curves.,As,in,the,previous,section,,we,record,the,same,statistics,but,now,utilising,a,slightly,different,choice,of,δ,to,allow,for,the,increased,level,of,curvature,in,this,model;,we,select,δ,=,0.007,,0.003,and,0.0008,respectively.,A,high-order,mesh,at,P,=,5,is,visualised,in,figure,3(b).,The,presented,results,shown,in,table,2,reveal,much,of,the,same,trend,as,we,see,in,the,sphere,geometry,,although,broadly,the,maximum,and,average,angles,of,deflection,are,larger.,Very,curiously,however,,at,P,=,4,and,P,=,5,,there,is,a,large,deflection,noted,at,the,finest,resolution,,virtually,at,a,right,angle,to,the,desired,normal.,Clearly,the,presence,of,such,a,normal,in,reality,would,render,the,mesh,virtually,unusable.,To,investigate,this,further,,the,location,of,points,12,P,δ,2,2,2,2,3,3,3,3,4,4,4,4,0.1,0.05,0.01,0.005,0.1,0.05,0.01,0.005,0.1,0.05,0.01,0.005,θmax,[◦],5.82,·,10−1,1.18,·,10−1,6.75,·,10−3,1.97,·,10−3,6.54,·,10−2,8.26,·,10−3,9.02,·,10−5,1.29,·,10−5,3.69,·,10−3,1.86,·,10−4,1.71,·,10−6,1.91,·,10−6,θavg,[◦],1.21,·,10−1,2.73,·,10−2,1.15,·,10−3,2.75,·,10−4,9.91,·,10−3,1.17,·,10−3,1.03,·,10−5,1.27,·,10−6,3.08,·,10−4,1.48,·,10−5,2.68,·,10−7,2.67,·,10−7,dmax,1.35,·,10−15,1.45,·,10−15,1.52,·,10−15,1.61,·,10−15,1.57,·,10−15,1.57,·,10−15,1.64,·,10−15,1.61,·,10−15,1.44,·,10−15,1.58,·,10−15,1.54,·,10−15,1.64,·,10−15,Nelmt,814,3,414,82,384,333,714,814,3,414,82,384,333,714,814,3,414,82,384,333,714,Table,1:,Mesh,generation,statistics,of,maximum,normal,deflection,angle,θmax,,average,normal,deflection,angle,θavg,,maximum,surface,distance,dmax,and,number,of,elements,Nelmt,for,the,sphere,geometry,,given,an,input,polynomial,order,P,and,curvature,bound,δ.,(a),BRep,of,box,section.,(b),Resultant,high-order,mesh,at,P,=,4.,Figure,3:,Box,section,surface,in,(a),BRep,form,,where,dashed,lines,show,surfaces,and,solid,lines,show,curves;,(b),meshed,form,,after,high-order,mesh,generation,at,polynomial,order,P,=,5,with,δ,=,0.003.,13,P,δ,2,2,2,3,3,3,4,4,4,5,5,5,0.007,0.003,0.0008,0.007,0.003,0.0008,0.007,0.003,0.0008,0.007,0.003,0.0008,θmax,[◦],5·101,3.03,·,100,1.4,·,10−1,3.16,·,101,1.12,·,100,4.34,·,10−2,2.12,·,101,1.32,·,10−1,9·101,8.68,·,100,4.94,·,10−2,9·101,θavg,[◦],1.79,·,100,8.76,·,10−2,2.34,·,10−3,7.57,·,10−1,2.98,·,10−2,7.55,·,10−4,9.98,·,10−2,4.33,·,10−4,3.15,·,10−3,5.35,·,10−2,1.83,·,10−4,3.84,·,10−3,dmax,1.46,·,10−16,1.46,·,10−16,1.53,·,10−16,1.46,·,10−16,1.46,·,10−16,1.72,·,10−16,1.46,·,10−16,1.53,·,10−16,1.86,·,10−16,1.46,·,10−16,1.62,·,10−16,1.87,·,10−16,Nelmt,1,676,10,696,129,734,1,676,10,696,129,734,1,676,10,696,129,734,1,676,10,696,129,734,Table,2:,Mesh,generation,statistics,of,maximum,normal,deflection,angle,θmax,,average,normal,deflection,angle,θavg,,maximum,surface,distance,dmax,and,number,of,elements,Nelmt,for,the,box,geometry,,given,an,input,polynomial,order,P,and,curvature,bound,δ.,with,a,deflection,angle,above,1,radian,is,visualised,in,figure,4,,where,it,is,evident,that,these,occur,on,or,very,close,to,the,weldment,boundaries.,It,is,therefore,perhaps,more,probable,in,this,instance,,since,the,high-order,elements,themselves,seem,well-aligned,with,the,surface,,that,the,CAD,engine,itself,is,generating,spurious,normals,close,to,the,edge,of,the,parametrisation.,Indeed,on,the,whole,,average,deflections,remain,very,small,throughout.,We,do,additionally,note,that,the,mesh,in,this,figure,is,not,the,finest,level,mesh,,but,is,used,purely,for,visualisation,purposes.,5,Conclusions,and,future,directions,This,report,has,outlined,the,methods,and,techniques,used,for,high-order,surface,mesh,gener-,ation,within,the,NekMesh,mesh,generation,package,,with,a,particular,focus,on,the,maximum,deflection,angle,of,surface,normals,from,the,CAD,engine.,Broadly,,it,has,been,found,that,the,existing,methodology,,at,least,for,simple,geometries,,is,capable,of,generating,high,quality,surface,meshes.,Due,to,time,constraints,in,the,initial,phase,of,this,project,,it,was,not,possible,to,consider,far,more,complex,geometries,due,to,time,required,for,CAD,cleanup,and,watertight,geometry,testing;,however,this,is,a,clear,area,for,future,study,,and,this,work,outlines,at,least,the,potential,for,this,methodology.,There,are,a,clear,number,of,routes,for,future,work,in,this,area.,Firstly,,the,abnormalities,seen,in,the,box,geometry,in,the,previous,section,should,be,validated,using,an,alternative,CAD,engine.,NekMesh,has,a,link,to,the,commercial,CAD,engine,CADfix,,which,could,be,used,as,an,alternative,testbed,for,the,geometry.,Additionally,,it,is,clear,that,if,the,requirement,is,to,guarantee,surface,normal,representation,below,a,user-supplied,threshold,,then,a,route,towards,enabling,this,would,be,to,incorporate,additional,terms,into,the,minimisation,process,defined,in,equation,(5).,Clearly,a,balance,between,surface,geometry,representation,(i.e.,the,ability,to,track,geodesics),together,with,normal,representation,must,be,struck.,However,,the,addition,of,an,extra,term,that,gives,high,functional,values,to,configurations,having,large,deflections,from,the,CAD,normal,should,lead,to,the,desired,effect.,However,we,do,note,that,in,this,case,,computing,derivatives,may,be,more,challenging,,in,which,case,non-gradient,based,optimisation,14,Figure,4:,Visualisation,of,location,of,high,deflection,points,with,reported,normals,above,1,radian.,techniques,could,be,appropriate.,References,[1],George,Karniadakis,and,Spencer,Sherwin.,Spectral/Hp,Element,Methods,for,Computa-,tional,Fluid,Dynamics.,Oxford,University,Press,,2013.,[2],David,Moxey,,Chris,D.,Cantwell,,Yan,Bao,,Andrea,Cassinelli,,Giacomo,Castiglioni,,Sehun,Chun,,Emilia,Juda,,Ehsan,Kazemi,,Kilian,Lackhove,,Julian,Marcon,,Gianmarco,Mengaldo,,Douglas,Serson,,Michael,Turner,,Hui,Xu,,Joaquim,Peir´o,,Robert,M.,Kirby,,and,Spencer,J.,Sherwin.,Nektar++:,Enhancing,the,capability,and,application,of,high-fidelity,spectral/hp,element,methods.,Computer,Physics,Communications,,249:107110,,April,2020.,[3],C.,D.,Cantwell,,D.,Moxey,,A.,Comerford,,A.,Bolis,,G.,Rocco,,G.,Mengaldo,,D.,de,Grazia,,S.,Yakovlev,,J.-E.,Lombard,,D.,Ekelschot,,B.,Jordi,,H.,Xu,,Y.,Mohamied,,C.,Eskilsson,,B.,Nelson,,P.,Vos,,C.,Biotto,,R.,M.,Kirby,,and,S.,J.,Sherwin.,Nektar++:,An,open-source,spectral/hp,element,framework.,Computer,Physics,Communications,,192:205–219,,2015.,[4],Michael,Turner.,High-Order,Mesh,Generation,for,CFD,Solvers.,PhD,Thesis,,Imperial,College,London,,2017.,[5],Open,Cascade,-,software,development,company.,https://www.opencascade.com/.,[6],M.,Turner,,D.,Moxey,,and,J.,Peir´o.,Automatic,mesh,sizing,specification,of,complex,three,dimensional,domains,using,an,octree,structure.,In,24th,International,Meshing,Roundtable,,2015.,[7],J.,Peir´o.,Surface,grid,generation.,Handbook,of,grid,generation,,pages,19–1,,1999.,15,[8],Jonathan,Richard,Shewchuk.,Triangle:,Engineering,a,2D,quality,mesh,generator,and,Delaunay,triangulator.,In,Workshop,on,Applied,Computational,Geometry,,pages,203–222.,Springer,,1996.,[9],Jonathan,Richard,Shewchuk.,Adaptive,precision,floating-point,arithmetic,and,fast,robust,geometric,predicates.,Discrete,&,Computational,Geometry,,18(3):305–363,,1997.,[10],Jan,S.,Hesthaven,and,Tim,Warburton.,Nodal,Discontinuous,Galerkin,Methods:,Algo-,rithms,,Analysis,,and,Applications.,Springer,Science,&,Business,Media,,2007.,[11],S.,J.,Sherwin,and,J.,Peir´o.,Mesh,generation,in,curvilinear,domains,using,high-order,International,Journal,for,Numerical,Methods,in,Engineering,,53(1):207–223,,elements.,2002.,[12],Richard,H.,Byrd,,Peihuang,Lu,,Jorge,Nocedal,,and,Ciyou,Zhu.,A,limited,memory,algorithm,for,bound,constrained,optimization.,SIAM,Journal,on,scientific,computing,,16(5):1190–1208,,1995.,16 :pdfembed:`src:_static/CD-EXCALIBUR-FMS0046-M2.1.2_SurfaceMeshGeneration.pdf, height:1600, width:1100, align:middle`