diff --git a/geometries/Test_geoms/Fennecs_article_test.m b/geometries/Test_geoms/Fennecs_article_test.m index e3207a3..e13d2b4 100644 --- a/geometries/Test_geoms/Fennecs_article_test.m +++ b/geometries/Test_geoms/Fennecs_article_test.m @@ -1,119 +1,119 @@ % Creates the geometry for a test case of an empty ring with sqare % cross-section. The boundaries are defined using the curve b-splines % representation. % The magnetic field is the one created by the asg magnet % Both the magnet and geometry are definde in the Final report of the % Development of the european gyrotron CCCGDS6 %% Define the individual boundaries rmin=0.015; rmax=0.065; zmin=-0.025; zmax=0.025; npts=5; geomcells={}; geomcells{1}.Z=zeros(1,4*npts-4); geomcells{1}.R=zeros(1,4*npts-4); geomcells{1}.Z(1)=zmin; geomcells{1}.R(1)=rmin; i=1; dz=(zmax-zmin)/(npts-1); dr=(rmax-rmin)/4; geomcells{1}.Z(i+(1:npts-1))=zmin+dz*(1:(npts-1)); -geomcells{1}.R(i+(1:npts-1))=rmin-[dr/2 dr dr/2 0]; +geomcells{1}.R(i+(1:npts-1))=rmin+[dr/2 dr dr/2 0]; i=i+npts-1; dr=(rmax-rmin)/(npts-1); dz=(zmax-zmin)/4; geomcells{1}.R(i+(1:npts-1))=rmin+dr*(1:(npts-1)); -geomcells{1}.Z(i+(1:npts-1))=zmax-[-dz/2 -dz -dz/2 0]; +geomcells{1}.Z(i+(1:npts-1))=zmax+[-dz/2 -dz -dz/2 0]; i=i+npts-1; dz=(zmax-zmin)/(npts-1); dr=(rmax-rmin)/4; geomcells{1}.Z(i+(1:npts-1))=zmax-dz*(1:(npts-1)); -geomcells{1}.R(i+(1:npts-1))=rmax+[dr/2 dr dr/2 0]; +geomcells{1}.R(i+(1:npts-1))=rmax-[dr/2 dr dr/2 0]; i=i+npts-1; dr=(rmax-rmin)/(npts-1); dz=(zmax-zmin)/4; geomcells{1}.R(i+(1:npts-2))=rmax-dr*(1:(npts-2)); -geomcells{1}.Z(i+(1:npts-2))=zmin-[dz/2 dz dz/2]; +geomcells{1}.Z(i+(1:npts-2))=zmin+[dz/2 dz dz/2]; % geomcells{1}.Z=flip(geomcells{1}.Z); % geomcells{1}.R=flip(geomcells{1}.R); % geomcells{1}.Z=[geomcells{1}.Z(5:end) geomcells{1}.Z(2:5)]; % geomcells{1}.R=[geomcells{1}.R(5:end) geomcells{1}.R(2:5)]; for k=1:length(geomcells) geomcells{k}.order=3; geomcells{k}.dim=2; geomcells{k}.epsce=1e-9; geomcells{k}.epsge=1e-9; geomcells{k}.Dval=0; geomcells{k}.name=sprintf('Electrode_%i',k); geomcells{k}.Z=geomcells{k}.Z; geomcells{k}.R=geomcells{k}.R; geomcells{k}.points=[geomcells{k}.Z; geomcells{k}.R]; geomcells{k}.type=0; geomcells{k}.periodic=1; end %% Plots f=figure; for k=1:length(geomcells) plothandle=plot(geomcells{k}.Z, geomcells{k}.R,'k-x','linewidth',1.5); hold on order=geomcells{k}.order; sizec=size(geomcells{k}.Z); coeffs=[[geomcells{k}.Z(1:end-1) geomcells{k}.Z(1:geomcells{k}.order)]; geomcells{k}.R(1:end-1) geomcells{k}.R(1:geomcells{k}.order)]; if ~geomcells{k}.periodic knots=linspace(0,1,length(geomcells{k}.Z)-(order-2)); knots=augknt(knots, order); else knots=linspace(0,1,size(coeffs,2)-(order-2)); dknots=knots(2)-knots(1); knots=[knots(1)+dknots*(-order+1:-1) knots knots(end)+dknots*(1:order-1)]; end pp=spmak(knots,coeffs); %pp=csape(geomcells{k}.Z,geomcells{k}.R,'periodic'); s=linspace(0,1,1000); fittedpos=fnval(pp,s); plot(fittedpos(1,:),fittedpos(2,:),'x-') end %axis equal %[~,cont2]=contour(Zphi,Rphi,Phi,20,'b'); %rectangle('Position',[-0.011, 0.06375, 0.032+0.011, 0.081-0.06375],'EdgeColor','magenta','Linestyle','--') legend([plothandle],{'Gun geometry', 'Magnetic field lines'},'location','southwest') f.PaperUnits='centimeters'; f.PaperSize=[12,8]; xlabel('z [m]') ylabel('r [m]') % print(f,name,'-dpdf','-fillpage') % savefig(f,name) % set(f, 'Color', 'w'); % export_fig(f,name,'-eps') hold off %% Save magnetic field and geometry to disk save=true; overwrite=true; if save savegeomtoh5('test_square_inb2.h5',geomcells,1e-2,overwrite); end diff --git a/geometries/compare_gt170_proto_refurb/displaydifferences.m b/geometries/compare_gt170_proto_refurb/displaydifferences.m new file mode 100644 index 0000000..1d4526e --- /dev/null +++ b/geometries/compare_gt170_proto_refurb/displaydifferences.m @@ -0,0 +1,258 @@ +% Display the geometry of the gt170 gyrotron gun for the first prototype and for therefurbished geometry. +% The magnetic field is the one of the asg magnet +% This also creates the h5 files of the geometry and of the magnetic field +% to be used in FENNECS + + +%% Define the individual boundaries +%read from input file +geom=importproto('geometry_proto_modif.data',[2,Inf]); +geomcells={}; +j=1; +i=1; +n=1; +% clean and separate the curves +while i<=size(geom.Z,1) + if isnan(geom.Z(i)) + j=j+1; + while isnan(geom.Z(i)) + i=i+1; + end + n=1; + end + geomcells{j}.Z(n)=geom.Z(i); + geomcells{j}.R(n)=geom.R(i); + i=i+1; + n=n+1; +end + +geo_old = geomcells{2}; +%% Correcting the corners + +% Body ----------------------------------------- +N = 30; + +% First corner (lone corner) +start1 = 32; +end1 = 36; +R_corner = cat(2,linspace(geomcells{2}.R(start1),0.0869994,30),linspace(0.0869994,geomcells{2}.R(end1),30)); +Z_corner = cat(2,linspace(geomcells{2}.Z(start1),0.104844,30),linspace(0.104844,geomcells{2}.Z(end1),30)); +% Incomplete square +start2 =510; + +R_square = cat(2,linspace(geomcells{2}.R(start2),0.0819994,N),linspace(0.0819994,0.0899991,N),linspace(0.08999911,0.0900011,N),linspace(0.0899911,0.085,N),0.085*ones(1,10),linspace(0.08505,0.0899911,N)); +Z_square = cat(2,linspace(geomcells{2}.Z(start2),0.0143061,N),linspace(0.0143061,0.0143061,N),linspace(0.0143061,0.00316498,N),0.003165*ones(1,N),linspace(0.003165,0.0029,10),0.0029*ones(1,N)); + +geomcells{2}.R = cat(2,geomcells{2}.R(1:start1),R_corner,geomcells{2}.R(end1:start2),R_square); +geomcells{2}.Z = cat(2,geomcells{2}.Z(1:start1),Z_corner,geomcells{2}.Z(end1:start2),Z_square); + +geomcells{2}.R(284)=[]; +geomcells{2}.Z(284)=[]; +geomcells{2}.R(32)=[]; +geomcells{2}.Z(32)=[]; + +% Cathode -------------------------------------- + +%Incomplete square +end1 = 320; +R_square = cat(2,linspace(0.090,0.08505,N),0.085*ones(1,10),linspace(0.085,0.0900011,N),linspace(0.0900011,0.0899991,N),linspace(0.089991,0.08,N)); +Z_square = cat(2,-0.082*ones(1,N),linspace(-0.082,-0.0829,10),-0.0829438*ones(1,N),linspace(-0.0829483,-0.0939433,N),linspace(-0.0939433,-0.094,N)); + +geomcells{1}.R = cat(2,R_square,geomcells{1}.R(end1:end)); +geomcells{1}.Z = cat(2,Z_square,geomcells{1}.Z(end1:end)); + +% adapt body + +geomcells{3}.R(2:4)=0.085; +geomcells{3}.R=[geomcells{3}.R(1:4) 0.0875 geomcells{3}.R(5:end)]; +geomcells{3}.Z=[geomcells{3}.Z(1:4) geomcells{3}.Z(4) geomcells{3}.Z(5:end)]; +geomcells{3}.Z(1:2)=-0.271; + +%% Define the ceramic boundaries + +geomcells{4}.Z = cat(2,geomcells{2}.Z(1:end-10-N),linspace(geomcells{2}.Z(end-10-N),-0.08294,50),geomcells{1}.Z((1:668)+N+10),linspace(geomcells{1}.Z(668),geomcells{3}.Z(2),50),geomcells{3}.Z(3:end)); +geomcells{4}.R = cat(2,geomcells{2}.R(1:end-10-N),0.085*ones(1,50),geomcells{1}.R((1:668)+N+10),0.085*ones(1,50),geomcells{3}.R(3:end)); + +% create the geometry structure +geomcells{1}.name='Cathode'; +geomcells{1}.Dval=-30000; +geomcells{2}.name='Body'; +geomcells{2}.Dval=0; +geomcells{3}.name='Coaxial insert'; +geomcells{3}.Dval=0; +geomcells{4}.name='Ceramics'; +geomcells{4}.Dval=0; +% geomcells{4}.name='insulator left'; +% geomcells{4}.Dval=0; +% geomcells{5}.name='insulator right'; +% geomcells{5}.Dval=0; + +for k=1:(length(geomcells)-1) +geomcells{k}.order=2; +geomcells{k}.dim=2; +geomcells{k}.epsce=1e-9; +geomcells{k}.epsge=1e-9; +geomcells{k}.type=0; +geomcells{k}.periodic=0; +dist{k}=sqrt(diff(geomcells{k}.Z).^2+diff(geomcells{k}.R).^2); +% remove the problematic points too close to each other +geomcells{k}.Z(dist{k}<1e-5)=[]; +geomcells{k}.R(dist{k}<1e-5)=[]; +end +% geomcells{end-1}.type=2; +% geomcells{end}.type=2; + +k = length(geomcells); +geomcells{k}.order=2; +geomcells{k}.dim=2; +geomcells{k}.epsce=1e-9; +geomcells{k}.epsge=1e-9; +geomcells{k}.type=2; +geomcells{k}.periodic=0; +dist{k}=sqrt(diff(geomcells{k}.Z).^2+diff(geomcells{k}.R).^2); +% remove the problematic points too close to each other +geomcells{k}.Z(dist{k}<1e-5)=[]; +geomcells{k}.R(dist{k}<1e-5)=[]; + + +%% Plots +f=figure; +markers=false; +for k=1:length(geomcells)-1 + plothandle=plot(geomcells{k}.Z*1e3, geomcells{k}.R*1e3,'k-','linewidth',1.3); + hold on +% if markers && k>3 +% for j=1:length(geomcells{k}.Z) +% text(geomcells{k}.Z(j),geomcells{k}.R(j),sprintf('%i',j),'fontsize',14) +% end +% end +% geomcells{k}.points=[geomcells{k}.Z; geomcells{k}.R]; +% order=geomcells{k}.order; +% knots=linspace(0,1,length(geomcells{k}.Z)-(order-2)); +% knots=augknt(knots, order); +% sizec=size(geomcells{k}.Z); +% order=length(knots)-sizec(end); +% coeffs=[geomcells{k}.Z; geomcells{k}.R]; +% pp=spmak(knots,coeffs); +% s=linspace(0,1,100000); +% fittedpos=fnval(pp,s); +% plot(fittedpos(1,:),fittedpos(2,:),'x-') +end +hold on +%end +axis equal + + +%Plot the magnetic field lines +%[~,cont1]=contour(Z,R,R.*Aphi,15,'r:','linewidth',3); + +% legend([plothandle,cont1],{'Gun geometry', 'Magnetic field lines','Wall approximation'},'location','southwest') +f.PaperUnits='centimeters'; +f.PaperSize=[12,8]; +xlabel('z [m]') +ylabel('r [m]') +print(f,'phiBprofile_protoasg','-dpdf','-fillpage') +savefig(f,'phiBprofile_protoasg') + + + +%% Define the individual boundaries +geom=importrefurb('refurb_modif_improv.data'); +geomcells={}; +j=1; +i=1; +n=1; +while i<=size(geom.Z,1) + if isnan(geom.Z(i)) + j=j+1; + while isnan(geom.Z(i)) + i=i+1; + end + n=1; + end + geomcells{j}.Z(n)=geom.Z(i)/1e3; + geomcells{j}.R(n)=geom.R(i)/1e3; + i=i+1; + n=n+1; +end +geomcells{1}.name='Cathode'; +geomcells{1}.Dval=-30000; +geomcells{2}.name='Body'; +geomcells{2}.Dval=0; +geomcells{3}.name='Coaxial insert'; +geomcells{3}.Dval=0; +for k=1:length(geomcells) +geomcells{k}.order=3; +geomcells{k}.dim=2; +geomcells{k}.epsce=1e-9; +geomcells{k}.epsge=1e-9; +geomcells{k}.type=0; +geomcells{k}.periodic=0; +end + +%% Load the original boundary +geomorig=importrefurb('refurb.data'); +geomcellsorig={}; +j=1; +i=1; +n=1; +while i<=size(geomorig.Z,1) + if isnan(geomorig.Z(i)) + j=j+1; + while isnan(geomorig.Z(i)) + i=i+1; + end + n=1; + end + geomcellsorig{j}.Z(n)=geomorig.Z(i)/1e3; + geomcellsorig{j}.R(n)=geomorig.R(i)/1e3; + i=i+1; + n=n+1; +end +geomcellsorig{1}.name='Cathode'; +geomcellsorig{1}.Dval=-30000; +geomcellsorig{2}.name='Body'; +geomcellsorig{2}.Dval=0; +geomcellsorig{3}.name='Coaxial insert'; +geomcellsorig{3}.Dval=0; +for k=1:length(geomcellsorig) +geomcellsorig{k}.order=3; +geomcellsorig{k}.dim=2; +geomcellsorig{k}.epsce=1e-9; +geomcellsorig{k}.epsge=1e-9; +end + + +%% Plots +for k=1:length(geomcellsorig) + plothandleorig=plot(geomcellsorig{k}.Z*1e3, geomcellsorig{k}.R*1e3,'r-','linewidth',1.3); + hold on +end + +%rectangle('Position',[-0.1, 0.045, 0.292, 0.092-0.045]*1e3,'EdgeColor','black','Linestyle','--','linewidth',2) + +legend([plothandleorig(1) plothandle(1)],{'Refurbished','Prototype'},'location','southwest','orientation','horizontal') + +xlabel('z [mm]') +ylabel('r [mm]') +axis equal +grid on +ylim([0,inf]) +xlim([-300 300]) + +name='refurbVSproto'; +Pos=f.Position; +Pos(3)=1.5*Pos(3); +f.Position=Pos; + +%% Save the file +print(f,name,'-dpdf','-fillpage') +savefig(f,name) +exportgraphics(f,sprintf('%s.png',name),'Resolution',300) +print(f,name,'-dpdf','-fillpage') +set(f, 'Color', 'w'); +exportgraphics(f,sprintf('%s.eps',name)) +export_fig(f,name,'-eps','-painters') + + + diff --git a/geometries/compare_gt170_proto_refurb/geometry_proto_modif.data b/geometries/compare_gt170_proto_refurb/geometry_proto_modif.data new file mode 100644 index 0000000..ddec270 --- /dev/null +++ b/geometries/compare_gt170_proto_refurb/geometry_proto_modif.data @@ -0,0 +1,1581 @@ +# Cathode +-1.09356558506937e-01 1.03413101315671e-01 -4.17000000000000e+04 +-1.09337929613389e-01 1.03431513356963e-01 -4.17000000000000e+04 +-1.09319060653470e-01 1.03449679294619e-01 -4.17000000000000e+04 +-1.09299954878147e-01 1.03467595998799e-01 -4.17000000000000e+04 +-1.09280615579189e-01 1.03485260382603e-01 -4.17000000000000e+04 +-1.09261046088596e-01 1.03502669402601e-01 -4.17000000000000e+04 +-1.09241249778032e-01 1.03519820059364e-01 -4.17000000000000e+04 +-1.09221230058237e-01 1.03536709397974e-01 -4.17000000000000e+04 +-1.09200990378444e-01 1.03553334508537e-01 -4.17000000000000e+04 +-1.09180534225783e-01 1.03569692526684e-01 -4.17000000000000e+04 +-1.09159865124682e-01 1.03585780634063e-01 -4.17000000000000e+04 +-1.09138986636257e-01 1.03601596058825e-01 -4.17000000000000e+04 +-1.09117902357698e-01 1.03617136076103e-01 -4.17000000000000e+04 +-1.09096615921653e-01 1.03632398008480e-01 -4.17000000000000e+04 +-1.09075130995601e-01 1.03647379226451e-01 -4.17000000000000e+04 +-1.09053451281216e-01 1.03662077148874e-01 -4.17000000000000e+04 +-1.09031580513736e-01 1.03676489243420e-01 -4.17000000000000e+04 +-1.09009522461314e-01 1.03690613027002e-01 -4.17000000000000e+04 +-1.08987280924369e-01 1.03704446066210e-01 -4.17000000000000e+04 +-1.08964859734937e-01 1.03717985977723e-01 -4.17000000000000e+04 +-1.08942262756003e-01 1.03731230428728e-01 -4.17000000000000e+04 +-1.08919493880841e-01 1.03744177137315e-01 -4.17000000000000e+04 +-1.08896557032341e-01 1.03756823872871e-01 -4.17000000000000e+04 +-1.08873456162332e-01 1.03769168456468e-01 -4.17000000000000e+04 +-1.08850195250905e-01 1.03781208761237e-01 -4.17000000000000e+04 +-1.08826778305722e-01 1.03792942712732e-01 -4.17000000000000e+04 +-1.08803209361332e-01 1.03804368289289e-01 -4.17000000000000e+04 +-1.08779492478468e-01 1.03815483522377e-01 -4.17000000000000e+04 +-1.08755631743355e-01 1.03826286496931e-01 -4.17000000000000e+04 +-1.08731631267001e-01 1.03836775351689e-01 -4.17000000000000e+04 +-1.08707495184490e-01 1.03846948279507e-01 -4.17000000000000e+04 +-1.08683373196843e-01 1.03856682699557e-01 -4.17000000000000e+04 +-1.08658981019059e-01 1.03866135084906e-01 -4.17000000000000e+04 +-1.08634469227649e-01 1.03875272809335e-01 -4.17000000000000e+04 +-1.08609841881571e-01 1.03884094359708e-01 -4.17000000000000e+04 +-1.08585103058916e-01 1.03892598275248e-01 -4.17000000000000e+04 +-1.08560256856237e-01 1.03900783147774e-01 -4.17000000000000e+04 +-1.08535307387866e-01 1.03908647621937e-01 -4.17000000000000e+04 +-1.08510258785236e-01 1.03916190395441e-01 -4.17000000000000e+04 +-1.08485115196196e-01 1.03923410219265e-01 -4.17000000000000e+04 +-1.08459880784324e-01 1.03930305897862e-01 -4.17000000000000e+04 +-1.08434559728237e-01 1.03936876289364e-01 -4.17000000000000e+04 +-1.08409156220900e-01 1.03943120305765e-01 -4.17000000000000e+04 +-1.08383674468931e-01 1.03949036913108e-01 -4.17000000000000e+04 +-1.08358118691905e-01 1.03954625131648e-01 -4.17000000000000e+04 +-1.08332493121655e-01 1.03959884036022e-01 -4.17000000000000e+04 +-1.08306802001571e-01 1.03964812755396e-01 -4.17000000000000e+04 +-1.08281049585897e-01 1.03969410473614e-01 -4.17000000000000e+04 +-1.08255240139028e-01 1.03973676429331e-01 -4.17000000000000e+04 +-1.08229377934803e-01 1.03977609916138e-01 -4.17000000000000e+04 +-1.08203467255796e-01 1.03981210282682e-01 -4.17000000000000e+04 +-1.08177512392609e-01 1.03984476932770e-01 -4.17000000000000e+04 +-1.08151517643160e-01 1.03987409325471e-01 -4.17000000000000e+04 +-1.08125487311973e-01 1.03990006975205e-01 -4.17000000000000e+04 +-1.08099425709462e-01 1.03992269451820e-01 -4.17000000000000e+04 +-1.08073337151222e-01 1.03994196380670e-01 -4.17000000000000e+04 +-1.08047225957309e-01 1.03995787442670e-01 -4.17000000000000e+04 +-1.08021096451529e-01 1.03997042374353e-01 -4.17000000000000e+04 +-1.07994952960719e-01 1.03997960967913e-01 -4.17000000000000e+04 +-1.07968799814033e-01 1.03998543071237e-01 -4.17000000000000e+04 +-1.07942641342224e-01 1.03998788587933e-01 -4.17000000000000e+04 +-9.39433000000000e-02 1.03999000000000e-01 -4.17000000000000e+04 +-9.39170914490733e-02 1.03998629519165e-01 -4.17000000000000e+04 +-9.38909281077295e-02 1.03998041162911e-01 -4.17000000000000e+04 +-9.38647744958061e-02 1.03997116405260e-01 -4.17000000000000e+04 +-9.38386349384852e-02 1.03995855399147e-01 -4.17000000000000e+04 +-9.38125137586245e-02 1.03994258353110e-01 -4.17000000000000e+04 +-9.37864152760429e-02 1.03992325531265e-01 -4.17000000000000e+04 +-9.37603438068052e-02 1.03990057253252e-01 -4.17000000000000e+04 +-9.37343036625092e-02 1.03987453894192e-01 -4.17000000000000e+04 +-9.37082991495723e-02 1.03984515884617e-01 -4.17000000000000e+04 +-9.36823345685190e-02 1.03981243710403e-01 -4.17000000000000e+04 +-9.36564142132704e-02 1.03977637912691e-01 -4.17000000000000e+04 +-9.36305423704335e-02 1.03973699087793e-01 -4.17000000000000e+04 +-9.36047233185926e-02 1.03969427887097e-01 -4.17000000000000e+04 +-9.35789613276016e-02 1.03964825016956e-01 -4.17000000000000e+04 +-9.35532606578778e-02 1.03959891238577e-01 -4.17000000000000e+04 +-9.35276255596976e-02 1.03954627367886e-01 -4.17000000000000e+04 +-9.35020602724933e-02 1.03949034275404e-01 -4.17000000000000e+04 +-9.34765690241522e-02 1.03943112886094e-01 -4.17000000000000e+04 +-9.34511560303173e-02 1.03936864179211e-01 -4.17000000000000e+04 +-9.34258254936903e-02 1.03930289188144e-01 -4.17000000000000e+04 +-9.34005816033363e-02 1.03923389000237e-01 -4.17000000000000e+04 +-9.33754285339912e-02 1.03916164756618e-01 -4.17000000000000e+04 +-9.33503704453713e-02 1.03908617652002e-01 -4.17000000000000e+04 +-9.33254114814854e-02 1.03900748934502e-01 -4.17000000000000e+04 +-9.33005557699495e-02 1.03892559905415e-01 -4.17000000000000e+04 +-9.32758074213039e-02 1.03884051919010e-01 -4.17000000000000e+04 +-9.32511705283338e-02 1.03875226382305e-01 -4.17000000000000e+04 +-9.32266491653923e-02 1.03866084754832e-01 -4.17000000000000e+04 +-9.32022473877266e-02 1.03856628548399e-01 -4.17000000000000e+04 +-9.31779692308072e-02 1.03846859326836e-01 -4.17000000000000e+04 +-9.31538905163530e-02 1.03836968939741e-01 -4.17000000000000e+04 +-9.31299031532091e-02 1.03826463037984e-01 -4.17000000000000e+04 +-9.31060553567409e-02 1.03815644065485e-01 -4.17000000000000e+04 +-9.30823512127771e-02 1.03804513875852e-01 -4.17000000000000e+04 +-9.30587947825345e-02 1.03793074376013e-01 -4.17000000000000e+04 +-9.30353901019221e-02 1.03781327525893e-01 -4.17000000000000e+04 +-9.30121411808500e-02 1.03769275338070e-01 -4.17000000000000e+04 +-9.29890520025418e-02 1.03756919877440e-01 -4.17000000000000e+04 +-9.29661265228528e-02 1.03744263260857e-01 -4.17000000000000e+04 +-9.29433686695915e-02 1.03731307656769e-01 -4.17000000000000e+04 +-9.29207823418474e-02 1.03718055284855e-01 -4.17000000000000e+04 +-9.28983714093226e-02 1.03704508415634e-01 -4.17000000000000e+04 +-9.28761397116687e-02 1.03690669370083e-01 -4.17000000000000e+04 +-9.28540910578292e-02 1.03676540519239e-01 -4.17000000000000e+04 +-9.28322292253867e-02 1.03662124283788e-01 -4.17000000000000e+04 +-9.28105579599159e-02 1.03647423133655e-01 -4.17000000000000e+04 +-9.27890809743418e-02 1.03632439587580e-01 -4.17000000000000e+04 +-9.27678019483035e-02 1.03617176212685e-01 -4.17000000000000e+04 +-9.27467245275238e-02 1.03601635624035e-01 -4.17000000000000e+04 +-9.27258523231847e-02 1.03585820484189e-01 -4.17000000000000e+04 +-9.27051889113083e-02 1.03569733502746e-01 -4.17000000000000e+04 +-9.26847378321446e-02 1.03553377435878e-01 -4.17000000000000e+04 +-9.26645025895650e-02 1.03536755085862e-01 -4.17000000000000e+04 +-9.26444866504613e-02 1.03519869300594e-01 -4.17000000000000e+04 +-9.26246934441524e-02 1.03502722973106e-01 -4.17000000000000e+04 +-9.26051263617967e-02 1.03485319041067e-01 -4.17000000000000e+04 +-9.25857887558104e-02 1.03467660486283e-01 -4.17000000000000e+04 +-9.25666839392943e-02 1.03449750334184e-01 -4.17000000000000e+04 +-9.25478151854649e-02 1.03431591653306e-01 -4.17000000000000e+04 +-9.25291857270947e-02 1.03413187554763e-01 -4.17000000000000e+04 +-9.25290845623189e-02 1.03412642276611e-01 -4.17000000000000e+04 +-9.25106887554738e-02 1.03394009901466e-01 -4.17000000000000e+04 +-9.24925392126668e-02 1.03375137561682e-01 -4.17000000000000e+04 +-9.24746390638466e-02 1.03356028511856e-01 -4.17000000000000e+04 +-9.24569913959529e-02 1.03336686047407e-01 -4.17000000000000e+04 +-9.24395992523845e-02 1.03317113504008e-01 -4.17000000000000e+04 +-9.24224656324741e-02 1.03297314257007e-01 -4.17000000000000e+04 +-9.24055934909709e-02 1.03277291720851e-01 -4.17000000000000e+04 +-9.23889857375315e-02 1.03257049348492e-01 -4.17000000000000e+04 +-9.23726452362180e-02 1.03236590630793e-01 -4.17000000000000e+04 +-9.23565748050038e-02 1.03215919095930e-01 -4.17000000000000e+04 +-9.23407772152879e-02 1.03195038308775e-01 -4.17000000000000e+04 +-9.23252551914168e-02 1.03173951870290e-01 -4.17000000000000e+04 +-9.23100114102148e-02 1.03152663416901e-01 -4.17000000000000e+04 +-9.22950485005225e-02 1.03131176619872e-01 -4.17000000000000e+04 +-9.22803690427430e-02 1.03109495184672e-01 -4.17000000000000e+04 +-9.22659755683974e-02 1.03087622850337e-01 -4.17000000000000e+04 +-9.22518705596878e-02 1.03065563388822e-01 -4.17000000000000e+04 +-9.22380564490697e-02 1.03043320604354e-01 -4.17000000000000e+04 +-9.22245356188321e-02 1.03020898332776e-01 -4.17000000000000e+04 +-9.22113104006869e-02 1.02998300440883e-01 -4.17000000000000e+04 +-9.21983830753666e-02 1.02975530825754e-01 -4.17000000000000e+04 +-9.21857558722312e-02 1.02952593414087e-01 -4.17000000000000e+04 +-9.21734309688836e-02 1.02929492161512e-01 -4.17000000000000e+04 +-9.21614104907942e-02 1.02906231051919e-01 -4.17000000000000e+04 +-9.21496965109342e-02 1.02882814096761e-01 -4.17000000000000e+04 +-9.21382910494180e-02 1.02859245334370e-01 -4.17000000000000e+04 +-9.21271960731552e-02 1.02835528829257e-01 -4.17000000000000e+04 +-9.21164134955112e-02 1.02811668671412e-01 -4.17000000000000e+04 +-9.21059451759770e-02 1.02787668975598e-01 -4.17000000000000e+04 +-9.20958239547539e-02 1.02764170298662e-01 -4.17000000000000e+04 +-9.20859623848740e-02 1.02739932521064e-01 -4.17000000000000e+04 +-9.20764191362259e-02 1.02715567652326e-01 -4.17000000000000e+04 +-9.20671958461876e-02 1.02691079872839e-01 -4.17000000000000e+04 +-9.20582940972406e-02 1.02666473384080e-01 -4.17000000000000e+04 +-9.20497154166980e-02 1.02641752407895e-01 -4.17000000000000e+04 +-9.20414612764425e-02 1.02616921185774e-01 -4.17000000000000e+04 +-9.20335330926742e-02 1.02591983978122e-01 -4.17000000000000e+04 +-9.20259322256673e-02 1.02566945063527e-01 -4.17000000000000e+04 +-9.20186599795367e-02 1.02541808738028e-01 -4.17000000000000e+04 +-9.20117176020144e-02 1.02516579314378e-01 -4.17000000000000e+04 +-9.20051062842353e-02 1.02491261121303e-01 -4.17000000000000e+04 +-9.19988271605331e-02 1.02465858502759e-01 -4.17000000000000e+04 +-9.19928813082452e-02 1.02440375817187e-01 -4.17000000000000e+04 +-9.19872697475282e-02 1.02414817436767e-01 -4.17000000000000e+04 +-9.19819934411829e-02 1.02389187746665e-01 -4.17000000000000e+04 +-9.19770532944889e-02 1.02363491144283e-01 -4.17000000000000e+04 +-9.19724501550493e-02 1.02337732038501e-01 -4.17000000000000e+04 +-9.19681848126457e-02 1.02311914848926e-01 -4.17000000000000e+04 +-9.19642579991019e-02 1.02286044005130e-01 -4.17000000000000e+04 +-9.19606703881590e-02 1.02260123945888e-01 -4.17000000000000e+04 +-9.19574225953595e-02 1.02234159118423e-01 -4.17000000000000e+04 +-9.19545151779420e-02 1.02208153977636e-01 -4.17000000000000e+04 +-9.19519486347450e-02 1.02182112985348e-01 -4.17000000000000e+04 +-9.19497234061220e-02 1.02156040609527e-01 -4.17000000000000e+04 +-9.19478398738655e-02 1.02129941323529e-01 -4.17000000000000e+04 +-9.19462983611414e-02 1.02103819605326e-01 -4.17000000000000e+04 +-9.19450991324342e-02 1.02077679936738e-01 -4.17000000000000e+04 +-9.19442423935009e-02 1.02051526802666e-01 -4.17000000000000e+04 +-9.19437282913360e-02 1.02025364690322e-01 -4.17000000000000e+04 +-9.19436000000000e-02 1.01999000000000e-01 -4.17000000000000e+04 +-9.19436430197910e-02 9.94991979141926e-02 -4.17000000000000e+04 +-9.19438130579741e-02 9.94730211180015e-02 -4.17000000000000e+04 +-9.19443257615846e-02 9.94468487908826e-02 -4.17000000000000e+04 +-9.19451810427545e-02 9.94206854182802e-02 -4.17000000000000e+04 +-9.19463787549048e-02 9.93945354841040e-02 -4.17000000000000e+04 +-9.19479186927702e-02 9.93684034699608e-02 -4.17000000000000e+04 +-9.19498005924343e-02 9.93422938543859e-02 -4.17000000000000e+04 +-9.19520241313749e-02 9.93162111120763e-02 -4.17000000000000e+04 +-9.19545889285194e-02 9.92901597131230e-02 -4.17000000000000e+04 +-9.19574945443096e-02 9.92641441222458e-02 -4.17000000000000e+04 +-9.19607404807778e-02 9.92381687980273e-02 -4.17000000000000e+04 +-9.19643261816314e-02 9.92122381921493e-02 -4.17000000000000e+04 +-9.19682510323490e-02 9.91863567486297e-02 -4.17000000000000e+04 +-9.19725143602848e-02 9.91605289030609e-02 -4.17000000000000e+04 +-9.19771154347848e-02 9.91347590818497e-02 -4.17000000000000e+04 +-9.19820534673113e-02 9.91090517014585e-02 -4.17000000000000e+04 +-9.19873276115784e-02 9.90834111676485e-02 -4.17000000000000e+04 +-9.19929369636972e-02 9.90578418747248e-02 -4.17000000000000e+04 +-9.19988805623301e-02 9.90323482047829e-02 -4.17000000000000e+04 +-9.20051573888563e-02 9.90069345269583e-02 -4.17000000000000e+04 +-9.20117663675458e-02 9.89816051966771e-02 -4.17000000000000e+04 +-9.20187063657439e-02 9.89563645549099e-02 -4.17000000000000e+04 +-9.20259761940656e-02 9.89312169274276e-02 -4.17000000000000e+04 +-9.20335746065991e-02 9.89061666240606e-02 -4.17000000000000e+04 +-9.20415003011195e-02 9.88812179379593e-02 -4.17000000000000e+04 +-9.20497519193119e-02 9.88563751448591e-02 -4.17000000000000e+04 +-9.20583280470042e-02 9.88316425023472e-02 -4.17000000000000e+04 +-9.20672272144095e-02 9.88070242491333e-02 -4.17000000000000e+04 +-9.20764478963779e-02 9.87825246043226e-02 -4.17000000000000e+04 +-9.20859885126581e-02 9.87581477666933e-02 -4.17000000000000e+04 +-9.20957634075459e-02 9.87338990977643e-02 -4.17000000000000e+04 +-9.21059300420149e-02 9.87097750376602e-02 -4.17000000000000e+04 +-9.21164119049487e-02 9.86857862635821e-02 -4.17000000000000e+04 +-9.21272071966112e-02 9.86619368944028e-02 -4.17000000000000e+04 +-9.21383140634509e-02 9.86382310250592e-02 -4.17000000000000e+04 +-9.21497305984186e-02 9.86146727258493e-02 -4.17000000000000e+04 +-9.21614548412950e-02 9.85912660417333e-02 -4.17000000000000e+04 +-9.21734847790276e-02 9.85680149916392e-02 -4.17000000000000e+04 +-9.21858183460760e-02 9.85449235677724e-02 -4.17000000000000e+04 +-9.21984534247665e-02 9.85219957349307e-02 -4.17000000000000e+04 +-9.22113878456560e-02 9.84992354298233e-02 -4.17000000000000e+04 +-9.22246193879043e-02 9.84766465603946e-02 -4.17000000000000e+04 +-9.22381457796555e-02 9.84542330051540e-02 -4.17000000000000e+04 +-9.22519646984279e-02 9.84319986125090e-02 -4.17000000000000e+04 +-9.22660737715131e-02 9.84099472001051e-02 -4.17000000000000e+04 +-9.22804705763831e-02 9.83880825541700e-02 -4.17000000000000e+04 +-9.22951526411062e-02 9.83664084288636e-02 -4.17000000000000e+04 +-9.23101174447720e-02 9.83449285456336e-02 -4.17000000000000e+04 +-9.23253624179233e-02 9.83236465925760e-02 -4.17000000000000e+04 +-9.23408849429982e-02 9.83025662238024e-02 -4.17000000000000e+04 +-9.23566823547790e-02 9.82816910588124e-02 -4.17000000000000e+04 +-9.23727519408499e-02 9.82610246818720e-02 -4.17000000000000e+04 +-9.23890909420627e-02 9.82405706413983e-02 -4.17000000000000e+04 +-9.24056965530108e-02 9.82203324493504e-02 -4.17000000000000e+04 +-9.24225659225107e-02 9.82003135806259e-02 -4.17000000000000e+04 +-9.24396961540914e-02 9.81805174724649e-02 -4.17000000000000e+04 +-9.24570843064920e-02 9.81609475238593e-02 -4.17000000000000e+04 +-9.24747273941665e-02 9.81416070949695e-02 -4.17000000000000e+04 +-9.24926223877966e-02 9.81224995065474e-02 -4.17000000000000e+04 +-9.25107662148117e-02 9.81036280393660e-02 -4.17000000000000e+04 +-9.25291557599166e-02 9.80849959336566e-02 -4.17000000000000e+04 +-9.25291939151983e-02 9.80849636137085e-02 -4.17000000000000e+04 +-9.25478309045217e-02 9.80665789355479e-02 -4.17000000000000e+04 +-9.25667065030414e-02 9.80484393230209e-02 -4.17000000000000e+04 +-9.25858174885539e-02 9.80305478726927e-02 -4.17000000000000e+04 +-9.26051605986734e-02 9.80129076387655e-02 -4.17000000000000e+04 +-9.26247325313889e-02 9.79955216325568e-02 -4.17000000000000e+04 +-9.26445299456273e-02 9.79783928219859e-02 -4.17000000000000e+04 +-9.26645494618247e-02 9.79615241310666e-02 -4.17000000000000e+04 +-9.26847876625022e-02 9.79449184394085e-02 -4.17000000000000e+04 +-9.27052410928502e-02 9.79285785817254e-02 -4.17000000000000e+04 +-9.27259062613177e-02 9.79125073473511e-02 -4.17000000000000e+04 +-9.27467796402086e-02 9.78967074797635e-02 -4.17000000000000e+04 +-9.27678576662834e-02 9.78811816761162e-02 -4.17000000000000e+04 +-9.27891367413682e-02 9.78659325867781e-02 -4.17000000000000e+04 +-9.28106132329683e-02 9.78509628148808e-02 -4.17000000000000e+04 +-9.28322834748887e-02 9.78362749158746e-02 -4.17000000000000e+04 +-9.28541437678597e-02 9.78218713970918e-02 -4.17000000000000e+04 +-9.28761903801685e-02 9.78077547173189e-02 -4.17000000000000e+04 +-9.28984195482963e-02 9.77939272863771e-02 -4.17000000000000e+04 +-9.29208274775606e-02 9.77803914647104e-02 -4.17000000000000e+04 +-9.29434103427631e-02 9.77671495629833e-02 -4.17000000000000e+04 +-9.29661642888426e-02 9.77542038416856e-02 -4.17000000000000e+04 +-9.29890854315332e-02 9.77415565107473e-02 -4.17000000000000e+04 +-9.30121698580272e-02 9.77292097291607e-02 -4.17000000000000e+04 +-9.30354136276434e-02 9.77171656046122e-02 -4.17000000000000e+04 +-9.30588127724991e-02 9.77054261931226e-02 -4.17000000000000e+04 +-9.30823632981885e-02 9.76939934986955e-02 -4.17000000000000e+04 +-9.31060611844634e-02 9.76828694729762e-02 -4.17000000000000e+04 +-9.31299023859206e-02 9.76720560149176e-02 -4.17000000000000e+04 +-9.31538828326915e-02 9.76615549704564e-02 -4.17000000000000e+04 +-9.31779686495007e-02 9.76514640729202e-02 -4.17000000000000e+04 +-9.32022156255765e-02 9.76415956342009e-02 -4.17000000000000e+04 +-9.32265898664103e-02 9.76320458532946e-02 -4.17000000000000e+04 +-9.32510871843563e-02 9.76228163709131e-02 -4.17000000000000e+04 +-9.32757033706235e-02 9.76139087727385e-02 -4.17000000000000e+04 +-9.33004341959984e-02 9.76053245891516e-02 -4.17000000000000e+04 +-9.33252754115719e-02 9.75970652949681e-02 -4.17000000000000e+04 +-9.33502227494691e-02 9.75891323091861e-02 -4.17000000000000e+04 +-9.33752719235829e-02 9.75815269947417e-02 -4.17000000000000e+04 +-9.34004186303097e-02 9.75742506582752e-02 -4.17000000000000e+04 +-9.34256585492894e-02 9.75673045499061e-02 -4.17000000000000e+04 +-9.34509873441475e-02 9.75606898630190e-02 -4.17000000000000e+04 +-9.34764006632400e-02 9.75544077340580e-02 -4.17000000000000e+04 +-9.35018941404012e-02 9.75484592423320e-02 -4.17000000000000e+04 +-9.35274633956935e-02 9.75428454098287e-02 -4.17000000000000e+04 +-9.35531040361604e-02 9.75375672010392e-02 -4.17000000000000e+04 +-9.35788116565809e-02 9.75326255227926e-02 -4.17000000000000e+04 +-9.36045818402265e-02 9.75280212240999e-02 -4.17000000000000e+04 +-9.36304101596198e-02 9.75237550960080e-02 -4.17000000000000e+04 +-9.36562921772954e-02 9.75198278714643e-02 -4.17000000000000e+04 +-9.36822234465623e-02 9.75162402251903e-02 -4.17000000000000e+04 +-9.37081995122676e-02 9.75129927735658e-02 -4.17000000000000e+04 +-9.37342159115622e-02 9.75100860745232e-02 -4.17000000000000e+04 +-9.37602681746673e-02 9.75075206274514e-02 -4.17000000000000e+04 +-9.37863518256427e-02 9.75052968731101e-02 -4.17000000000000e+04 +-9.38124623831555e-02 9.75034151935541e-02 -4.17000000000000e+04 +-9.38385953612499e-02 9.75018759120675e-02 -4.17000000000000e+04 +-9.38647462701184e-02 9.75006792931086e-02 -4.17000000000000e+04 +-9.38909106168726e-02 9.74998255422638e-02 -4.17000000000000e+04 +-9.39170839063155e-02 9.74993148062128e-02 -4.17000000000000e+04 +-9.39433000000000e-02 9.74991000000000e-02 -4.17000000000000e+04 +-9.69431000000000e-02 9.74991000000000e-02 -4.17000000000000e+04 +-9.69431000000000e-02 9.07990000000000e-02 -4.17000000000000e+04 +-8.76941000000000e-02 9.07990000000000e-02 -4.17000000000000e+04 +-8.29438000000000e-02 9.07990000000000e-02 -4.17000000000000e+04 +-8.29438000000000e-02 9.49991000000000e-02 -4.17000000000000e+04 +-8.26310000000000e-02 9.49991000000000e-02 -4.17000000000000e+04 +-8.23182000000000e-02 9.49996000000000e-02 -4.17000000000000e+04 +-8.23187000000000e-02 9.46990000000000e-02 -4.17000000000000e+04 +-8.23187000000000e-02 8.52992000000000e-02 -4.17000000000000e+04 +-8.23207000000000e-02 8.50012000000000e-02 -4.17000000000000e+04 +-8.26322500000000e-02 8.49992000000000e-02 -4.17000000000000e+04 +-8.29438000000000e-02 8.49992000000000e-02 -4.17000000000000e+04 +-8.29483000000000e-02 9.00011000000000e-02 -4.17000000000000e+04 +-9.39433000000000e-02 8.99991000000000e-02 -4.17000000000000e+04 +-9.39433000000000e-02 7.99997000000000e-02 -4.17000000000000e+04 +-8.29393000000000e-02 7.99997000000000e-02 -4.17000000000000e+04 +-8.23092000000000e-02 7.99997000000000e-02 -4.17000000000000e+04 +-8.20226000000000e-02 7.99997000000000e-02 -4.17000000000000e+04 +-7.74940000000000e-02 7.99997000000000e-02 -4.17000000000000e+04 +-4.24938000000000e-02 6.79996000000000e-02 -4.17000000000000e+04 +-1.24961000000000e-02 6.37501000000000e-02 -4.17000000000000e+04 +-1.60144000000000e-03 6.37501000000000e-02 -4.17000000000000e+04 +3.39684000000000e-02 6.37501000000000e-02 -4.17000000000000e+04 +5.05051000000000e-02 6.37501000000000e-02 -4.17000000000000e+04 +5.05051000000000e-02 6.42499000000000e-02 -4.17000000000000e+04 +5.10044000000000e-02 6.47497000000000e-02 -4.17000000000000e+04 +7.75021000000000e-02 6.47572000000000e-02 -4.17000000000000e+04 +1.06501000000000e-01 6.18328000000000e-02 -4.17000000000000e+04 +1.16103000000000e-01 5.80032000000000e-02 -4.17000000000000e+04 +1.20951000000000e-01 5.60699000000000e-02 -4.17000000000000e+04 +1.27072000000000e-01 5.36219000000000e-02 -4.17000000000000e+04 +1.27072019716794e-01 5.36218661862056e-02 -4.17000000000000e+04 +1.27150246246391e-01 5.35901321161326e-02 -4.17000000000000e+04 +1.27228133196764e-01 5.35575734905792e-02 -4.17000000000000e+04 +1.27305671876876e-01 5.35241939426081e-02 -4.17000000000000e+04 +1.27382853634554e-01 5.34899971968848e-02 -4.17000000000000e+04 +1.27459669857451e-01 5.34549870692621e-02 -4.17000000000000e+04 +1.27536111974009e-01 5.34191674663542e-02 -4.17000000000000e+04 +1.27612171454414e-01 5.33825423851009e-02 -4.17000000000000e+04 +1.27687839811549e-01 5.33451159123213e-02 -4.17000000000000e+04 +1.27763108601942e-01 5.33068922242581e-02 -4.17000000000000e+04 +1.27837969426704e-01 5.32678755861117e-02 -4.17000000000000e+04 +1.27912413932471e-01 5.32280703515636e-02 -4.17000000000000e+04 +1.27986433812333e-01 5.31874809622914e-02 -4.17000000000000e+04 +1.28060020806763e-01 5.31461119474727e-02 -4.17000000000000e+04 +1.28133166704536e-01 5.31039679232796e-02 -4.17000000000000e+04 +1.28205863343650e-01 5.30610535923642e-02 -4.17000000000000e+04 +1.28278102612230e-01 5.30173737433333e-02 -4.17000000000000e+04 +1.28349876449438e-01 5.29729332502141e-02 -4.17000000000000e+04 +1.28421176846373e-01 5.29277370719106e-02 -4.17000000000000e+04 +1.28491995846961e-01 5.28817902516503e-02 -4.17000000000000e+04 +1.28562325548845e-01 5.28350979164210e-02 -4.17000000000000e+04 +1.28632158104268e-01 5.27876652763990e-02 -4.17000000000000e+04 +1.28701485720945e-01 5.27394976243679e-02 -4.17000000000000e+04 +1.28770300662936e-01 5.26906003351278e-02 -4.17000000000000e+04 +1.28838595251508e-01 5.26409788648952e-02 -4.17000000000000e+04 +1.28906361865992e-01 5.25906387506949e-02 -4.17000000000000e+04 +1.28973592944632e-01 5.25395856097418e-02 -4.17000000000000e+04 +1.29040280985431e-01 5.24878251388137e-02 -4.17000000000000e+04 +1.29106418546987e-01 5.24353631136163e-02 -4.17000000000000e+04 +1.29171998249321e-01 5.23822053881384e-02 -4.17000000000000e+04 +1.29237012774707e-01 5.23283578939987e-02 -4.17000000000000e+04 +1.29237132963917e-01 5.23283912534334e-02 -4.17000000000000e+04 +1.29301591778364e-01 5.22738802777079e-02 -4.17000000000000e+04 +1.29365471740667e-01 5.22186920937315e-02 -4.17000000000000e+04 +1.29428765736378e-01 5.21628328479308e-02 -4.17000000000000e+04 +1.29491466716308e-01 5.21063087614699e-02 -4.17000000000000e+04 +1.29553567697315e-01 5.20491261295576e-02 -4.17000000000000e+04 +1.29615061763080e-01 5.19912913207463e-02 -4.17000000000000e+04 +1.29675942064875e-01 5.19328107762228e-02 -4.17000000000000e+04 +1.29736201822332e-01 5.18736910090910e-02 -4.17000000000000e+04 +1.29795834324191e-01 5.18139386036461e-02 -4.17000000000000e+04 +1.29854832929054e-01 5.17535602146418e-02 -4.17000000000000e+04 +1.29913191066118e-01 5.16925625665489e-02 -4.17000000000000e+04 +1.29970902235913e-01 5.16309524528064e-02 -4.17000000000000e+04 +1.30027960011022e-01 5.15687367350649e-02 -4.17000000000000e+04 +1.30084358036797e-01 5.15059223424224e-02 -4.17000000000000e+04 +1.30140090032071e-01 5.14425162706526e-02 -4.17000000000000e+04 +1.30195149789851e-01 5.13785255814259e-02 -4.17000000000000e+04 +1.30249531178013e-01 5.13139574015226e-02 -4.17000000000000e+04 +1.30303228139986e-01 5.12488189220396e-02 -4.17000000000000e+04 +1.30356234695423e-01 5.11831173975890e-02 -4.17000000000000e+04 +1.30408544940871e-01 5.11168601454908e-02 -4.17000000000000e+04 +1.30460153050426e-01 5.10500545449572e-02 -4.17000000000000e+04 +1.30511053276381e-01 5.09827080362715e-02 -4.17000000000000e+04 +1.30561239949870e-01 5.09148281199588e-02 -4.17000000000000e+04 +1.30610707481494e-01 5.08464223559511e-02 -4.17000000000000e+04 +1.30659450361949e-01 5.07774983627451e-02 -4.17000000000000e+04 +1.30707463162634e-01 5.07080638165540e-02 -4.17000000000000e+04 +1.30754740536263e-01 5.06381264504521e-02 -4.17000000000000e+04 +1.30801277217451e-01 5.05676940535141e-02 -4.17000000000000e+04 +1.30847068023310e-01 5.04967744699471e-02 -4.17000000000000e+04 +1.30892107854017e-01 5.04253755982175e-02 -4.17000000000000e+04 +1.30892061811701e-01 5.04253657666830e-02 -4.17000000000000e+04 +1.30936322618187e-01 5.03534894680522e-02 -4.17000000000000e+04 +1.30979823382829e-01 5.02811506487976e-02 -4.17000000000000e+04 +1.31022559272835e-01 5.02083573455270e-02 -4.17000000000000e+04 +1.31064525540386e-01 5.01351176453399e-02 -4.17000000000000e+04 +1.31105717523166e-01 5.00614396849289e-02 -4.17000000000000e+04 +1.31146130644879e-01 4.99873316496760e-02 -4.17000000000000e+04 +1.31185760415759e-01 4.99128017727430e-02 -4.17000000000000e+04 +1.31224602433067e-01 4.98378583341572e-02 -4.17000000000000e+04 +1.31262652381581e-01 4.97625096598909e-02 -4.17000000000000e+04 +1.31299906034077e-01 4.96867641209370e-02 -4.17000000000000e+04 +1.31336359251793e-01 4.96106301323788e-02 -4.17000000000000e+04 +1.31372007984896e-01 4.95341161524549e-02 -4.17000000000000e+04 +1.31406848272927e-01 4.94572306816199e-02 -4.17000000000000e+04 +1.31440876245245e-01 4.93799822615997e-02 -4.17000000000000e+04 +1.31474088121450e-01 4.93023794744427e-02 -4.17000000000000e+04 +1.31506480211813e-01 4.92244309415665e-02 -4.17000000000000e+04 +1.31538048917677e-01 4.91461453227996e-02 -4.17000000000000e+04 +1.31568790731862e-01 4.90675313154200e-02 -4.17000000000000e+04 +1.31598702239051e-01 4.89885976531883e-02 -4.17000000000000e+04 +1.31627780116174e-01 4.89093531053780e-02 -4.17000000000000e+04 +1.31656021132773e-01 4.88298064758007e-02 -4.17000000000000e+04 +1.31683422151363e-01 4.87499666018286e-02 -4.17000000000000e+04 +1.31709980127779e-01 4.86698423534121e-02 -4.17000000000000e+04 +1.31735692111517e-01 4.85894426320948e-02 -4.17000000000000e+04 +1.31760555246059e-01 4.85087763700246e-02 -4.17000000000000e+04 +1.31784566769192e-01 4.84278525289609e-02 -4.17000000000000e+04 +1.31807724013313e-01 4.83466800992796e-02 -4.17000000000000e+04 +1.31830024405727e-01 4.82652680989737e-02 -4.17000000000000e+04 +1.31851465468935e-01 4.81836255726520e-02 -4.17000000000000e+04 +1.31872240896207e-01 4.81018229189442e-02 -4.17000000000000e+04 +1.31891860428895e-01 4.80197279541137e-02 -4.17000000000000e+04 +1.31910618257411e-01 4.79374318230825e-02 -4.17000000000000e+04 +1.31928512320224e-01 4.78549435704070e-02 -4.17000000000000e+04 +1.31945540650728e-01 4.77722722617587e-02 -4.17000000000000e+04 +1.31961701377467e-01 4.76894269829274e-02 -4.17000000000000e+04 +1.31976992724335e-01 4.76064168388224e-02 -4.17000000000000e+04 +1.31991413010774e-01 4.75232509524723e-02 -4.17000000000000e+04 +1.32004960651957e-01 4.74399384640221e-02 -4.17000000000000e+04 +1.32017634158964e-01 4.73564885297290e-02 -4.17000000000000e+04 +1.32029432138943e-01 4.72729103209555e-02 -4.17000000000000e+04 +1.32040353295267e-01 4.71892130231619e-02 -4.17000000000000e+04 +1.32050396427671e-01 4.71054058348969e-02 -4.17000000000000e+04 +1.32059560432390e-01 4.70214979667862e-02 -4.17000000000000e+04 +1.32067844302276e-01 4.69374986405205e-02 -4.17000000000000e+04 +1.32075247126911e-01 4.68534170878421e-02 -4.17000000000000e+04 +1.32081768092704e-01 4.67692625495301e-02 -4.17000000000000e+04 +1.32087406482986e-01 4.66850442743850e-02 -4.17000000000000e+04 +1.32092161678082e-01 4.66007715182121e-02 -4.17000000000000e+04 +1.32096033155384e-01 4.65164535428043e-02 -4.17000000000000e+04 +1.32099020489408e-01 4.64320996149241e-02 -4.17000000000000e+04 +1.32101123351836e-01 4.63477190052854e-02 -4.17000000000000e+04 +1.32102341511560e-01 4.62633209875346e-02 -4.17000000000000e+04 +1.32102674834700e-01 4.61789148372311e-02 -4.17000000000000e+04 +1.32102123284623e-01 4.60945098308280e-02 -4.17000000000000e+04 +1.32100686921946e-01 4.60101152446531e-02 -4.17000000000000e+04 +1.32098365904529e-01 4.59257403538885e-02 -4.17000000000000e+04 +1.32095160487458e-01 4.58413944315521e-02 -4.17000000000000e+04 +1.32091071023017e-01 4.57570867474779e-02 -4.17000000000000e+04 +1.32086097960647e-01 4.56728265672974e-02 -4.17000000000000e+04 +1.32080241846902e-01 4.55886231514214e-02 -4.17000000000000e+04 +1.32079932283695e-01 4.55886481415754e-02 -4.17000000000000e+04 +1.32073122773613e-01 4.55045103580827e-02 -4.17000000000000e+04 +1.32065423833131e-01 4.54204492948364e-02 -4.17000000000000e+04 +1.32056836323357e-01 4.53364743538450e-02 -4.17000000000000e+04 +1.32047361204780e-01 4.52525949274844e-02 -4.17000000000000e+04 +1.32036999537168e-01 4.51688203974474e-02 -4.17000000000000e+04 +1.32025752479446e-01 4.50851601336944e-02 -4.17000000000000e+04 +1.32013621289567e-01 4.50016234934055e-02 -4.17000000000000e+04 +1.32000607324373e-01 4.49182198199339e-02 -4.17000000000000e+04 +1.31986712039442e-01 4.48349584417606e-02 -4.17000000000000e+04 +1.31971936988925e-01 4.47518486714514e-02 -4.17000000000000e+04 +1.31956283825373e-01 4.46688998046151e-02 -4.17000000000000e+04 +1.31939754299549e-01 4.45861211188640e-02 -4.17000000000000e+04 +1.31922350260239e-01 4.45035218727758e-02 -4.17000000000000e+04 +1.31904073654039e-01 4.44211113048587e-02 -4.17000000000000e+04 +1.31884926525138e-01 4.43388986325176e-02 -4.17000000000000e+04 +1.31864911015092e-01 4.42568930510231e-02 -4.17000000000000e+04 +1.31844029362584e-01 4.41751037324836e-02 -4.17000000000000e+04 +1.31822283903171e-01 4.40935398248188e-02 -4.17000000000000e+04 +1.31799677069026e-01 4.40122104507368e-02 -4.17000000000000e+04 +1.31776211388663e-01 4.39311247067139e-02 -4.17000000000000e+04 +1.31751889486658e-01 4.38502916619769e-02 -4.17000000000000e+04 +1.31726714083350e-01 4.37697203574888e-02 -4.17000000000000e+04 +1.31700687994542e-01 4.36894198049378e-02 -4.17000000000000e+04 +1.31673814131184e-01 4.36093989857290e-02 -4.17000000000000e+04 +1.31646095499046e-01 4.35296668499804e-02 -4.17000000000000e+04 +1.31617535198385e-01 4.34502323155210e-02 -4.17000000000000e+04 +1.31588136423595e-01 4.33711042668944e-02 -4.17000000000000e+04 +1.31557902462851e-01 4.32922915543643e-02 -4.17000000000000e+04 +1.31526836697742e-01 4.32138029929249e-02 -4.17000000000000e+04 +1.31494942602892e-01 4.31356473613151e-02 -4.17000000000000e+04 +1.31495102636186e-01 4.31355640204662e-02 -4.17000000000000e+04 +1.31462459429063e-01 4.30577226272809e-02 -4.17000000000000e+04 +1.31428994761927e-01 4.29802308372782e-02 -4.17000000000000e+04 +1.31394712378287e-01 4.29030973190370e-02 -4.17000000000000e+04 +1.31359616113123e-01 4.28263307010584e-02 -4.17000000000000e+04 +1.31323709892461e-01 4.27499395708003e-02 -4.17000000000000e+04 +1.31286997732931e-01 4.26739324737170e-02 -4.17000000000000e+04 +1.31249483741322e-01 4.25983179123031e-02 -4.17000000000000e+04 +1.31211172114114e-01 4.25231043451421e-02 -4.17000000000000e+04 +1.31172067137020e-01 4.24483001859610e-02 -4.17000000000000e+04 +1.31132173184497e-01 4.23739138026881e-02 -4.17000000000000e+04 +1.31091494719261e-01 4.22999535165178e-02 -4.17000000000000e+04 +1.31050036291788e-01 4.22264276009792e-02 -4.17000000000000e+04 +1.31007802539804e-01 4.21533442810106e-02 -4.17000000000000e+04 +1.30964798187764e-01 4.20807117320398e-02 -4.17000000000000e+04 +1.30921028046329e-01 4.20085380790694e-02 -4.17000000000000e+04 +1.30876497011823e-01 4.19368313957675e-02 -4.17000000000000e+04 +1.30831210065687e-01 4.18655997035653e-02 -4.17000000000000e+04 +1.30785172273921e-01 4.17948509707589e-02 -4.17000000000000e+04 +1.30738388786520e-01 4.17245931116189e-02 -4.17000000000000e+04 +1.30690864836895e-01 4.16548339855041e-02 -4.17000000000000e+04 +1.30642605741286e-01 4.15855813959832e-02 -4.17000000000000e+04 +1.30593616898173e-01 4.15168430899611e-02 -4.17000000000000e+04 +1.30543903787667e-01 4.14486267568128e-02 -4.17000000000000e+04 +1.30493471970900e-01 4.13809400275233e-02 -4.17000000000000e+04 +1.30442327089401e-01 4.13137904738332e-02 -4.17000000000000e+04 +1.30390474864465e-01 4.12471856073927e-02 -4.17000000000000e+04 +1.30337921096515e-01 4.11811328789208e-02 -4.17000000000000e+04 +1.30284671664451e-01 4.11156396773715e-02 -4.17000000000000e+04 +1.30230732524993e-01 4.10507133291080e-02 -4.17000000000000e+04 +1.30176109712014e-01 4.09863610970826e-02 -4.17000000000000e+04 +1.30175886774703e-01 4.09864097012946e-02 -4.17000000000000e+04 +1.30120578617151e-01 4.09226325683015e-02 -4.17000000000000e+04 +1.30064601713867e-01 4.08594415777781e-02 -4.17000000000000e+04 +1.30007962276249e-01 4.07968437416253e-02 -4.17000000000000e+04 +1.29950666589215e-01 4.07348460059249e-02 -4.17000000000000e+04 +1.29892721010502e-01 4.06734552501698e-02 -4.17000000000000e+04 +1.29834131969959e-01 4.06126782865000e-02 -4.17000000000000e+04 +1.29774905968839e-01 4.05525218589469e-02 -4.17000000000000e+04 +1.29715049579072e-01 4.04929926426852e-02 -4.17000000000000e+04 +1.29654569442541e-01 4.04340972432916e-02 -4.17000000000000e+04 +1.29593472270338e-01 4.03758421960126e-02 -4.17000000000000e+04 +1.29531764842028e-01 4.03182339650385e-02 -4.17000000000000e+04 +1.29469454004889e-01 4.02612789427869e-02 -4.17000000000000e+04 +1.29406546673157e-01 4.02049834491928e-02 -4.17000000000000e+04 +1.29343049827257e-01 4.01493537310076e-02 -4.17000000000000e+04 +1.29278970513028e-01 4.00943959611056e-02 -4.17000000000000e+04 +1.29214315840943e-01 4.00401162377997e-02 -4.17000000000000e+04 +1.29149092985317e-01 3.99865205841641e-02 -4.17000000000000e+04 +1.29083309183514e-01 3.99336149473661e-02 -4.17000000000000e+04 +1.29016971735142e-01 3.98814051980063e-02 -4.17000000000000e+04 +1.28950088001245e-01 3.98298971294671e-02 -4.17000000000000e+04 +1.28882665403484e-01 3.97790964572699e-02 -4.17000000000000e+04 +1.28814711423312e-01 3.97290088184408e-02 -4.17000000000000e+04 +1.28746233601150e-01 3.96796397708852e-02 -4.17000000000000e+04 +1.28677239535543e-01 3.96309947927709e-02 -4.17000000000000e+04 +1.28607736882324e-01 3.95830792819205e-02 -4.17000000000000e+04 +1.28537733353756e-01 3.95358985552122e-02 -4.17000000000000e+04 +1.28467236717685e-01 3.94894578479899e-02 -4.17000000000000e+04 +1.28396254796672e-01 3.94437623134821e-02 -4.17000000000000e+04 +1.28324795467128e-01 3.93988170222306e-02 -4.17000000000000e+04 +1.28253014248108e-01 3.93546240289211e-02 -4.17000000000000e+04 +1.28180617782870e-01 3.93112297417873e-02 -4.17000000000000e+04 +1.28107768051359e-01 3.92686007733086e-02 -4.17000000000000e+04 +1.28034473143620e-01 3.92267418574803e-02 -4.17000000000000e+04 +1.27960741199136e-01 3.91856576427825e-02 -4.17000000000000e+04 +1.27886580405922e-01 3.91453526916638e-02 -4.17000000000000e+04 +1.27811998999619e-01 3.91058314800347e-02 -4.17000000000000e+04 +1.27737005262576e-01 3.90670983967704e-02 -4.17000000000000e+04 +1.27661607522933e-01 3.90291577432239e-02 -4.17000000000000e+04 +1.27585814153695e-01 3.89920137327476e-02 -4.17000000000000e+04 +1.27509633571800e-01 3.89556704902260e-02 -4.17000000000000e+04 +1.27433074237189e-01 3.89201320516175e-02 -4.17000000000000e+04 +1.27356144651863e-01 3.88854023635058e-02 -4.17000000000000e+04 +1.27278853358939e-01 3.88514852826622e-02 -4.17000000000000e+04 +1.27201208941703e-01 3.88183845756170e-02 -4.17000000000000e+04 +1.27123220022656e-01 3.87861039182412e-02 -4.17000000000000e+04 +1.27044895262555e-01 3.87546468953383e-02 -4.17000000000000e+04 +1.26966243359454e-01 3.87240170002465e-02 -4.17000000000000e+04 +1.26887273047735e-01 3.86942176344502e-02 -4.17000000000000e+04 +1.26807993097142e-01 3.86652521072029e-02 -4.17000000000000e+04 +1.26728412311803e-01 3.86371236351591e-02 -4.17000000000000e+04 +1.26648539529253e-01 3.86098353420175e-02 -4.17000000000000e+04 +1.26568383619457e-01 3.85833902581741e-02 -4.17000000000000e+04 +1.26487953483818e-01 3.85577913203853e-02 -4.17000000000000e+04 +1.26407258054194e-01 3.85330413714422e-02 -4.17000000000000e+04 +1.26326306291905e-01 3.85091431598547e-02 -4.17000000000000e+04 +1.26245107186736e-01 3.84860993395463e-02 -4.17000000000000e+04 +1.26163669755938e-01 3.84639124695593e-02 -4.17000000000000e+04 +1.26082003043231e-01 3.84425850137707e-02 -4.17000000000000e+04 +1.26000116117795e-01 3.84221193406188e-02 -4.17000000000000e+04 +1.25917635510903e-01 3.84024058416411e-02 -4.17000000000000e+04 +1.25835307485233e-01 3.83836915120456e-02 -4.17000000000000e+04 +1.25752786609745e-01 3.83658467634771e-02 -4.17000000000000e+04 +1.25670082069027e-01 3.83488735820596e-02 -4.17000000000000e+04 +1.25587203068110e-01 3.83327738569112e-02 -4.17000000000000e+04 +1.25504158831443e-01 3.83175493799345e-02 -4.17000000000000e+04 +1.25420958601865e-01 3.83032018456167e-02 -4.17000000000000e+04 +1.25337611639577e-01 3.82897328508411e-02 -4.17000000000000e+04 +1.25254127221113e-01 3.82771438947093e-02 -4.17000000000000e+04 +1.25170514638303e-01 3.82654363783745e-02 -4.17000000000000e+04 +1.25086783197244e-01 3.82546116048855e-02 -4.17000000000000e+04 +1.25002942217262e-01 3.82446707790418e-02 -4.17000000000000e+04 +1.24919001029873e-01 3.82356150072590e-02 -4.17000000000000e+04 +1.24834968977748e-01 3.82274452974463e-02 -4.17000000000000e+04 +1.24750855413669e-01 3.82201625588939e-02 -4.17000000000000e+04 +1.24666669699493e-01 3.82137676021721e-02 -4.17000000000000e+04 +1.24582421205105e-01 3.82082611390407e-02 -4.17000000000000e+04 +1.24498119307379e-01 3.82036437823701e-02 -4.17000000000000e+04 +1.24413773389132e-01 3.81999160460730e-02 -4.17000000000000e+04 +1.24329392838081e-01 3.81970783450471e-02 -4.17000000000000e+04 +1.24244987045797e-01 3.81951309951291e-02 -4.17000000000000e+04 +1.24160565406660e-01 3.81940742130595e-02 -4.17000000000000e+04 +1.24076137316816e-01 3.81939081164583e-02 -4.17000000000000e+04 +1.23991712173126e-01 3.81946327238119e-02 -4.17000000000000e+04 +1.23907299372126e-01 3.81962479544717e-02 -4.17000000000000e+04 +1.23822908308975e-01 3.81987536286619e-02 -4.17000000000000e+04 +1.23738548376416e-01 3.82021494675007e-02 -4.17000000000000e+04 +1.23654228963724e-01 3.82064350930305e-02 -4.17000000000000e+04 +1.23569959455667e-01 3.82116100282603e-02 -4.17000000000000e+04 +1.23485749231457e-01 3.82176736972190e-02 -4.17000000000000e+04 +1.23401607663707e-01 3.82246254250190e-02 -4.17000000000000e+04 +1.23402000000000e-01 3.82246000000000e-02 -4.17000000000000e+04 +-1.51740533002840e-01 6.23227921503517e-02 -4.17000000000000e+04 +-1.52011137784559e-01 6.23483029116723e-02 -4.17000000000000e+04 +-1.52281370716535e-01 6.23774903971496e-02 -4.17000000000000e+04 +-1.52551181845218e-01 6.24103492113698e-02 -4.17000000000000e+04 +-1.52820521295029e-01 6.24468732802603e-02 -4.17000000000000e+04 +-1.53089339277582e-01 6.24870558522130e-02 -4.17000000000000e+04 +-1.53357586100886e-01 6.25308894993319e-02 -4.17000000000000e+04 +-1.53625212178532e-01 6.25783661188063e-02 -4.17000000000000e+04 +-1.53892168038856e-01 6.26294769344088e-02 -4.17000000000000e+04 +-1.54158404334087e-01 6.26842124981175e-02 -4.17000000000000e+04 +-1.54423871849468e-01 6.27425626918626e-02 -4.17000000000000e+04 +-1.54688521512355e-01 6.28045167293963e-02 -4.17000000000000e+04 +-1.54952304401285e-01 6.28700631582875e-02 -4.17000000000000e+04 +-1.55215171755023e-01 6.29391898620380e-02 -4.17000000000000e+04 +-1.55477074981574e-01 6.30118840623230e-02 -4.17000000000000e+04 +-1.55737965667164e-01 6.30881323213524e-02 -4.17000000000000e+04 +-1.55997795585193e-01 6.31679205443558e-02 -4.17000000000000e+04 +-1.56256516705145e-01 6.32512339821871e-02 -4.17000000000000e+04 +-1.56514081201473e-01 6.33380572340514e-02 -4.17000000000000e+04 +-1.56770441462432e-01 6.34283742503519e-02 -4.17000000000000e+04 +-1.57025550098889e-01 6.35221683356564e-02 -4.17000000000000e+04 +-1.57279359953074e-01 6.36194221517840e-02 -4.17000000000000e+04 +-1.57531824107304e-01 6.37201177210096e-02 -4.17000000000000e+04 +-1.57782895892653e-01 6.38242364293875e-02 -4.17000000000000e+04 +-1.58032528897580e-01 6.39317590301922e-02 -4.17000000000000e+04 +-1.58280676976508e-01 6.40426656474762e-02 -4.17000000000000e+04 +-1.58527294258352e-01 6.41569357797441e-02 -4.17000000000000e+04 +-1.58772335155003e-01 6.42745483037422e-02 -4.17000000000000e+04 +-1.59015754369751e-01 6.43954814783638e-02 -4.17000000000000e+04 +-1.59257506905661e-01 6.45197129486675e-02 -4.17000000000000e+04 +-1.59497994047389e-01 6.46472016529278e-02 -4.17000000000000e+04 +-1.59736332068514e-01 6.47779142034836e-02 -4.17000000000000e+04 +-1.59972870241899e-01 6.49118562645321e-02 -4.17000000000000e+04 +-1.60207564809920e-01 6.50490030578887e-02 -4.17000000000000e+04 +-1.60440372356003e-01 6.51893292125195e-02 -4.17000000000000e+04 +-1.60671249812657e-01 6.53328087692349e-02 -4.17000000000000e+04 +-1.60900154469444e-01 6.54794151854916e-02 -4.17000000000000e+04 +-1.61127043980876e-01 6.56291213403030e-02 -4.17000000000000e+04 +-1.61351876374252e-01 6.57818995392560e-02 -4.17000000000000e+04 +-1.61574610057419e-01 6.59377215196349e-02 -4.17000000000000e+04 +-1.61795203826470e-01 6.60965584556489e-02 -4.17000000000000e+04 +-1.62013616873364e-01 6.62583809637655e-02 -4.17000000000000e+04 +-1.62229808793474e-01 6.64231591081455e-02 -4.17000000000000e+04 +-1.62443739593067e-01 6.65908624061814e-02 -4.17000000000000e+04 +-1.62655369696695e-01 6.67614598341360e-02 -4.17000000000000e+04 +-1.62864659954522e-01 6.69349198328821e-02 -4.17000000000000e+04 +-1.63071571649565e-01 6.71112103137400e-02 -4.17000000000000e+04 +-1.63276066504853e-01 6.72902986644142e-02 -4.17000000000000e+04 +-1.63478106690512e-01 6.74721517550260e-02 -4.17000000000000e+04 +-1.63677654830763e-01 6.76567359442427e-02 -4.17000000000000e+04 +-1.63874674010833e-01 6.78440170855005e-02 -4.17000000000000e+04 +-1.64069127783788e-01 6.80339605333216e-02 -4.17000000000000e+04 +-1.64260980177271e-01 6.82265311497234e-02 -4.17000000000000e+04 +-1.64450195700160e-01 6.84216933107185e-02 -4.17000000000000e+04 +-1.64636739349132e-01 6.86194109129051e-02 -4.17000000000000e+04 +-1.64820576615141e-01 6.88196473801455e-02 -4.17000000000000e+04 +-1.65001673489796e-01 6.90223656703327e-02 -4.17000000000000e+04 +-1.65179996471660e-01 6.92275282822428e-02 -4.17000000000000e+04 +-1.65355512572439e-01 6.94350972624724e-02 -4.17000000000000e+04 +-1.65528189323093e-01 6.96450342124595e-02 -4.17000000000000e+04 +-1.65697994779837e-01 6.98573002955874e-02 -4.17000000000000e+04 +-1.65697596142259e-01 6.98572605348614e-02 -4.17000000000000e+04 +-1.65864502843679e-01 7.00718119042587e-02 -4.17000000000000e+04 +-1.66028480753816e-01 7.02886099256428e-02 -4.17000000000000e+04 +-1.66189499635318e-01 7.05076146216867e-02 -4.17000000000000e+04 +-1.66347529796470e-01 7.07287856081550e-02 -4.17000000000000e+04 +-1.66502542096678e-01 7.09520821013503e-02 -4.17000000000000e+04 +-1.66654507951837e-01 7.11774629256345e-02 -4.17000000000000e+04 +-1.66803399339602e-01 7.14048865210206e-02 -4.17000000000000e+04 +-1.66949188804560e-01 7.16343109508369e-02 -4.17000000000000e+04 +-1.67091849463285e-01 7.18656939094601e-02 -4.17000000000000e+04 +-1.67231355009303e-01 7.20989927301160e-02 -4.17000000000000e+04 +-1.67367679717937e-01 7.23341643927476e-02 -4.17000000000000e+04 +-1.67500798451055e-01 7.25711655319478e-02 -4.17000000000000e+04 +-1.67630686661702e-01 7.28099524449560e-02 -4.17000000000000e+04 +-1.67757320398630e-01 7.30504810997165e-02 -4.17000000000000e+04 +-1.67880676310710e-01 7.32927071429986e-02 -4.17000000000000e+04 +-1.68000731651241e-01 7.35365859085748e-02 -4.17000000000000e+04 +-1.68117464282146e-01 7.37820724254574e-02 -4.17000000000000e+04 +-1.68230852678050e-01 7.40291214261909e-02 -4.17000000000000e+04 +-1.68340875930253e-01 7.42776873551996e-02 -4.17000000000000e+04 +-1.68447513750581e-01 7.45277243771877e-02 -4.17000000000000e+04 +-1.68550746475134e-01 7.47791863855916e-02 -4.17000000000000e+04 +-1.68650555067906e-01 7.50320270110814e-02 -4.17000000000000e+04 +-1.68746921124297e-01 7.52861996301119e-02 -4.17000000000000e+04 +-1.68839826874507e-01 7.55416573735196e-02 -4.17000000000000e+04 +-1.68929255186815e-01 7.57983531351654e-02 -4.17000000000000e+04 +-1.69015189570733e-01 7.60562395806210e-02 -4.17000000000000e+04 +-1.69097614180052e-01 7.63152691558972e-02 -4.17000000000000e+04 +-1.69176513815760e-01 7.65753940962129e-02 -4.17000000000000e+04 +-1.69251873928848e-01 7.68365664348029e-02 -4.17000000000000e+04 +-1.69323680622989e-01 7.70987380117627e-02 -4.17000000000000e+04 +-1.69333832667085e-01 7.71382163327697e-02 -4.17000000000000e+04 +-1.69343625865951e-01 7.71777634662490e-02 -4.17000000000000e+04 +-1.69352958173844e-01 7.72174218895641e-02 -4.17000000000000e+04 +-1.69361828326846e-01 7.72571862315828e-02 -4.17000000000000e+04 +-1.69370235123628e-01 7.72970511068280e-02 -4.17000000000000e+04 +-1.69378177425617e-01 7.73370111162069e-02 -4.17000000000000e+04 +-1.69385654157150e-01 7.73770608477421e-02 -4.17000000000000e+04 +-1.69392664305616e-01 7.74171948773049e-02 -4.17000000000000e+04 +-1.69399206921596e-01 7.74574077693494e-02 -4.17000000000000e+04 +-1.69405281118993e-01 7.74976940776493e-02 -4.17000000000000e+04 +-1.69410886075149e-01 7.75380483460350e-02 -4.17000000000000e+04 +-1.69416021030957e-01 7.75784651091327e-02 -4.17000000000000e+04 +-1.69420685290966e-01 7.76189388931049e-02 -4.17000000000000e+04 +-1.69424878223472e-01 7.76594642163911e-02 -4.17000000000000e+04 +-1.69428599260607e-01 7.77000355904509e-02 -4.17000000000000e+04 +-1.69431847898411e-01 7.77406475205069e-02 -4.17000000000000e+04 +-1.69434623696907e-01 7.77812945062889e-02 -4.17000000000000e+04 +-1.69436926280154e-01 7.78219710427792e-02 -4.17000000000000e+04 +-1.69438755336302e-01 7.78626716209576e-02 -4.17000000000000e+04 +-1.69440110617635e-01 7.79033907285481e-02 -4.17000000000000e+04 +-1.69440991940598e-01 7.79441228507649e-02 -4.17000000000000e+04 +-1.69441399185831e-01 7.79848624710598e-02 -4.17000000000000e+04 +-1.69441332298179e-01 7.80256040718690e-02 -4.17000000000000e+04 +-1.69440791286699e-01 7.80663421353605e-02 -4.17000000000000e+04 +-1.69439776224665e-01 7.81070711441812e-02 -4.17000000000000e+04 +-1.69438287249550e-01 7.81477855822046e-02 -4.17000000000000e+04 +-1.69436324563014e-01 7.81884799352774e-02 -4.17000000000000e+04 +-1.69433888430873e-01 7.82291486919666e-02 -4.17000000000000e+04 +-1.69430979183065e-01 7.82697863443058e-02 -4.17000000000000e+04 +-1.69427597213602e-01 7.83103873885412e-02 -4.17000000000000e+04 +-1.69427823079124e-01 7.83104306780937e-02 -4.17000000000000e+04 +-1.69423976252515e-01 7.83509908012711e-02 -4.17000000000000e+04 +-1.69419656433642e-01 7.83915032787569e-02 -4.17000000000000e+04 +-1.69414864210632e-01 7.84319625949368e-02 -4.17000000000000e+04 +-1.69409600235926e-01 7.84723632414345e-02 -4.17000000000000e+04 +-1.69403865226195e-01 7.85126997178610e-02 -4.17000000000000e+04 +-1.69397659962236e-01 7.85529665325640e-02 -4.17000000000000e+04 +-1.69390985288873e-01 7.85931582033755e-02 -4.17000000000000e+04 +-1.69383842114835e-01 7.86332692583578e-02 -4.17000000000000e+04 +-1.69376231412638e-01 7.86732942365488e-02 -4.17000000000000e+04 +-1.69368154218448e-01 7.87132276887056e-02 -4.17000000000000e+04 +-1.69359611631945e-01 7.87530641780459e-02 -4.17000000000000e+04 +-1.69350604816167e-01 7.87927982809887e-02 -4.17000000000000e+04 +-1.69341134997357e-01 7.88324245878925e-02 -4.17000000000000e+04 +-1.69331203464793e-01 7.88719377037917e-02 -4.17000000000000e+04 +-1.69320811570615e-01 7.89113322491313e-02 -4.17000000000000e+04 +-1.69309960729638e-01 7.89506028604993e-02 -4.17000000000000e+04 +-1.69298652419160e-01 7.89897441913566e-02 -4.17000000000000e+04 +-1.69286888178765e-01 7.90287509127653e-02 -4.17000000000000e+04 +-1.69274669610107e-01 7.90676177141139e-02 -4.17000000000000e+04 +-1.69261998376696e-01 7.91063393038407e-02 -4.17000000000000e+04 +-1.69248876203670e-01 7.91449104101537e-02 -4.17000000000000e+04 +-1.69235304877562e-01 7.91833257817489e-02 -4.17000000000000e+04 +-1.69221286246055e-01 7.92215801885248e-02 -4.17000000000000e+04 +-1.69206822217728e-01 7.92596684222947e-02 -4.17000000000000e+04 +-1.69191914761804e-01 7.92975852974956e-02 -4.17000000000000e+04 +-1.69176565907874e-01 7.93353256518943e-02 -4.17000000000000e+04 +-1.69160777745623e-01 7.93728843472905e-02 -4.17000000000000e+04 +-1.69144552424547e-01 7.94102562702156e-02 -4.17000000000000e+04 +-1.69127892153660e-01 7.94474363326296e-02 -4.17000000000000e+04 +-1.69110799201193e-01 7.94844194726136e-02 -4.17000000000000e+04 +-1.69093148341792e-01 7.95211526779512e-02 -4.17000000000000e+04 +-1.69075233753708e-01 7.95577384219659e-02 -4.17000000000000e+04 +-1.69056894461481e-01 7.95941131314753e-02 -4.17000000000000e+04 +-1.69038132950677e-01 7.96302718765267e-02 -4.17000000000000e+04 +-1.69018951764092e-01 7.96662097564376e-02 -4.17000000000000e+04 +-1.68999353501398e-01 7.97019219004598e-02 -4.17000000000000e+04 +-1.68979340818794e-01 7.97374034684396e-02 -4.17000000000000e+04 +-1.68958916428648e-01 7.97726496514740e-02 -4.17000000000000e+04 +-1.68938083099128e-01 7.98076556725621e-02 -4.17000000000000e+04 +-1.68916843653826e-01 7.98424167872528e-02 -4.17000000000000e+04 +-1.68895200971374e-01 7.98769282842878e-02 -4.17000000000000e+04 +-1.68873157985058e-01 7.99111854862401e-02 -4.17000000000000e+04 +-1.68850717682418e-01 7.99451837501478e-02 -4.17000000000000e+04 +-1.68827883104843e-01 7.99789184681436e-02 -4.17000000000000e+04 +-1.68804657347158e-01 8.00123850680794e-02 -4.17000000000000e+04 +-1.68781043557206e-01 8.00455790141454e-02 -4.17000000000000e+04 +-1.68757044935423e-01 8.00784958074854e-02 -4.17000000000000e+04 +-1.68732664734399e-01 8.01111309868066e-02 -4.17000000000000e+04 +-1.68707906258442e-01 8.01434801289838e-02 -4.17000000000000e+04 +-1.68682772863128e-01 8.01755388496592e-02 -4.17000000000000e+04 +-1.68657267954849e-01 8.02073028038364e-02 -4.17000000000000e+04 +-1.68631394990346e-01 8.02387676864696e-02 -4.17000000000000e+04 +-1.68605157476244e-01 8.02699292330467e-02 -4.17000000000000e+04 +-1.68578558968579e-01 8.03007832201678e-02 -4.17000000000000e+04 +-1.68551603072309e-01 8.03313254661168e-02 -4.17000000000000e+04 +-1.68524293440834e-01 8.03615518314291e-02 -4.17000000000000e+04 +-1.68496633775494e-01 8.03914582194519e-02 -4.17000000000000e+04 +-1.68468627825070e-01 8.04210405768998e-02 -4.17000000000000e+04 +-1.68440279385277e-01 8.04502948944040e-02 -4.17000000000000e+04 +-1.68412430332200e-01 8.04793186147157e-02 -4.17000000000000e+04 +-1.68383362685020e-01 8.05078823147267e-02 -4.17000000000000e+04 +-1.68353966207016e-01 8.05361074834922e-02 -4.17000000000000e+04 +-1.68324244840576e-01 8.05639903357099e-02 -4.17000000000000e+04 +-1.68294202571657e-01 8.05915271319855e-02 -4.17000000000000e+04 +-1.68263843429257e-01 8.06187141793351e-02 -4.17000000000000e+04 +-1.68233171484866e-01 8.06455478316794e-02 -4.17000000000000e+04 +-1.68202190851925e-01 8.06720244903336e-02 -4.17000000000000e+04 +-1.68170905685276e-01 8.06981406044895e-02 -4.17000000000000e+04 +-1.68139320180599e-01 8.07238926716918e-02 -4.17000000000000e+04 +-1.68107438573855e-01 8.07492772383079e-02 -4.17000000000000e+04 +-1.68075265140714e-01 8.07742908999911e-02 -4.17000000000000e+04 +-1.68042804195984e-01 8.07989303021370e-02 -4.17000000000000e+04 +-1.68010060093030e-01 8.08231921403335e-02 -4.17000000000000e+04 +-1.67977037223195e-01 8.08470731608040e-02 -4.17000000000000e+04 +-1.67943740015204e-01 8.08705701608435e-02 -4.17000000000000e+04 +-1.67910172934574e-01 8.08936799892486e-02 -4.17000000000000e+04 +-1.67876340483018e-01 8.09163995467397e-02 -4.17000000000000e+04 +-1.67842247197836e-01 8.09387257863767e-02 -4.17000000000000e+04 +-1.67807897651307e-01 8.09606557139678e-02 -4.17000000000000e+04 +-1.67773296450080e-01 8.09821863884711e-02 -4.17000000000000e+04 +-1.67738448234554e-01 8.10033149223885e-02 -4.17000000000000e+04 +-1.67703357678252e-01 8.10240384821536e-02 -4.17000000000000e+04 +-1.67668029487202e-01 8.10443542885116e-02 -4.17000000000000e+04 +-1.67632468399297e-01 8.10642596168915e-02 -4.17000000000000e+04 +-1.67596679183667e-01 8.10837517977720e-02 -4.17000000000000e+04 +-1.67560666640036e-01 8.11028282170396e-02 -4.17000000000000e+04 +-1.67524435598077e-01 8.11214863163387e-02 -4.17000000000000e+04 +-1.67487990916768e-01 8.11397235934149e-02 -4.17000000000000e+04 +-1.67451337483737e-01 8.11575376024510e-02 -4.17000000000000e+04 +-1.67414480214609e-01 8.11749259543944e-02 -4.17000000000000e+04 +-1.67377002615558e-01 8.11917605654043e-02 -4.17000000000000e+04 +-1.67339758433991e-01 8.12082541380711e-02 -4.17000000000000e+04 +-1.67302324843517e-01 8.12243131948379e-02 -4.17000000000000e+04 +-1.67264706913292e-01 8.12399355610316e-02 -4.17000000000000e+04 +-1.67226909737429e-01 8.12551191211146e-02 -4.17000000000000e+04 +-1.67188938434319e-01 8.12698618189713e-02 -4.17000000000000e+04 +-1.67150798145931e-01 8.12841616581863e-02 -4.17000000000000e+04 +-1.67112494037115e-01 8.12980167023151e-02 -4.17000000000000e+04 +-1.67074031294909e-01 8.13114250751459e-02 -4.17000000000000e+04 +-1.67035415127831e-01 8.13243849609540e-02 -4.17000000000000e+04 +-1.66996650765175e-01 8.13368946047475e-02 -4.17000000000000e+04 +-1.66957743456304e-01 8.13489523125051e-02 -4.17000000000000e+04 +-1.66918698469938e-01 8.13605564514055e-02 -4.17000000000000e+04 +-1.66879521093441e-01 8.13717054500482e-02 -4.17000000000000e+04 +-1.66840216632104e-01 8.13823977986667e-02 -4.17000000000000e+04 +-1.66800790408429e-01 8.13926320493328e-02 -4.17000000000000e+04 +-1.66761247761406e-01 8.14024068161527e-02 -4.17000000000000e+04 +-1.66721594045791e-01 8.14117207754543e-02 -4.17000000000000e+04 +-1.66681834631380e-01 8.14205726659673e-02 -4.17000000000000e+04 +-1.66641974902283e-01 8.14289612889930e-02 -4.17000000000000e+04 +-1.66602020256194e-01 8.14368855085674e-02 -4.17000000000000e+04 +-1.66561976103661e-01 8.14443442516146e-02 -4.17000000000000e+04 +-1.66521847867351e-01 8.14513365080922e-02 -4.17000000000000e+04 +-1.66481640981320e-01 8.14578613311283e-02 -4.17000000000000e+04 +-1.66441360890273e-01 8.14639178371493e-02 -4.17000000000000e+04 +-1.66401013048828e-01 8.14695052060001e-02 -4.17000000000000e+04 +-1.66360602920778e-01 8.14746226810546e-02 -4.17000000000000e+04 +-1.66320135978350e-01 8.14792695693184e-02 -4.17000000000000e+04 +-1.66279617701467e-01 8.14834452415229e-02 -4.17000000000000e+04 +-1.66239053577000e-01 8.14871491322100e-02 -4.17000000000000e+04 +-1.66198396010511e-01 8.14903100379593e-02 -4.17000000000000e+04 +-1.66157753185954e-01 8.14930570002167e-02 -4.17000000000000e+04 +-1.66117081149736e-01 8.14953308646611e-02 -4.17000000000000e+04 +-1.66076385408707e-01 8.14971313234190e-02 -4.17000000000000e+04 +-1.66035671472926e-01 8.14984581327148e-02 -4.17000000000000e+04 +-1.65994944854917e-01 8.14993111129032e-02 -4.17000000000000e+04 +-1.65954211068920e-01 8.14996901484937e-02 -4.17000000000000e+04 +-1.65913475630145e-01 8.14995951881662e-02 -4.17000000000000e+04 +-1.65872744054027e-01 8.14990262447781e-02 -4.17000000000000e+04 +-1.65832021855477e-01 8.14979833953621e-02 -4.17000000000000e+04 +-1.65791314548137e-01 8.14964667811165e-02 -4.17000000000000e+04 +-1.65750627643633e-01 8.14944766073855e-02 -4.17000000000000e+04 +-1.65709966650827e-01 8.14920131436315e-02 -4.17000000000000e+04 +-1.65669337075074e-01 8.14890767233988e-02 -4.17000000000000e+04 +-1.65628744417475e-01 8.14856677442684e-02 -4.17000000000000e+04 +-1.65588194174133e-01 8.14817866678040e-02 -4.17000000000000e+04 +-1.65547691835407e-01 8.14774340194895e-02 -4.17000000000000e+04 +-1.65507242885170e-01 8.14726103886583e-02 -4.17000000000000e+04 +-1.65466852800068e-01 8.14673164284129e-02 -4.17000000000000e+04 +-1.65426527048775e-01 8.14615528555367e-02 -4.17000000000000e+04 +-1.65386271091255e-01 8.14553204503972e-02 -4.17000000000000e+04 +-1.65346090378024e-01 8.14486200568400e-02 -4.17000000000000e+04 +-1.65305990349406e-01 8.14414525820746e-02 -4.17000000000000e+04 +-1.65265976434805e-01 8.14338189965520e-02 -4.17000000000000e+04 +-1.65226054051963e-01 8.14257203338324e-02 -4.17000000000000e+04 +-1.65186228606229e-01 8.14171576904464e-02 -4.17000000000000e+04 +-1.65146505489828e-01 8.14081322257454e-02 -4.17000000000000e+04 +-1.65106890081130e-01 8.13986451617455e-02 -4.17000000000000e+04 +-1.65067387743922e-01 8.13886977829616e-02 -4.17000000000000e+04 +-1.65028003826678e-01 8.13782914362337e-02 -4.17000000000000e+04 +-1.64455000000000e-01 8.11682000000000e-02 -4.17000000000000e+04 +-1.63927000000000e-01 8.08618000000000e-02 -4.17000000000000e+04 +-1.63461000000000e-01 8.04683000000000e-02 -4.17000000000000e+04 +-1.63069000000000e-01 7.99997000000000e-02 -4.17000000000000e+04 +-1.61392000000000e-01 7.99997000000000e-02 -4.17000000000000e+04 +-1.50219000000000e-01 7.99997000000000e-02 -4.17000000000000e+04 +-1.50192000000000e-01 8.99991000000000e-02 -4.17000000000000e+04 +-1.61387000000000e-01 9.00026000000000e-02 -4.17000000000000e+04 +-1.61392000000000e-01 8.49992000000000e-02 -4.17000000000000e+04 +-1.61592000000000e-01 8.50002000000000e-02 -4.17000000000000e+04 +-1.61792000000000e-01 8.50002000000000e-02 -4.17000000000000e+04 +-1.61794000000000e-01 9.49991000000000e-02 -4.17000000000000e+04 + +# Body +7.78674000000000e-01 3.28382000000000e-02 3.50000000000000e+04 +6.09987000000000e-01 3.25007000000000e-02 3.50000000000000e+04 +6.01928000000000e-01 3.24847000000000e-02 3.50000000000000e+04 +5.79470000000000e-01 3.23034000000000e-02 3.50000000000000e+04 +5.62034000000000e-01 3.18655000000000e-02 3.50000000000000e+04 +5.46202000000000e-01 3.12414000000000e-02 3.50000000000000e+04 +5.37489000000000e-01 3.08605000000000e-02 3.50000000000000e+04 +5.07491000000000e-01 2.95508000000000e-02 3.50000000000000e+04 +4.91539000000000e-01 2.95508000000000e-02 3.50000000000000e+04 +4.69495000000000e-01 2.84009000000000e-02 3.50000000000000e+04 +4.49982000000000e-01 1.95050000000000e-02 3.50000000000000e+04 +4.44495000000000e-01 1.70010000000000e-02 3.50000000000000e+04 +4.41494000000000e-01 1.70010000000000e-02 3.50000000000000e+04 +4.37265000000000e-01 1.80011000000000e-02 3.50000000000000e+04 +4.30884000000000e-01 1.80011000000000e-02 3.50000000000000e+04 +4.26356000000000e-01 1.85009000000000e-02 3.50000000000000e+04 +4.18272000000000e-01 1.85009000000000e-02 3.50000000000000e+04 +4.13743000000000e-01 2.07008000000000e-02 3.50000000000000e+04 +3.99583000000000e-01 2.07008000000000e-02 3.50000000000000e+04 +3.98335000000000e-01 2.07008000000000e-02 3.50000000000000e+04 +3.98035000000000e-01 2.10009000000000e-02 3.50000000000000e+04 +3.93806000000000e-01 2.12011000000000e-02 3.50000000000000e+04 +3.90706000000000e-01 2.12011000000000e-02 3.50000000000000e+04 +3.86177000000000e-01 2.40011000000000e-02 3.50000000000000e+04 +3.64787000000000e-01 2.40011000000000e-02 3.50000000000000e+04 +3.60254000000000e-01 2.68007000000000e-02 3.50000000000000e+04 +3.39468000000000e-01 2.68007000000000e-02 3.50000000000000e+04 +3.34934000000000e-01 2.97006000000000e-02 3.50000000000000e+04 +3.06295000000000e-01 2.97006000000000e-02 3.50000000000000e+04 +2.87995000000000e-01 3.60007000000000e-02 3.50000000000000e+04 +2.29962000000000e-01 5.14874000000000e-02 3.50000000000000e+04 +1.78500000000000e-01 6.54198000000000e-02 3.50000000000000e+04 +1.53500000000000e-01 6.88000000000000e-02 3.50000000000000e+04 +1.48103000000000e-01 7.08177000000000e-02 3.50000000000000e+04 +1.48103000000000e-01 7.08177000000000e-02 3.50000000000000e+04 +1.04844000000000e-01 8.69994000000000e-02 3.50000000000000e+04 +5.10643000000000e-02 8.69994000000000e-02 3.50000000000000e+04 +3.40034000000000e-02 8.69994000000000e-02 3.50000000000000e+04 +3.40034000000000e-02 8.62384000000000e-02 3.50000000000000e+04 +3.40033794637618e-02 8.62384328446797e-02 3.50000000000000e+04 +3.38148368413922e-02 8.60142651738350e-02 3.50000000000000e+04 +3.36230313714004e-02 8.57928828647335e-02 3.50000000000000e+04 +3.34280041970195e-02 8.55743334049884e-02 3.50000000000000e+04 +3.32297971525544e-02 8.53586636745524e-02 3.50000000000000e+04 +3.30284527544082e-02 8.51459199356621e-02 3.50000000000000e+04 +3.28240141919618e-02 8.49361478229142e-02 3.50000000000000e+04 +3.26165253183099e-02 8.47293923334766e-02 3.50000000000000e+04 +3.24060306408544e-02 8.45256978174365e-02 3.50000000000000e+04 +3.21925753117570e-02 8.43251079682870e-02 3.50000000000000e+04 +3.19762051182541e-02 8.41276658135546e-02 3.50000000000000e+04 +3.17569664728348e-02 8.39334137055695e-02 3.50000000000000e+04 +3.15349064032860e-02 8.37423933123811e-02 3.50000000000000e+04 +3.13100725426037e-02 8.35546456088197e-02 3.50000000000000e+04 +3.10825131187763e-02 8.33702108677072e-02 3.50000000000000e+04 +3.08522769444389e-02 8.31891286512186e-02 3.50000000000000e+04 +3.06194134064033e-02 8.30114378023957e-02 3.50000000000000e+04 +3.03839724550636e-02 8.28371764368146e-02 3.50000000000000e+04 +3.01460045936823e-02 8.26663819344105e-02 3.50000000000000e+04 +2.99055608675564e-02 8.24990909314587e-02 3.50000000000000e+04 +2.96626928530685e-02 8.23353393127168e-02 3.50000000000000e+04 +2.94174526466232e-02 8.21751622037263e-02 3.50000000000000e+04 +2.91698928534720e-02 8.20185939632787e-02 3.50000000000000e+04 +2.89200665764296e-02 8.18656681760452e-02 3.50000000000000e+04 +2.86680274044824e-02 8.17164176453724e-02 3.50000000000000e+04 +2.84138294012944e-02 8.15708743862462e-02 3.50000000000000e+04 +2.81575270936092e-02 8.14290696184239e-02 3.50000000000000e+04 +2.78991754595545e-02 8.12910337597378e-02 3.50000000000000e+04 +2.76388299168488e-02 8.11567964195706e-02 3.50000000000000e+04 +2.73765463109139e-02 8.10263863925034e-02 3.50000000000000e+04 +2.71123809028958e-02 8.08998316521397e-02 3.50000000000000e+04 +2.71123819434175e-02 8.08997840726548e-02 3.50000000000000e+04 +2.68463933503883e-02 8.07771152269231e-02 3.50000000000000e+04 +2.65786367978065e-02 8.06583549394348e-02 3.50000000000000e+04 +2.63091697161076e-02 8.05435286827880e-02 3.50000000000000e+04 +2.60380499026145e-02 8.04326610857802e-02 3.50000000000000e+04 +2.57653355091402e-02 8.03257759281261e-02 3.50000000000000e+04 +2.54910850295153e-02 8.02228961353566e-02 3.50000000000000e+04 +2.52153572870415e-02 8.01240437739022e-02 3.50000000000000e+04 +2.49382114218751e-02 8.00292400463594e-02 3.50000000000000e+04 +2.46597068783421e-02 7.99385052869435e-02 3.50000000000000e+04 +2.43799033921878e-02 7.98518589571269e-02 3.50000000000000e+04 +2.40988609777645e-02 7.97693196414649e-02 3.50000000000000e+04 +2.38166399151593e-02 7.96909050436096e-02 3.50000000000000e+04 +2.35333007372645e-02 7.96166319825127e-02 3.50000000000000e+04 +2.32489042167942e-02 7.95465163888179e-02 3.50000000000000e+04 +2.29635113532492e-02 7.94805733014441e-02 3.50000000000000e+04 +2.26771833598334e-02 7.94188168643599e-02 3.50000000000000e+04 +2.23899816503247e-02 7.93612603235494e-02 3.50000000000000e+04 +2.21019678259018e-02 7.93079160241717e-02 3.50000000000000e+04 +2.18132036619321e-02 7.92587954079126e-02 3.50000000000000e+04 +2.15237510947213e-02 7.92139090105307e-02 3.50000000000000e+04 +2.12336722082293e-02 7.91732664595973e-02 3.50000000000000e+04 +2.09430292207534e-02 7.91368764724321e-02 3.50000000000000e+04 +2.06518844715836e-02 7.91047468542326e-02 3.50000000000000e+04 +2.03603004076314e-02 7.90768844964006e-02 3.50000000000000e+04 +2.00683395700361e-02 7.90532953750637e-02 3.50000000000000e+04 +1.97760645807500e-02 7.90339845497939e-02 3.50000000000000e+04 +1.94835381291071e-02 7.90189561625218e-02 3.50000000000000e+04 +1.91908229583768e-02 7.90082134366488e-02 3.50000000000000e+04 +1.88979818523067e-02 7.90017586763554e-02 3.50000000000000e+04 +1.86050776216557e-02 7.89995932661071e-02 3.50000000000000e+04 +1.86051000000000e-02 7.89996000000000e-02 3.50000000000000e+04 +6.28745000000000e-03 7.89996000000000e-02 3.50000000000000e+04 +6.28744754920699e-03 7.89993746439200e-02 3.50000000000000e+04 +6.04348821461353e-03 7.90005641033655e-02 3.50000000000000e+04 +5.79955209698573e-03 7.90041337344033e-02 3.50000000000000e+04 +5.55566241774282e-03 7.90100831972237e-02 3.50000000000000e+04 +5.31184239388325e-03 7.90184119254696e-02 3.50000000000000e+04 +5.06811523577475e-03 7.90291191262902e-02 3.50000000000000e+04 +4.82450414494462e-03 7.90422037804172e-02 3.50000000000000e+04 +4.58103231187126e-03 7.90576646422611e-02 3.50000000000000e+04 +4.33772291377641e-03 7.90755002400303e-02 3.50000000000000e+04 +4.09459911241888e-03 7.90957088758708e-02 3.50000000000000e+04 +3.85168405188971e-03 7.91182886260281e-02 3.50000000000000e+04 +3.60900085640883e-03 7.91432373410303e-02 3.50000000000000e+04 +3.36657262812396e-03 7.91705526458926e-02 3.50000000000000e+04 +3.12442244491121e-03 7.92002319403435e-02 3.50000000000000e+04 +2.88257335817835e-03 7.92322723990721e-02 3.50000000000000e+04 +2.64104839067032e-03 7.92666709719975e-02 3.50000000000000e+04 +2.39987053427762e-03 7.93034243845588e-02 3.50000000000000e+04 +2.15906274784772e-03 7.93425291380267e-02 3.50000000000000e+04 +1.91864795499927e-03 7.93839815098371e-02 3.50000000000000e+04 +1.67864904194014e-03 7.94277775539449e-02 3.50000000000000e+04 +1.43908885528856e-03 7.94739131012001e-02 3.50000000000000e+04 +1.19999019989843e-03 7.95223837597441e-02 3.50000000000000e+04 +9.61375836688251e-04 7.95731849154285e-02 3.50000000000000e+04 +7.23268480474575e-04 7.96263117322539e-02 3.50000000000000e+04 +4.85690797809518e-04 7.96817591528301e-02 3.50000000000000e+04 +2.48665404823096e-04 7.97395218988582e-02 3.50000000000000e+04 +1.22148650703582e-05 7.97995944716323e-02 3.50000000000000e+04 +-2.23638312616705e-04 7.98619711525634e-02 3.50000000000000e+04 +-4.58871676271700e-04 7.99266460037238e-02 3.50000000000000e+04 +-6.93462832931315e-04 7.99936128684121e-02 3.50000000000000e+04 +-9.27389450766835e-04 8.00628653717393e-02 3.50000000000000e+04 +-9.27386703034138e-04 8.00631006018983e-02 3.50000000000000e+04 +-9.43631141710379e-04 8.00681029296686e-02 3.50000000000000e+04 +-9.59817828137351e-04 8.00732890894755e-02 3.50000000000000e+04 +-9.75944682032353e-04 8.00786584148034e-02 3.50000000000000e+04 +-9.92009630802255e-04 8.00842102155967e-02 3.50000000000000e+04 +-1.00801060980985e-03 8.00899437783482e-02 3.50000000000000e+04 +-1.02394556263922e-03 8.00958583661913e-02 3.50000000000000e+04 +-1.03981244135999e-03 8.01019532189941e-02 3.50000000000000e+04 +-1.05560920679055e-03 8.01082275534576e-02 3.50000000000000e+04 +-1.07133382876012e-03 8.01146805632160e-02 3.50000000000000e+04 +-1.08698428636967e-03 8.01213114189405e-02 3.50000000000000e+04 +-1.10255856825162e-03 8.01281192684460e-02 3.50000000000000e+04 +-1.11805467282837e-03 8.01351032368003e-02 3.50000000000000e+04 +-1.13347060856950e-03 8.01422624264369e-02 3.50000000000000e+04 +-1.14880439424775e-03 8.01495959172702e-02 3.50000000000000e+04 +-1.16405405919363e-03 8.01571027668135e-02 3.50000000000000e+04 +-1.17921764354870e-03 8.01647820103006e-02 3.50000000000000e+04 +-1.19429319851743e-03 8.01726326608095e-02 3.50000000000000e+04 +-1.20927878661766e-03 8.01806537093892e-02 3.50000000000000e+04 +-1.22417248192960e-03 8.01888441251896e-02 3.50000000000000e+04 +-1.23897237034335e-03 8.01972028555937e-02 3.50000000000000e+04 +-1.25367654980491e-03 8.02057288263530e-02 3.50000000000000e+04 +-1.26828313056060e-03 8.02144209417259e-02 3.50000000000000e+04 +-1.28279023539996e-03 8.02232780846178e-02 3.50000000000000e+04 +-1.29719599989697e-03 8.02322991167253e-02 3.50000000000000e+04 +-1.31149857264970e-03 8.02414828786822e-02 3.50000000000000e+04 +-1.32569611551821e-03 8.02508281902085e-02 3.50000000000000e+04 +-1.33978680386083e-03 8.02603338502623e-02 3.50000000000000e+04 +-1.35376882676861e-03 8.02699986371940e-02 3.50000000000000e+04 +-1.36764038729808e-03 8.02798213089031e-02 3.50000000000000e+04 +-1.38139970270221e-03 8.02898006029982e-02 3.50000000000000e+04 +-1.38139897193075e-03 8.02897936290505e-02 3.50000000000000e+04 +-1.39504760757479e-03 8.02999242335870e-02 3.50000000000000e+04 +-1.40858044466490e-03 8.03102090147472e-02 3.50000000000000e+04 +-1.42199574169111e-03 8.03206466490059e-02 3.50000000000000e+04 +-1.43529177226940e-03 8.03312357931677e-02 3.50000000000000e+04 +-1.44846682536389e-03 8.03419750845399e-02 3.50000000000000e+04 +-1.46151920550701e-03 8.03528631411075e-02 3.50000000000000e+04 +-1.47444723301769e-03 8.03638985617113e-02 3.50000000000000e+04 +-1.48724924421753e-03 8.03750799262282e-02 3.50000000000000e+04 +-1.49992359164487e-03 8.03864057957538e-02 3.50000000000000e+04 +-1.51246864426681e-03 8.03978747127878e-02 3.50000000000000e+04 +-1.52488278768912e-03 8.04094852014213e-02 3.50000000000000e+04 +-1.53716442436395e-03 8.04212357675271e-02 3.50000000000000e+04 +-1.54931197379547e-03 8.04331248989516e-02 3.50000000000000e+04 +-1.56132387274320e-03 8.04451510657095e-02 3.50000000000000e+04 +-1.57319857542324e-03 8.04573127201809e-02 3.50000000000000e+04 +-1.58493455370716e-03 8.04696082973100e-02 3.50000000000000e+04 +-1.59653029731864e-03 8.04820362148072e-02 3.50000000000000e+04 +-1.60798431402786e-03 8.04945948733520e-02 3.50000000000000e+04 +-1.61929512984350e-03 8.05072826567993e-02 3.50000000000000e+04 +-1.63046128920243e-03 8.05200979323870e-02 3.50000000000000e+04 +-1.64148135515706e-03 8.05330390509467e-02 3.50000000000000e+04 +-1.65235390956020e-03 8.05461043471152e-02 3.50000000000000e+04 +-1.66307755324759e-03 8.05592921395493e-02 3.50000000000000e+04 +-1.67365090621795e-03 8.05726007311421e-02 3.50000000000000e+04 +-1.68407260781058e-03 8.05860284092413e-02 3.50000000000000e+04 +-1.69434131688045e-03 8.05995734458694e-02 3.50000000000000e+04 +-1.70445571197078e-03 8.06132340979467e-02 3.50000000000000e+04 +-1.71441449148310e-03 8.06270086075149e-02 3.50000000000000e+04 +-1.72421637384476e-03 8.06408952019638e-02 3.50000000000000e+04 +-1.73386009767387e-03 8.06548920942591e-02 3.50000000000000e+04 +-1.73386027855466e-03 8.06549082452400e-02 3.50000000000000e+04 +-1.74335131474335e-03 8.06690082887677e-02 3.50000000000000e+04 +-1.75268169681231e-03 8.06832151521042e-02 3.50000000000000e+04 +-1.76185022265120e-03 8.06975270048619e-02 3.50000000000000e+04 +-1.77085571100295e-03 8.07119420031264e-02 3.50000000000000e+04 +-1.77969700161597e-03 8.07264582896940e-02 3.50000000000000e+04 +-1.78837295539363e-03 8.07410739943114e-02 3.50000000000000e+04 +-1.79688245454099e-03 8.07557872339165e-02 3.50000000000000e+04 +-1.80522440270886e-03 8.07705961128809e-02 3.50000000000000e+04 +-1.81339772513503e-03 8.07854987232541e-02 3.50000000000000e+04 +-1.82140136878271e-03 8.08004931450095e-02 3.50000000000000e+04 +-1.82923430247626e-03 8.08155774462916e-02 3.50000000000000e+04 +-1.83689551703402e-03 8.08307496836650e-02 3.50000000000000e+04 +-1.84438402539829e-03 8.08460079023650e-02 3.50000000000000e+04 +-1.85169886276259e-03 8.08613501365488e-02 3.50000000000000e+04 +-1.85883908669587e-03 8.08767744095494e-02 3.50000000000000e+04 +-1.86580377726399e-03 8.08922787341303e-02 3.50000000000000e+04 +-1.87259203714824e-03 8.09078611127408e-02 3.50000000000000e+04 +-1.87920299176090e-03 8.09235195377741e-02 3.50000000000000e+04 +-1.88563578935798e-03 8.09392519918259e-02 3.50000000000000e+04 +-1.89188960114894e-03 8.09550564479539e-02 3.50000000000000e+04 +-1.89796362140344e-03 8.09709308699391e-02 3.50000000000000e+04 +-1.90385706755519e-03 8.09868732125484e-02 3.50000000000000e+04 +-1.90956918030274e-03 8.10028814217979e-02 3.50000000000000e+04 +-1.91509922370735e-03 8.10189534352175e-02 3.50000000000000e+04 +-1.92044648528774e-03 8.10350871821167e-02 3.50000000000000e+04 +-1.92561027611196e-03 8.10512805838514e-02 3.50000000000000e+04 +-1.93058993088610e-03 8.10675315540916e-02 3.50000000000000e+04 +-1.93538480804002e-03 8.10838379990903e-02 3.50000000000000e+04 +-1.93999428981003e-03 8.11001978179532e-02 3.50000000000000e+04 +-1.94441778231843e-03 8.11166089029096e-02 3.50000000000000e+04 +-1.94442018741758e-03 8.11166003637466e-02 3.50000000000000e+04 +-1.94866270875799e-03 8.11330559868286e-02 3.50000000000000e+04 +-1.95271843262526e-03 8.11495586418347e-02 3.50000000000000e+04 +-1.95658683791183e-03 8.11661062083892e-02 3.50000000000000e+04 +-1.96026742757813e-03 8.11826965603459e-02 3.50000000000000e+04 +-1.96375972871641e-03 8.11993275660611e-02 3.50000000000000e+04 +-1.96706329261157e-03 8.12159970886676e-02 3.50000000000000e+04 +-1.97017769479877e-03 8.12327029863494e-02 3.50000000000000e+04 +-1.97310253511800e-03 8.12494431126166e-02 3.50000000000000e+04 +-1.97583743776544e-03 8.12662153165817e-02 3.50000000000000e+04 +-1.97838205134181e-03 8.12830174432354e-02 3.50000000000000e+04 +-1.98073604889749e-03 8.12998473337236e-02 3.50000000000000e+04 +-1.98289912797450e-03 8.13167028256252e-02 3.50000000000000e+04 +-1.98487101064543e-03 8.13335817532295e-02 3.50000000000000e+04 +-1.98665144354910e-03 8.13504819478146e-02 3.50000000000000e+04 +-1.98824019792311e-03 8.13674012379261e-02 3.50000000000000e+04 +-1.98963706963328e-03 8.13843374496561e-02 3.50000000000000e+04 +-1.99084187919982e-03 8.14012884069225e-02 3.50000000000000e+04 +-1.99185447182042e-03 8.14182519317485e-02 3.50000000000000e+04 +-1.99267471739016e-03 8.14352258445426e-02 3.50000000000000e+04 +-1.99330251051818e-03 8.14522079643787e-02 3.50000000000000e+04 +-1.99373777054127e-03 8.14691961092760e-02 3.50000000000000e+04 +-1.99398044153419e-03 8.14861880964795e-02 3.50000000000000e+04 +-1.99403049231689e-03 8.15031817427409e-02 3.50000000000000e+04 +-1.99388791645850e-03 8.15201748645984e-02 3.50000000000000e+04 +-1.99355273227814e-03 8.15371652786576e-02 3.50000000000000e+04 +-1.99302498284262e-03 8.15541508018721e-02 3.50000000000000e+04 +-1.99230473596085e-03 8.15711292518240e-02 3.50000000000000e+04 +-1.99139208417515e-03 8.15880984470040e-02 3.50000000000000e+04 +-1.99028714474936e-03 8.16050562070920e-02 3.50000000000000e+04 +-1.98899005965378e-03 8.16220003532373e-02 3.50000000000000e+04 +-1.98898993356199e-03 8.16220496580947e-02 3.50000000000000e+04 +-1.98749981219250e-03 8.16389832061471e-02 3.50000000000000e+04 +-1.98581800368330e-03 8.16558987916077e-02 3.50000000000000e+04 +-1.98394472376585e-03 8.16727942446555e-02 3.50000000000000e+04 +-1.98188021273228e-03 8.16896673980516e-02 3.50000000000000e+04 +-1.97962473540464e-03 8.17065160874179e-02 3.50000000000000e+04 +-1.97717858110087e-03 8.17233381515142e-02 3.50000000000000e+04 +-1.97454206359771e-03 8.17401314325157e-02 3.50000000000000e+04 +-1.97171552109047e-03 8.17568937762895e-02 3.50000000000000e+04 +-1.96869931614960e-03 8.17736230326714e-02 3.50000000000000e+04 +-1.96549383567425e-03 8.17903170557414e-02 3.50000000000000e+04 +-1.96209949084257e-03 8.18069737040987e-02 3.50000000000000e+04 +-1.95851671705902e-03 8.18235908411372e-02 3.50000000000000e+04 +-1.95474597389849e-03 8.18401663353185e-02 3.50000000000000e+04 +-1.95078774504735e-03 8.18566980604462e-02 3.50000000000000e+04 +-1.94664253824144e-03 8.18731838959384e-02 3.50000000000000e+04 +-1.94231088520089e-03 8.18896217270993e-02 3.50000000000000e+04 +-1.93779334156195e-03 8.19060094453910e-02 3.50000000000000e+04 +-1.93309048680569e-03 8.19223449487037e-02 3.50000000000000e+04 +-1.92820292418372e-03 8.19386261416254e-02 3.50000000000000e+04 +-1.92313128064073e-03 8.19548509357107e-02 3.50000000000000e+04 +-1.91787620673413e-03 8.19710172497486e-02 3.50000000000000e+04 +-1.91243837655059e-03 8.19871230100297e-02 3.50000000000000e+04 +-1.90681848761956e-03 8.20031661506119e-02 3.50000000000000e+04 +-1.90101726082379e-03 8.20191446135856e-02 3.50000000000000e+04 +-1.89503544030689e-03 8.20350563493376e-02 3.50000000000000e+04 +-1.88887379337784e-03 8.20508993168141e-02 3.50000000000000e+04 +-1.88253311041258e-03 8.20666714837822e-02 3.50000000000000e+04 +-1.87601420475265e-03 8.20823708270913e-02 3.50000000000000e+04 +-1.86931791260081e-03 8.20979953329316e-02 3.50000000000000e+04 +-1.86244509291381e-03 8.21135429970934e-02 3.50000000000000e+04 +-1.86245982441148e-03 8.21134534805115e-02 3.50000000000000e+04 +-1.85541104800820e-03 8.21289191997361e-02 3.50000000000000e+04 +-1.84818750276208e-03 8.21443040661313e-02 3.50000000000000e+04 +-1.84079011592484e-03 8.21596061048157e-02 3.50000000000000e+04 +-1.83321983706340e-03 8.21748233515404e-02 3.50000000000000e+04 +-1.82547763793800e-03 8.21899538529406e-02 3.50000000000000e+04 +-1.81756451237748e-03 8.22049956667868e-02 3.50000000000000e+04 +-1.80948147615165e-03 8.22199468622337e-02 3.50000000000000e+04 +-1.80122956684096e-03 8.22348055200683e-02 3.50000000000000e+04 +-1.79280984370327e-03 8.22495697329564e-02 3.50000000000000e+04 +-1.78422338753789e-03 8.22642376056869e-02 3.50000000000000e+04 +-1.77547130054687e-03 8.22788072554158e-02 3.50000000000000e+04 +-1.76655470619346e-03 8.22932768119071e-02 3.50000000000000e+04 +-1.75747474905795e-03 8.23076444177737e-02 3.50000000000000e+04 +-1.74823259469072e-03 8.23219082287150e-02 3.50000000000000e+04 +-1.73882942946262e-03 8.23360664137545e-02 3.50000000000000e+04 +-1.72926646041269e-03 8.23501171554741e-02 3.50000000000000e+04 +-1.71954491509322e-03 8.23640586502476e-02 3.50000000000000e+04 +-1.70966604141218e-03 8.23778891084726e-02 3.50000000000000e+04 +-1.69963110747301e-03 8.23916067547997e-02 3.50000000000000e+04 +-1.68944140141187e-03 8.24052098283608e-02 3.50000000000000e+04 +-1.67909823123224e-03 8.24186965829947e-02 3.50000000000000e+04 +-1.66860292463710e-03 8.24320652874717e-02 3.50000000000000e+04 +-1.65795682885841e-03 8.24453142257155e-02 3.50000000000000e+04 +-1.64716131048422e-03 8.24584416970239e-02 3.50000000000000e+04 +-1.63621775528324e-03 8.24714460162865e-02 3.50000000000000e+04 +-1.62512756802697e-03 8.24843255142014e-02 3.50000000000000e+04 +-1.61389217230933e-03 8.24970785374895e-02 3.50000000000000e+04 +-1.60251301036398e-03 8.25097034491067e-02 3.50000000000000e+04 +-1.59099154287915e-03 8.25221986284537e-02 3.50000000000000e+04 +-1.57932924881014e-03 8.25345624715847e-02 3.50000000000000e+04 +-1.57931957514250e-03 8.25346295462135e-02 3.50000000000000e+04 +-1.56751331012054e-03 8.25468557400067e-02 3.50000000000000e+04 +-1.55556954399041e-03 8.25589476446981e-02 3.50000000000000e+04 +-1.54348980410914e-03 8.25709037139868e-02 3.50000000000000e+04 +-1.53127563522195e-03 8.25827224189425e-02 3.50000000000000e+04 +-1.51892859926470e-03 8.25944022482010e-02 3.50000000000000e+04 +-1.50645027516419e-03 8.26059417081571e-02 3.50000000000000e+04 +-1.49384225863617e-03 8.26173393231561e-02 3.50000000000000e+04 +-1.48110616198138e-03 8.26285936356823e-02 3.50000000000000e+04 +-1.46824361387929e-03 8.26397032065451e-02 3.50000000000000e+04 +-1.45525625917985e-03 8.26506666150638e-02 3.50000000000000e+04 +-1.44214575869318e-03 8.26614824592484e-02 3.50000000000000e+04 +-1.42891378897716e-03 8.26721493559794e-02 3.50000000000000e+04 +-1.41556204212300e-03 8.26826659411846e-02 3.50000000000000e+04 +-1.40209222553893e-03 8.26930308700135e-02 3.50000000000000e+04 +-1.38850606173182e-03 8.27032428170092e-02 3.50000000000000e+04 +-1.37480528808687e-03 8.27133004762780e-02 3.50000000000000e+04 +-1.36099165664552e-03 8.27232025616562e-02 3.50000000000000e+04 +-1.34706693388132e-03 8.27329478068751e-02 3.50000000000000e+04 +-1.33303290047409e-03 8.27425349657223e-02 3.50000000000000e+04 +-1.31889135108217e-03 8.27519628122013e-02 3.50000000000000e+04 +-1.30464409411295e-03 8.27612301406885e-02 3.50000000000000e+04 +-1.29029295149160e-03 8.27703357660870e-02 3.50000000000000e+04 +-1.27583975842808e-03 8.27792785239785e-02 3.50000000000000e+04 +-1.26128636318247e-03 8.27880572707718e-02 3.50000000000000e+04 +-1.24663462682858e-03 8.27966708838495e-02 3.50000000000000e+04 +-1.23188642301601e-03 8.28051182617112e-02 3.50000000000000e+04 +-1.21704363773053e-03 8.28133983241147e-02 3.50000000000000e+04 +-1.20210816905286e-03 8.28215100122136e-02 3.50000000000000e+04 +-1.18708192691601e-03 8.28294522886934e-02 3.50000000000000e+04 +-1.17196683286100e-03 8.28372241379035e-02 3.50000000000000e+04 +-1.17197038281512e-03 8.28372378541755e-02 3.50000000000000e+04 +-1.15676707674774e-03 8.28448360987624e-02 3.50000000000000e+04 +-1.14147848749072e-03 8.28522612502566e-02 3.50000000000000e+04 +-1.12610658566931e-03 8.28595123515918e-02 3.50000000000000e+04 +-1.11065335264737e-03 8.28665884681363e-02 3.50000000000000e+04 +-1.09512078027192e-03 8.28734886878127e-02 3.50000000000000e+04 +-1.07951087061648e-03 8.28802121212161e-02 3.50000000000000e+04 +-1.06382563572294e-03 8.28867579017284e-02 3.50000000000000e+04 +-1.04806709734227e-03 8.28931251856303e-02 3.50000000000000e+04 +-1.03223728667390e-03 8.28993131522094e-02 3.50000000000000e+04 +-1.01633824410391e-03 8.29053210038669e-02 3.50000000000000e+04 +-1.00037201894203e-03 8.29111479662198e-02 3.50000000000000e+04 +-9.84340669157522e-04 8.29167932882006e-02 3.50000000000000e+04 +-9.68246261113876e-04 8.29222562421549e-02 3.50000000000000e+04 +-9.52090869302499e-04 8.29275361239340e-02 3.50000000000000e+04 +-9.35876576075307e-04 8.29326322529869e-02 3.50000000000000e+04 +-9.19605471376326e-04 8.29375439724472e-02 3.50000000000000e+04 +-9.03279652472302e-04 8.29422706492178e-02 3.50000000000000e+04 +-8.86901223682382e-04 8.29468116740531e-02 3.50000000000000e+04 +-8.70472296106870e-04 8.29511664616369e-02 3.50000000000000e+04 +-8.53994987355121e-04 8.29553344506580e-02 3.50000000000000e+04 +-8.37471421272590e-04 8.29593151038830e-02 3.50000000000000e+04 +-8.20903727667076e-04 8.29631079082248e-02 3.50000000000000e+04 +-8.04294042034205e-04 8.29667123748092e-02 3.50000000000000e+04 +-7.87644505282172e-04 8.29701280390380e-02 3.50000000000000e+04 +-7.70957263455786e-04 8.29733544606485e-02 3.50000000000000e+04 +-7.54234467459862e-04 8.29763912237707e-02 3.50000000000000e+04 +-7.37478272781972e-04 8.29792379369803e-02 3.50000000000000e+04 +-7.20690839214619e-04 8.29818942333498e-02 3.50000000000000e+04 +-7.03874330576846e-04 8.29843597704955e-02 3.50000000000000e+04 +-6.87030914435333e-04 8.29866342306216e-02 3.50000000000000e+04 +-6.87030744408926e-04 8.29866141498875e-02 3.50000000000000e+04 +-6.70163400249386e-04 8.29887018910546e-02 3.50000000000000e+04 +-6.53273528701193e-04 8.29905987835826e-02 3.50000000000000e+04 +-6.36363289086073e-04 8.29923045849592e-02 3.50000000000000e+04 +-6.19434843329748e-04 8.29938190771026e-02 3.50000000000000e+04 +-6.02490355685546e-04 8.29951420663893e-02 3.50000000000000e+04 +-5.85531992457703e-04 8.29962733836789e-02 3.50000000000000e+04 +-5.68561921724407e-04 8.29972128843358e-02 3.50000000000000e+04 +-5.51582313060621e-04 8.29979604482474e-02 3.50000000000000e+04 +-5.34595337260702e-04 8.29985159798398e-02 3.50000000000000e+04 +-5.17603166060875e-04 8.29988794080900e-02 3.50000000000000e+04 +-5.00607971861583e-04 8.29990506865347e-02 3.50000000000000e+04 +-4.83611927449750e-04 8.29990297932764e-02 3.50000000000000e+04 +-4.66617205720997e-04 8.29988167309862e-02 3.50000000000000e+04 +-4.49625979401843e-04 8.29984115269036e-02 3.50000000000000e+04 +-4.32640420771932e-04 8.29978142328327e-02 3.50000000000000e+04 +-4.15662701386306e-04 8.29970249251359e-02 3.50000000000000e+04 +-3.98694991797786e-04 8.29960437047240e-02 3.50000000000000e+04 +-3.81739461279466e-04 8.29948706970430e-02 3.50000000000000e+04 +-3.64798277547382e-04 8.29935060520588e-02 3.50000000000000e+04 +-3.47873606483375e-04 8.29919499442372e-02 3.50000000000000e+04 +-3.30967611858188e-04 8.29902025725222e-02 3.50000000000000e+04 +-3.14082455054835e-04 8.29882641603102e-02 3.50000000000000e+04 +-2.97220294792273e-04 8.29861349554218e-02 3.50000000000000e+04 +-2.80383286849420e-04 8.29838152300696e-02 3.50000000000000e+04 +-2.63573583789538e-04 8.29813052808239e-02 3.50000000000000e+04 +-2.46793334685041e-04 8.29786054285746e-02 3.50000000000000e+04 +-2.30044684842738e-04 8.29757160184900e-02 3.50000000000000e+04 +-2.13329775529562e-04 8.29726374199728e-02 3.50000000000000e+04 +-1.96650743698818e-04 8.29693700266133e-02 3.50000000000000e+04 +-1.80009721716975e-04 8.29659142561381e-02 3.50000000000000e+04 +-1.80010482212498e-04 8.29658837615737e-02 3.50000000000000e+04 +-1.63411416754861e-04 8.29622274181047e-02 3.50000000000000e+04 +-1.46854817418079e-04 8.29583833525445e-02 3.50000000000000e+04 +-1.30342807116614e-04 8.29543520577855e-02 3.50000000000000e+04 +-1.13877503047648e-04 8.29501340507268e-02 3.50000000000000e+04 +-9.74610164196140e-05 8.29457298722085e-02 3.50000000000000e+04 +-8.10954521814911e-05 8.29411400869414e-02 3.50000000000000e+04 +-6.47829087529068e-05 8.29363652834355e-02 3.50000000000000e+04 +-4.85254777550712e-05 8.29314060739238e-02 3.50000000000000e+04 +-3.23252437425897e-05 8.29262630942845e-02 3.50000000000000e+04 +-1.61842839361740e-05 8.29209370039588e-02 3.50000000000000e+04 +-1.04667956301176e-07 8.29154284858667e-02 3.50000000000000e+04 +1.59115424421598e-05 8.29097382463198e-02 3.50000000000000e+04 +3.18622936343070e-05 8.29038670149297e-02 3.50000000000000e+04 +4.77455403885262e-05 8.28978155445154e-02 3.50000000000000e+04 +6.35592461287344e-05 8.28915846110065e-02 3.50000000000000e+04 +7.93013831955106e-05 8.28851750133436e-02 3.50000000000000e+04 +9.49699331060875e-05 8.28785875733758e-02 3.50000000000000e+04 +1.10562886813165e-04 8.28718231357555e-02 3.50000000000000e+04 +1.26078244962512e-04 8.28648825678300e-02 3.50000000000000e+04 +1.41514018149329e-04 8.28577667595305e-02 3.50000000000000e+04 +1.56868227173329e-04 8.28504766232577e-02 3.50000000000000e+04 +1.72138903292520e-04 8.28430130937647e-02 3.50000000000000e+04 +1.87324088475634e-04 8.28353771280376e-02 3.50000000000000e+04 +2.02421835653192e-04 8.28275697051727e-02 3.50000000000000e+04 +2.17430208967163e-04 8.28195918262504e-02 3.50000000000000e+04 +2.32347284019175e-04 8.28114445142076e-02 3.50000000000000e+04 +2.47171148117275e-04 8.28031288137061e-02 3.50000000000000e+04 +2.61899900521169e-04 8.27946457909987e-02 3.50000000000000e+04 +2.76531652685943e-04 8.27859965337925e-02 3.50000000000000e+04 +2.91064528504210e-04 8.27771821511096e-02 3.50000000000000e+04 +2.91066074436660e-04 8.27771647350380e-02 3.50000000000000e+04 +3.05498016367830e-04 8.27681879907642e-02 3.50000000000000e+04 +3.19827266168204e-04 8.27590482158315e-02 3.50000000000000e+04 +3.34051982242034e-04 8.27497465848842e-02 3.50000000000000e+04 +3.48170336428248e-04 8.27402842933681e-02 3.50000000000000e+04 +3.62180514235409e-04 8.27306625573774e-02 3.50000000000000e+04 +3.76080715074912e-04 8.27208826134981e-02 3.50000000000000e+04 +3.89869152492397e-04 8.27109457186488e-02 3.50000000000000e+04 +4.03544054397342e-04 8.27008531499197e-02 3.50000000000000e+04 +4.17103663290815e-04 8.26906062044080e-02 3.50000000000000e+04 +4.30546236491346e-04 8.26802061990518e-02 3.50000000000000e+04 +4.43870046358896e-04 8.26696544704599e-02 3.50000000000000e+04 +4.57073380516895e-04 8.26589523747411e-02 3.50000000000000e+04 +4.70154542072317e-04 8.26481012873291e-02 3.50000000000000e+04 +4.83111849833762e-04 8.26371026028061e-02 3.50000000000000e+04 +4.95943638527524e-04 8.26259577347234e-02 3.50000000000000e+04 +5.08648259011615e-04 8.26146681154199e-02 3.50000000000000e+04 +5.21224078487709e-04 8.26032351958380e-02 3.50000000000000e+04 +5.33669480710989e-04 8.25916604453369e-02 3.50000000000000e+04 +5.45982866197872e-04 8.25799453515040e-02 3.50000000000000e+04 +5.58162652431567e-04 8.25680914199637e-02 3.50000000000000e+04 +5.70207274065469e-04 8.25561001741836e-02 3.50000000000000e+04 +5.82115183124329e-04 8.25439731552792e-02 3.50000000000000e+04 +5.93884849203204e-04 8.25317119218154e-02 3.50000000000000e+04 +6.05514759664146e-04 8.25193180496064e-02 3.50000000000000e+04 +6.17003419830604e-04 8.25067931315132e-02 3.50000000000000e+04 +6.28349353179519e-04 8.24941387772387e-02 3.50000000000000e+04 +6.39551101531089e-04 8.24813566131211e-02 3.50000000000000e+04 +6.50607225236174e-04 8.24684482819245e-02 3.50000000000000e+04 +6.61516303361319e-04 8.24554154426283e-02 3.50000000000000e+04 +6.72276933871374e-04 8.24422597702134e-02 3.50000000000000e+04 +6.72282984050363e-04 8.24422746449279e-02 3.50000000000000e+04 +6.82894630634690e-04 8.24289967563966e-02 3.50000000000000e+04 +6.93355156626642e-04 8.24155994893973e-02 3.50000000000000e+04 +7.03663219159381e-04 8.24020845638000e-02 3.50000000000000e+04 +7.13817494938515e-04 8.23884537145791e-02 3.50000000000000e+04 +7.23816680411981e-04 8.23747086915909e-02 3.50000000000000e+04 +7.33659491937388e-04 8.23608512593484e-02 3.50000000000000e+04 +7.43344665946801e-04 8.23468831967953e-02 3.50000000000000e+04 +7.52870959108954e-04 8.23328062970773e-02 3.50000000000000e+04 +7.62237148488862e-04 8.23186223673123e-02 3.50000000000000e+04 +7.71442031704814e-04 8.23043332283578e-02 3.50000000000000e+04 +7.80484427082727e-04 8.22899407145778e-02 3.50000000000000e+04 +7.89363173807849e-04 8.22754466736067e-02 3.50000000000000e+04 +7.98077132073769e-04 8.22608529661127e-02 3.50000000000000e+04 +8.06625183228747e-04 8.22461614655586e-02 3.50000000000000e+04 +8.15006229919318e-04 8.22313740579612e-02 3.50000000000000e+04 +8.23219196231163e-04 8.22164926416496e-02 3.50000000000000e+04 +8.31263027827232e-04 8.22015191270209e-02 3.50000000000000e+04 +8.39136692083091e-04 8.21864554362957e-02 3.50000000000000e+04 +8.46839178219488e-04 8.21713035032706e-02 3.50000000000000e+04 +8.54369497432109e-04 8.21560652730703e-02 3.50000000000000e+04 +8.61726683018518e-04 8.21407427018981e-02 3.50000000000000e+04 +8.68909790502253e-04 8.21253377567844e-02 3.50000000000000e+04 +8.75917897754077e-04 8.21098524153342e-02 3.50000000000000e+04 +8.82750105110355e-04 8.20942886654737e-02 3.50000000000000e+04 +8.89405535488546e-04 8.20786485051945e-02 3.50000000000000e+04 +8.95883334499801e-04 8.20629339422973e-02 3.50000000000000e+04 +9.02182670558644e-04 8.20471469941344e-02 3.50000000000000e+04 +9.08302734989725e-04 8.20312896873505e-02 3.50000000000000e+04 +9.14242742131635e-04 8.20153640576224e-02 3.50000000000000e+04 +9.20001929437766e-04 8.19993721493982e-02 3.50000000000000e+04 +9.20009000000000e-04 8.19994000000000e-02 3.50000000000000e+04 +2.37296000000000e-03 8.19994000000000e-02 3.50000000000000e+04 +2.67753000000000e-03 8.19994000000000e-02 3.50000000000000e+04 +3.28667000000000e-03 8.19994000000000e-02 3.50000000000000e+04 +1.43061000000000e-02 8.19994000000000e-02 3.50000000000000e+04 +1.43061000000000e-02 8.99991000000000e-02 3.50000000000000e+04 +3.30165000000000e-03 9.00011000000000e-02 3.50000000000000e+04 +3.30665000000000e-03 8.49992000000000e-02 3.50000000000000e+04 +2.99209000000000e-03 8.49997000000000e-02 3.50000000000000e+04 +2.67753000000000e-03 8.49997000000000e-02 3.50000000000000e+04 +2.67753000000000e-03 8.52992000000000e-02 3.50000000000000e+04 +2.67753000000000e-03 8.57691900000000e-02 3.50000000000000e+04 +2.67753000000000e-03 8.62391800000000e-02 3.50000000000000e+04 +2.67753000000000e-03 8.67091700000000e-02 3.50000000000000e+04 +2.67753000000000e-03 8.71791600000000e-02 3.50000000000000e+04 +2.67753000000000e-03 8.76491500000000e-02 3.50000000000000e+04 +2.67753000000000e-03 8.81191400000000e-02 3.50000000000000e+04 +2.67753000000000e-03 8.85891300000000e-02 3.50000000000000e+04 +2.67753000000000e-03 8.90591200000000e-02 3.50000000000000e+04 +2.67753000000000e-03 8.95291100000000e-02 3.50000000000000e+04 +2.67753000000000e-03 8.99991000000000e-02 3.50000000000000e+04 +2.67753000000000e-03 9.04690900000000e-02 3.50000000000000e+04 +2.67753000000000e-03 9.09390800000000e-02 3.50000000000000e+04 +2.67753000000000e-03 9.14090700000000e-02 3.50000000000000e+04 +2.67753000000000e-03 9.18790600000000e-02 3.50000000000000e+04 +2.67753000000000e-03 9.23490500000000e-02 3.50000000000000e+04 +2.67753000000000e-03 9.28190400000000e-02 3.50000000000000e+04 +2.67753000000000e-03 9.32890300000000e-02 3.50000000000000e+04 +2.67753000000000e-03 9.37590200000000e-02 3.50000000000000e+04 +2.67753000000000e-03 9.42290100000000e-02 3.50000000000000e+04 +2.67753000000000e-03 9.46990000000000e-02 3.50000000000000e+04 +2.67753000000000e-03 9.49996000000000e-02 3.50000000000000e+04 +2.99209000000000e-03 9.49991000000000e-02 3.50000000000000e+04 +3.30665000000000e-03 9.49991000000000e-02 3.50000000000000e+04 +3.30165000000000e-03 9.08070000000000e-02 3.50000000000000e+04 +1.73019000000000e-02 9.07990000000000e-02 3.50000000000000e+04 +1.73019000000000e-02 9.34992000000000e-02 3.50000000000000e+04 +9.30320000000000e-03 1.01499000000000e-01 3.50000000000000e+04 +3.25172000000000e-03 1.01499000000000e-01 3.50000000000000e+04 +2.67753000000000e-03 1.01499000000000e-01 3.50000000000000e+04 +2.39293000000000e-03 1.01499000000000e-01 3.50000000000000e+04 +-4.69708000000000e-03 1.01499000000000e-01 3.50000000000000e+04 +-7.69785000000000e-03 1.04499000000000e-01 3.50000000000000e+04 +-7.69785000000000e-03 1.06499000000000e-01 3.50000000000000e+04 +-7.69774394574347e-03 1.06519893574197e-01 3.50000000000000e+04 +-7.69741433157317e-03 1.06540835192970e-01 3.50000000000000e+04 +-7.69686501494058e-03 1.06561772200722e-01 3.50000000000000e+04 +-7.69609605631790e-03 1.06582702292576e-01 3.50000000000000e+04 +-7.69510754035688e-03 1.06603623164416e-01 3.50000000000000e+04 +-7.69389957587955e-03 1.06624532513143e-01 3.50000000000000e+04 +-7.69247229586614e-03 1.06645428036925e-01 3.50000000000000e+04 +-7.69082585744056e-03 1.06666307435452e-01 3.50000000000000e+04 +-7.68896044185301e-03 1.06687168410191e-01 3.50000000000000e+04 +-7.68687625446008e-03 1.06708008664635e-01 3.50000000000000e+04 +-7.68457352470212e-03 1.06728825904558e-01 3.50000000000000e+04 +-7.68205250607797e-03 1.06749617838269e-01 3.50000000000000e+04 +-7.67931347611710e-03 1.06770382176863e-01 3.50000000000000e+04 +-7.67635673634900e-03 1.06791116634471e-01 3.50000000000000e+04 +-7.67318261227003e-03 1.06811818928516e-01 3.50000000000000e+04 +-7.66979145330756e-03 1.06832486779958e-01 3.50000000000000e+04 +-7.66618363278153e-03 1.06853117913553e-01 3.50000000000000e+04 +-7.66235954786333e-03 1.06873710058097e-01 3.50000000000000e+04 +-7.65831961953206e-03 1.06894260946677e-01 3.50000000000000e+04 +-7.65406429252825e-03 1.06914768316924e-01 3.50000000000000e+04 +-7.64959403530482e-03 1.06935229911259e-01 3.50000000000000e+04 +-7.64490933997557e-03 1.06955643477141e-01 3.50000000000000e+04 +-7.64001072226099e-03 1.06976006767319e-01 3.50000000000000e+04 +-7.63489872143147e-03 1.06996317540073e-01 3.50000000000000e+04 +-7.62957390024794e-03 1.07016573559468e-01 3.50000000000000e+04 +-7.62403684489993e-03 1.07036772595594e-01 3.50000000000000e+04 +-7.61828816494103e-03 1.07056912424816e-01 3.50000000000000e+04 +-7.61232849322179e-03 1.07076990830016e-01 3.50000000000000e+04 +-7.60615848582003e-03 1.07097005600837e-01 3.50000000000000e+04 +-7.59977882196866e-03 1.07116954533929e-01 3.50000000000000e+04 +-7.59316208586846e-03 1.07136760498631e-01 3.50000000000000e+04 +-7.58635867662109e-03 1.07156589374325e-01 3.50000000000000e+04 +-7.57934867640740e-03 1.07176346160138e-01 3.50000000000000e+04 +-7.57213284891022e-03 1.07196028703729e-01 3.50000000000000e+04 +-7.56471198023563e-03 1.07215634860843e-01 3.50000000000000e+04 +-7.55708687882727e-03 1.07235162495548e-01 3.50000000000000e+04 +-7.54925837537829e-03 1.07254609480466e-01 3.50000000000000e+04 +-7.54122732274083e-03 1.07273973697006e-01 3.50000000000000e+04 +-7.53299459583315e-03 1.07293253035592e-01 3.50000000000000e+04 +-7.52456109154428e-03 1.07312445395897e-01 3.50000000000000e+04 +-7.51592772863632e-03 1.07331548687068e-01 3.50000000000000e+04 +-7.50709544764437e-03 1.07350560827956e-01 3.50000000000000e+04 +-7.49806521077401e-03 1.07369479747342e-01 3.50000000000000e+04 +-7.48883800179656e-03 1.07388303384162e-01 3.50000000000000e+04 +-7.47941482594180e-03 1.07407029687734e-01 3.50000000000000e+04 +-7.46979670978858e-03 1.07425656617979e-01 3.50000000000000e+04 +-7.45998470115287e-03 1.07444182145642e-01 3.50000000000000e+04 +-7.44997986897369e-03 1.07462604252517e-01 3.50000000000000e+04 +-7.43978330319660e-03 1.07480920931665e-01 3.50000000000000e+04 +-7.42939611465501e-03 1.07499130187632e-01 3.50000000000000e+04 +-7.41881943494911e-03 1.07517230036666e-01 3.50000000000000e+04 +-7.40805441632266e-03 1.07535218506936e-01 3.50000000000000e+04 +-7.39710223153738e-03 1.07553093638742e-01 3.50000000000000e+04 +-7.38596407374527e-03 1.07570853484734e-01 3.50000000000000e+04 +-7.37464115635855e-03 1.07588496110120e-01 3.50000000000000e+04 +-7.36313471291752e-03 1.07606019592879e-01 3.50000000000000e+04 +-7.35144599695616e-03 1.07623422023969e-01 3.50000000000000e+04 +-7.33957628186557e-03 1.07640701507536e-01 3.50000000000000e+04 +-7.32752686075524e-03 1.07657856161119e-01 3.50000000000000e+04 +-7.31529904631217e-03 1.07674884115859e-01 3.50000000000000e+04 +-7.30289181354684e-03 1.07692196983010e-01 3.50000000000000e+04 +-7.29033346320979e-03 1.07708963441721e-01 3.50000000000000e+04 +-7.27759728154531e-03 1.07725595217859e-01 3.50000000000000e+04 +-7.26468471285015e-03 1.07742090425362e-01 3.50000000000000e+04 +-7.25159722142355e-03 1.07758447193657e-01 3.50000000000000e+04 +-7.23833629140117e-03 1.07774663667868e-01 3.50000000000000e+04 +-7.22490342658681e-03 1.07790738009029e-01 3.50000000000000e+04 +-7.21130015028183e-03 1.07806668394293e-01 3.50000000000000e+04 +-7.19752800511247e-03 1.07822453017137e-01 3.50000000000000e+04 +-7.18358855285486e-03 1.07838090087568e-01 3.50000000000000e+04 +-7.16948337425794e-03 1.07853577832324e-01 3.50000000000000e+04 +-7.15521406886421e-03 1.07868914495079e-01 3.50000000000000e+04 +-7.14078225482830e-03 1.07884098336639e-01 3.50000000000000e+04 +-7.12618956873351e-03 1.07899127635140e-01 3.50000000000000e+04 +-7.11143766540621e-03 1.07914000686243e-01 3.50000000000000e+04 +-7.09652821772817e-03 1.07928715803328e-01 3.50000000000000e+04 +-7.08146291644685e-03 1.07943271317685e-01 3.50000000000000e+04 +-7.06624346998370e-03 1.07957665578703e-01 3.50000000000000e+04 +-7.05087160424038e-03 1.07971896954057e-01 3.50000000000000e+04 +-7.03534906240307e-03 1.07985963829893e-01 3.50000000000000e+04 +-7.01967760474478e-03 1.07999864611014e-01 3.50000000000000e+04 +-7.00385900842573e-03 1.08013597721054e-01 3.50000000000000e+04 +-6.98789506729183e-03 1.08027161602665e-01 3.50000000000000e+04 +-6.97178759167126e-03 1.08040554717688e-01 3.50000000000000e+04 +-6.95553840816913e-03 1.08053775547330e-01 3.50000000000000e+04 +-6.93914935946041e-03 1.08066822592333e-01 3.50000000000000e+04 +-6.92262230408093e-03 1.08079694373149e-01 3.50000000000000e+04 +-6.90595911621661e-03 1.08092389430104e-01 3.50000000000000e+04 +-6.88916168549096e-03 1.08104906323564e-01 3.50000000000000e+04 +-6.87223191675076e-03 1.08117243634102e-01 3.50000000000000e+04 + + +# Coaxial insert +-2.71790000000000e-01 9.50011000000000e-02 3.50000000000000e+04 +-2.71790000000000e-01 8.50012000000000e-02 3.50000000000000e+04 +-2.72002000000000e-01 8.49992000000000e-02 3.50000000000000e+04 +-2.72214000000000e-01 8.49992000000000e-02 3.50000000000000e+04 +-2.72221000000000e-01 9.00096000000000e-02 3.50000000000000e+04 +-2.83414000000000e-01 8.99991000000000e-02 3.50000000000000e+04 +-2.83414000000000e-01 7.87265000000000e-02 3.50000000000000e+04 +-2.83414000000000e-01 6.99998000000000e-02 3.50000000000000e+04 +-2.97526000000000e-01 6.99998000000000e-02 3.50000000000000e+04 +-2.97487000000000e-01 5.00010000000000e-02 3.50000000000000e+04 +-2.83430000000000e-01 5.00005000000000e-02 3.50000000000000e+04 +-2.59998000000000e-01 5.00005000000000e-02 3.50000000000000e+04 +-1.74274000000000e-01 4.25006000000000e-02 3.50000000000000e+04 +7.14656000000000e-02 2.10009000000000e-02 3.50000000000000e+04 +1.20372000000000e-01 2.10009000000000e-02 3.50000000000000e+04 +1.34027000000000e-01 2.10009000000000e-02 3.50000000000000e+04 +1.40174000000000e-01 2.10009000000000e-02 3.50000000000000e+04 +1.93309000000000e-01 2.10009000000000e-02 3.50000000000000e+04 +2.21299000000000e-01 1.35009000000000e-02 3.50000000000000e+04 +2.21299000000000e-01 1.18672000000000e-02 3.50000000000000e+04 +2.19797000000000e-01 1.10014000000000e-02 3.50000000000000e+04 +2.13251000000000e-01 1.10014000000000e-02 3.50000000000000e+04 +2.13251000000000e-01 9.00127000000000e-03 3.50000000000000e+04 +2.21270000000000e-01 9.00127000000000e-03 3.50000000000000e+04 +3.06255000000000e-01 9.00127000000000e-03 3.50000000000000e+04 +3.99993000000000e-01 9.00127000000000e-03 3.50000000000000e+04 +3.99993000000000e-01 8.50147000000000e-03 3.50000000000000e+04 +4.39991000000000e-01 8.50147000000000e-03 3.50000000000000e+04 +4.39991000000000e-01 8.00118000000000e-03 3.50000000000000e+04 +4.49992000000000e-01 8.00118000000000e-03 3.50000000000000e+04 +4.49992000000000e-01 9.00127000000000e-03 3.50000000000000e+04 +4.54995000000000e-01 9.00127000000000e-03 3.50000000000000e+04 +4.59993000000000e-01 8.38463000000000e-03 3.50000000000000e+04 +4.69719000000000e-01 8.38463000000000e-03 3.50000000000000e+04 +5.29011000000000e-01 7.35459000000000e-03 3.50000000000000e+04 +5.41943000000000e-01 7.20130000000000e-03 3.50000000000000e+04 +7.72787000000000e-01 7.20130000000000e-03 3.50000000000000e+04 diff --git a/geometries/compare_gt170_proto_refurb/importproto.m b/geometries/compare_gt170_proto_refurb/importproto.m new file mode 100644 index 0000000..f1f90ce --- /dev/null +++ b/geometries/compare_gt170_proto_refurb/importproto.m @@ -0,0 +1,47 @@ +function refurb = importproto(filename, dataLines) +%IMPORTFILE Import data from a text file +% REFURB = IMPORTFILE(FILENAME) reads data from text file FILENAME for +% the default selection. Returns the data as a table. +% +% REFURB = IMPORTFILE(FILE, DATALINES) reads data for the specified row +% interval(s) of text file FILENAME. Specify DATALINES as a positive +% scalar integer or a N-by-2 array of positive scalar integers for +% dis-contiguous row intervals. +% +% Example: +% refurb = importfile("/home/lebars/Documents/Doctorate/codes/espic2d/matlab/Magnetic_Field_GLS_2020/refurb.data", [5, Inf]); +% +% See also READTABLE. +% +% Auto-generated by MATLAB on 24-Mar-2022 17:18:34 + +%% Input handling + +% If dataLines is not specified, define defaults +if nargin < 2 + dataLines = [2, Inf]; +end + +%% Setup the Import Options and import the data +opts = delimitedTextImportOptions("NumVariables", 3); + +% Specify range and delimiter +opts.DataLines = dataLines; +opts.Delimiter = " "; + +% Specify column names and types +opts.VariableNames = ["Z", "R", "phi"]; +opts.VariableTypes = ["double", "double", "double"]; + +% Specify file level properties +opts.ExtraColumnsRule = "ignore"; +opts.EmptyLineRule = "read"; + +% Specify variable properties +%opts = setvaropts(opts, "Z", "TrimNonNumeric", true); +opts = setvaropts(opts, "Z", "ThousandsSeparator", ","); + +% Import the data +refurb = readtable(filename, opts); + +end \ No newline at end of file diff --git a/geometries/compare_gt170_proto_refurb/importrefurb.m b/geometries/compare_gt170_proto_refurb/importrefurb.m new file mode 100644 index 0000000..5101969 --- /dev/null +++ b/geometries/compare_gt170_proto_refurb/importrefurb.m @@ -0,0 +1,47 @@ +function refurb = importrefurb(filename, dataLines) +%IMPORTFILE Import data from a text file +% REFURB = IMPORTFILE(FILENAME) reads data from text file FILENAME for +% the default selection. Returns the data as a table. +% +% REFURB = IMPORTFILE(FILE, DATALINES) reads data for the specified row +% interval(s) of text file FILENAME. Specify DATALINES as a positive +% scalar integer or a N-by-2 array of positive scalar integers for +% dis-contiguous row intervals. +% +% Example: +% refurb = importfile("/home/lebars/Documents/Doctorate/codes/espic2d/matlab/Magnetic_Field_GLS_2020/refurb.data", [5, Inf]); +% +% See also READTABLE. +% +% Auto-generated by MATLAB on 24-Mar-2022 17:18:34 + +%% Input handling + +% If dataLines is not specified, define defaults +if nargin < 2 + dataLines = [4, Inf]; +end + +%% Setup the Import Options and import the data +opts = delimitedTextImportOptions("NumVariables", 3); + +% Specify range and delimiter +opts.DataLines = dataLines; +opts.Delimiter = "\t\t"; + +% Specify column names and types +opts.VariableNames = ["name", "Z", "R"]; +opts.VariableTypes = ["double", "double", "double"]; + +% Specify file level properties +opts.ExtraColumnsRule = "ignore"; +opts.EmptyLineRule = "read"; + +% Specify variable properties +opts = setvaropts(opts, "name", "TrimNonNumeric", true); +opts = setvaropts(opts, "name", "ThousandsSeparator", ","); + +% Import the data +refurb = readtable(filename, opts); + +end \ No newline at end of file diff --git a/geometries/compare_gt170_proto_refurb/refurb.data b/geometries/compare_gt170_proto_refurb/refurb.data new file mode 100644 index 0000000..63a6d1b --- /dev/null +++ b/geometries/compare_gt170_proto_refurb/refurb.data @@ -0,0 +1,218 @@ +# z [mm] +# r [mm] +# Cathode +cthP101 -96.945839 97.528159 +cthP100 -96.945839 90.821586 +cthP94 -82.846074 90.020801 +cthP97 -82.44608 95.025706 +cthP95 -82.846074 85.015895 +cthP94 -82.846074 90.020801 +cthP93 -93.945889 90.020801 +cthP92 -93.945889 80.010989 +cthP91 -77.522162 80.010989 +cthEP0 -19.9797 63.1981 +cthEP1 -17.4845 63.0446 +cthEP2 -14.9889 62.8954 +cthEP3 -12.3933 62.7449 +cthEP4 -9.8972 62.6048 +cthEP5 -7.40087 62.4694 +cthEP6 -4.90429 62.3388 +cthEP7 -2.40746 62.213 +cthEP8 0.189511 62.0874 +cthEP9 2.68684 61.9718 +cthEP10 5.1844 61.8615 +cthEP11 7.6822 61.7565 +cthEP12 10.2801 61.6531 +cthEP13 12.7784 61.5594 +cthEP14 15.2768 61.4714 +cthEP15 17.7755 61.3892 +cthEP16 20.2743 61.313 +cthEP17 22.8733 61.2403 +cthEP18 25.3725 61.1768 +cthEP19 27.8718 61.1197 +cthEP20 30.3713 61.0691 +cthEP21 32.8709 61.0253 +cthEP22 35.4707 60.987 +cthEP23 37.9705 60.9572 +cthEP24 40.4704 60.9346 +cthEP25 42.9703 60.9193 +cthEP26 45.4703 60.9114 +cthEP27 48.0703 60.9112 +cthEP28 50.5703 60.9189 +cthEP29 53.0703 60.9343 +cthEP30 55.5701 60.9576 +cthEP31 58.1699 60.9903 +cthEP32 60.6696 61.03 +cthEP33 63.1692 61.0778 +cthEP34 65.6685 61.1338 +cthEP35 68.1677 61.1979 +cthEP36 70.7666 61.2733 +cthEP37 73.2653 61.354 +cthEP38 75.7637 61.4427 +cthEP39 78.2619 61.5392 +cthEP40 80.7597 61.6434 +cthEP41 83.3571 61.7595 +cthEP42 85.8543 61.8784 +cthEP43 88.3511 62.0038 +cthEP44 90.8477 62.1353 +cthEP45 93.4438 62.2778 +cthEP46 95.9397 62.4195 +cthEP47 98.4355 62.565 +cthEP48 100.931 62.7131 +cthEP49 103.526 62.8685 +cthP2 105.72253 63 +cthP4 106.72253 63 +cthP5 109.57202 62.864366 +cthP6 112.39575 62.458692 +cthP7 115.16818 61.786644 +cthP8 117.86425 60.854301 +emtrP2 120.25 59.9 +emtrP1 124.75 58.1 +cthP13 131.1696 55.53216 +cthP14 132.70522 54.781069 +cthP15 134.11253 53.81064 +cthP16 135.36045 52.642314 +cthP17 136.42138 51.301909 +cthP18 137.27189 49.819043 +cthP19 137.89319 48.226481 +cthP20 138.27155 46.559414 +cthP21 138.39861 44.854678 +cthP24 138.2641 43.469046 +cthP25 137.86576 42.155894 +cthP26 137.21889 40.945686 +cthP27 136.34835 39.884931 +cthP28 135.2876 39.014391 +cthP29 134.07739 38.367521 +cthP30 132.76424 37.969181 +cthP31 131.39861 37.834678 +cthP11 122.5 37.834678 +cthP32 -100 57.5 +cthP40 -154.21892 64.40626 +cthP42 -158.26726 65.357779 +cthP44 -162.03129 67.125946 +cthP46 -165.34829 69.634314 +cthP48 -168.07484 72.77443 +cthP52 -168.90702 74.602138 +cthP54 -169.02759 76.606762 +cthP56 -168.42046 78.521037 +cthP58 -167.16659 80.089745 +cthP60 -165.43313 81.103738 +cthP62 -163.45121 81.427828 +cthP64 -161.48505 81.018804 +cthP78 -159.79681 79.9312 +cthP66 -149.8737 79.9312 +cthP67 -149.8737 89.9172 +cthP68 -161.0308 89.9172 +cthP69 -161.0308 84.9248 +cthP72 -161.4323 94.91 +cthP68 -161.0308 89.9172 +cthP76 -146.8508 90.716 +cthP77 -146.8508 94.91 + +# Body +crnP40 42.053679 93.524235 +crnP39 42.053679 90.821586 +crnP33 27.953913 90.020801 +crnP36 27.55392 95.025706 +crnP34 27.953913 85.015895 +crnP33 27.953913 90.020801 +crnP32 39.053729 90.020801 +crnP31 39.053729 82.012951 +crnP24 24 82 +crnP20 23.543174 82.83962 +crnP16 22.590076 82.91212 +crnP12 22.011506 82.151259 +crnP8 22.336075 81.2522 +crnP4 24.365737 79.996789 +crnP0 26.7 79.5 +crnEP1 28.0992 79.4536 +crnEP2 30.1982 79.3891 +crnEP3 32.3974 79.3284 +crnEP4 34.4968 79.2771 +crnEP5 36.5963 79.2325 +crnEP6 38.696 79.1947 +crnEP7 40.7957 79.164 +crnEP8 42.9956 79.1394 +crnEP9 45.0955 79.1235 +crnEP10 47.1955 79.1151 +crnEP11 49.2955 79.1145 +crnEP12 51.3955 79.1218 +crnEP13 53.5954 79.1382 +crnEP14 55.6953 79.1623 +crnEP15 57.795 79.195 +crnEP16 59.8946 79.2364 +crnEP17 61.994 79.2868 +crnEP18 64.1931 79.3494 +crnEP19 66.292 79.4189 +crnEP20 68.3905 79.4979 +crnEP21 70.4886 79.5869 +crnEP22 72.6861 79.6908 +crnEP23 74.7833 79.8007 +crnEP24 76.8798 79.921 +crnEP25 78.9757 80.0522 +crnEP26 81.0709 80.1943 +crnEP27 83.265 80.3552 +crnEP28 85.3585 80.5204 +crnEP29 87.451 80.6973 +crnEP30 89.6421 80.8952 +crnEP31 91.7324 81.0964 +crnEP32 93.8216 81.3098 +crnEP33 96.0088 81.5466 +crnEP34 98.0952 81.7854 +crnEP35 100.18 82.0368 +crnEP36 102.363 82.3139 +crnEP37 104.444 82.5915 +crnEP38 106.524 82.8822 +crnEP39 108.701 83.2007 +crnEP40 110.777 83.5181 +crnEP41 112.949 83.8648 +crnEP42 115.021 84.2092 +crnEP43 117.188 84.5842 +crnEP44 119.255 84.9557 +crnEP45 121.418 85.3589 +crnEP46 123.48 85.7572 +crnEP47 125.637 86.1882 +crnEP48 127.792 86.6332 +crnEP49 129.846 87.0707 +crnEP50 131.995 87.5419 +andP2 133.91839 87.820665 +andP12 156.41106 78.8236 +andP4 190 43.3 +andP1 196 40.4 +andP11 203 37.3 +andP13 300 36.3 + +# Coaxial insert +insP6 300 8.4 +insP5 250 8.4 +insP4 250 12 +insP3 217.3 18.7 +insP71 200 18.7 +insP71 180 18.7 +insP71 170 18.7 +insP71 160 18.7 +insP71 150 18.7 +insP71 140 18.7 +insP71 130 18.7 +insP71 120 18.7 +insP72 110 18.7 +insP8 92.5184 18.7 +insP81 80 19.8121 +insP82 38.75 23.4768 +insP83 -2.5 27.1415 +insP84 -43.75 30.8062 +insP85 -85 34.4708 +insP86 -126.25 38.1355 +insP87 -167.5 41.8002 +insP88 -208.75 45.4648 +insP89 -250 49.1295 +insP9 -259.5 49.9735 +insP10 -296.9384 49.9742 +insP11 -296.9384 69.9453 +insP12 -282.884 69.9453 +insP13 -282.884 89.9172 +insP14 -271.6998 89.9172 +insP15 -271.6998 84.9242 +insP17 -271.2767 94.9119 +insP14 -271.6998 89.9172 +insP24 -300 90.722 diff --git a/geometries/compare_gt170_proto_refurb/refurb_modif_improv.data b/geometries/compare_gt170_proto_refurb/refurb_modif_improv.data new file mode 100644 index 0000000..b3c1fa6 --- /dev/null +++ b/geometries/compare_gt170_proto_refurb/refurb_modif_improv.data @@ -0,0 +1,249 @@ +# z [mm] +# r [mm] +# Cathode +cthP99 -82.45 110 +cthP98 -82.45 100 +cthP97 -82.45 95 +cthP96 -82.45 90.020801 +cthP95 -83 90.020801 +cthP94 -84 90.020801 +cthP94 -85 90.020801 +cthP93 -93.945889 90.020801 +cthP93 -93.945889 87 +cthP93 -93.945889 83 +cthP92 -93.945889 80.010989 +cthP911 -90 80.010989 +cthP911 -87 80.010989 +cthP911 -85 80.010989 +cthP911 -82 80.010989 +cthP911 -80 80.010989 +cthP911 -79 80.010989 +cthP91 -77.522162 80.010989 +cthEP0 -19.9797 63.1981 +cthEP1 -17.4845 63.0446 +cthEP2 -14.9889 62.8954 +cthEP3 -12.3933 62.7449 +cthEP4 -9.8972 62.6048 +cthEP5 -7.40087 62.4694 +cthEP6 -4.90429 62.3388 +cthEP7 -2.40746 62.213 +cthEP8 0.189511 62.0874 +cthEP9 2.68684 61.9718 +cthEP10 5.1844 61.8615 +cthEP11 7.6822 61.7565 +cthEP12 10.2801 61.6531 +cthEP13 12.7784 61.5594 +cthEP14 15.2768 61.4714 +cthEP15 17.7755 61.3892 +cthEP16 20.2743 61.313 +cthEP17 22.8733 61.2403 +cthEP18 25.3725 61.1768 +cthEP19 27.8718 61.1197 +cthEP20 30.3713 61.0691 +cthEP21 32.8709 61.0253 +cthEP22 35.4707 60.987 +cthEP23 37.9705 60.9572 +cthEP24 40.4704 60.9346 +cthEP25 42.9703 60.9193 +cthEP26 45.4703 60.9114 +cthEP27 48.0703 60.9112 +cthEP28 50.5703 60.9189 +cthEP29 53.0703 60.9343 +cthEP30 55.5701 60.9576 +cthEP31 58.1699 60.9903 +cthEP32 60.6696 61.03 +cthEP33 63.1692 61.0778 +cthEP34 65.6685 61.1338 +cthEP35 68.1677 61.1979 +cthEP36 70.7666 61.2733 +cthEP37 73.2653 61.354 +cthEP38 75.7637 61.4427 +cthEP39 78.2619 61.5392 +cthEP40 80.7597 61.6434 +cthEP41 83.3571 61.7595 +cthEP42 85.8543 61.8784 +cthEP43 88.3511 62.0038 +cthEP44 90.8477 62.1353 +cthEP45 93.4438 62.2778 +cthEP46 95.9397 62.4195 +cthEP47 98.4355 62.565 +cthEP48 100.931 62.7131 +cthEP49 103.526 62.8685 +cthP2 105.72253 63 +cthP4 106.72253 63 +cthP5 109.57202 62.864366 +cthP6 112.39575 62.458692 +cthP7 115.16818 61.786644 +cthP8 117.86425 60.854301 +emtrP2 120.25 59.9 +emtrP1 124.75 58.1 +cthP13 131.1696 55.53216 +cthP14 132.70522 54.781069 +cthP15 134.11253 53.81064 +cthP16 135.36045 52.642314 +cthP17 136.42138 51.301909 +cthP18 137.27189 49.819043 +cthP19 137.89319 48.226481 +cthP20 138.27155 46.559414 +cthP21 138.39861 44.854678 +cthP24 138.2641 43.469046 +cthP25 137.86576 42.155894 +cthP26 137.21889 40.945686 +cthP27 136.34835 39.884931 +cthP28 135.2876 39.014391 +cthP29 134.07739 38.367521 +cthP30 132.76424 37.969181 +cthP31 131.39861 37.834678 +cthP11 122.5 37.834678 +cthP32 -100 57.5 +cthP40 -154.21892 64.40626 +cthP42 -158.26726 65.357779 +cthP44 -162.03129 67.125946 +cthP46 -165.34829 69.634314 +cthP48 -168.07484 72.77443 +cthP52 -168.90702 74.602138 +cthP54 -169.02759 76.606762 +cthP56 -168.42046 78.521037 +cthP58 -167.16659 80.089745 +cthP60 -165.43313 81.103738 +cthP62 -163.45121 81.427828 +cthP64 -161.48505 81.018804 +cthP78 -159.79681 79.9312 +cthP66 -149.8737 79.9312 +cthP67 -149.8737 89.9172 +cthP68 -161.0308 89.9172 +cthP69 -161.0308 95 +cthP70 -161.0308 100 +cthP71 -161.0308 110 + + +# Body +andP13 300 36.3 +andP11 203 37.3 +andP1 196 40.4 +andP4 190 43.3 +andP5 187.60079 45.8374 +andP5 185.20158 48.3748 +andP5 182.80237 50.9122 +andP5 180.40316 53.4496 +andP5 178.00395 55.9870 +andP5 175.60474 58.5244 +andP5 173.20553 61.0618 +andP5 170.80632 63.5992 +andP5 168.40711 66.1366 +andP5 166.00790 68.6740 +andP5 163.60869 71.2114 +andP5 161.20948 73.7488 +andP5 158.81027 76.2862 +andP12 156.41106 78.8236 +andP13 151.912526 80.623013 +andP14 147.413992 82.422426 +andP15 142.915458 84.221839 +andP16 138.416924 86.021252 +andP2 133.91839 87.820665 +crnEP50 131.995 87.5419 +crnEP49 129.846 87.0707 +crnEP48 127.792 86.6332 +crnEP47 125.637 86.1882 +crnEP46 123.48 85.7572 +crnEP45 121.418 85.3589 +crnEP44 119.255 84.9557 +crnEP43 117.188 84.5842 +crnEP42 115.021 84.2092 +crnEP41 112.949 83.8648 +crnEP40 110.777 83.5181 +crnEP39 108.701 83.2007 +crnEP38 106.524 82.8822 +crnEP37 104.444 82.5915 +crnEP36 102.363 82.3139 +crnEP35 100.18 82.0368 +crnEP34 98.0952 81.7854 +crnEP33 96.0088 81.5466 +crnEP32 93.8216 81.3098 +crnEP31 91.7324 81.0964 +crnEP30 89.6421 80.8952 +crnEP29 87.451 80.6973 +crnEP28 85.3585 80.5204 +crnEP27 83.265 80.3552 +crnEP26 81.0709 80.1943 +crnEP25 78.9757 80.0522 +crnEP24 76.8798 79.921 +crnEP23 74.7833 79.8007 +crnEP22 72.6861 79.6908 +crnEP21 70.4886 79.5869 +crnEP20 68.3905 79.4979 +crnEP19 66.292 79.4189 +crnEP18 64.1931 79.3494 +crnEP17 61.994 79.2868 +crnEP16 59.8946 79.2364 +crnEP15 57.795 79.195 +crnEP14 55.6953 79.1623 +crnEP13 53.5954 79.1382 +crnEP12 51.3955 79.1218 +crnEP11 49.2955 79.1145 +crnEP10 47.1955 79.1151 +crnEP9 45.0955 79.1235 +crnEP8 42.9956 79.1394 +crnEP7 40.7957 79.164 +crnEP6 38.696 79.1947 +crnEP5 36.5963 79.2325 +crnEP4 34.4968 79.2771 +crnEP3 32.3974 79.3284 +crnEP2 30.1982 79.3891 +crnEP1 28.0992 79.4536 +crnP0 26.7 79.5 +crnP4 24.365737 79.996789 +crnP8 22.336075 81.2522 +crnP12 22.011506 82.151259 +crnP16 22.590076 82.91212 +crnP20 23.543174 82.83962 +crnP24 24 82 +crnP24 28 82 +crnP24 32 82 +crnP24 36 82 +crnP31 39.053729 82 +crnP311 39.053729 84 +crnP312 39.053729 86 +crnP313 39.053729 88 +crnP32 39.053729 90.020801 +crnP321 36 90.020801 +crnP322 32 90.020801 +crnP33 28 90.020801 +crnP32 27.953913 90.020801 +crnP38 27.953913 100 +crnP39 27.953913 110 + + +# Coaxial insert +cthP71 -271.6998 110 +cthP70 -271.6998 100 +cthP69 -271.6998 95 +insP14 -271.6998 89.9172 +insP13 -282.884 89.9172 +insP12 -282.884 69.9453 +insP11 -296.9384 69.9453 +insP10 -296.9384 49.9742 +insP9 -259.5 49.9735 +insP89 -250 49.1295 +insP88 -208.75 45.4648 +insP87 -167.5 41.8002 +insP86 -126.25 38.1355 +insP85 -85 34.4708 +insP84 -43.75 30.8062 +insP83 -2.5 27.1415 +insP82 38.75 23.4768 +insP81 80 19.8121 +insP8 92.5184 18.7 +insP72 110 18.7 +insP71 120 18.7 +insP71 130 18.7 +insP71 140 18.7 +insP71 150 18.7 +insP71 160 18.7 +insP71 170 18.7 +insP71 180 18.7 +insP71 200 18.7 +insP3 217.3 18.7 +insP4 250 12 +insP5 250 8.4 +insP6 300 8.4 \ No newline at end of file diff --git a/geometries/experiment_both/exp_both_withvessel.m b/geometries/experiment_both/exp_both_withvessel.m new file mode 100644 index 0000000..e211e20 --- /dev/null +++ b/geometries/experiment_both/exp_both_withvessel.m @@ -0,0 +1,192 @@ +%% Create the geometry 3 for the T-REX experiment +% uses the upper ellipse and center column with extruded ellipse. + +% bottom axial position +zbottom=305; % mm + +radialindent=8; %mm + +% Outer vacuum vessel +splid=1; +geomcells(splid).Dval=0; % V +geomcells(splid).order=3; +geomcells(splid).dim=2; +geomcells(splid).name='vacuum vessel'; +geomcells(splid).type=0; +geomcells(splid).periodic=0; +rmax=50; %mm +lw=linspace(34,rmax,8); +rwellipse=linspace(zbottom,480,20); +uw=flip(linspace(0,rmax,30)); +geomcells(splid).points=flip([zbottom*ones(size(lw')) lw'; + rwellipse' rmax*ones(size(rwellipse')); + 480*ones(size(uw')) uw']/1e3); + + +% Central electrode +splid=2; +geomcells(splid).Dval=-20000; % V +geomcells(splid).order=3; +geomcells(splid).dim=2; +%splines(1).epsge=1e-6; +%splines(1).epsce=1e-6; +geomcells(splid).name='central electrode'; +geomcells(splid).type=0; +geomcells(splid).periodic=0; +lw=linspace(10-radialindent,10,10); +zwellipse=linspace(zbottom+30.5,414.5,150); +rwellipse=10*ones(size(zwellipse)); +uw=flip(linspace(0,10,30)); + + +%tilted ellipse +r_c=10; +z_c=250+125; +cosa=1; +sina=0; +Lz=25; +Lr=2.5; +deltar=(rwellipse-r_c); +deltaz=(zwellipse-z_c); +D=((deltaz)/Lz).^2+((deltar)/Lr).^2; +w=1-D; +ellipsez=zwellipse(w>=0); +deltaz=ellipsez-z_c; +a=(Lr^2*sina^2+Lz^2*cosa^2); +b=2*deltaz*sina*cosa*(Lr^2-Lz^2); +c=-Lr^2*Lz^2 +deltaz.^2*(Lr^2*cosa^2+Lz^2*sina^2); +rwellipse(w>=0)=r_c+(-b-sqrt(b.^2-4*a.*c))/2/a; + +%ellipse= +lowerring=linspace(zbottom,zbottom+29.5,40); +geomcells(splid).points=[ lowerring' (10-radialindent)*ones(size(lowerring')); + (zbottom+30)*ones(size(lw')) lw'; + zwellipse' rwellipse'; + (zwellipse(end)+0.5)*ones(size(uw')) uw']/1e3; + + +% Bottom plate +splid=3; +geomcells(splid).Dval=0; % V +geomcells(splid).order=3; +geomcells(splid).dim=2; +%splines(1).epsge=1e-6; +%splines(1).epsce=1e-6; +geomcells(splid).name='vacuum vessel'; +geomcells(splid).type=0; +geomcells(splid).periodic=0; +lw=linspace(10-radialindent,24+radialindent,50); +geomcells(splid).points=flip([ + zbottom*ones(size(lw')) lw';]/1e3); + + + + + + +% Outer electrode +splid=4; +geomcells(splid).Dval=0; % V +geomcells(splid).order=3; +geomcells(splid).dim=2; +%splines(1).epsge=1e-6; +%splines(1).epsce=1e-6; +geomcells(splid).name='outer electrode'; +geomcells(splid).type=0; +geomcells(splid).periodic=0; +lbaser=linspace(24+radialindent,24,20); +base=linspace(zbottom+30.5,349,80); +lowerbase=linspace(zbottom,zbottom+29.5,50); + +%tiltedwall +alpha=0.1745; +tiltedz=linspace(350,180+250,500); +tiltedr=(tiltedz-tiltedz(1))*tan(alpha)+24; + +%tilted ellipse +cosa=cos(alpha); +sina=sin(alpha); +r_c=28; +z_c=375; +Lz=25; +Lr=5; +deltar=(tiltedr-r_c); +deltaz=(tiltedz-z_c); +D=((deltaz*cosa+deltar*sina)/Lz).^2+((deltaz*sina-deltar*cosa)/Lr).^2; +w=1-D; +ellipsez=tiltedz(w>=0); +deltaz=ellipsez-z_c; +a=(Lr^2*sina^2+Lz^2*cosa^2); +b=2*deltaz*sina*cosa*(Lr^2-Lz^2); +c=-Lr^2*Lz^2 +deltaz.^2*(Lr^2*cosa^2+Lz^2*sina^2); +tiltedr(w>=0)=r_c+(-b-sqrt(b.^2-4*a.*c))/2/a; + +axialend=linspace(tiltedr(end)+0.5,39.5,15); +upperend=flip(linspace(zbottom,180+250,60)); + +geomcells(splid).points=flip([lowerbase' (24+radialindent)*ones(size(lowerbase')); + zbottom+30*ones(size(lbaser')) lbaser'; + base' 24*ones(size(base))'; + tiltedz' tiltedr'; + (180+250)*ones(size(axialend')) axialend'; + upperend' 40*ones(size(upperend'))]/1e3); + + +% Dielectric ring +splid=5; +geomcells(splid).Dval=0; % V +geomcells(splid).order=2; +geomcells(splid).dim=2; +%splines(1).epsge=1e-6; +%splines(1).epsce=1e-6; +geomcells(splid).name='dielectric rings'; +geomcells(splid).type=2; +geomcells(splid).periodic=0; +ow=flip(linspace(zbottom,zbottom+30,130)); +lw=flip(linspace(10.1,23.5,30)); +rw=linspace(zbottom,429.5,60); +uw=flip(linspace(0,10,10)); +geomcells(splid).points=[flip([upperend', 40*ones(size(upperend'))]); + flip([(180+250)*ones(size(axialend')) axialend']); + flip([tiltedz' tiltedr']); + flip([base' 24*ones(size(base))']); + ow' 24*ones(size(ow')); + zbottom*ones(size(lw')) lw'; + zwellipse' rwellipse'; + (zwellipse(end)+0.5)*ones(size(uw')) uw']/1e3; + + + + %% Plots +f=figure; +for k=1:length(geomcells) + plothandle=plot(geomcells(k).points(:,1), geomcells(k).points(:,2),'k-x','linewidth',1.5); + hold on + %geomcells(k).points=[geomcells(k).Z; geomcells(k).R]; + order=geomcells(k).order; + knots=linspace(0,1,size(geomcells(k).points,1)-(order-2)); + knots=augknt(knots, order); + sizec=size(geomcells(k).points,1); + order=length(knots)-sizec(end); + coeffs=geomcells(k).points'; + pp=spmak(knots,coeffs); + s=linspace(0,1,100000); + fittedpos=fnval(pp,s); + plot(fittedpos(1,:),fittedpos(2,:),'x-') +end + + +legend(plothandle,{'Gun geometry'},'location','southwest') +f.PaperUnits='centimeters'; +f.PaperSize=[12,8]; +xlabel('z [m]') +ylabel('r [m]') + +axis equal + +savegeomtoh5('exp_both_with_vessel_geom.h5',geomcells,1e-2,true); +% print(f,name,'-dpdf','-fillpage') +% savefig(f,name) +% set(f, 'Color', 'w'); +% export_fig(f,name,'-eps') +hold off \ No newline at end of file diff --git a/geometries/experiment_upper/exp_outer_withvessel_shapes.m b/geometries/experiment_upper/exp_outer_withvessel_shapes.m new file mode 100644 index 0000000..5e32ef1 --- /dev/null +++ b/geometries/experiment_upper/exp_outer_withvessel_shapes.m @@ -0,0 +1,218 @@ +%% Create the geometry 1 for the T-REX experiment +% uses the upper ellipse and constant radius center column. + +% bottom axial position +zbottom=305; % mm + +radialindent=8; %mm +ztop=305+230; %mm + +% Outer vacuum vessel +splid=1; +geomcells(splid).Dval=0; % V +geomcells(splid).order=3; +geomcells(splid).dim=2; +geomcells(splid).name='vacuum vessel'; +geomcells(splid).type=0; +geomcells(splid).periodic=0; +rmax=60; %mm +lw=linspace(40,rmax,20); +rw=linspace(zbottom,ztop,60); +uw=flip(linspace(0,rmax,30)); +geomcells(splid).points=flip([zbottom*ones(size(lw')) lw'; + rw' rmax*ones(size(rw')); + ztop*ones(size(uw')) uw'; + linspace(ztop,ztop+3,10)' -1*ones(10,1); + (ztop+3)*ones(30,1) linspace(0,rmax+3,30)'; + linspace(ztop+3,zbottom-3,60)' (rmax+3)*ones(60,1); + (zbottom-3)*ones(30,1) linspace(rmax+3,40,30)'; + linspace(zbottom-3,zbottom,10)' 40*ones(10,1)]/1e3); + + +% Central electrode +splid=2; +geomcells(splid).Dval=-20000; % V +geomcells(splid).order=3; +geomcells(splid).dim=2; +%splines(1).epsge=1e-6; +%splines(1).epsce=1e-6; +geomcells(splid).name='central electrode'; +geomcells(splid).type=0; +geomcells(splid).periodic=0; +lw=linspace(-1,10,15); +rw=linspace(zbottom+30.5,429.5,60); +uw=flip(linspace(-1,10,10)); +%ellipse= +lowerring=linspace(zbottom,zbottom+29.5,40); +geomcells(splid).points=[ + (zbottom+30)*ones(size(lw')) lw'; + rw' 10*ones(size(rw')); + 430*ones(size(uw')) uw'; + flip(rw') -1*ones(size(rw'))]/1e3; + + +% Bottom plate +splid=3; +geomcells(splid).Dval=0; % V +geomcells(splid).order=3; +geomcells(splid).dim=2; +%splines(1).epsge=1e-6; +%splines(1).epsce=1e-6; +geomcells(splid).name='vacuum vessel'; +geomcells(splid).type=0; +geomcells(splid).periodic=0; +lw=linspace(10,24,40); +geomcells(splid).points=flip([ + zbottom*ones(size(lw')) lw'; + linspace(zbottom,zbottom-3,10)' 24*ones(10,1); + (zbottom-3)*ones(size(lw')) flip(lw'); + linspace(zbottom-3,zbottom,10)' 10*ones(10,1);]/1e3); + + + + + + +% Outer electrode +splid=4; +geomcells(splid).Dval=0; % V +geomcells(splid).order=3; +geomcells(splid).dim=2; +%splines(1).epsge=1e-6; +%splines(1).epsce=1e-6; +geomcells(splid).name='outer electrode'; +geomcells(splid).type=0; +geomcells(splid).periodic=0; +lbaser=linspace(24+radialindent,24,20); +base=linspace(zbottom+30,349,80); +lowerbase=linspace(zbottom,zbottom+29.5,50); + +%tiltedwall +alpha=0.1745; +tiltedz=linspace(350,180+250,500); +tiltedr=(tiltedz-tiltedz(1))*tan(alpha)+24; + +%tilted ellipse +cosa=cos(alpha); +sina=sin(alpha); +r_c=28; +z_c=375; +Lz=25; +Lr=5; +deltar=(tiltedr-r_c); +deltaz=(tiltedz-z_c); +D=((deltaz*cosa+deltar*sina)/Lz).^2+((deltaz*sina-deltar*cosa)/Lr).^2; +w=1-D; +ellipsez=tiltedz(w>=0); +deltaz=ellipsez-z_c; +a=(Lr^2*sina^2+Lz^2*cosa^2); +b=2*deltaz*sina*cosa*(Lr^2-Lz^2); +c=-Lr^2*Lz^2 +deltaz.^2*(Lr^2*cosa^2+Lz^2*sina^2); +tiltedr(w>=0)=r_c+(-b-sqrt(b.^2-4*a.*c))/2/a; + +axialend=linspace(tiltedr(end)+0.5,39.5,15); +upperend=flip(linspace(zbottom+30,180+250,60)); + +geomcells(splid).points=flip([ + base' 24*ones(size(base))'; + tiltedz' tiltedr'; + (180+250)*ones(size(axialend')) axialend'; + upperend' 40*ones(size(upperend')); + zbottom+30*ones(size(lbaser')) linspace(40,24,20)']/1e3); + + +% Dielectric ring +% splid=5; +% geomcells(splid).Dval=0; % V +% geomcells(splid).order=3; +% geomcells(splid).dim=2; +% %splines(1).epsge=1e-6; +% %splines(1).epsce=1e-6; +% geomcells(splid).name='dielectric rings'; +% geomcells(splid).type=2; +% geomcells(splid).periodic=0; +% ow=flip(linspace(zbottom,zbottom+30,130)); +% lw=flip(linspace(10.1,23.5,30)); +% rw=linspace(zbottom,429.5,60); +% uw=flip(linspace(0,10,10)); +% geomcells(splid).points=[flip([upperend', 40*ones(size(upperend'))]); +% flip([(180+250)*ones(size(axialend')) axialend']); +% flip([tiltedz' tiltedr']); +% flip([base' 24*ones(size(base))']); +% ow' 24*ones(size(ow')); +% zbottom*ones(size(lw')) lw'; +% rw' 10*ones(size(rw')); +% 430*ones(size(uw')) uw']/1e3; + +% Dielectric ring inner +splid=5; +geomcells(splid).Dval=0; % V +geomcells(splid).order=2; +geomcells(splid).dim=2; +%splines(1).epsge=1e-6; +%splines(1).epsce=1e-6; +geomcells(splid).name='dielectric ring center'; +geomcells(splid).type=2; +geomcells(splid).periodic=0; +ow=flip(linspace(zbottom-3,zbottom+30,130)); +lw=flip(linspace(10.1,23.5,30)); +rw=linspace(zbottom-3,334.5,50); +uw=flip(linspace(-1,10,10)); +geomcells(splid).points=[(zbottom-3)*ones(size(uw')) flip(uw'); + rw' 10*ones(size(rw')); + 335*ones(size(uw')) uw'; + flip(rw') -1*ones(size(rw'))]/1e3; +% Dielectric ring outer +splid=6; +geomcells(splid).Dval=0; % V +geomcells(splid).order=2; +geomcells(splid).dim=2; +%splines(1).epsge=1e-6; +%splines(1).epsce=1e-6; +geomcells(splid).name='dielectric ring center'; +geomcells(splid).type=2; +geomcells(splid).periodic=0; +ow=flip(linspace(zbottom,zbottom+30,130)); +lw=flip(linspace(10.1,23.5,30)); +rw=linspace(zbottom-3,334.5,50); +uw=linspace(40,24,20); +geomcells(splid).points=[rw' uw(1)*ones(size(rw')); + 335*ones(size(uw')) uw'; + flip(rw') uw(end)*ones(size(rw')); + (zbottom-3)*ones(size(uw')) flip(uw'); + ]/1e3; + + %% Plots +f=figure; +for k=1:length(geomcells) + plothandle=plot(geomcells(k).points(:,1), geomcells(k).points(:,2),'k-x','linewidth',1.5); + hold on + %geomcells(k).points=[geomcells(k).Z; geomcells(k).R]; + order=geomcells(k).order; + knots=linspace(0,1,size(geomcells(k).points,1)-(order-2)); + knots=augknt(knots, order); + sizec=size(geomcells(k).points,1); + order=length(knots)-sizec(end); + coeffs=geomcells(k).points'; + geomcells(k).periodic=0; + pp=spmak(knots,coeffs); + s=linspace(0,1,1000); + fittedpos=fnval(pp,s); + plot(fittedpos(1,:),fittedpos(2,:),'x-') +end + + +legend(plothandle,{'Gun geometry'},'location','southwest') +f.PaperUnits='centimeters'; +f.PaperSize=[12,8]; +xlabel('z [m]') +ylabel('r [m]') + +axis equal + +savegeomtoh5('exp_outer_with_vessel_geom.h5',geomcells,1e-2,true); +% print(f,name,'-dpdf','-fillpage') +% savefig(f,name) +% set(f, 'Color', 'w'); +% export_fig(f,name,'-eps') +hold off \ No newline at end of file diff --git a/magnet/10T_DNP/Draw_B_Ellip_10T_DNP_geom.m b/magnet/10T_DNP/Draw_B_Ellip_10T_DNP_geom.m index b79acae..9162450 100644 --- a/magnet/10T_DNP/Draw_B_Ellip_10T_DNP_geom.m +++ b/magnet/10T_DNP/Draw_B_Ellip_10T_DNP_geom.m @@ -1,53 +1,55 @@ +% Draws the magnetic field generated by the 10T magnet used for T-REX and the old DNP gyrotron + %geom=importgeometry('../geometry.data'); -z=linspace(0.225,0.525,2500); -r=linspace(0.00,0.10,1000); +z=linspace(0.225,0.525,200); +r=linspace(0.00,0.10,100); [Z,R] = meshgrid(z,r); % 100 Amperes current in the coils I = 100*ones(1,13); res=zeros([size(Z),3]); for i=1:size(R,2) res(:,i,:) = B_Ellip_10T_DNP({'aphi','bz','br'},'new',I,R(:,i),Z(:,i)); end Aphi=res(:,:,1); Bz=res(:,:,2); Br=res(:,:,3); % Plot the magnetic field lines f=figure; % for k=1:size(geom.Z) % plothandle=plot(geom.Z{k}, geom.R{k},'k-'); % hold on % end axis equal [~,cont1]=contour(Z,R,R.*Aphi,15,'r:'); %xlim([min(z) 0.04]) ylim([0.0 0.085]) %[~,cont2]=contour(Zphi,Rphi,Phi,20,'b'); f.PaperUnits='centimeters'; f.PaperSize=[12,8]; xlabel('z [m]') ylabel('r [m]') print(f,'phiBprofile_10T','-dpdf','-fillpage') savefig(f,'phiBprofile_10T') hold off figure; contourf(Z,R,Bz) hold on contour(Z,R,R.*Aphi,15,'r:'); xlim([min(z) max(z)]) ylim([min(r) max(r)]) function phi=Phivacuum(r,a,b,phia,phib) phi=((phib-phia)*log(r)+phia*log(b)-phib*log(a))/log(b/a); end diff --git a/magnet/bi-freq/B_Ellip_bifreq.m b/magnet/bi-freq/B_Ellip_bifreq.m new file mode 100644 index 0000000..1d92602 --- /dev/null +++ b/magnet/bi-freq/B_Ellip_bifreq.m @@ -0,0 +1,150 @@ +function [B] = B_Ellip_bifreq(mode,magnet,I,r,z) +% +% Call: [B] = B_Ellip_gt118(mode,magnet,r,z) +% Examples: +% 1. Plot axis magnetic field profile: +% +% >> z = linspace(0,1,101); +% >> r = 0*z + 0.0; +% >> I = [9.85 -15.80 33.59 33.21]; +% >> [B] = B_Ellip_gt118('bz','cryogenic',I,r,z); +% >> figure(1); plot(z,B) +% +% 2. Plot field lines (r* aphi = cst) +% +% >> z = linspace(0,1,51); +% >> r = linspace(0,0.2,21); +% >> [Z,R] = meshgrid(z,r); +% >> I = [9.85 -15.80 33.59 33.21]; +% >> [Aphi] = B_Ellip_gt118('aphi','cryogenic',I,R,Z); +% >> figure(2); contour(Z,R,R.*Aphi); +% +% Magnetic field associated with GT118 GHz magnet, with currents Igun and Icav, +% as read on power supplies +% The computation is based on the elliptic integral formulae that can be found in: +% Smythe: "Static and Dynamic Electricity", Third edition, McGraw-Hill, p.290. +% +% Version : 1.0 G. Le Bars Mar. 14, 2023 +% +% +% mode : 'bz','br','dbzbz','dbzdr','dbrdz','dbrdr', 'd2bzdz2' or 'aphi' +% magnet : 'X3' only so far +% z : a row vector (in [m]) or a 2D matrix containing the z locations where the field is to be evaluated +% r : a row vector (in [m]) or a 2D matrix containing the r locations where the field is to be evaluated +% + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% 10T magnet for DNP gyrotron coils geometry [m] +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +switch lower(magnet) + + case 'normal' % Geometry of the gt118 X3 gyrotron magnet used at TCV + + Ncoil = 5; + Nturn = [3567 1659 4307 11398 13384]; + rmin = [0.1457 0.1584 0.1452 0.1632 0.1482]; + rmax = [0.1582 0.1615 0.1632 0.1946 0.1837]; + zcen = [0.2598 0.2598 0.4184 0.4184 0.6022]; + deltaz = [0.0540 0.0540 0.1057 0.1057 0.1094]; + zmin = zcen-deltaz; + zmax = zcen+deltaz; + na = 5. *[10 10 10 10 10]; % Number of subcoils (radial direction + nb = 5. *[10 10 10 10 10]; % Number of subcoils in longitudinal direction + % default current + % I = [9.85 -15.80 33.59 33.21] + Current = [ -I(1) I(2) I(1) I(1) I(1)]; % Current flowing in each power supply + + rcen = (rmin + rmax)/2; + zcen = (zmin + zmax)/2; + dr = rmax - rmin; + dz = zmax - zmin; + coilsurf= dr .* dz; + + JTot = Current .* Nturn; % Total current flowing in each coil + J = JTot./(dr.*dz); % Current density in each coil + Ic1 = JTot ; % Total current flowing in each coil [A] + + otherwise + error('Unknown magnet: "%s"', magnet) + +end + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Construct array of current loops +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% + +% Number of coils +ncoil = length(rcen); + +% Number of subcoils +ntot = sum(na.*nb); + +% Preallocate space +r2 = zeros(1,ntot); +z2 = zeros(1,ntot); +Ic = zeros(ntot,1); + + +% isub is the index of subcoil + +isub = 0; +for icoil=1:ncoil + for ib=1:nb(icoil) + for ia=1:na(icoil) + isub = isub +1; + r2(isub) = (rcen(icoil) - dr(icoil)/2) + (dr(icoil)/nb(icoil))*(ib-0.5); + z2(isub) = (zcen(icoil) - dz(icoil)/2) + (dz(icoil)/na(icoil))*(ia-0.5); + Ic(isub) = Ic1(icoil) / (na(icoil)*nb(icoil)); + end + end +end + +% printf('isub =',isub) + + +% Transform array of evaluation points in a one-dimensional array +% +r1d = reshape(r,1,prod(size(r))); +z1d = reshape(z,1,prod(size(z))); + +% +% Suppress locations where Green function diverges (i.e. on the sources) +% +for i=1:length(r2), + [I] = find((r1d.*r1d -r2(i)*r2(i) == 0) & (z1d.*z1d - z2(i)^2)==0); + + if ~isempty(I) + r1d(I)=NaN; + z1d(I)=NaN; + end +end + +% Call greenem + +b = greenem_jph(mode,r1d,z1d,r2,z2); + +if(~iscell(mode)) + nbmodes=length({mode}); +else + nbmodes=length(mode); +end +B=zeros(size(r,1),size(r,2),nbmodes); + +% b is a rectangular matrix (length(r1d) x length(r2)) which needs to be multiplied by the +% column vector Ic to get the proper contribution of each source. +for i=1:size(b,3) + temp = b(:,:,i) * Ic; + + B(:,:,i) = reshape(temp,size(r,1),size(r,2)); +end +B(find((B==Inf)|(B==-Inf)))= 0; +B(find(isnan(B))) = 0; + + + +return diff --git a/magnet/bi-freq/Draw_B_Ellip_bifreq.m b/magnet/bi-freq/Draw_B_Ellip_bifreq.m new file mode 100644 index 0000000..94b4d60 --- /dev/null +++ b/magnet/bi-freq/Draw_B_Ellip_bifreq.m @@ -0,0 +1,47 @@ +% Computational grid +z=linspace(0.,1.2,2000); +r=0; +[Z,R] = meshgrid(z,r); + + +% Default current in the coils +I = [69.5248 -4.8]; +%final filename +name='bifreq'; + +%allocate memory for speed +res=zeros([size(Z),3]); +for i=1:size(R,2) +res(:,i,:) = B_Ellip_bifreq({'aphi','bz','br'},'normal',I,R(:,i),Z(:,i)); +end +Aphi=res(:,:,1); +Bz=res(:,:,2); +Br=res(:,:,3); + + +% Plot the magnetic field lines +f=figure; +plot(Bz,z) +ylabel('Z [m]') +xlabel('B_z [T]') + +grid on +set(gca,'fontsize',14) +f.PaperUnits='centimeters'; +f.PaperSize=[12,8]; +f.Position=[1 1 0.3 1.5].*f.Position; +namefig='phiBprofile_bifreq'; +exportgraphics(f,sprintf('%s.png',name),'Resolution',300) +print(f,name,'-dpdf','-fillpage') +set(f, 'Color', 'w'); +exportgraphics(f,sprintf('%s.eps',name)) +savefig(f,'phiBprofile_bifreq') +hold off + + +%% Save magnetic field to disk +save=true; +overwrite=true; +if save + savemagtoh5([name,'.h5'],r,z,Aphi,Br,Bz,overwrite); +end diff --git a/matlab/@fennecshdf5/display2Dpotentialwell.m b/matlab/@fennecshdf5/display2Dpotentialwell.m index 4a91b6f..8b8b453 100644 --- a/matlab/@fennecshdf5/display2Dpotentialwell.m +++ b/matlab/@fennecshdf5/display2Dpotentialwell.m @@ -1,236 +1,249 @@ function f=display2Dpotentialwell(obj,timestep,rcoord,clims,rescale, mag,nblv) % Display the 2D potential well at time obj.t2d(timestep) % if rcoord is true, the potential is evaluated at grid points in r,z coordinates % if false, the potential is evaluated at grid points in magnetic field line coordinates % clims are the values limits in eV for the color coding of the % potential well if iscell(timestep) timestep=cell2mat(timestep); end if nargin <3 rcoord=true; end if nargin<4 clims=[-inf inf]; end if nargin<5 rescale=false; end if nargin<6 mag=[]; end if nargin<7 nblv=500; end f=figure('Name',sprintf('%s Potential well',obj.name)); ax1=gca; model=obj.potentialwellmodel(timestep,true,mag,nblv); z=model.z; r=model.r; Pot=model.pot; rathet=model.rathet; N0=obj.N(:,:,1); id=find(timestep==0); timestep(id)=[]; Nend=obj.N(:,:,timestep); if(~isempty(id)) N0=zeros(obj.N.nr,obj.N.nz); Nend=cat(3,Nend(:,:,1:id-1),N0,Nend(:,:,id:end)); end Nend=mean(Nend,3); geomw=obj.geomweight(:,:,1); %z(isnan(Pot))=[]; %r(isnan(Pot))=[]; %Pot(isnan(Pot))=[]; if rescale if obj.spl_bound.nbsplines >0 Pot=Pot/(obj.spl_bound.boundary(2).Dval-obj.spl_bound.boundary(1).Dval); else Pot=Pot/(obj.potout-obj.potinn); end end if rcoord [Zmesh,Rmesh]=meshgrid(obj.zgrid,obj.rgrid); %Pot(obj.geomweight(:,:,1)<=0)=NaN; Pot(Pot<0)=NaN; geow=griddedInterpolant(Zmesh',Rmesh',obj.geomweight(:,:,1)'); [Zmesh,Rmesh]=meshgrid(obj.zgrid,obj.rgrid); finezgrid=obj.zgrid; finergrid=obj.rgrid; % finergrid=[obj.rgrid';[0.5*(obj.rgrid(1:end-1)+obj.rgrid(2:end)); 0]']; % finergrid=finergrid(1:end-1)'; % finezgrid=[obj.zgrid';[0.5*(obj.zgrid(1:end-1)+obj.zgrid(2:end)); 0]']; % finezgrid=finezgrid(1:end-1)'; % [Zmesh,Rmesh]=meshgrid(finezgrid,finergrid); Pot=griddata(z,r,Pot,Zmesh,Rmesh,'natural'); boundaries=geow(Zmesh',Rmesh')'; Pot(boundaries<0)=NaN; contourf(finezgrid*1e3,finergrid*1e3,Pot(1:end,1:end),50,'edgecolor','none','Displayname','Well') xlabel('z [mm]') ylabel('r [mm]') xlim([obj.zgrid(1) obj.zgrid(end)]*1e3) ylim([obj.rgrid(1) obj.rgrid(end)]*1e3) hold(gca, 'on') rdisp=obj.rgrid; %% Magnetic field lines Blines=obj.rAthet; - levels=linspace(min(Blines(obj.geomweight(:,:,1)>0)),max(Blines(obj.geomweight(:,:,1)>0)),35); + levels=linspace(min(Blines(obj.geomweight(:,:,1)>0)),max(Blines(obj.geomweight(:,:,1)>0)),40); Blines(obj.geomweight(:,:,1)<0)=NaN; [~,h1]=contour(obj.zgrid*1000,obj.rgrid*1000,Blines,real(levels),'k-.','linewidth',1.2,'Displayname','Magnetic field lines'); geomw=obj.geomweight(:,:,1); else lvls=linspace(min(obj.rAthet(:)),max(obj.rAthet(:)),400); rdisp=lvls; [Zmesh,Rmesh]=meshgrid(obj.zgrid,rdisp); finergrid=[rdisp';[0.5*(drisp(1:end-1)+rdisp(2:end)); 0]']; finergrid=finergrid(1:end-1)'; finezgrid=[obj.zgrid';[0.5*(obj.zgrid(1:end-1)+obj.zgrid(2:end)); 0]']; finezgrid=finezgrid(1:end-1)'; [Zmesh,Rmesh]=meshgrid(finezgrid,finergrid); Pot=griddata(z,rathet,Pot,Zmesh,Rmesh,'natural'); boundaries=geow(Zmesh',Rmesh')'; Pot(boundaries<0)=NaN; %Pot=griddata(z,rathet,Pot,Zmesh,Rmesh); [Zinit,~]=meshgrid(obj.zgrid,obj.rAthet(:,1)); % if isempty(obj.maxwellsrce) % end N0=griddata(Zinit,obj.rAthet,N0,Zmesh,Rmesh); Nend=griddata(Zinit,obj.rAthet,Nend,Zmesh,Rmesh); geomw=griddata(Zinit,obj.rAthet,geomw,Zmesh,Rmesh); Pot(geomw<0)=NaN; %geomw(geomw2>0)=-1; contourf(finezgrid,finergrid*1000,Pot(1:end,1:end),'edgecolor','none') ylabel('rA_\theta [Tm^2]') xlabel('z [m]') xlim([obj.zgrid(1) obj.zgrid(end)]*1e3) ylim([min(rdisp) max(rdisp)]*1e3) hold(gca, 'on') end if (~isempty(id) && isempty(timestep)) % the title(sprintf('Vacuum potential well')) else title(sprintf('Potential well t=%1.2f [ns]',mean(obj.t2d(timestep))*1e9)) end maxdensend=max(Nend(:)); contourscale=0.1; Nend=(Nend-contourscale*maxdensend)/maxdensend; maxdens0=max(N0(:)); contourscale=0.1; N0=(N0-contourscale*maxdens0)/maxdens0; - contour(obj.zgrid*1e3,rdisp*1e3,Nend,linspace(0,1-contourscale,5),'k--','linewidth',1.5,'Displayname','Cloud Boundaries'); - contour(obj.zgrid*1e3,rdisp*1e3,N0,[0 0],'k-.','linewidth',1.5,'Displayname','Source boundaries'); + contour(obj.zgrid*1e3,rdisp*1e3,Nend,linspace(0,1-contourscale,5),'r--','linewidth',1.5,'Displayname','Cloud Boundaries'); + %contour(obj.zgrid*1e3,rdisp*1e3,N0,[0 0],'k-.','linewidth',1.5,'Displayname','Source boundaries'); %contour(obj.zgrid*1e3,rdisp*1e3,geomw,[0 0],'-','linecolor',[0.5 0.5 0.5],'linewidth',1.5,'Displayname','Vessel Boundaries'); + c=colorbar; colormap('jet'); + axis equal; % Grey outline showing the metalic walls [c1,hContour]=contourf(ax1,obj.zgrid*1000,rdisp*1000,-geomw, [0 0]); drawnow; xlim(ax1,[obj.zgrid(1)*1000 obj.zgrid(end)*1000]) if(obj.conformgeom) %ylim([ax1 ],[obj.rgrid(1)*1000 obj.rgrid(rgridend)*1000]) else % ylim([ax1],[obj.rgrid(1)*1000 obj.rgrid(end)*1000]) end %ylim(ax1,[0.05*1000 obj.rgrid(end)*1000]) %xlim([obj.zgrid(1) 0.185]*1e3) xlabel(ax1,'z [mm]') ylabel(ax1,'r [mm]') view(ax1,2) if rescale c.Label.String= 'Normalized well depth (U_{well}/\Delta\phi) [eV/V]'; else c.Label.String= 'well depth [eV]'; end f.PaperUnits='centimeters'; caxis(clims) grid(ax1, 'on'); hFills=hContour.FacePrims; [hFills.ColorType] = deal('truecoloralpha'); % default = 'truecolor' try drawnow hFills(1).ColorData = uint8([150;150;150;255]); for idx = 2 : numel(hFills) hFills(idx).ColorData(4) = 0; % default=255 end catch end % Plot of the geometry and of the different boundaries % considered for the calculation of the currents % geomw=obj.geomweight(:,:,1); % geomw(geomw>1e-6)=NaN; % geomw(geomw<1e-6)=max(Pot(:)/1e3); % [c1,hContour]=contourf(ax1,obj.zgrid*1000,obj.rgrid*1000,geomw, max(Pot(:)/1e3)*[1 1]); % hold on dirw=obj.dirichletweight(:,:,1); mask=obj.geomweight(:,:,1)<=1e-6&dirw>=1e-6; dirw(obj.geomweight(:,:,1)<=1e-6)=max(Pot(:)/1e3); dirw(mask)=min(Pot(:)/1e3); dirw(obj.geomweight(:,:,1)>=1e-6)=NaN; [c1,hContour2]=contourf(ax1,obj.zgrid*1000,obj.rgrid*1000,dirw,'edgecolor','none'); grid on; drawnow; %legend([h1,h2],{'Magnetic field lines','Equipotentials [kV]'},'location','northeast','Orientation','horizontal') %colormap(ax,([255,165,0;255,255,255;150,150,150])./255) % We add the coloring for the solid parts of the geometry % Dielectrics and metallic parts hFills=hContour2.FacePrims; [hFills.ColorType] = deal('truecoloralpha'); % default = 'truecolor' try %hFills(1).ColorData = uint8([255;165;0;255]); hFills(1).ColorData = uint8([150;150;150;255]); hFills(2).ColorData = uint8([150;150;150;255]); for idx = 3 : numel(hFills) hFills(idx).ColorData(4) = 0; % default=255 end catch end drawnow; - axis equal pause(0.1) % add central and external metallic walls if we have a coaxial % configuration if( obj.walltype >=2 && obj.walltype<=4) rectangle('Position',[obj.zgrid(1) max(obj.r_a,obj.r_b) obj.zgrid(end)-obj.zgrid(1) 0.001]*1e3,'FaceColor',[150 150 150]/255,'Edgecolor','none') ylimits=ylim; ylim([ylimits(1),ylimits(2)+1]) end if sum(obj.geomweight(:,1,1))==0 rectangle('Position',[obj.zgrid(1) obj.rgrid(1)-0.001 obj.zgrid(end)-obj.zgrid(1) 0.001]*1e3,'FaceColor',[150 150 150]/255,'Edgecolor','none') ylimits=ylim; ylim([ylimits(1)-1,ylimits(2)]) end - - axis equal + + %% Change orientation + rotate=false; + if rotate + k=pi/2; + set(gca, 'CameraUpVector', [sin(k), cos(k), 0]); + %f.Position=f.Position.*[1 1 0.8 1.2]; + title("") + f.Children(1).Position=f.Children(1).Position.*[0.9 1 1 1]; + f.Position=f.Position.*[1 1 1 1.2]; + end + title("") + + %axis equal %xlim([-100 200]) [max_depth,id]=max(abs(Pot(:))); [idr,idz]=ind2sub(size(Pot),id); fprintf('Maximum potential wel depth: %f eV\n',max_depth) fprintf('at location r=%f z=%f [mm]\n',finergrid(idr)*1e3, finezgrid(idz)*1e3) papsize=[14 8]; if rcoord obj.savegraph(f,sprintf('%s/%s_wellr%i',obj.folder,obj.name,floor(mean(timestep))),papsize); else obj.savegraph(f,sprintf('%s/%s_wellpsi%i',obj.folder,obj.name,floor(mean(timestep))),papsize); end end \ No newline at end of file diff --git a/matlab/@fennecshdf5/displayconfiguration.m b/matlab/@fennecshdf5/displayconfiguration.m index 190beca..8b9a69a 100644 --- a/matlab/@fennecshdf5/displayconfiguration.m +++ b/matlab/@fennecshdf5/displayconfiguration.m @@ -1,125 +1,126 @@ function f=displayconfiguration(obj,fieldsteps,xlimits,ylimits) %displayconfiguration plot the configuration of the simulation % domain withe boundaries, the magnetic field lines the % electric equipotential lines and the electron density % averaged in time between t2d(fieldsteps(1)) and t2d(fieldsteps(end)) fieldstart=fieldsteps(1); fieldend=fieldsteps(end); if nargin<3 xlimits=inf*[-1 1]; end if nargin<4 ylimits=inf*[-1 1]; end dens=mean(obj.N(:,:,fieldstart:fieldend),3); geomw=obj.geomweight(:,:,1); maxdens=max(dens(:)); geomw(geomw<0)=0; geomw(geomw>0)=maxdens; dens(geomw<=0)=0; geomw(geomw>0)=NaN; f=figure('Name', sprintf('%s fields',obj.name)); ax1=gca; title(sprintf('Configuration')) %dens(dens<=1e13)=NaN; %% electron density h=contourf(ax1,obj.zgrid*1000,obj.rgrid*1000,dens,50,'Displayname','n_e [m^{-3}]', 'linestyle','none'); hold on; colormap(flipud(hot)); %% Magnetic field lines Blines=obj.rAthet; levels=linspace(min(Blines(obj.geomweight(:,:,1)>0)),max(Blines(obj.geomweight(:,:,1)>0)),15); [~,h1]=contour(ax1,obj.zgrid*1000,obj.rgrid*1000,Blines,real(levels),'-.','color','k','linewidth',1.1,'Displayname','Magnetic field lines'); %% Equipotential lines Pot=mean(obj.pot(:,:,fieldstart:fieldend),3); Pot(obj.geomweight(:,:,1)<0)=NaN; %levels=8;%[-3.4 -5 -10 -15 -20 -25];%7; potcolor='b';%[0.3660 0.6740 0.1880]; [c1,h2]=contour(ax1,obj.zgrid*1000,obj.rgrid*1000,Pot/1e3,[-18:4:-2],'--','color',potcolor,'ShowText','on','linewidth',1.2,'Displayname','Equipotentials [kV]'); clabel(c1,h2,'Color',potcolor) clabel(c1,h2, 'labelspacing', 450); clabel(c1,h2, 'fontsize', 13); % Grey outline shows metallic parts [c1,hContour]=contourf(ax1,obj.zgrid*1000,obj.rgrid*1000,geomw, [0 0]); drawnow; % set the axia limits xlim(ax1,[obj.zgrid(1)*1000 obj.zgrid(end)*1000]) if(obj.conformgeom) ylim([ax1 ],[obj.rgrid(1)*1000 obj.rgrid(rgridend)*1000]) else ylim([ax1],[obj.rgrid(1)*1000 obj.rgrid(end)*1000]) end legend([h1,h2],{'Magnetic field lines','Equipotentials [kV]'},'location','northeast') xlabel(ax1,'z [mm]') ylabel(ax1,'r [mm]') c = colorbar(ax1); c.Label.String= 'Electron density [m^{-3}]'; view(ax1,2) set(ax1,'fontsize',14) grid on; hFills=hContour.FacePrims; [hFills.ColorType] = deal('truecoloralpha'); % default = 'truecolor' try hFills(1).ColorData = uint8([150;150;150;255]); for idx = 2 : numel(hFills) hFills(idx).ColorData(4) = 0; % default=255 end catch end [~, name, ~] = fileparts(obj.file); % with this you could show the outline of the maxwellian source % if obj.maxwellsrce.present % rlen=diff(obj.maxwellsrce.rlim); % zlen=diff(obj.maxwellsrce.zlim); % rectangle('Position',[obj.maxwellsrce.zlim(1) obj.maxwellsrce.rlim(1) zlen rlen]*1000,'Edgecolor','g','Linewidth',2,'Linestyle','--') % end % in case of coaxial configuration, extend the display domain % and add grey rectangles to show metallic boundaries if( obj.walltype >=2 && obj.walltype<=4) rectangle('Position',[obj.zgrid(1) obj.r_b obj.zgrid(end)-obj.zgrid(1) 0.001]*1e3,'FaceColor',[150 150 150]/255,'Edgecolor','none') ylimits=ylim; ylim([ylimits(1),ylimits(2)+1]) end if sum(obj.geomweight(:,1,1))==0 rectangle('Position',[obj.zgrid(1) obj.r_a-0.001 obj.zgrid(end)-obj.zgrid(1) 0.001]*1e3,'FaceColor',[150 150 150]/255,'Edgecolor','none') ylimits=ylim; ylim([ylimits(1)-1,ylimits(2)]) end if nargin>2 xlim(xlimits) end if nargin>3 ylim(ylimits) end f.PaperUnits='centimeters'; %axis equal papsize=[14 5 ]; %% axis equal - ylim([60 85]) - xlim([-40 80]) + %ylim([60 85]) + %xlim([-40 80]) legend('location','northeast') + legend off Pos=f.Position; Pos(3)=1.8*Pos(3); f.Position=Pos; obj.savegraph(f,sprintf('%s/%sFields',obj.folder,obj.name),papsize); end diff --git a/matlab/@fennecshdf5/displaygeometry.m b/matlab/@fennecshdf5/displaygeometry.m index a80ddf9..c2291e0 100644 --- a/matlab/@fennecshdf5/displaygeometry.m +++ b/matlab/@fennecshdf5/displaygeometry.m @@ -1,153 +1,153 @@ function displaygeometry(obj,ax,xlimits,ylimits) %DISPLAYGEOMETRY Display the simulation geometry in the axis ax % if ax is not specified, a new figure is generated\ savefile=false; if nargin<2 fig=figure('Name', sprintf('%s geometry',obj.name)); ax=axes(fig); savefile=true; end geomw=obj.geomweight(:,:,1); %% Magnetic field lines Blines=obj.rAthet; - levels=linspace(min(Blines(obj.geomweight(:,:,1)>0)),max(Blines(obj.geomweight(:,:,1)>0)),20); + levels=linspace(min(Blines(obj.geomweight(:,:,1)>0)),max(Blines(obj.geomweight(:,:,1)>0)),60); [~,h1]=contour(ax,obj.zgrid*1000,obj.rgrid*1000,Blines,real(levels),'-.','color','k','linewidth',1.5,'Displayname','Magnetic field lines'); hold on %% Equipotential lines Pot=obj.potxt(:,:,1); Pot(obj.geomweight(:,:,1)<0)=NaN; potcolor='b'; [c1,h2]=contour(ax,obj.zgrid*1000,obj.rgrid*1000,Pot/1e3,'--','color',potcolor,'linewidth',1,'Displayname','Equipotentials [kV]'); %clabel(c1,h2,'Color',potcolor) %clabel(c1,h2, 'labelspacing', 200); % % Grey outline shows metallic parts % if obj.spl_bound.nbsplines<1 % [c]=contourc(obj.zgrid*1000,obj.rgrid*1000,geomw, [0 0]); % [x,y,z]=C2xyz(c); % % else % x=cell(obj.spl_bound.nbsplines,1); % y=cell(obj.spl_bound.nbsplines,1); % for i=1:obj.spl_bound.nbsplines % z=obj.spl_bound.boundary(i).coefs(:,1)*1000; % r=obj.spl_bound.boundary(i).coefs(:,2)*1000; % if z(1)>obj.zgrid(end)*1000 ||z(end)obj.zgrid(end)*1000 % z=[z(1); z]; % r=[obj.rgrid(1)*1000; r]; % end % if r(1)>obj.rgrid(end)*1000 || r(end)obj.rgrid(end)*1000 % r=[r(1); r]; % z=[obj.zgrid(1)*1000; z]; % end % if r(1)>obj.rgrid(end)*1000 % end % x{i}=z; % y{i}=r; % end % end % for i=1:length(x) % z=[x{i}]; % r=[y{i}]; % patch(z,r,[150,150,150]./255,'edgecolor','none') % end % set the axia limits xlim(ax,[obj.zgrid(1)*1000 obj.zgrid(end)*1000]) if(obj.conformgeom) ylim(ax ,[obj.rgrid(1)*1000 obj.rgrid(rgridend)*1000]) else ylim(ax,[obj.rgrid(1)*1000 obj.rgrid(end)*1000]) end [~, name, ~] = fileparts(obj.file); % in case of coaxial configuration, extend the display domain % and add grey rectangles to show metallic boundaries if( obj.walltype >=2 && obj.walltype<=4) rectangle('Position',[obj.zgrid(1) obj.r_b obj.zgrid(end)-obj.zgrid(1) 0.001]*1e3,'FaceColor',[150 150 150]/255,'Edgecolor','none') ylimits=ylim; ylim([ylimits(1),ylimits(2)+1]) end if sum(obj.geomweight(1,:,1))==0 rectangle('Position',[obj.zgrid(1) obj.r_a-0.001 obj.zgrid(end)-obj.zgrid(1) 0.001]*1e3,'FaceColor',[150 150 150]/255,'Edgecolor','none') ylimits=ylim; ylim([ylimits(1)-1,ylimits(2)]) end if nargin>3 xlim(xlimits) end if nargin>4 ylim(ylimits) end xlabel(ax,'z [mm]') ylabel(ax,'r [mm]') % Plot of the geometry and of the different boundaries % considered for the calculation of the currents geomw=obj.geomweight(:,:,1); geomw(geomw>1e-6)=NaN; geomw(geomw<1e-6)=max(Pot(:)/1e3); [c1,hContour]=contourf(ax,obj.zgrid*1000,obj.rgrid*1000,geomw, max(Pot(:)/1e3)*[1 1]); hold on dirw=obj.dirichletweight(:,:,1); mask=obj.geomweight(:,:,1)<=1e-6&dirw>=1e-6; dirw(mask)=min(Pot(:)/1e3); dirw(~mask)=NaN; [c1,hContour2]=contourf(ax,obj.zgrid*1000,obj.rgrid*1000,dirw,min(Pot(:)/1e3)*[1 1]); grid on; %legend([h1,h2],{'Magnetic field lines','Equipotentials [kV]'},'location','northeast','Orientation','horizontal') colormap(ax,([255,165,0;255,255,255;150,150,150])./255) % We add the coloring for the solid parts of the geometry % Metallic parts hFills=hContour.FacePrims; [hFills.ColorType] = deal('truecoloralpha'); % default = 'truecolor' try hFills(1).ColorData = uint8([150;150;150;255]); for idx = 2 : numel(hFills) hFills(idx).ColorData(4) = 0; % default=255 end catch end drawnow; % Dielectrics hFills=hContour2.FacePrims; [hFills.ColorType] = deal('truecoloralpha'); % default = 'truecolor' try hFills(1).ColorData = uint8([255;165;0;255]); for idx = 2 : numel(hFills) hFills(idx).ColorData(4) = 0; % default=255 end catch end drawnow; axis equal if savefile obj.savegraph(fig,sprintf('%s/%sgeometry',obj.folder,obj.name),[16 14]); end end diff --git a/matlab/@fennecshdf5/displaytotcurrevol_geom.m b/matlab/@fennecshdf5/displaytotcurrevol_geom.m index 8ff5b12..52fd069 100644 --- a/matlab/@fennecshdf5/displaytotcurrevol_geom.m +++ b/matlab/@fennecshdf5/displaytotcurrevol_geom.m @@ -1,254 +1,267 @@ function displaytotcurrevol_geom(obj,timesteps,toptitle,scalet,dens,subdiv,nmean, rsplit) % Computes and display the time evolution of the outgoing % currents at time obj.t2d(timesteps) %-scalet=true scales the time by the ellastic collision % frequency %- dens = true plot the time evolution of the maximum electron % density in the simulation domain otherwise plot the total % number of electrons in the domain % also plot in a subplot the color coded boundary corresponding % to each current % - subdiv allows the subdivision of individual boundaries by % defining relative length e.g. [1 1] divides the boundary in % two boundaries of equal length % - nmean defines the window time average for the current and % density % - rsplit defines the radial position, for the calculation of the % time evolution of the density, at which a new cloud is considered. % This helps tracking the density in two clouds at the same % time. if nargin<2 timesteps=1:length(obj.t2d); end if nargin<3 toptitle=""; end if nargin<4 - scalet=true; + scalet=1; end if nargin <5 dens=true; end if nargin<6 subdiv=1; end if nargin<7 nmean=1; end if nargin<8 rsplit=0.07; %rsplit=0.014; end - if scalet + if scalet==1 if obj.neutcol.present vexb0=(obj.Ezxt(:,:,1).*obj.Br'-obj.Erxt(:,:,1).*obj.Bz')./(obj.B'.^2); vexb0(obj.geomweight(:,:,1)<=0)=0; potwell=obj.PotentialWell(0); vexb0(isnan(potwell))=NaN; vexb0=mean(abs(vexb0(:)),'omitnan'); E=0.5*obj.msim/obj.weight*vexb0^2/obj.qe; taucol=1/(obj.neutcol.neutdens*vexb0*(obj.sigio(E)+obj.sigmela(E)+obj.sigmio(E))); try Sio_S=1e17*(obj.neutcol.neutdens*vexb0*obj.sigio(E))/(obj.maxwellsrce.frequency*obj.weight/(pi*(obj.maxwellsrce.rlim(2)^2-obj.maxwellsrce.rlim(1)^2)*diff(obj.maxwellsrce.zlim))) catch end tlabel='t/\tau_d [-]'; else taucol=2*pi/obj.omece; tlabel='t/\tau_ce [-]'; end + elseif scalet==2 + if obj.neutcol.present && obj.psupply.active + taucol=1/(obj.neutcol.neutdens/obj.psupply.expdens*1000); + tlabel='t [ms]'; + else + taucol=2*pi/obj.omece; + tlabel='t/\tau_ce [-]'; + end + else taucol=1e-9; tlabel='t [ns]'; end if dens N=obj.N(:,:,timesteps); geomw=obj.geomweight(:,:,1); geomw(geomw<0)=0; geomw(geomw>0)=1; N=N.*geomw; %[~,idl]=max(N(:,:,end),[],'all','linear'); %[ir,iz]=ind2sub(size(geomw),idl); %nmax=squeeze(max(max(N,[],1),[],2)); tn=(obj.t2d(timesteps)); nrhalf=find(obj.rgrid>rsplit,1,'first'); if(nrhalf=obj.t2d(timesteps(1)),1,'first'); t0dlst=find(obj.t0d<=obj.t2d(timesteps(end)),1,'last'); tn=obj.t0d(t0dst:t0dlst); nmax=obj.npart(t0dst:t0dlst)*obj.weight; nlabel='Nb e^-'; ndlabel='Nb e^-'; end % We get the current at the desired time steps for each % boundary [currents,pos]=obj.OutCurrents(timesteps,subdiv); % The currents are normalized to the simulated pressure P=1; if obj.neutcol.present P=obj.neutcol.neutdens*obj.kb*300/100;% pressure at room temperature in mbar end + currents=currents/P; + if scalet==2 + currents=currents*obj.psupply.expdens*obj.kb*300/100*1000; + end % Start of the figure f=figure('Name',sprintf('%s Charges',obj.name)); tiledlayout(2,1) nexttile % Plot the evolution of nb of particles or density yyaxis right if size(nmax,2)>1 nmax=nmax'; end for i=1:size(nmax,2) p=plot(tn/taucol,nmax(:,i),'b','linewidth',1.8,'Displayname',sprintf('%s, %d',ndlabel,i)); hold on end ylabel(nlabel) axl=gca; axl.YAxis(2).Color=p.Color; axl.YAxis(1).Color='k'; ylim([0 inf]) if(obj.B(1,1)>obj.B(end,1)) lname='HFS'; rname='LFS'; else lname='LFS'; rname='HFS'; end % Plot of the different current contributions yyaxis( 'left'); map=colormap(lines); set(axl,'linestyleorder',{'-',':','--','*','+'},... 'ColorOrder',map(2:7,:), 'NextPlot','replacechildren') p(1)=plot(axl,obj.t2d(timesteps)/taucol,movmean(currents(1,:),nmean),'Displayname',lname,'linewidth',1.8); hold on p(2)=plot(axl,obj.t2d(timesteps)/taucol,movmean(currents(2,:),nmean),'Displayname',rname,'linewidth',1.8); % Plot the currents for i=3:size(currents,1) p(i)=plot(axl,obj.t2d(timesteps)/taucol,movmean(currents(i,:),nmean),'Displayname',sprintf('border %i',i-2),'linewidth',1.8); end plot(axl,obj.t2d(timesteps)/taucol,movmean(sum(currents(:,:),1,'omitnan'),nmean),'k-','Displayname','total','linewidth',1.8); xlabel(tlabel) - if obj.neutcol.present + if obj.neutcol.present && scalet~=2 ylabel('I/p_n [A/mbar]') else - ylabel('I [A]') + ylabel('I [mA]') end grid on set(gca,'fontsize',12) ax.YAxis(1).Color='black'; %legend('Orientation','horizontal','location','north','numcolumns',3) if ~isempty(toptitle) title(toptitle) end % Plot of the geometry and of the different boundaries % considered for the calculation of the currents ax2=nexttile; %% Magnetic field lines Blines=obj.rAthet; levels=linspace(min(Blines(obj.geomweight(:,:,1)>0)),max(Blines(obj.geomweight(:,:,1)>0)),15); Blines(obj.geomweight(:,:,1)<0)=NaN; [~,h1]=contour(ax2,obj.zgrid*1000,obj.rgrid*1000,Blines,real(levels),'-.','color','k','linewidth',1.1,'Displayname','Magnetic field lines'); hold on %% Boundaries geomw=obj.geomweight(:,:,1); geomw(geomw<1e-6)=0; geomw(geomw>1e-6)=NaN; [c1,hContour]=contourf(ax2,obj.zgrid*1000,obj.rgrid*1000,geomw, [0 0]); hold on dirw=obj.dirichletweight(:,:,1); geomw=obj.geomweight(:,:,1); dirw(geomw<=1e-6&dirw>=1e-6)=0; dirw(dirw>0)=NaN; [c1,hContour2]=contourf(ax2,obj.zgrid*1000,obj.rgrid*1000,dirw, [0 0]); drawnow; grid on; for i=1:length(pos) plot(ax2,pos{i}(1,:)*1000,pos{i}(2,:)*1000,'linestyle',p(i+2).LineStyle,... 'color',p(i+2).Color,'marker',p(i+2).Marker,... 'displayname',sprintf('border %i',i),'linewidth',1.8) hold on end title('Domain') plot(ax2,ones(size(obj.rgrid))*obj.zgrid(1)*1000,obj.rgrid*1000,'linestyle',p(1).LineStyle,... 'color',p(1).Color,'marker',p(1).Marker,... 'displayname',lname,'linewidth',1.8) plot(ax2,ones(size(obj.rgrid))*obj.zgrid(end)*1000,obj.rgrid*1000,'linestyle',p(2).LineStyle,... 'color',p(2).Color,'marker',p(2).Marker,... 'displayname',rname,'linewidth',1.8) xlabel('z [mm]') ylabel('r [mm]') grid on set(gca,'fontsize',12) % We add the coloring for the solid parts of the geometry % Metallic parts hFills=hContour.FacePrims; [hFills.ColorType] = deal('truecoloralpha'); % default = 'truecolor' try hFills(1).ColorData = uint8([150;150;150;255]); for idx = 2 : numel(hFills) hFills(idx).ColorData(4) = 0; % default=255 end catch end % Dielectrics hFills=hContour2.FacePrims; [hFills.ColorType] = deal('truecoloralpha'); % default = 'truecolor' try hFills(1).ColorData = uint8([255;165;0;255]); for idx = 2 : numel(hFills) hFills(idx).ColorData(4) = 0; % default=255 end catch end %legend('Orientation','horizontal','location','north','numcolumns',4) % Output to console the mean total current at the end of the % time considered fprintf('mean total current: %f [A/mbar]\n',mean(sum(currents(:,max(1,size(currents,2)-50):end),1,'omitnan'))); %if nargin <3 % sgtitle(sprintf('\\phi_b-\\phi_a=%.2g kV, B=%f T',(obj.potout-obj.potinn)/1e3,mean(obj.B(:)))) %elseif ~isempty(toptitle) % sgtitle(toptitle) %end xlim([obj.zgrid(1) obj.zgrid(end)]*1e3) ylim([obj.rgrid(1) obj.rgrid(end)]*1e3) % Save to file if length(subdiv)>1 obj.savegraph(f,sprintf('%s/%s_totIEvol%i%i_div%i',obj.folder,obj.name,scalet,dens,nmean),[16 14]); else obj.savegraph(f,sprintf('%s/%s_totIEvol%i%i_%i',obj.folder,obj.name,scalet,dens,nmean),[16 14]); end end \ No newline at end of file diff --git a/matlab/@fennecshdf5/fennecshdf5.m b/matlab/@fennecshdf5/fennecshdf5.m index 6f49753..47bc366 100644 --- a/matlab/@fennecshdf5/fennecshdf5.m +++ b/matlab/@fennecshdf5/fennecshdf5.m @@ -1,3985 +1,4011 @@ classdef fennecshdf5 %fennecshdf5 General class used to treat hdf5 result files of fennecs code % A result file is loaded with a call to M=fennecshdf5(filename) where filename is the relative or absolute file path % after loading, several quantities and composite diagnostics such as moments of the distribution function or individual particles % quantities can be accessed. properties filename name folder fullpath timestamp info t0d t1d t2d tpart it0 it1 it2 restartsteps restarttimes %% Physical constants vlight=299792458; qe=1.60217662E-19; me=9.109383E-31; eps_0=8.85418781762E-12; kb=1.38064852E-23; %% Run parameters dt % simulation time step nrun % number of time steps simulated nlres nlsave nlclassical % Was the equation of motion solved in the classical framework nlPhis % Was the self-consistent electric field computed nz % number of intervals in the z direction for the grid nnr % number of intervals in the r direction for the grid for each of the 3 mesh regions lz % physical axial dimension of the simulation space nplasma % Number of initial macro particles potinn % Electric potential at the coaxial insert potout % Electric potential at the cylinder surface B0 % Normalization for the magnetic field Rcurv % Magnetic mirror ratio width % Magnetic mirror length n0 % Initial particle density in case of old particle loading temp % Initial particle temperature in case of old particle loading femorder % finite element method order in z and r direction ngauss % Order of the Gauss integration method for the FEM plasmadim % initial dimensions of the plasma for the old particle loading system radii % Radial limits of the three mesh regions coarse,fine,coarse H0 % Initial particle Energy for Davidsons distribution function P0 % Initial particle Angular momentum for Davidsons distribution function normalized % Are the parts quantities normalized in the h5 file nbspecies % Number of species simulated %% Frequencies omepe % Reference plasma frequency used for normalization omece % Reference cyclotronic frequency for normalization %% Normalizations tnorm % Time normalization rnorm % Dimension normalization bnorm % Magnetic field normalization enorm % Electric field normalization phinorm % Electric potential normalization vnorm % Velocity normalization %% Grid data rgrid % Radial grid position points zgrid % Axial grid position points dz % Axial grid step dr % Radial grid step for the three mesh regions CellVol % Volume of the cell used for density calculation celltype % type of cell -1 outside 1 inside 0 border linked_s % location of linked spline bsplinetype %% Magnetic field Br % Radial magnetic field Bz % Axial magnetic field Athet % Azimuthal component of the Magnetic potential vector rAthet % r*Athet used for the representation of magnetic field lines B % Magnetic field amplitude sinthet % ratio to project quantities along the magnetic field lines costhet % ratio to project quantities along the magnetic field lines %% Energies epot % Time evolution of the particles potential energy ekin % Time evolution of the particles kinetic energy etot % Time evolution of the particles total energy etot0 % Time evolution of the reference particle total energy eerr % Time evolution of the error on the energy conservation npart % Time evolution of the number of simulated %% 2D time data evaluated on grid points N % main specie Density fluidUR % main specie radial fluid velocity fluidUZ % main specie axial fluid velocity fluidUTHET % main specie azimuthal fluid velocity pot % Electric potential evaluated at grid points potxt % External Electric potential evaluated at grid points phi % Electric potential in spline form Er % Radial electric field Ez % Axial electric field Erxt % External Radial electric field Ezxt % External Axial electric field Presstens % Pressure tensor fluidEkin % average kinetic energy in each direction %% Splines knotsr % Spline radial knots knotsz % Spline axial knots %% Particle parameters weight % Macro particle numerical weight of the main specie qsim % Macro particle charge msim % Macro particle mass nbparts % Time evolution of the number of simulated particles partepot % Electric potential at the particles positions R % Particles radial position Z % Particles axial position Rindex % Particles radial grid index Zindex % Particles axial grid index partindex % Particles unique id for tracing trajectories VR % Particles radial velocity VZ % Particles axial velocity VTHET % Particles azimuthal velocity THET % Particles azimuthal position species % Array containing the other simulated species species_moments % containing moments for species (parts) %% Celldiag celldiag % Array containing the cell diagnostic data nbcelldiag % Total number of cell diagnostics %% Curvilinear geometry conformgeom % stores if we use the conforming or nonconforming boundary conditions r_a r_b z_r z_0 r_0 r_r L_r L_z Interior above1 above2 interior walltype geomweight dirichletweight gtilde + fsolution spl_bound %% Maxwell source parameters maxwellsrce %% Collision with neutral parameters neutcol nudcol % effective momentum collision frequency %% Non ideal power supply psupply end methods function file=file(obj) % returns the h5 file name file=obj.filename; end function obj = fennecshdf5(filename,readparts,old) % Reads the new result file filename and read the parts data if readparts==true % adds the helper_classes folder to the path matlabfuncpath = dir([mfilename('fullpath'),'.m']); addpath(sprintf('%s/../helper_classes',matlabfuncpath.folder)); addpath(sprintf('%s/../helper_functions',matlabfuncpath.folder)); addpath(sprintf('%s/../export_fig',matlabfuncpath.folder)); rehash path % Try catch are there for compatibility with older simulation files filedata=dir(filename); if (isempty(filedata)) fullpath=which(filename); filedata=dir(fullpath); if (isempty(filedata)) error("File: ""%s"" doesn't exist",filename) end end obj.folder=filedata.folder; obj.filename=filedata.name; [~, obj.name, ext] = fileparts(obj.filename); obj.filename=[obj.name,ext]; obj.fullpath=[obj.folder,'/',obj.filename]; obj.timestamp=filedata.date; if nargin==1 readparts=true; end if nargin<3 old=false; end %obj.info=h5info(filename); %% Read the run parameters obj.dt = h5readatt(obj.fullpath,'/data/input.00/','dt'); obj.nrun = h5readatt(obj.fullpath,'/data/input.00/','nrun'); obj.nlres = strcmp(h5readatt(obj.fullpath,'/data/input.00/','nlres'),'y'); obj.nlsave = strcmp(h5readatt(obj.fullpath,'/data/input.00/','nlsave'),'y'); obj.nlclassical =strcmp(h5readatt(obj.fullpath,'/data/input.00/','nlclassical'),'y'); obj.nlPhis =strcmp(h5readatt(obj.fullpath,'/data/input.00/','nlPhis'),'y'); obj.nz = h5readatt(obj.fullpath,'/data/input.00/','nz'); obj.nnr = h5read(obj.fullpath,'/data/input.00/nnr'); obj.lz = h5read(obj.fullpath,'/data/input.00/lz'); obj.qsim = h5readatt(obj.fullpath,'/data/input.00/','qsim'); obj.msim = h5readatt(obj.fullpath,'/data/input.00/','msim'); try obj.r_a=h5readatt(obj.fullpath,'/data/input.00/geometry','r_a'); obj.r_b=h5readatt(obj.fullpath,'/data/input.00/geometry','r_b'); obj.z_r=h5readatt(obj.fullpath,'/data/input.00/geometry','z_r'); obj.r_r=h5readatt(obj.fullpath,'/data/input.00/geometry','r_r'); obj.r_0=h5readatt(obj.fullpath,'/data/input.00/geometry','r_0'); obj.z_0=h5readatt(obj.fullpath,'/data/input.00/geometry','z_0'); obj.above1=h5readatt(obj.fullpath,'/data/input.00/geometry','above1'); obj.above2=h5readatt(obj.fullpath,'/data/input.00/geometry','above2'); obj.interior=h5readatt(obj.fullpath,'/data/input.00/geometry','interior'); obj.walltype=h5readatt(obj.fullpath,'/data/input.00/geometry','walltype'); try obj.L_r=h5readatt(obj.fullpath,'/data/input.00/geometry','L_r'); obj.L_z=h5readatt(obj.fullpath,'/data/input.00/geometry','L_z'); catch end obj.conformgeom=false; catch obj.conformgeom=true; obj.walltype=0; obj.r_a=obj.rgrid(1); obj.r_b=obj.rgrid(end); obj.above1=1; obj.above2=-1; obj.L_r=0; obj.L_z=0; end try obj.weight=h5readatt(obj.fullpath,'/data/part/','weight'); catch obj.weight=obj.msim/obj.me; end filesgrpinfo=h5info(obj.fullpath,'/files'); nbrst=h5readatt(obj.fullpath,'/files','jobnum'); obj.restartsteps(1)=0; obj.restarttimes(1)=0; grp=sprintf('/data/input.%02i/',0); obj.dt(1)=h5readatt(obj.fullpath,grp,'dt'); for i=1:nbrst grp=sprintf('/data/input.%02i/',i); obj.restartsteps(i+1)= h5readatt(obj.fullpath,grp,'startstep'); obj.restarttimes(i+1)= obj.restarttimes(i) + (obj.restartsteps(i+1)-obj.restartsteps(i))*obj.dt(i); obj.dt(i+1)=h5readatt(obj.fullpath,grp,'dt'); end obj.nplasma = h5readatt(obj.fullpath,'/data/input.00/','nplasma'); obj.potinn = h5readatt(obj.fullpath,'/data/input.00/','potinn'); obj.potout = h5readatt(obj.fullpath,'/data/input.00/','potout'); obj.B0 = h5readatt(obj.fullpath,'/data/input.00/','B0'); obj.Rcurv = h5readatt(obj.fullpath,'/data/input.00/','Rcurv'); obj.width = h5readatt(obj.fullpath,'/data/input.00/','width'); obj.n0 = h5readatt(obj.fullpath,'/data/input.00/','n0'); obj.temp = h5readatt(obj.fullpath,'/data/input.00/','temp'); try obj.it0 = h5readatt(obj.fullpath,'/data/input.00/','it0d'); obj.it1 = h5readatt(obj.fullpath,'/data/input.00/','it2d'); obj.it2 = h5readatt(obj.fullpath,'/data/input.00/','itparts'); catch obj.it0 = h5readatt(obj.fullpath,'/data/input.00/','it0'); obj.it1 = h5readatt(obj.fullpath,'/data/input.00/','it1'); obj.it1 = h5readatt(obj.fullpath,'/data/input.00/','it2'); end try try obj.nbspecies=h5readatt(obj.fullpath,'/data/part/','nbspecies'); catch obj.nbspecies=h5readatt(obj.fullpath,'/data/input.00/','nbspecies'); end obj.normalized=strcmp(h5readatt(obj.fullpath,'/data/input.00/','rawparts'),'y'); catch obj.nbspecies=1; obj.normalized=false; end try obj.nbcelldiag=h5readatt(obj.fullpath,'/data/celldiag/','nbcelldiag'); catch obj.nbcelldiag=0; end obj.omepe=sqrt(abs(obj.n0)*obj.qe^2/(obj.me*obj.eps_0)); obj.omece=obj.qe*obj.B0/obj.me; obj.npart= h5read(obj.fullpath, '/data/var0d/nbparts'); try obj.nudcol= h5read(obj.fullpath, '/data/var0d/nudcol'); catch end try obj.H0 = h5read(obj.fullpath,'/data/input.00/H0'); obj.P0 = h5read(obj.fullpath,'/data/input.00/P0'); catch obj.H0=3.2e-14; obj.P0=8.66e-25; end % Normalizations if old obj.tnorm=abs(1/obj.omepe); else obj.tnorm=min(abs(1/obj.omepe),abs(1/obj.omece)); end obj.rnorm=obj.vlight*obj.tnorm; obj.bnorm=obj.B0; obj.enorm=obj.vlight*obj.bnorm; obj.phinorm=obj.enorm*obj.rnorm; obj.vnorm=obj.vlight; % Conversion of the bias to V obj.potinn=obj.potinn*obj.phinorm; obj.potout=obj.potout*obj.phinorm; % Grid data obj.rgrid= h5read(obj.fullpath, '/data/var1d/rgrid')*obj.rnorm; obj.zgrid= h5read(obj.fullpath, '/data/var1d/zgrid')*obj.rnorm; obj.dz=(obj.zgrid(end)-obj.zgrid(1))/double(obj.nz); rid=1; for i=1:length(obj.nnr) obj.dr(i)=(obj.rgrid(sum(obj.nnr(1:i))+1)-obj.rgrid(rid))/double(obj.nnr(i)); rid=rid+obj.nnr(i); end Br = h5read(obj.fullpath,'/data/fields/Br')*obj.bnorm; obj.Br= reshape(Br,length(obj.zgrid),length(obj.rgrid)); Bz = h5read(obj.fullpath,'/data/fields/Bz')*obj.bnorm; obj.Bz= reshape(Bz,length(obj.zgrid),length(obj.rgrid)); try Atheta = h5read(obj.fullpath,'/data/fields/Athet'); obj.Athet= reshape(Atheta,length(obj.zgrid),length(obj.rgrid)); [rmeshgrid,~]=meshgrid(obj.rgrid,obj.zgrid); obj.rAthet=(rmeshgrid.*obj.Athet)'; catch end obj.B=sqrt(obj.Bz.^2+obj.Br.^2); obj.costhet=(obj.Br./obj.B)'; obj.sinthet=(obj.Bz./obj.B)'; clear Br Bz try obj.t0d=h5read(obj.fullpath,'/data/var0d/time'); catch obj.t0d=obj.dt.*double(0:length(obj.epot)-1); end try for i=0:nbrst grp=sprintf('/data/input.%02i/',i); obj.Erxt(:,:,i+1)=reshape(h5read(obj.fullpath,[grp,'Erxt']),length(obj.zgrid),length(obj.rgrid))'*obj.enorm; obj.Ezxt(:,:,i+1)=reshape(h5read(obj.fullpath,[grp,'Ezxt']),length(obj.zgrid),length(obj.rgrid))'*obj.enorm; obj.potxt(:,:,i+1)=reshape(h5read(obj.fullpath,[grp,'potxt']),length(obj.zgrid),length(obj.rgrid))'*obj.phinorm; end catch end obj.femorder = h5read(obj.fullpath,'/data/input.00/femorder'); obj.ngauss = h5read(obj.fullpath,'/data/input.00/ngauss'); obj.plasmadim = h5read(obj.fullpath,'/data/input.00/plasmadim'); obj.radii = h5read(obj.fullpath,'/data/input.00/radii'); obj.epot = h5read(obj.fullpath,'/data/var0d/epot'); obj.ekin = h5read(obj.fullpath,'/data/var0d/ekin'); obj.etot = h5read(obj.fullpath,'/data/var0d/etot'); try obj.etot0 = h5read(obj.fullpath,'/data/var0d/etot0'); obj.eerr = obj.etot-obj.etot0; catch obj.eerr = obj.etot-obj.etot(2); end if(obj.normalized) obj.pot=gridquantity(obj.fullpath,'/data/fields/pot',sum(obj.nnr)+1, obj.nz+1,1); obj.Er=gridquantity(obj.fullpath,'/data/fields/Er',sum(obj.nnr)+1, obj.nz+1,1); obj.Ez=gridquantity(obj.fullpath,'/data/fields/Ez',sum(obj.nnr)+1, obj.nz+1,1); else obj.pot=gridquantity(obj.fullpath,'/data/fields/pot',sum(obj.nnr)+1, obj.nz+1,obj.phinorm); obj.Er=gridquantity(obj.fullpath,'/data/fields/Er',sum(obj.nnr)+1, obj.nz+1,obj.enorm); obj.Ez=gridquantity(obj.fullpath,'/data/fields/Ez',sum(obj.nnr)+1, obj.nz+1,obj.enorm); end try obj.t2d = h5read(obj.fullpath,'/data/fields/time'); catch info=h5info(obj.fullpath,'/data/fields/partdensity'); obj.t2d=obj.dt*(0:info.objspace.Size(2)-1)*double(obj.it1); end try info=h5info(obj.fullpath,'/data/fields/moments'); obj.femorder = h5read(obj.fullpath,'/data/input.00/femorder'); kr=obj.femorder(2)+1; obj.knotsr=augknt(obj.rgrid,kr); kz=obj.femorder(1)+1; obj.knotsz=augknt(obj.zgrid,kz); try obj.CellVol= reshape(h5read(obj.fullpath,'/data/fields/volume'),length(obj.knotsz)-kz,length(obj.knotsr)-kr); obj.CellVol=permute(obj.CellVol,[2,1,3])*obj.rnorm^3; zvol=fnder(spmak(obj.knotsz,ones(1,length(obj.knotsz)-kz)), -1 ); rvol=fnder(spmak(obj.knotsr,2*pi*obj.knotsr(kr:length(obj.knotsr)-kr+1)'), -1 ); ZVol=diff(fnval(zvol,obj.knotsz)); RVol=diff(fnval(rvol,obj.knotsr)); CellVolfull=RVol(kr:end-kr+1)*ZVol(kz:end-kz+1)'; CellVolfull=padarray(CellVolfull,double([kr-1,kz-1]),'replicate','post'); % We remove the volumes which are too small and could % lead to noise obj.CellVol(obj.CellVol./CellVolfull<0.1)=0; catch zvol=fnder(spmak(obj.knotsz,ones(1,length(obj.knotsz)-kz)), -1 ); rvol=fnder(spmak(obj.knotsr,2*pi*[obj.rgrid' 2*obj.rgrid(end)-obj.rgrid(end-1)]), -1 ); ZVol=diff(fnval(zvol,obj.knotsz)); RVol=diff(fnval(rvol,obj.knotsr)); obj.CellVol=RVol(3:end-1)*ZVol(3:end-1)'; obj.CellVol=padarray(obj.CellVol,[1,1],'replicate','post'); end try obj.geomweight = h5read(obj.fullpath,'/data/input.00/geometry/geomweight'); obj.geomweight= reshape(obj.geomweight,length(obj.zgrid),length(obj.rgrid),[]); obj.geomweight = permute(obj.geomweight,[2,1,3]); catch obj.geomweight=ones(length(obj.rgrid),length(obj.zgrid),3); end try obj.dirichletweight = h5read(obj.fullpath,'/data/input.00/geometry/dirichletweight'); obj.dirichletweight= reshape(obj.dirichletweight,length(obj.zgrid),length(obj.rgrid),[]); obj.dirichletweight = permute(obj.dirichletweight,[2,1,3]); catch obj.dirichletweight=obj.geomweight; end try obj.gtilde = h5read(obj.fullpath,'/data/input.00/geometry/gtilde'); obj.gtilde= reshape(obj.gtilde,length(obj.zgrid),length(obj.rgrid),[]); obj.gtilde = permute(obj.gtilde,[2,1,3]); catch obj.gtilde=zeros(length(obj.rgrid),length(obj.zgrid),3); end + try + obj.fsolution = h5read(obj.fullpath,'/data/input.00/geometry/fsolution'); + obj.fsolution= reshape(obj.fsolution,length(obj.zgrid),length(obj.rgrid),[]); + obj.fsolution = permute(obj.fsolution,[2,1,3]); + catch + obj.fsolution=zeros(length(obj.rgrid),length(obj.zgrid),3); + end geomweight=ones(length(obj.rgrid),length(obj.zgrid)); if(obj.normalized) obj.N=splinedensity(obj.fullpath, '/data/fields/moments', obj.knotsr, obj.knotsz, obj.femorder, obj.CellVol, 1, geomweight, 1); obj.phi=splinequantity(obj.fullpath,'/data/fields/phi', obj.knotsr, obj.knotsz, obj.femorder, 1, obj.geomweight(:,:,1), -1); else obj.N=splinedensity(obj.fullpath, '/data/fields/moments', obj.knotsr, obj.knotsz, obj.femorder, obj.CellVol, abs(obj.qsim/obj.qe), geomweight, 1); end obj.fluidUR=splinevelocity(obj.fullpath, '/data/fields/moments', obj.knotsr, obj.knotsz, obj.femorder, obj.vnorm, geomweight, 2); obj.fluidUTHET=splinevelocity(obj.fullpath, '/data/fields/moments', obj.knotsr, obj.knotsz, obj.femorder, obj.vnorm, geomweight, 3); obj.fluidUZ=splinevelocity(obj.fullpath, '/data/fields/moments', obj.knotsr, obj.knotsz, obj.femorder, obj.vnorm, geomweight, 4); if(obj.normalized) obj.Presstens=splinepressure(obj.fullpath, '/data/fields/moments', obj.knotsr, obj.knotsz, obj.femorder, obj.CellVol, obj.vnorm^2*obj.me, geomweight); obj.fluidEkin=splineenergy(obj.fullpath, '/data/fields/moments', obj.knotsr, obj.knotsz, obj.femorder, obj.CellVol, obj.vnorm^2*obj.me*0.5, geomweight); else obj.Presstens=splinepressure(obj.fullpath, '/data/fields/moments', obj.knotsr, obj.knotsz, obj.femorder, obj.CellVol, obj.vnorm^2*obj.msim, geomweight); obj.fluidEkin=splineenergy(obj.fullpath, '/data/fields/moments', obj.knotsr, obj.knotsz, obj.femorder, obj.CellVol, obj.vnorm^2*obj.msim*0.5, geomweight); end try obj.celltype=h5read(obj.fullpath,'/data/input.00/geometry/ctype')'; obj.linked_s=h5read(obj.fullpath,'/data/input.00/geometry/linked_s'); obj.bsplinetype=h5read(obj.fullpath,'/data/input.00/geometry/bsplinetype'); obj.bsplinetype=reshape(obj.bsplinetype,length(obj.knotsz)-kz,length(obj.knotsr)-kr); catch obj.celltype=[]; obj.linked_s=[]; end catch obj.CellVol=(obj.zgrid(2:end)-obj.zgrid(1:end-1))*((obj.rgrid(2:end).^2-obj.rgrid(1:end-1).^2)*pi)'; obj.CellVol=obj.CellVol'; obj.N=griddensity(obj.fullpath, '/data/fields/partdensity', sum(obj.nnr)+1, obj.nz+1, obj.CellVol, abs(obj.qsim/obj.qe), true); obj.fluidUR=gridquantity(obj.fullpath, '/data/fields/fluidur', sum(obj.nnr)+1, obj.nz+1, obj.vnorm, true); obj.fluidUTHET=gridquantity(obj.fullpath, '/data/fields/fluiduthet', sum(obj.nnr)+1, obj.nz+1, obj.vnorm, true); obj.fluidUZ=gridquantity(obj.fullpath, '/data/fields/fluiduz', sum(obj.nnr)+1, obj.nz+1, obj.vnorm, true); end % If we have a maxwellian source, read its parameters try obj.maxwellsrce.rlim=h5read(obj.fullpath, '/data/input.00/maxwellsource/rlimits'); obj.maxwellsrce.zlim=h5read(obj.fullpath, '/data/input.00/maxwellsource/zlimits'); obj.maxwellsrce.frequency=h5readatt(obj.fullpath, '/data/input.00/maxwellsource','frequency'); obj.maxwellsrce.radialtype=h5readatt(obj.fullpath, '/data/input.00/maxwellsource','radialtype'); obj.maxwellsrce.temperature=h5readatt(obj.fullpath, '/data/input.00/maxwellsource','temperature'); obj.maxwellsrce.time_end=h5readatt(obj.fullpath, '/data/input.00/maxwellsource','time_end'); obj.maxwellsrce.time_start=h5readatt(obj.fullpath, '/data/input.00/maxwellsource','time_start'); obj.maxwellsrce.vth=h5readatt(obj.fullpath, '/data/input.00/maxwellsource','vth'); obj.maxwellsrce.rate=obj.maxwellsrce.frequency*obj.weight/(pi*(diff(obj.maxwellsrce.rlim.^2))*diff(obj.maxwellsrce.zlim)); obj.maxwellsrce.current=obj.maxwellsrce.frequency*obj.weight*obj.qe; obj.maxwellsrce.present=true; catch obj.maxwellsrce.present=false; end %% load neutcol parameters try obj.neutcol.neutdens=double(h5readatt(obj.fullpath, '/data/input.00/neutcol','neutdens')); obj.neutcol.neutpressure=double(h5readatt(obj.fullpath, '/data/input.00/neutcol','neutpressure')); obj.neutcol.scatter_fac=double(h5readatt(obj.fullpath, '/data/input.00/neutcol','scatter_fac')); obj.neutcol.Eion=double(h5readatt(obj.fullpath, '/data/input.00/neutcol','Eion')); obj.neutcol.E0=double(h5readatt(obj.fullpath, '/data/input.00/neutcol','E0')); obj.neutcol.Escale=double(h5readatt(obj.fullpath, '/data/input.00/neutcol','Escale')); try obj.neutcol.io_cross_sec=double(h5read(obj.fullpath, '/data/input.00/neutcol/io_cross_sec')); obj.neutcol.io_cross_sec(:,2)=obj.neutcol.io_cross_sec(:,2)*obj.rnorm^2; obj.neutcol.io_cross_sec(:,3)=[log(obj.neutcol.io_cross_sec(2:end,2)./obj.neutcol.io_cross_sec(1:end-1,2))... ./log(obj.neutcol.io_cross_sec(2:end,1)./obj.neutcol.io_cross_sec(1:end-1,1)); 0]; obj.neutcol.iom_cross_sec=zeros(500,3); obj.neutcol.iom_cross_sec(:,1)=logspace(log10(obj.neutcol.Eion+0.001),log10(5e4),size(obj.neutcol.iom_cross_sec,1)); obj.neutcol.iom_cross_sec(:,2)=obj.sigmiopre(obj.neutcol.iom_cross_sec(:,1),true); obj.neutcol.iom_cross_sec(:,3)=abs([log(obj.neutcol.iom_cross_sec(2:end,2)./obj.neutcol.iom_cross_sec(1:end-1,2))... ./log(obj.neutcol.iom_cross_sec(2:end,1)./obj.neutcol.iom_cross_sec(1:end-1,1)); 0]); catch obj.neutcol.io_cross_sec=[]; obj.neutcol.iom_cross_sec=[]; end try obj.neutcol.ela_cross_sec=double(h5read(obj.fullpath, '/data/input.00/neutcol/ela_cross_sec')); obj.neutcol.ela_cross_sec(:,2)=obj.neutcol.ela_cross_sec(:,2)*obj.rnorm^2; obj.neutcol.ela_cross_sec(:,3)=[log(obj.neutcol.ela_cross_sec(2:end,2)./obj.neutcol.ela_cross_sec(1:end-1,2))... ./log(obj.neutcol.ela_cross_sec(2:end,1)./obj.neutcol.ela_cross_sec(1:end-1,1)); 0]; catch obj.neutcol.ela_cross_sec=[]; end obj.neutcol.present=true; catch obj.neutcol.present=false; end %% load spline boundaries try obj.spl_bound.nbsplines=h5readatt(obj.fullpath, '/data/input.00/geometry_spl','nbsplines'); for i=1:obj.spl_bound.nbsplines splgroup=sprintf('/data/input.00/geometry_spl/%02d',i); obj.spl_bound.boundary(i).knots=h5read(obj.fullpath,sprintf('%s/knots',splgroup)); obj.spl_bound.boundary(i).Dval=h5readatt(obj.fullpath,splgroup,'Dirichlet_val'); obj.spl_bound.boundary(i).coefs=reshape(h5read(obj.fullpath,sprintf('%s/pos',splgroup)),2,[])'; obj.spl_bound.boundary(i).order=h5readatt(obj.fullpath,splgroup,'order'); obj.spl_bound.boundary(i).kind=h5readatt(obj.fullpath,splgroup,'kind'); try obj.spl_bound.boundary(i).type=h5readatt(obj.fullpath,splgroup,'type'); catch end obj.spl_bound.boundary(i).fun=spmak(obj.spl_bound.boundary(i).knots,obj.spl_bound.boundary(i).coefs'); end catch obj.spl_bound.nbsplines=0; end %% load non ideal power supply parameters try obj.psupply.targetbias=h5readatt(obj.fullpath, '/data/input.00/psupply','targetbias'); obj.psupply.expdens=h5readatt(obj.fullpath, '/data/input.00/psupply','expdens'); obj.psupply.PSresistor=h5readatt(obj.fullpath, '/data/input.00/psupply','PSresistor'); obj.psupply.geomcapacitor=h5readatt(obj.fullpath, '/data/input.00/psupply','geomcapacitor'); obj.psupply.nbhdt=h5readatt(obj.fullpath, '/data/input.00/psupply','nbhdt'); obj.psupply.biases=h5read(obj.fullpath, '/data/var0d/biases'); obj.psupply.current=h5read(obj.fullpath, '/data/var0d/current'); obj.psupply.tau=obj.psupply.PSresistor*obj.psupply.geomcapacitor*obj.psupply.expdens/obj.neutcol.neutdens; obj.psupply.active=true; obj.psupply.bdpos=h5read(obj.fullpath, '/data/input.00/psupply/bdpos'); catch obj.psupply.active=false; end obj.species=h5parts.empty(obj.nbspecies,0); % Read the main particles parameters if(readparts) obj.species(1)=h5parts(obj.fullpath,'/data/part',obj,obj.normalized); if(obj.nbspecies >1) for i=2:obj.nbspecies obj.species(i)=h5parts(obj.fullpath,sprintf('/data/part/%2d',i),obj,true); try obj.species_moments(i-1).N=splinedensity(obj.fullpath, sprintf('/data/part/%2d/moments',i), obj.knotsr, obj.knotsz, obj.femorder, obj.CellVol, 1, geomweight, 1); obj.species_moments(i-1).fluidUR=splinevelocity(obj.fullpath, sprintf('/data/part/%2d/moments',i), obj.knotsr, obj.knotsz, obj.femorder, obj.vnorm, geomweight, 2); obj.species_moments(i-1).fluidUTHET=splinevelocity(obj.fullpath, sprintf('/data/part/%2d/moments',i), obj.knotsr, obj.knotsz, obj.femorder, obj.vnorm, geomweight, 3); obj.species_moments(i-1).fluidUZ=splinevelocity(obj.fullpath, sprintf('/data/part/%2d/moments',i), obj.knotsr, obj.knotsz, obj.femorder, obj.vnorm, geomweight, 4); catch % No moments stored obj.species_moments(i-1)=0; end end end end try obj.tpart = h5read(obj.fullpath,'/data/part/time'); obj.nbparts = h5read(obj.fullpath,'/data/part/Nparts'); catch obj.nbparts=obj.npart; obj.tpart=obj.dt*(0:size(obj.species(1).R,2)-1)*double(obj.it2); end if(obj.nbcelldiag > 0) obj.celldiag=h5parts.empty; j=0; for i=1:obj.nbcelldiag nbparts=h5read(obj.fullpath,sprintf('%s/Nparts',sprintf('/data/celldiag/%02d',i))); if (sum(nbparts)>0) j=j+1; obj.celldiag(j)=h5parts(obj.fullpath,sprintf('/data/celldiag/%02d',i),obj,true); obj.celldiag(j).rindex=double(h5readatt(obj.fullpath, sprintf('/data/celldiag/%02d',i),'rindex'))+(1:2); obj.celldiag(j).zindex=double(h5readatt(obj.fullpath, sprintf('/data/celldiag/%02d',i),'zindex'))+(1:2); end end end end %------------------------------------------ % Functions for accesing secondary simulation quantities function Atheta=Atheta(obj,R,Z) %% returns the magnetic vector potential at position R,Z interpolated from stored Athet in h5 file % halflz=(obj.zgrid(end)+obj.zgrid(1))/2; % Atheta=0.5*obj.B0*(R-obj.width/pi*(obj.Rcurv-1)/(obj.Rcurv+1)... % .*besseli(1,2*pi*R/obj.width).*cos(2*pi*(Z-halflz)/obj.width)); Atheta=interp2(obj.rgrid,obj.zgrid,obj.Athet,R,Z,'spline'); end function quantity=H(obj,indices) %% computes the total energy for the main specie % for the particle with index indices{1} at timepart step indices{2} % which is time obj.timepart(indices{2}) if strcmp(indices{1},':') p=1:obj.species(1).VR.nparts;% if nothing is defined we load all particles else p=indices{1}; end if strcmp(indices{2},':') t=1:length(obj.tpart); %if nothing is defined all time steps are considered else t=indices{2}; end % if track is true we look at specific particles with their % index and follow them in time % if it is false we just care about the distribution function % and specific particles can have different positions in the % resulting array for each timestep if size(indices,1)>2 track=indices{3}; else track=false; end quantity=0.5*obj.me*(obj.species(1).VR(p,t,track).^2+obj.species(1).VTHET(p,t,track).^2+obj.species(1).VZ(p,t,track).^2)+obj.species(1).partepot(p,t,track); end function quantity=P(obj,indices) %P computes the canonical angular momentum for the main specie % for the particle with index indices{1} at timepart step indices{2} % which is time obj.timepart(indices{2}) if strcmp(indices{1},':') p=1:obj.species(1).R.nparts; else p=indices{1}; end if strcmp(indices{2},':') t=1:length(obj.tpart); else t=indices{2}; end % if track is true we look at specific particles with their % index and follow them in time % if it is false we just care about the distribution function % and specific particles can have different positions in the % resulting array for each timestep if size(indices,1)>2 track=indices{3}; else track=false; end quantity=obj.species(1).R(p,t,track).*(obj.species(1).VTHET(p,t,track)*obj.me+sign(obj.qsim)*obj.qe*obj.Atheta(obj.species(1).R(p,t,track),obj.species(1).Z(p,t,track))); end function quantity=Vpar(obj,varargin) %Vpar Computes the parallel velocity for the main specie % for the particle with index indices{1} at timepart step indices{2} % which is time obj.timepart(indices{2}) if(~iscell(varargin)) indices=mat2cell(varargin); else indices=varargin; end if strcmp(indices{1},':') p=1:obj.species(1).R.nparts; else p=indices{1}; end if strcmp(indices{2},':') t=1:length(obj.tpart); else t=indices{2}; end % if track is true we look at specific particles with their % index and follow them in time % if it is false we just care about the distribution function % and specific particles can have different positions in the % resulting array for each timestep if size(indices,1)>2 track=indices{3}; else track=false; end Zp=obj.species(1).Z(p,t,track);% get the particle axial positon Rp=obj.species(1).R(p,t,track);% get the particle radial position % interpolate the magnetic field at the particle position Bzp=interp2(obj.zgrid,obj.rgrid,obj.Bz',Zp,Rp,'makima'); Brp=interp2(obj.zgrid,obj.rgrid,obj.Br',Zp,Rp,'makima'); Bp=sqrt(Bzp.^2+Brp.^2); % calculate the projection angle of the radial and axial % directions on the magnetic field line Costhet=Bzp./Bp; Sinthet=Brp./Bp; % calculate the actuale parallel velocity quantity=obj.species(1).VR(p,t,track).*Sinthet+obj.species(1).VZ(p,t,track).*Costhet; end function quantity=Vperp(obj,varargin) %Vperp Computes the perpendicular velocity in the guidind center reference frame, % for the main specie particle indices{1} at time indices{2} if(~iscell(varargin)) indices=mat2cell(varargin); else indices=varargin; end if strcmp(indices{1},':') p=1:obj.species(1).R.nparts; else p=indices{1}; end if strcmp(indices{2},':') t=1:length(obj.tpart); else t=indices{2}; end % if track is true we look at specific particles with their % index and follow them in time % if it is false we just care about the distribution function % and specific particles can have different positions in the % resulting array for each timestep if size(indices,2)>2 track=indices{3}; else track=false; end % if gcs is true, gives the perpendicular velocity in the % guiding center system by substracting the EXB azimuthal % velocity % else gives the total perpendicular velocity if size(indices,2)>3 gcs=indices{4}; else gcs=false; end % get the particle position Zp=obj.species(1).Z(p,t,track); Rp=obj.species(1).R(p,t,track); % interpolate the magnetic field at the particle position Bzp=interp2(obj.zgrid,obj.rgrid,obj.Bz',Zp,Rp,'makima'); Brp=interp2(obj.zgrid,obj.rgrid,obj.Br',Zp,Rp,'makima'); Bp=sqrt(Bzp.^2+Brp.^2); % calculate the projecting angles Costhet=Bzp./Bp; Sinthet=Brp./Bp; Vdrift=zeros(size(Zp)); if gcs % for each particle and each timestep % calculate the azimuthal ExB drift velocity for j=1:length(t) [~, tfield]=min(abs(obj.t2d-obj.tpart(t(j)))); timeEr=obj.Er(:,:,tfield); timeEz=obj.Ez(:,:,tfield); %posindE=sub2ind(size(timeEr),Rind(:,j),Zind(:,j)); timeErp=interp2(obj.zgrid,obj.rgrid,timeEr,Zp(:,j),Rp(:,j)); timeEzp=interp2(obj.zgrid,obj.rgrid,timeEz,Zp(:,j),Rp(:,j)); Vdrift(:,j)=(timeEzp.*Brp(:,j)-timeErp.*Bzp(:,j))./Bp(:,j).^2; end end % calculate the perpendicular velocity quantity=sqrt((obj.species(1).VTHET(p,t,track)-Vdrift).^2+(obj.species(1).VR(p,t,track).*Costhet-obj.species(1).VZ(p,t,track).*Sinthet).^2); end function quantity=cyclphase(obj,varargin) %cyclphase Computes the cyclotronic phase for the main specie % for particles with indices{1} at time indices{2} if(~iscell(varargin)) indices=mat2cell(varargin); else indices=varargin; end if strcmp(indices{1},':') p=1:obj.species(1).R.nparts; else p=indices{1}; end if strcmp(indices{2},':') t=1:length(obj.tpart); else t=indices{2}; end % if track is true we look at specific particles with their % index and follow them in time % if it is false we just care about the distribution function % and specific particles can have different positions in the % resulting array for each timestep if size(indices,2)>2 track=indices{3}; else track=false; end Zp=obj.species(1).Z(p,t,track); Rp=obj.species(1).R(p,t,track); % [~, zind(1)]=min(abs(obj.zgrid-0.005262)); % [~, zind(2)]=min(abs(obj.zgrid-0.006637)); % [~, rind(1)]=min(abs(obj.rgrid-0.0784)); % [~, rind(2)]=min(abs(obj.rgrid-0.07861)); % indices=Zp=obj.zgrid(zind(1)) &... % Rp=obj.rgrid(rind(1)); %Zp=Zp(indices); %Rp=Rp(indices); %p=indices; Bzp=interp2(obj.zgrid,obj.rgrid,obj.Bz',Zp,Rp,'makima'); Brp=interp2(obj.zgrid,obj.rgrid,obj.Br',Zp,Rp,'makima'); Bp=sqrt(Bzp.^2+Brp.^2); Costhet=Bzp./Bp; Sinthet=Brp./Bp; % compute the projection of the perpendicular velocity in the % radial direction vr=(obj.species(1).VR(p,t,track).*Costhet-obj.species(1).VZ(p,t,track).*Sinthet); % Get the perpendicular velocity vperp=obj.Vperp(p,t,track,true); vr=vr(indices); vperp=vperp(indices); cospsi=vr./vperp; quantity=acos(cospsi); end function p=borderpoints(obj,subdiv) %borderpoints Return a cell array containing the curves %defining the boundary of the domain % for each boundary p(1,:) and p(2,:) give axial and radial position % for each boundary p(3,:) and p(4,:) give axial and radial normals %gw= contourc(obj.zgrid,obj.rgrid,obj.geomweight(:,:,1),[0 0]) p=cell(0,0); if nargin<2 subdiv=1; end ndiv=sum(subdiv); %outer cylinder if any(obj.geomweight(end,:,1)>=0) idp=ceil(length(obj.zgrid)/ndiv); imin=1; for j=1:length(subdiv) imax=min(imin+subdiv(j)*idp-1,length(obj.zgrid)); p{end+1}=[obj.zgrid(imin:imax)';obj.rgrid(end)*ones(imax-imin+1,1)'; zeros(imax-imin+1,1)';ones(imax-imin+1,1)']; imin=imax; end end %inner cylinder if any(obj.geomweight(1,:,1)>=0) idp=ceil(length(obj.zgrid)/ndiv); imin=1; for j=1:length(subdiv) imax=min(imin+subdiv(j)*idp-1,length(obj.zgrid)); p{end+1}=[obj.zgrid(imin:imax)';obj.rgrid(1)*ones(imax-imin+1,1)'; zeros(imax-imin+1,1)';-ones(imax-imin+1,1)']; imin=imax; end end if obj.walltype==2 % We have an elliptic insert that we want to isolate gw=obj.ellipseborder; zpos=obj.zgrid(obj.zgrid<(min(gw(1,:))) | obj.zgrid>(max(gw(1,:)))); p{2}=[zpos,obj.rgrid(end)*ones(size(zpos))]'; p{1}=[obj.zgrid';obj.rgrid(1)*ones(size(obj.zgrid))']; gw=obj.ellipseborder; p{3}=gw; elseif obj.walltype==9 % extract all the walls gw=contourc(obj.zgrid,obj.rgrid,obj.geomweight(:,:,1),[0 0]); [x,y,~]=C2xyz(gw); for i=1:obj.spl_bound.nbsplines %subdiv=[4,1,2]; if( obj.spl_bound.boundary(i).type>1) continue end s=linspace(obj.spl_bound.boundary(i).knots(1),obj.spl_bound.boundary(i).knots(end),5*length(obj.spl_bound.boundary(i).knots)); positions=fnval(obj.spl_bound.boundary(i).fun,s); ndiv=sum(subdiv); idp=ceil(size(positions,2)/ndiv); imin=1; for j=1:length(subdiv) imax=min(imin+subdiv(j)*idp-1,size(positions,2)); p{end+1}=[positions(1,imin:imax);positions(2,imin:imax)]; imin=imax; end end elseif obj.walltype~=0 % extract all the walls gw=contourc(obj.zgrid,obj.rgrid,obj.geomweight(:,:,1),[0 0]); [x,y,~]=C2xyz(gw); for i=1:length(x) %subdiv=[4,1,2]; ndiv=sum(subdiv); idp=ceil(length(x{i})/ndiv); imin=1; for j=1:length(subdiv) imax=min(imin+subdiv(j)*idp-1,length(x{i})); p{end+1}=[x{i}(imin:imax);y{i}(imin:imax)]; imin=imax; end end end % figure % for i=1:length(p) % plot(p{i}(1,:),p{i}(2,:)) % hold on % end end function p=ellipseborder(obj) %ellipseborder returns the boundary points defining the %elliptic insert z=linspace(-0.998,0.998,600)*obj.z_r; p=zeros(4,length(z)); for i=1:length(z) p(1,i)=z(i)+obj.z_0; p(2,i)=obj.r_0-obj.r_r*sqrt(1-(z(i)/obj.z_r)^2); p(3,i)=2/(obj.z_r^2)*(z(i)); p(4,i)=2/(obj.r_r^2)*(p(2,i)-obj.r_0); end norm=sqrt(p(3,:).^2+p(4,:).^2); p(3,:)=double(obj.interior)*p(3,:)./norm; p(4,:)=double(obj.interior)*p(4,:)./norm; end function charge=totcharge(obj,fieldstep) % Integrates the density profile over the full volume to obtain % the total number of electrons in the volume n=splinedensity(obj.fullpath, '/data/fields/moments', obj.knotsr, obj.knotsz, obj.femorder,ones(size(obj.CellVol)), 1, 1); charge=sum(sum(n(:,:,fieldstep))); end function Gamma=Axialflux(obj,timestep,zpos, species_id) if nargin <4 species_id=1; end % Computes the axial particle flux n*Uz at timestep timestep and axial position zpos if species_id ==1 Gamma=obj.fluidUZ(:,zpos,timestep).*obj.N(:,zpos,timestep); else Gamma=obj.species_moments.fluidUZ(:,zpos,timestep).*obj.species_moments.N(:,zpos,timestep); end end function Gamma=Metallicflux(obj,timestep,subdiv) % Computes the particle flux at time obj.t2d(timestep) on the % metallic boundaries if nargin<3 subdiv=1; end % We find the borderpoints p=obj.borderpoints(subdiv); gamma=cell(size(p)); Nr=cell(size(p)); Nz=cell(size(p)); for i=1:length(p) bp=p{i}; if size(bp,1)==2 % We get the normals at these positions and normalise them Nr{i}=-interp2(obj.zgrid,obj.rgrid,obj.geomweight(:,:,3),bp(1,:),bp(2,:),'linear',0); Nz{i}=-interp2(obj.zgrid,obj.rgrid,obj.geomweight(:,:,2),bp(1,:),bp(2,:),'linear',0); norm=sqrt(Nr{i}.^2+Nz{i}.^2); norm(norm==0)=1; norm(isnan(norm))=1; Nr{i}=Nr{i}./norm; Nz{i}=Nz{i}./norm; else Nr{i}=bp(4,:); Nz{i}=bp(3,:); end gamma{i}=zeros(size(bp,2),length(timestep)); end [z,r]=ndgrid(obj.zgrid,obj.rgrid); N=obj.N(:,:,timestep(1)); n=griddedInterpolant(z,r,N'); % choose as function of species # (dep espece) uz=griddedInterpolant(z,r,obj.fluidUZ(:,:,timestep(1))'); ur=griddedInterpolant(z,r,obj.fluidUR(:,:,timestep(1))'); % we get the density and fluid velocities at the desired time % steps and interpolate them at the boundary position for j=1:length(timestep) n.Values=obj.N(:,:,timestep(j))'; % dependence esp %n.Values(obj.geomweight(:,:,1)<=0)=0; uz.Values=obj.fluidUZ(:,:,timestep(j))'; %uz.Values(obj.geomweight(:,:,1)<=0)=0; ur.Values=obj.fluidUR(:,:,timestep(j))'; %ur.Values(obj.geomweight(:,:,1)<=0)=0; for i=1:length(p) bp=p{i}; gamma{i}(:,j)=n(bp(1:2,:)').*(ur(bp(1:2,:)').*Nr{i}'+uz(bp(1:2,:)').*Nz{i}'); end end % return the boundary position p and the corresponding flux % gamma Gamma.p=p; Gamma.gamma=gamma; end function gamma_species = MetallicFlux_species(obj,timestep,subdiv) % Computes the particle flux at time obj.t2d(timestep) on the % metallic boundaries for species 2, supposedly the ions if nargin<3 subdiv=1; end % We find the borderpoints p=obj.borderpoints(subdiv); gamma=cell(size(p)); Nr=cell(size(p)); Nz=cell(size(p)); for i=1:length(p) bp=p{i}; if size(bp,1)==2 % We get the normals at these positions and normalise them - Nr{i}=-interp2(obj.zgrid,obj.rgrid,obj.geomweight(:,:,3),bp(1,:),bp(2,:)); - Nz{i}=-interp2(obj.zgrid,obj.rgrid,obj.geomweight(:,:,2),bp(1,:),bp(2,:)); + Nr{i}=-interp2(obj.zgrid,obj.rgrid,obj.geomweight(:,:,3),bp(1,:),bp(2,:),'linear',0); + Nz{i}=-interp2(obj.zgrid,obj.rgrid,obj.geomweight(:,:,2),bp(1,:),bp(2,:),'linear',0); norm=sqrt(Nr{i}.^2+Nz{i}.^2); + norm(norm==0)=1; + norm(isnan(norm))=1; Nr{i}=Nr{i}./norm; Nz{i}=Nz{i}./norm; else Nr{i}=bp(4,:); Nz{i}=bp(3,:); end gamma{i}=zeros(size(bp,2),length(timestep)); end [z,r]=ndgrid(obj.zgrid,obj.rgrid); - N=obj.species_moments.N; - N = N(:,:,timestep(1)); + N=obj.species_moments.N(:,:,timestep(1)); n=griddedInterpolant(z,r,N'); % choose as function of species # (dep espece) uz=griddedInterpolant(z,r,obj.species_moments.fluidUZ(:,:,timestep(1))'); ur=griddedInterpolant(z,r,obj.species_moments.fluidUR(:,:,timestep(1))'); % we get the density and fluid velocities at the desired time % steps and interpolate them at the boundary position for j=1:length(timestep) n.Values=obj.species_moments.N(:,:,timestep(j))'; % dependence esp uz.Values=obj.species_moments.fluidUZ(:,:,timestep(j))'; ur.Values=obj.species_moments.fluidUR(:,:,timestep(j))'; for i=1:length(p) bp=p{i}; gamma{i}(:,j)=n(bp(1:2,:)').*(ur(bp(1:2,:)').*Nr{i}'+uz(bp(1:2,:)').*Nz{i}'); end end % return the boundary position p and the corresponding flux % gamma gamma_species.p=p; gamma_species.gamma=gamma; end % function [I, pos]=OutCurrents_species(obj,timestep, subdiv) % % Computes the Outgoing currens at the simulation axial boundaries at timestep timestep % % This is simply the surface integral of the axial flux % if nargin<3 % subdiv=1; % end % flux=obj.Axialflux(timestep,[1 obj.nz+1],2); % Iz=squeeze(trapz(obj.species(1).rgrid,flux.*obj.species(1).rgrid)*2*pi*obj.species.q); % Iz(1,:)=-Iz(1,:); % gamm=obj.MetallicFlux_species(timestep, subdiv); % qe = obj.species.q; % % OK TILL HERE % % c=mflux.gamma{i}'*qe/(100^2)/P; % Im=zeros(length(gamm.p),length(timestep)); % pos=cell(size(gamm.p)); % % for i=1:length(gamm.p) % p=gamm.p{i}; % pos{i}=p; % flux=gamm.gamma{i}'*obj.species.q; % for j=1:length(timestep) % % Im(i,j)=pi/2*sum((p(2,1:end-1)+p(2,2:end)).*(flux(2:end,j)+flux(1:end-1,j))'... % % .*sqrt((p(1,2:end)-p(1,1:end-1)).^2+(p(2,2:end)-p(2,1:end-1)).^2)); % % %AxialDensity = flux(j,:).*sqrt(p(1,:).^2 + p(2,:).^2); % AxialDensity = flux(j,:).* p(2,:); % Im(i,j) = 2*pi*trapz(p(1,~isnan(AxialDensity)),AxialDensity(~isnan(AxialDensity))); % end % end % I=cat(1,Iz,Im); % end function [I, pos]=OutCurrents(obj,timestep, subdiv) % Computes the Outgoing currens at the simulation axial boundaries at timestep timestep % This is simply the surface integral of the axial flux if nargin<3 subdiv=1; end flux=obj.Axialflux(timestep,[1 obj.nz+1]); Iz=squeeze(trapz(obj.rgrid,flux.*obj.rgrid)*2*pi*obj.qsim/obj.weight); Iz(1,:)=-Iz(1,:); gamm=obj.Metallicflux(timestep, subdiv); Im=zeros(length(gamm.p),length(timestep)); pos=cell(size(gamm.p)); for i=1:length(gamm.p) p=gamm.p{i}; pos{i}=p; flux=gamm.gamma{i}'; for j=1:length(timestep) Im(i,j)=pi/2*sum((p(2,1:end-1)+p(2,2:end)).*(flux(j,2:end)+flux(j,1:end-1))... .*sqrt((p(1,2:end)-p(1,1:end-1)).^2+(p(2,2:end)-p(2,1:end-1)).^2)); %AxialDensity = flux(j,:).* p(2,:); %Im(i,j) = 2*pi*trapz(p(1,:),AxialDensity); end end I=-cat(1,Iz,Im*obj.qsim/obj.weight); end % % function [I, pos]=OutCurrents(obj,timestep, subdiv) % % Computes the Outgoing currens at the simulation axial boundaries at timestep timestep % % This is simply the surface integral of the axial flux for % % ions % if nargin<3 % subdiv=1; % end % qe = obj.qsim/obj.weight; % electrons charge % flux=obj.Axialflux(timestep,[1 obj.nz+1]); % Iz=squeeze(trapz(obj.rgrid,flux.*obj.rgrid)*2*pi*qe); % Iz(1,:)=-Iz(1,:); % % mflux = obj.Metallicflux(timestep,subdiv); % Im=zeros(length(mflux.p),length(timestep)); % pos=cell(size(mflux.p)); % % for ii =1:length(mflux.gamma) % pos{ii}=mflux.p{ii}; % p=mflux.p{ii}; % for jj = 1:length(timestep) % % flux = qe*mflux.gamma{ii}(:,jj)'.*mflux.p{ii}(2,:); % Im(ii,jj) = 2*pi*trapz(mflux.p{ii}(1,~isnan(flux)), flux(~isnan(flux))); % %Im(ii,jj)=pi/2*sum((p(2,1:end-1)+p(2,2:end)).*(flux(jj,2:end)+flux(jj,1:end-1))... % %.*sqrt((p(1,2:end)-p(1,1:end-1)).^2+(p(2,2:end)-p(2,1:end-1)).^2)); % end % end % % I=-cat(1,Iz,Im); % end function [I, pos]=OutCurrents_species(obj,timestep, subdiv) % Computes the Outgoing currens at the simulation axial boundaries at timestep timestep % This is simply the surface integral of the axial flux for % ions if nargin<3 subdiv=1; end flux=obj.Axialflux(timestep,[1 obj.nz+1],2); - Iz=squeeze(trapz(obj.species(1).rgrid,flux.*obj.species(1).rgrid)*2*pi*obj.species.q); + Iz=squeeze(trapz(obj.species(2).rgrid,flux.*obj.species(2).rgrid)*2*pi*obj.species(2).q); Iz(1,:)=-Iz(1,:); mflux = obj.MetallicFlux_species(timestep,subdiv); - qe = abs(obj.species.q); % ions charge + qe = abs(obj.species(2).q); % ions charge Im=zeros(length(mflux.p),length(timestep)); pos=cell(size(mflux.p)); - for ii =1:length(mflux.gamma) - pos{ii}=mflux.p{ii}; - for jj = 1:length(timestep) - - flux = qe*mflux.gamma{ii}(:,jj)'.*mflux.p{ii}(2,:); - Im(ii,jj) = 2*pi*trapz(mflux.p{ii}(1,~isnan(flux)), flux(~isnan(flux))); + for i=1:length(mflux.p) + p=mflux.p{i}; + pos{i}=p; + flux=mflux.gamma{i}'; + for j=1:length(timestep) + Im(i,j)=pi/2*sum((p(2,1:end-1)+p(2,2:end)).*(flux(j,2:end)+flux(j,1:end-1))... + .*sqrt((p(1,2:end)-p(1,1:end-1)).^2+(p(2,2:end)-p(2,1:end-1)).^2)); + %AxialDensity = flux(j,:).* p(2,:); + %Im(i,j) = 2*pi*trapz(p(1,:),AxialDensity); end end - - I=cat(1,Iz,Im); + I=cat(1,Iz,Im*qe); +% for ii =1:length(mflux.gamma) +% pos{ii}=mflux.p{ii}; +% for jj = 1:length(timestep) +% +% flux = qe*mflux.gamma{ii}(:,jj)'.*mflux.p{ii}(2,:); +% Im(ii,jj) = 2*pi*trapz(mflux.p{ii}(1,~isnan(flux)), flux(~isnan(flux))); +% end +% end +% +% I=cat(1,Iz,Im); end function [pot] = PotentialWell(obj,fieldstep,fieldaligned) %PotentialWell Computes the potential well at the given timestep on the FEM grid points % interpolates the model data on rgrid and zgrid if nargin<3 fieldaligned=false; end model=obj.potentialwellmodel(fieldstep); z=model.z; modpot=model.pot; if fieldaligned r=model.rathet; lvls=linspace(min(obj.rAthet(:)),max(obj.rAthet(:)),400); [Zmesh,Rmesh]=meshgrid(obj.zgrid,lvls); else r=model.r; [Zmesh,Rmesh]=meshgrid(obj.zgrid,obj.rgrid); end pot=zeros(size(Zmesh,2),size(Zmesh,1),length(fieldstep)); for i=1:length(fieldstep) pot(:,:,i)=griddata(z,r,modpot(:,i),Zmesh,Rmesh)'; end end function Epar = Epar(obj,fieldstep) % Computes the electric field component parallel to the magnetic field line Epar=obj.Er(:,:,fieldstep).*(obj.Br./obj.B)' + (obj.Bz./obj.B)'.*obj.Ez(:,:,fieldstep); end function Eperp = Eperp(obj,fieldstep) % Computes the electric field component perpendicular to the magnetic field line Eperp=obj.Er(:,:,fieldstep).*(obj.Bz./obj.B)' - (obj.Br./obj.B)'.*obj.Ez(:,:,fieldstep); end function Ekin = Ekin(obj,varargin) %Ekin Computes the classical kinetic energy of particles indices{1} at % time obj.tpart(indices{2}) in Joules if(~iscell(varargin)) indices=mat2cell(varargin); else indices=varargin; end if strcmp(indices{1},':') p=1:obj.species(1).R.nparts; else p=indices{1}; end if strcmp(indices{2},':') t=1:length(obj.tpart); else t=indices{2}; end % if track is true we look at specific particles with their % index and follow them in time % if it is false we just care about the distribution function % and specific particles can have different positions in the % resulting array for each timestep if size(indices,1)>2 track=indices{3}; else track=false; end Vr=obj.species(1).VR(p,t,track); Vthet= obj.species(1).VTHET(p,t,track); Vz=obj.species(1).VZ(p,t,track); Ekin=0.5*obj.msim/obj.weight*(Vr.^2+Vthet.^2+Vz.^2); end function sig=sigio(obj,E,init) %sigio returns the total ionisation cross-section in m^2 % at energy E[eV] % init is only used during the loading of the h5 file if nargin <3 init=false; end sig=zeros(size(E)); if(~init &&( ~obj.neutcol.present || isempty(obj.neutcol.io_cross_sec))) sig=zeros(size(E)); return end for i=1:length(E(:)) if(E(i)>obj.neutcol.Eion) sig(ind2sub(size(E),i))=obj.fit_cross_sec(E(ind2sub(size(E),i)),obj.neutcol.io_cross_sec); end end end function sig=sigmio(obj,E) %sigmio returns the total ionisation cross-section for momentum exchange for the incoming electron in m^2 % at energy E[eV] sig=zeros(size(E)); if(~obj.neutcol.present || isempty(obj.neutcol.iom_cross_sec)) return end for i=1:length(E(:)) if(E(i)>obj.neutcol.Eion) sig(ind2sub(size(E),i))=obj.fit_cross_sec(E(ind2sub(size(E),i)),obj.neutcol.iom_cross_sec); end end end function sigm=sigmela(obj,E) %sigmela returns the elastic collision cross-section for momentum exchange for the incoming electron in m^2 % at energy E[eV] sigm=zeros(size(E)); if(~obj.neutcol.present || isempty(obj.neutcol.ela_cross_sec)) return end for i=1:length(E(:)) sigm(ind2sub(size(E),i))=obj.fit_cross_sec(E(ind2sub(size(E),i)),obj.neutcol.ela_cross_sec); end end function sig=sigela(obj,E) %sigmela returns the elastic collision cross-section for the incoming electron in m^2 % at energy E[eV] % if used this will give the frequency of elastic collisions E0=obj.neutcol.E0; chi=E./(0.25*E0+E); sig=(2*chi.^2)./((1-chi).*((1+chi).*log((1+chi)./(1-chi))-2*chi)).*obj.sigmela(E); end function [Forces, Density]=Forcespline(obj,it,fdens,getmean) %Forcespline calculates the fluid force terms in each direction %at time obj.t2d(it) % if fdens return the force density in N/m^3 othewise give % the force in N % if getmean return only the time averaged quanties over % time samples[it(1)...it(end] if strcmp(it,':') it=floor(0.95*size(obj.t2d)):size(obj.t2d)-1; end if nargin<3 fdens=true; end if nargin <4 getmean=false; end % To be able to calculate the centered finite difference in % time, we remove the first and last time indices it(it<2)=[]; it(it>length(obj.t2d)-1)=[]; m_e=obj.msim/obj.weight; q_e=obj.qsim/obj.weight; n=obj.N(:,:,it); [r,~]=meshgrid(obj.rgrid,obj.zgrid); Rinv=1./r'; Rinv(isinf(Rinv))=0; % get inverse of density to get the force in N Density.N=n; invn=1./n; invn(isnan(invn) | isinf(invn))=0; % Calculate electric forces Eforcer=q_e*obj.Er(:,:,it); Eforcez=q_e*obj.Ez(:,:,it); Dragforcer=zeros(size(n,1),size(n,2),size(n,3)); Dragforcethet=zeros(size(n,1),size(n,2),size(n,3)); Dragforcez=zeros(size(n,1),size(n,2),size(n,3)); time=obj.t2d(it); Forces.it=it; Forces.time=time; if getmean if ~fdens n=ones(size(n)); end % Electric forces Forces.Eforcer=mean(n.*q_e.*obj.Er(:,:,it),3); Forces.Eforcez=mean(n.*q_e.*obj.Ez(:,:,it),3); % Magnetic forces Forces.Bforcer=mean(q_e.*obj.fluidUTHET(:,:,it).*obj.Bz'.*n,3); Forces.Bforcethet=mean(q_e.*(obj.fluidUZ(:,:,it).*obj.Br'-obj.fluidUR(:,:,it).*obj.Bz').*n,3); Forces.Bforcez=mean(-q_e.*obj.fluidUTHET(:,:,it).*obj.Br'.*n,3); % Inertial forces Forces.inertforcer=mean(-m_e.*n.*(-obj.fluidUTHET(:,:,it).^2.*Rinv... +obj.fluidUR(:,:,it).*obj.fluidUR.der(:,:,it,[1 0])... +obj.fluidUZ(:,:,it).*obj.fluidUR.der(:,:,it,[0 1])),3); Forces.inertforcethet=mean(-m_e*n.*(obj.fluidUR(:,:,it).*obj.fluidUTHET(:,:,it).*Rinv... +obj.fluidUR(:,:,it).*obj.fluidUTHET.der(:,:,it,[1 0])... +obj.fluidUZ(:,:,it).*obj.fluidUTHET.der(:,:,it,[0 1])),3); Forces.inertforcez=mean(-m_e*n.*(obj.fluidUR(:,:,it).*obj.fluidUZ.der(:,:,it,[1 0])... +obj.fluidUZ(:,:,it).*obj.fluidUZ.der(:,:,it,[0 1])),3); % Pressure forces Forces.Pressforcer=mean(-n.*( squeeze(obj.Presstens.der(1,:,:,it,[1 0]))... + squeeze(obj.Presstens(1,:,:,it) - obj.Presstens(4,:,:,it)).*Rinv... + squeeze(obj.Presstens.der(3,:,:,it,[0 1])))... .*invn,3); Forces.Pressforcethet=mean(-n.*( squeeze(obj.Presstens.der(2,:,:,it,[1 0]))... + squeeze(obj.Presstens.der(5,:,:,it,[0 1])) ... + 2*squeeze(obj.Presstens(2,:,:,it)).*Rinv ... ).*invn,3); Forces.Pressforcez=mean(-n.*( squeeze(obj.Presstens.der(3,:,:,it,[1 0]))... + squeeze(obj.Presstens(3,:,:,it)).*Rinv... + squeeze(obj.Presstens.der(6,:,:,it,[0 1])) )... .*invn,3); % ellastic coll drag forces if( obj.neutcol.present) Ek=squeeze(obj.fluidEkin(1,:,:,it)+obj.fluidEkin(2,:,:,it)+obj.fluidEkin(3,:,:,it)); sigm=obj.sigmela(Ek/obj.qe)+obj.sigio(Ek/obj.qe)+obj.sigmio(Ek/obj.qe); dragfreq=obj.neutcol.neutdens.*sigm.*sqrt(2*obj.weight/obj.msim*Ek); Forces.Dragforcer=mean(-m_e*n.*dragfreq.*obj.fluidUR(:,:,it),3); Forces.Dragforcethet=mean(-m_e*n.*dragfreq.*obj.fluidUTHET(:,:,it),3); Forces.Dragforcez=mean(-m_e*n.*dragfreq.*obj.fluidUZ(:,:,it),3); else Forces.Dragforcer=0; Forces.Dragforcethet=0; Forces.Dragforcez=0; end % effective drag frequency due to the maxwellian source if( obj.maxwellsrce.present) dragfreqsrc=obj.maxwellsrce.frequency*obj.weight/(pi*diff(obj.maxwellsrce.zlim)*(obj.maxwellsrce.rlim(2)^2-obj.maxwellsrce.rlim(1)^2)).*invn; dragfreqsrc(isinf(dragfreqsrc))=0; Forces.Dragforcer=Forces.Dragforcer+mean(-n.*m_e.*dragfreqsrc.*obj.fluidUR(:,:,it),3); Forces.Dragforcethet=Forces.Dragforcethet+mean(-n.*m_e.*dragfreqsrc.*obj.fluidUTHET(:,:,it),3); Forces.Dragforcez=Forces.Dragforcez+mean(-n.*m_e.*dragfreqsrc.*obj.fluidUZ(:,:,it),3); end % Time derivative for fluid accelleration cdt=(obj.t2d(it+1)-obj.t2d(it-1)); cdt=reshape(cdt,1,1,[]); Forces.durdt=mean(m_e*(obj.fluidUR(:,:,it+1)-obj.fluidUR(:,:,it-1))./cdt,3); Forces.duthetdt=mean(m_e*(obj.fluidUTHET(:,:,it+1)-obj.fluidUTHET(:,:,it-1))./cdt,3); Forces.duzdt=mean(m_e*(obj.fluidUZ(:,:,it+1)-obj.fluidUZ(:,:,it-1))./cdt,3); else % Allocate memory Bforcer=zeros(size(n,1),size(n,2),size(n,3)); Bforcez=zeros(size(n,1),size(n,2),size(n,3)); Bforcethet=zeros(size(n,1),size(n,2),size(n,3)); inertforcer=zeros(size(n,1),size(n,2),size(n,3)); inertforcez=zeros(size(n,1),size(n,2),size(n,3)); inertforcethet=zeros(size(n,1),size(n,2),size(n,3)); Pressforcer=zeros(size(n,1),size(n,2),size(n,3)); Pressforcethet=zeros(size(n,1),size(n,2),size(n,3)); Pressforcez=zeros(size(n,1),size(n,2),size(n,3)); durdt=zeros(size(n,1),size(n,2),size(n,3)); duthetdt=zeros(size(n,1),size(n,2),size(n,3)); duzdt=zeros(size(n,1),size(n,2),size(n,3)); fluiduThet=obj.fluidUTHET(:,:,it); Density.fluiduThet=fluiduThet; for j=1:size(n,3) % Magnetic forces Bforcer(:,:,j)=q_e.*fluiduThet(:,:,j).*obj.Bz'; Bforcethet(:,:,j)=q_e.*(obj.fluidUZ(:,:,it(j)).*obj.Br'-obj.fluidUR(:,:,it(j)).*obj.Bz'); Bforcez(:,:,j)=-q_e.*fluiduThet(:,:,j).*obj.Br'; % Inertial forces inertforcer(:,:,j)=-m_e.*(-fluiduThet(:,:,j).^2.*Rinv... +obj.fluidUR(:,:,it(j)).*obj.fluidUR.der(:,:,it(j),[1 0])... +obj.fluidUZ(:,:,it(j)).*obj.fluidUR.der(:,:,it(j),[0 1])); inert1=obj.fluidUR(:,:,it(j)).*fluiduThet(:,:,j).*Rinv; inert2=obj.fluidUR(:,:,it(j)).*obj.fluidUTHET.der(:,:,it(j),[1 0]); inert3=obj.fluidUZ(:,:,it(j)).*obj.fluidUTHET.der(:,:,it(j),[0 1]); inertforcethet(:,:,j)=-m_e.*(inert1... +inert2... +inert3); inertforcez(:,:,j)=-m_e.*(obj.fluidUR(:,:,it(j)).*obj.fluidUZ.der(:,:,it(j),[1 0])... +obj.fluidUZ(:,:,it(j)).*obj.fluidUZ.der(:,:,it(j),[0 1])); % Pressure forces Pr1=squeeze(obj.Presstens.der(1,:,:,it(j),[1 0])); Pr2=squeeze(obj.Presstens(1,:,:,it(j)) - obj.Presstens(4,:,:,it(j))).*Rinv; Pr3=squeeze(obj.Presstens.der(3,:,:,it(j),[0 1])); Pressforcer(:,:,j)=-( Pr1... + Pr2... + Pr3 )... .*invn(:,:,j); Pthet1=squeeze(obj.Presstens.der(2,:,:,it(j),[1 0])); Pthet2=squeeze(obj.Presstens.der(5,:,:,it(j),[0 1])); Pthet3=2*squeeze(obj.Presstens(2,:,:,it(j))).*Rinv; Pressforcethet(:,:,j)=-( Pthet1... + Pthet2 ... + Pthet3 ... ).*invn(:,:,j); Pz1=squeeze(obj.Presstens.der(3,:,:,it(j),[1 0])); Pz2=squeeze(obj.Presstens(3,:,:,it(j))).*Rinv; Pz3=squeeze(obj.Presstens.der(6,:,:,it(j),[0 1])); Pressforcez(:,:,j)=-( Pz1... + Pz2... + Pz3 )... .*invn(:,:,j); % ellastic coll drag forces if( obj.neutcol.present) Ek=squeeze(obj.fluidEkin(1,:,:,it(j))+obj.fluidEkin(2,:,:,it(j))+obj.fluidEkin(3,:,:,it(j))); sigm=obj.sigmela(Ek/obj.qe)+obj.sigio(Ek/obj.qe)+obj.sigmio(Ek/obj.qe); dragfreq=obj.neutcol.neutdens.*sigm.*sqrt(2*obj.weight/obj.msim*Ek); Dragforcer(:,:,j)=-m_e*dragfreq.*obj.fluidUR(:,:,it(j)); Dragforcethet(:,:,j)=-m_e*dragfreq.*obj.fluidUTHET(:,:,it(j)); Dragforcez(:,:,j)=-m_e*dragfreq.*obj.fluidUZ(:,:,it(j)); end % effective drag frequency due to the maxwellian source if( obj.maxwellsrce.present) dragfreqsrc=obj.maxwellsrce.frequency*obj.weight/(pi*diff(obj.maxwellsrce.zlim)*(obj.maxwellsrce.rlim(2)^2-obj.maxwellsrce.rlim(1)^2))*invn(:,:,j); dragfreqsrc(isinf(dragfreqsrc))=0; Dragforcer(:,:,j)=Dragforcer(:,:,j)+-m_e*dragfreqsrc.*obj.fluidUR(:,:,it(j)); Dragforcethet(:,:,j)=Dragforcethet(:,:,j)+-m_e*dragfreqsrc.*obj.fluidUTHET(:,:,it(j)); Dragforcez(:,:,j)=Dragforcez(:,:,j)+-m_e*dragfreqsrc.*obj.fluidUZ(:,:,it(j)); end % Time derivative cdt=(obj.t2d(it(j)+1)-obj.t2d(it(j)-1)); durdt(:,:,j)=m_e*(obj.fluidUR(:,:,it(j)+1)-obj.fluidUR(:,:,it(j)-1))/cdt; duthetdt(:,:,j)=m_e*(obj.fluidUTHET(:,:,it(j)+1)-obj.fluidUTHET(:,:,it(j)-1))/cdt; duzdt(:,:,j)=m_e*(obj.fluidUZ(:,:,it(j)+1)-obj.fluidUZ(:,:,it(j)-1))/cdt; end if(~fdens) Forces.Eforcer=Eforcer; Forces.Eforcez=Eforcez; Forces.Bforcer=Bforcer; Forces.Bforcethet=Bforcethet; Forces.Bforcez=Bforcez; Forces.inertforcer=inertforcer; Forces.inertforcethet=inertforcethet; Forces.inertforcez=inertforcez; Forces.Pressforcer=Pressforcer; Forces.Pressforcethet=Pressforcethet; Forces.Pressforcez=Pressforcez; Forces.durdt=durdt; Forces.duthetdt=duthetdt; Forces.duzdt=duzdt; Forces.Dragforcer=Dragforcer; Forces.Dragforcethet=Dragforcethet; Forces.Dragforcez=Dragforcez; else % multiply by density to have force density Forces.Eforcer=Eforcer.*n; Forces.Eforcez=Eforcez.*n; Forces.Bforcer=Bforcer.*n; Forces.Bforcethet=Bforcethet.*n; Forces.Bforcez=Bforcez.*n; Forces.inertforcer=inertforcer.*n; Forces.inertforcethet=inertforcethet.*n; Forces.inertforcez=inertforcez.*n; Forces.Pressforcer=Pressforcer.*n; Forces.Pressforcethet=Pressforcethet.*n; Forces.Pressforcez=Pressforcez.*n; Forces.durdt=durdt.*n; Forces.duthetdt=duthetdt.*n; Forces.duzdt=duzdt.*n; Forces.Dragforcer=Dragforcer.*n; Forces.Dragforcethet=Dragforcethet.*n; Forces.Dragforcez=Dragforcez.*n; end end end function [lr,rb,lz,zb]= clouddims(obj,it,zpos,fracn) % clouddims return the cloud axial and radial limit at time it % and axial position zpos % fracn defines the fraction of the maximum density below which % we consider to have a vacuum if nargin<4 fracn=0.1; end % get the density n=obj.N(:,:,it); lr=cell(1,length(it)); lz=lr; rb=lr; zb=rb; for i=1:size(n,3) nthresh=fracn*max(max(n(:,:,i))); % find the points outside of the cloud outside=find(n(:,zpos,i)2) rmpos=outside(j); rppos=outside(j+1); lr{i}(k)=obj.rgrid(rppos-1)-obj.rgrid(rmpos+1); rb{i}(:,k)=[max(rmpos+1,1) min(rppos-1,sum(obj.nnr))]; k=k+1; end end maxgap=2; k=1; for I=rmpos+1:rppos-1 outside=find(n(I,:,i)maxgap) maxgap=zgap(j); zmpos=outside(j); zppos=outside(j+1); lz{i}(k)=obj.zgrid(zppos-1)-obj.zgrid(zmpos+1); zb{i}(:,k)=[max(zmpos+1,1) min(zppos-1,obj.nz)]; k=k+1; end end end end end function displaygeomweight(self) figure contourf(self.zgrid,self.rgrid,self.geomweight(:,:,1)) end %------------------------------------------ % Functions for plotting evolving quantities function line=displaysplbound(obj,ax,rescale,markers) %displaysplbound display on axis ax the boundary of the %simulation domain and the Dirichlet and Neumann walls defined %with spline curves if nargin<2 ax=gca; end if nargin<3 rescale=1; end if nargin<4 markers=true; end hold on for i=1:obj.spl_bound.nbsplines if(obj.spl_bound.boundary(i).type==0) %continue end knots=obj.spl_bound.boundary(i).knots(1:end); coeffs=obj.spl_bound.boundary(i).coefs'*rescale; pp=spmak(knots,coeffs); sizec=size(coeffs,2); order=length(knots)-sizec; s=linspace(knots(order),knots(sizec+1),max(200,3*length(knots))); fittedpos=fnval(pp,s); line=plot(fittedpos(1,:),fittedpos(2,:),'-','linewidth',2); %ine=plot(coeffs(1,:),coeffs(2,:),'-','linewidth',2); if markers plot(coeffs(1,:),coeffs(2,:),'rx','markersize',14) for j=1:size(coeffs,2) text(coeffs(1,j),coeffs(2,j),sprintf('%i',j),'fontsize',14) end end end end function displayraddim(obj,it,zpos,fracn) %displayraddim display the evolution of the radial dimension of the cloud in %time to find if the cloud size get below a critical radial %size at which the ionisation is not sufficient to compensate %the losses % also plot the well radial dimensions in time if nargin<3 zpos=floor(length(obj.zgrid)/2); end if nargin<4 fracn=0.1; end [lr,rb,lz,zb]=obj.clouddims(it,zpos,fracn); t=obj.t2d(it); Lr=zeros(size(lr)); er=obj.Er(:,:,it); r_min=Lr; r_minpred=r_min; well_r=Lr; nb=Lr; for i=1:length(lr) if ~isempty(lr{i}) && ~isempty(lz{i}) [Lr(i),id]=max(lr{i}); rm=rb{i}(1,id); rp=rb{i}(2,id); nb(i)=mean(obj.N(rm:rp,zpos,it(i))); Lp=min(lz{i}); Lm=mean(lz{i}); rpos=rm:rp; vperp=-er(rpos,zpos,i)./obj.Bz(zpos,rpos)'; Ek=0.5*obj.me*vperp.^2/obj.qe; sigio=obj.sigio(Ek); sigd=obj.sigmela(Ek)+obj.sigmio(Ek)+sigio; omegap2=obj.qe^2*obj.N(rpos,zpos,it(i))/obj.eps_0/obj.me; omegac2=(obj.qe*obj.Bz(zpos,rpos)'/obj.me).^2; ur=er(rpos,zpos,i)*obj.qe./((omegap2-omegac2)*obj.me).*sigd.*vperp*obj.neutcol.neutdens; r_minpred(i)=mean(obj.N(rp,zpos,it(i))*Lp*ur./(nb(i)*obj.neutcol.neutdens*sigio.*vperp*Lm));%mean(1./(-1/obj.rgrid(rm)+obj.neutcol.neutdens*sigio.*vperp./ur*(Lm/Lp)*nb(i)/obj.N(rp,zpos,it(i)))); rpos=rp; vperp=-er(rpos,zpos,i)./obj.Bz(zpos,rpos)'; Ek=0.5*obj.me*vperp.^2/obj.qe; sigio=obj.sigio(Ek); ur=obj.fluidUR(rpos,zpos,it(i)); r_min(i)=max(obj.N(rp,zpos,it(i))*Lp*ur/(nb(i)*obj.neutcol.neutdens*sigio.*vperp*Lm),0);%max(mean(1./(-1/obj.rgrid(rm)+obj.neutcol.neutdens*sigio.*vperp./ur*(Lm/Lp)*nb(i)/obj.N(rp,zpos,it(i)))),0); nb(i)=nb(i)*Lm*2*pi*obj.rgrid(rm)*Lr(i); else Lr(i)=NaN; r_min(i)=NaN; r_minpred(i)=NaN; end potwell=obj.PotentialWell(it(i))'; outside=find(isnan(potwell(:,zpos))); gap=diff(outside); for j=1:length(gap) if(gap(j)>2) rmpos=outside(j)+1; rppos=outside(j+1)-1; well_r(i)=obj.rgrid(rppos)-obj.rgrid(rmpos); end end end f=figure('Name', sprintf('%s rlims B=%f phi=%f',obj.name,obj.B0, (obj.potout-obj.potinn))); plot(t,Lr,'displayname','\Deltar_{cloud}','linewidth',1.3) hold on plot(t,r_min,'displayname','\Deltar_{min} (u_r simu)','linewidth',1.3) plot(t,r_minpred,'displayname','\Deltar_{min} (u_r pred)','linewidth',1.3) plot(t,well_r,'displayname','\Deltar_{well}','linewidth',1.3) ylabel('\Delta r [m]') yyaxis right plot(t,nb,'--','displayname','N') legend('location','eastoutside') xlabel('t [s]') ylabel('N') set(gca,'fontsize',12) yyaxis left ylimits=ylim; %ylim([ylimits(1) 1.1*max(Lr)]) title(sprintf('cloud radial limits at z=%1.2e[m]',obj.zgrid(zpos))) obj.savegraph(f,sprintf('%s/%s_%d_rlims',obj.folder,obj.name,zpos),[15 10]); end function displaypsi(obj,deltat) %% plot the initial and final radial profile at position z=0 and show the normalized enveloppe function Psi % relevant for Davidson annular distribution function f=figure('Name', sprintf('%s Psi',obj.name)); f.Name= sprintf('%s Psi',obj.name); zpos=floor(length(obj.zgrid)/2); tinit=1; tend=length(obj.t2d); if iscell(deltat) deltat=cell2mat(deltat); end if(obj.species(1).R.nt<2) h0=obj.H0; p0=obj.P0; else h0=mean(H(obj,{1:obj.species(1).VR.nparts,obj.species(1).VR.nt,false})); p0=mean(P(obj,{1:obj.species(1).VR.nparts,obj.species(1).VR.nt,false})); end lw=1.5; Mirrorratio=(obj.Rcurv-1)/(obj.Rcurv+1); locpot=mean(obj.pot(:,zpos,tend-deltat:tend),3); psi=1+obj.qe*locpot(:)/h0-1/(2*obj.me*h0)*(p0./obj.rgrid+obj.qe*0.5*obj.B0.*(obj.rgrid-obj.width/pi*Mirrorratio*cos(2*pi*obj.zgrid(zpos)/obj.width)*besseli(1,2*pi*obj.rgrid/obj.width))).^2; locdens=mean(obj.N(:,zpos,tend-deltat:tend),3); [maxn,In]=max(locdens);%M.N(:,zpos,tinit)); plot(obj.rgrid*1e3,obj.N(:,zpos,tinit),'b-','DisplayName',sprintf('t=%1.2f[ns]',obj.t2d(tinit)*1e9),'linewidth',lw) hold on plot(obj.rgrid*1e3,locdens,'r-','DisplayName',sprintf('t=[%1.2f-%1.2f] [ns] averaged',obj.t2d(tend-deltat)*1e9,obj.t2d(tend)*1e9),'linewidth',lw) %r0=0.005;% r0=obj.rgrid(In); %maxn=5e14; plot(obj.rgrid(In-5:end)*1e3,1./obj.rgrid(In-5:end)*r0*maxn,'--','DisplayName','n_{e,fit}=a/r','linewidth',lw) %plot(obj.rgrid(In-2:end),1./obj.rgrid(In-2:end).^2*maxn*obj.rgrid(In)^2,'DisplayName','N=c*1/r^2','linewidth',lw) %plot(obj.rgrid(In-2:end),1./obj.rgrid(In-2:end).^4*maxn*obj.rgrid(In)^4,'DisplayName','N=c*1/r^4','linewidth',lw) xlabel('r [mm]') ylabel('n_e [m^{-3}]') I=find(psi>0); if (length(I)>1) I=[I(1)-2; I(1)-1; I; I(end)+1; I(end)+2]; else I=obj.nnr(1):length(psi); end rq=linspace(obj.rgrid(max(I(1),1)),obj.rgrid(I(end)),500); psiinterp=interp1(obj.rgrid(I),psi(I),rq,'pchip'); zeroindices=find(diff(psiinterp>=0),2); maxpsiinterp=max(psiinterp); plot(rq*1e3,maxn*psiinterp/abs(maxpsiinterp),'--','Displayname','normalized \zeta [a.u.]','linewidth',lw) ylim([0 inf]); drawnow ylimits=ylim; for i=1:length(zeroindices) border=plot([rq(zeroindices(i)) rq(zeroindices(i))]*1e3,[0 1./obj.rgrid(In-5)*r0*maxn],'--','linewidth',lw,'Color',[.7 .7 .7]); set(get(get(border,'Annotation'),'LegendInformation'),'IconDisplayStyle','off'); end legend xlim([0 0.02]*1e3) grid on %title(sprintf('Radial density profile at z=%1.2e[m]',obj.zgrid(zpos))) set(gca,'fontsize',12) obj.savegraph(f,sprintf('%sPsi',obj.name),[15 10]); end function f=displayrprofile(obj,t,zpos,init) %% plot the initial and final radial profile at the axial center of the simulation space % also plot the azimuthal fluid rotation frequency profile % t: time index considered % zpos: axial position index % init: initial time considered for comparison f=figure('Name', sprintf('%s Prof',obj.name)); if nargin < 3 || length(zpos)<1 zpos=floor(length(obj.zgrid)/2); end if nargin<4 init=false; end if(iscell(t)) t=cell2mat(t); end lw=1.5; if init tinit=t(1); t=t(2:end); end locdens=mean(obj.N(:,zpos,t),3); %inverse of radius Rinv=1./obj.rgrid; Rinv(isnan(Rinv))=0; %azimuthal velocity and azimuthal rotation frequency in m/s and %1/s vthet=mean(obj.fluidUTHET(:,zpos,t),3); omegare=(vthet.*Rinv); % plot the initial density if(init) plot(obj.rgrid,obj.N(:,zpos,tinit),'bx-','DisplayName',sprintf('t=%1.2f[ns]',obj.t2d(tinit)*1e9),'linewidth',lw) end hold on %plot the time averaged current density plot(obj.rgrid,locdens,'rx-','DisplayName',sprintf('t=[%1.2f-%1.2f] [ns] averaged',obj.t2d(t(1))*1e9,obj.t2d(t(end))*1e9),'linewidth',lw) xlabel('r [m]') ylabel('n_e [m^{-3}]') legend('location','Northwest') % limit the axis to the simulation domain if obj.conformgeom xlim([obj.rgrid(1) obj.rgrid(sum(obj.nnr(1:2)))]) else xlim([obj.rgrid(1) obj.rgrid(end)]) end grid on ylimits=ylim(); % plot the metallic walls for a constant radius coaxial % configuration if obj.conformgeom plot(obj.rgrid(1)*[1 1],ylimits,'k--') plot(obj.rgrid(end)*[1 1],ylimits,'k--') else plot(obj.r_a*[1 1],ylimits,'k--') if obj.walltype==0 plot(obj.r_b*[1 1],ylimits,'k--') elseif obj.walltype==1 rmax=obj.r_0-obj.r_r*sqrt(1-(obj.zgrid(zpos)-obj.z_0)^2/obj.z_r^2); plot(rmax*[1 1],ylimits,'k--') end end yyaxis right % plot the azimuthal fluid rotation frequency profile plot(obj.rgrid,omegare,'DisplayName',sprintf('<\\omega_{re}> t=[%1.2f-%1.2f] [ns] averaged',obj.t2d(t(1))*1e9,obj.t2d(t(end))*1e9),'linewidth',lw) ylabel('\omega_{re} [1/s]') title(sprintf('Radial density profile at z=%1.2e[m]',obj.zgrid(zpos))) obj.savegraph(f,sprintf('%srProf',obj.name),[15 10]); end function displayenergy(obj) %% Plot the time evolution of the system energy and number of simulated macro particles tmin=2; tmax=length(obj.ekin); f=figure('Name', sprintf('%s Energy',obj.name)); subplot(1,2,1) semilogy(obj.t0d(tmin:tmax)*1e9,obj.ekin(tmin:tmax),'-',... obj.t0d(tmin:tmax)*1e9,obj.epot(tmin:tmax),':',... obj.t0d(tmin:tmax)*1e9,obj.etot(tmin:tmax),'-.', ... 'linewidth',4) obj.t0d(tmin:tmax)*1e9,obj.etot0(tmin:tmax),'--','linewidth',4) %obj.t0d(tmin:tmax),obj.ekin(tmin:tmax)-obj.epot(tmin:tmax),'--', legend('E_{kin}', 'E_{pot}', 'E_{tot}','E_{ref}','location','east') xlabel('Time [ns]') ylabel('Energies [J]') grid on xlim([obj.t0d(tmin) obj.t0d(tmax)]*1e9); xlimits=xlim(); %ylim([1e-7 1e-3]) set(gca,'fontsize',14) subplot(1,2,2) try semilogy(obj.t0d(tmin:tmax)*1e9,abs(obj.eerr(tmin:tmax)./obj.etot0(tmin:tmax)),'-','linewidth',1.5) catch semilogy(obj.t0d(tmin:tmax)*1e9,abs(obj.eerr(tmin:tmax)/obj.etot(2)),'-','linewidth',1.5) end hold on xlabel('Time [ns]') ylabel('Total energy relative error [-]') xlim(xlimits) grid on % try % yyaxis right % plot(obj.t0d(tmin:tmax),abs(obj.npart(tmin:tmax)./obj.npart(1)*100),'d--') % ylabel('Nparts %') % %ylim([0 110]) % catch % end ylimits=ylim; for i=1:length(obj.restarttimes) plot(obj.restarttimes(i)*[1 1]*1e9,ylimits,'k--') end set(gca,'fontsize',14) Position=f.Position; Position(3)=1.5*Position(3); f.Position=Position; obj.savegraph(f,sprintf('%s/%sEnergy',obj.folder,obj.name)); end function out=displaycharge(obj,scalet,f,linelegend) %% Plot the time evolution of the system charge of electrons % f: figure handle if you want to stack several such curves % on the same figure % linelegend: legend for this charge evolution tmin=1; tmax=length(obj.ekin); if nargin<2 scalet =false; end if nargin<3 f=figure('Name', sprintf('%s Charge',obj.name)); end if nargin<4 linelegend=''; end ax=f.CurrentAxes; if isempty(ax) ax=axes(f); end if scalet if obj.neutcol.present vexb0=(obj.Ez(:,:,1).*obj.Br'-obj.Er(:,:,1).*obj.Bz')./(obj.B'.^2); vexb0(obj.geomweight(:,:,1)<=0)=0; E=0.5*obj.msim/obj.weight*mean(abs(vexb0(:)))^2/obj.qe; taucol=1/(obj.neutcol.neutdens*mean(abs(vexb0(:)))*(obj.sigio(E)+obj.sigmela(E)+obj.sigmio(E))); try Sio_S=1e17*(obj.neutcol.neutdens*mean(abs(vexb0(:)))*obj.sigio(E))/(obj.maxwellsrce.frequency*obj.weight/(pi*(obj.maxwellsrce.rlim(2)^2-obj.maxwellsrce.rlim(1)^2)*diff(obj.maxwellsrce.zlim))) catch end tlabel='t/\tau_d [-]'; else taucol=2*pi/obj.omece; tlabel='t/\tau_ce [-]'; end else taucol=1e-9; tlabel='t [ns]'; end try plot(ax,obj.t0d(tmin:tmax)/taucol,abs(obj.npart(tmin:tmax)*obj.qsim),'linewidth',2,'displayname',linelegend) hold on ylabel(ax,'Total charge [C]') xlabel(ax,tlabel) grid on if(nargin>2) legend end set(ax,'fontsize',12) catch end if nargin < 2 obj.savegraph(f,sprintf('%s/%scharge',obj.folder,obj.name)); end out.time = obj.t0d(tmin:tmax)/taucol; out.charge = abs(obj.npart(tmin:tmax)*obj.qsim); end function displaySimParticles(obj) %% Plot the time evolution of the number of simulated markers in the main specie f=figure('Name', sprintf('%s Trapped particles',obj.name)); plot(obj.t0d,obj.npart,'linewidth',1.5) xlabel('t [s]') ylabel('N particles') set(gca,'fontsize',12) obj.savegraph(f,sprintf('%s/%sntrapped',obj.folder,obj.name),[10 12]); end function displayLarmorRad(obj,time2d) if nargin<2 time2d=length(obj.t2d); end % Plot the larmor radius for created particles with low energy % the larmor radius is calculated by considering that the % initial perpendicular velocity \approx the ExB velocity if time2d>0 Er=obj.Er(:,:,time2d); Ez=obj.Ez(:,:,time2d); else Er=obj.Erxt(:,:,1); Ez=obj.Ezxt(:,:,1); end rl=abs(obj.me/obj.qe*(-Er.*obj.Bz'+Ez.*obj.Br')./(obj.B.^3)'); figure rl(obj.geomweight(:,:,1)<0)=0; contourf(obj.zgrid,obj.rgrid,rl) hold on contour(obj.zgrid,obj.rgrid,obj.geomweight(:,:,1),[0 0],'r-','linewidth',3) if time2d>0 n=obj.N(:,:,time2d); maxN=max(n (:)); n=n/maxN*mean(rl(:)); contour(obj.zgrid,obj.rgrid,n,linspace(0,1,6)*mean(rl(:)),'r:','linewidth',3) end c=colorbar; xlabel('z [m]') ylabel('r [m]') c.Label.String='r_L [m]'; end function displayHP(obj,tstart) % Plot the histogramm of the total energy and canonical angular momentum at time tstart and % end time of the simulation over the full simulation space for the main specie if(iscell(tstart)) tstart=cell2mat(tstart); end if(obj.species(1).R.nt>=2) - tstart=obj.species(1).R.nt; + %tstart=obj.species(1).R.nt; f=figure('Name', sprintf('%s HP',obj.name)); legtext=sprintf("t=%2.1f - %2.1f [ns]",obj.tpart(tstart)*1e9,obj.tpart(end)*1e9); subplot(1,2,1) partsmax=min(obj.nbparts(end),obj.species(1).R.nparts); - Hloc=H(obj,{1:obj.nbparts(1),1,false}); - h1=histogram(Hloc,20,'BinLimits',[min(Hloc(:)) max(Hloc(:))],'DisplayName',sprintf("t=%2.3d [ns]",obj.tpart(1)*1e9)); + Hloc=H(obj,{1:obj.nbparts(tstart),tstart,false}); + h1=histogram(Hloc,20,'BinLimits',[min(Hloc(:)) max(Hloc(:))],'DisplayName',sprintf("t=%2.3d [ns]",obj.tpart(tstart)*1e9)); hold on Hloc=H(obj,{1:partsmax,obj.species(1).R.nt,false}); %,'Binwidth',h1.BinWidth h1=histogram(Hloc,20,'BinLimits',[min(Hloc(:)) max(Hloc(:))],'DisplayName',legtext); ylabel('counts') xlabel('H [J]') legend subplot(1,2,2) - Ploc=P(obj,{1:obj.nbparts(1),1,false}); - h2=histogram(Ploc,50,'BinLimits',[min(Ploc(:)) max(Ploc(:))],'DisplayName',sprintf("t=%2.3d [ns]",obj.tpart(1)*1e9)); + Ploc=P(obj,{1:obj.nbparts(tstart),tstart,false}); + h2=histogram(Ploc,50,'BinLimits',[min(Ploc(:)) max(Ploc(:))],'DisplayName',sprintf("t=%2.3d [ns]",obj.tpart(tstart)*1e9)); hold on Ploc=P(obj,{1:partsmax,obj.species(1).R.nt,false}); histogram(Ploc,50,'BinLimits',[min(Ploc(:)) max(Ploc(:))],'DisplayName',legtext); ylabel('counts') xlabel('P [kg\cdotm^2\cdots^{-1}]') %clear P %clear H legend %xlim([0.95*h2.BinLimits(1) 1.05*h2.BinLimits(2)]) obj.savegraph(f,sprintf('%s/%sParts_HP',obj.folder,obj.name)); end end function displayaveragetemp(obj) % Computes and show the particles average temperature as a function of time f=figure('Name',sprintf('%s potinn=%f part temperature',obj.name,obj.potinn)); vr2=obj.species(1).VR(:,:,false); vr2=mean(vr2.^2,1)-mean(vr2,1).^2; vz2=obj.species(1).VZ(:,:,false); vz2=mean(vz2.^2,1)-mean(vz2,1).^2; vthet2=obj.species(1).VTHET(:,:,false); vthet2=mean(vthet2.^2,1)-mean(vthet2,1).^2; plot(obj.tpart,0.5*obj.me*vr2/obj.qe,'displayname','T_r') hold on plot(obj.tpart,0.5*obj.me*vz2/obj.qe,'displayname','T_z') plot(obj.tpart,0.5*obj.me*vthet2/obj.qe,'displayname','T_{thet}') xlabel('time [s]') ylabel('T [eV]') title(sprintf('\\phi_a=%.1f kV \\phi_b=%.1f kV R=%.1f',obj.potinn/1e3,obj.potout/1e3,obj.Rcurv)) legend grid obj.savegraph(f,sprintf('%s/%s_partstemp',obj.folder,obj.name)); end function displayCurrentsevol(obj,timesteps,species_id) % Computes and display the time evolution of the outgoing currents on each domain boundary % at timesteps timesteps P=obj.neutcol.neutdens*obj.kb*300/100; if nargin<2 timesteps=1:length(obj.t2d); end if nargin<3 species_id=1; end if species_id ==1 currents=obj.OutCurrents(timesteps); currents = currents/P; else currents=obj.OutCurrents_species(timesteps); currents = currents/P; end f=figure('Name',sprintf('%s Currents',obj.name)); if(obj.B(1,1)>obj.B(end,1)) lname='HFS'; rname='LFS'; else lname='LFS'; rname='HFS'; end plot(obj.t2d(timesteps),currents(1,:),'Displayname',lname,'linewidth',1.8); hold on plot(obj.t2d(timesteps),currents(2,:),'Displayname',rname,'linewidth',1.8); plot(obj.t2d(timesteps),currents(3,:),'Displayname','outer cylinder','linewidth',1.8); plot(obj.t2d(timesteps),currents(4,:),'Displayname','inner cylinder','linewidth',1.8); if size(currents,1)>=5 - plot(obj.t2d(timesteps),currents(5,:),'Displayname','ellipse','linewidth',1.8); + for ii=5:size(currents,1) + plot(obj.t2d(timesteps),currents(ii,:),'Displayname',sprintf('metallic wall %i',ii),'linewidth',1.8); + end end legend('location','Northeast') xlabel('time [s]') ylabel('I [A/mbar]') grid on set(gca,'fontsize',12) title(sprintf('\\phi_b-\\phi_a=%.2g kV, R=%.1f',(obj.potout-obj.potinn)/1e3,obj.Rcurv)) obj.savegraph(f,sprintf('%s/%s_outCurrents',obj.folder,obj.name),[16 12]); end function displayChargeLossevol(obj,timesteps,toptitle,scalet,dens) % Computes and display the time evolution of the outgoing currents on each domain boundary % at time obj.t2d(timesteps) %scalet=true scales the time by the ellastic collision %frequency %dens = true plot the time evolution of the maximum electron %density in the simulation domain otherwise plot the total %number of electrons in the domain if nargin<2 timesteps=1:length(obj.t2d); end if nargin<4 scalet=true; end if nargin <5 dens=true; end if scalet if obj.neutcol.present vexb0=(obj.Ez(:,:,1).*obj.Br'-obj.Er(:,:,1).*obj.Bz')./(obj.B'.^2); vexb0(obj.geomweight(:,:,1)<=0)=0; E=0.5*obj.msim/obj.weight*mean(abs(vexb0(:)))^2/obj.qe; taucol=1/(obj.neutcol.neutdens*mean(abs(vexb0(:)))*(obj.sigio(E)+obj.sigmela(E)+obj.sigmio(E))); try Sio_S=1e17*(obj.neutcol.neutdens*mean(abs(vexb0(:)))*obj.sigio(E))/(obj.maxwellsrce.frequency*obj.weight/(pi*(obj.maxwellsrce.rlim(2)^2-obj.maxwellsrce.rlim(1)^2)*diff(obj.maxwellsrce.zlim))) catch end tlabel='t/\tau_d [-]'; else taucol=2*pi/obj.omece; tlabel='t/\tau_ce [-]'; end else taucol=1e-9; tlabel='t [ns]'; end if dens N=obj.N(:,:,timesteps); geomw=obj.geomweight(:,:,1); geomw(geomw<0)=0; geomw(geomw>0)=1; N=N.*geomw; nmax=squeeze(max(max(N,[],1),[],2)); tn=(obj.t2d(timesteps)); nlabel='n_{e,max} [m^{-3}]'; ndlabel='n_{e,max}'; else t0dst=find(obj.t0d>=obj.t2d(timesteps(1)),1,'first'); t0dlst=find(obj.t0d<=obj.t2d(timesteps(end)),1,'last'); tn=obj.t0d(t0dst:t0dlst); nmax=obj.npart(t0dst:t0dlst)*obj.weight; nlabel='Nb e^-'; ndlabel='Nb e^-'; end [currents,pos]=obj.OutCurrents(timesteps); P=obj.neutcol.neutdens*obj.kb*300/100;% pressure at room temperature in mbar currents=currents/P; f=figure('Name',sprintf('%s Charges',obj.name)); % Plot the evolution of nb of particles yyaxis right p=plot(tn/taucol,nmax,'b-.','linewidth',1.8,'Displayname',ndlabel); ylabel(nlabel) ax=gca; ax.YAxis(2).Color=p.Color; ylim([0 inf]) if(obj.B(1,1)>obj.B(end,1)) lname='HFS'; rname='LFS'; else lname='LFS'; rname='HFS'; end yyaxis left mincurr=max(currents(:))*5e-3; if (max(currents(1,:)>mincurr)) plot(obj.t2d(timesteps)/taucol,currents(1,:),'r:','Displayname',lname,'linewidth',1.8); end hold on if (max(currents(2,:)>mincurr)) plot(obj.t2d(timesteps)/taucol,currents(2,:),'r--','Displayname',rname,'linewidth',1.8); end if (max(currents(3,:)>mincurr)) plot(obj.t2d(timesteps)/taucol,currents(3,:),'r-','Displayname','outer cylinder','linewidth',1.8); end if (max(currents(4,:)>mincurr)) plot(obj.t2d(timesteps)/taucol,currents(4,:),'Displayname','inner cylinder','linewidth',1.8); end if (size(currents,1)>=5 && max(currents(5,:)>mincurr)) plot(obj.t2d(timesteps)/taucol,currents(5,:),'r-','Displayname','ellipse','linewidth',1.8); end xlabel(tlabel) ylabel('I/p_n [A/mbar]') grid on set(gca,'fontsize',12) ax.YAxis(1).Color='red'; legend('Orientation','horizontal','location','south','numcolumns',3) if nargin <3 title(sprintf('\\phi_b-\\phi_a=%.2g kV, B=%f T',(obj.potout-obj.potinn)/1e3,max(obj.B(:)))) elseif ~isempty(toptitle) title(toptitle) end obj.savegraph(f,sprintf('%s/%s_ChargeEvol%i%i',obj.folder,obj.name,scalet,dens),[16 14]); end function out = displaytotcurrevol(obj,timesteps,species_id,all_cur_id, toptitle,scalet,dens,subdiv,nmean) % Computes and display the time evolution of the outgoing % currents at time obj.t2d(timesteps) %scalet=true scales the time by the ellastic collision %frequency %dens = true plot the time evolution of the maximum electron %density in the simulation domain otherwise plot the total %number of electrons in the domain % also plot in a subplot the color coded boundary corresponding % to each current if nargin<2 timesteps=1:length(obj.t2d); end if nargin<3 species_id =1; end if nargin<4 all_cur_id = 0; end if nargin<5 toptitle=""; end if nargin<6 scalet=true; end if nargin <7 dens=true; end if nargin<8 subdiv=1; end if nargin<9 nmean=1; end if scalet if obj.neutcol.present vexb0=(obj.Ez(:,:,1).*obj.Br'-obj.Er(:,:,1).*obj.Bz')./(obj.B'.^2); vexb0(obj.geomweight(:,:,1)<=0)=0; E=0.5*obj.msim/obj.weight*mean(abs(vexb0(:)))^2/obj.qe; taucol=1/(obj.neutcol.neutdens*mean(abs(vexb0(:)))*(obj.sigio(E)+obj.sigmela(E)+obj.sigmio(E))); try Sio_S=1e17*(obj.neutcol.neutdens*mean(abs(vexb0(:)))*obj.sigio(E))/(obj.maxwellsrce.frequency*obj.weight/(pi*(obj.maxwellsrce.rlim(2)^2-obj.maxwellsrce.rlim(1)^2)*diff(obj.maxwellsrce.zlim))) catch end tlabel='t/\tau_d [-]'; else taucol=2*pi/obj.omece; tlabel='t/\tau_ce [-]'; end else taucol=1e-9; tlabel='t [ns]'; end if dens if species_id==1 N=obj.N(:,:,timesteps); else N=obj.species_moments.N(:,:,timesteps); end geomw=obj.geomweight(:,:,1); geomw(geomw<0)=0; geomw(geomw>0)=1; N=N.*geomw; %[~,idl]=max(N(:,:,end),[],'all','linear'); %[ir,iz]=ind2sub(size(geomw),idl); %nmax=squeeze(max(max(N,[],1),[],2)); tn=(obj.t2d(timesteps)); nmax=zeros(2,length(tn)); nrhalf= floor(0.5*length(obj.rgrid));%find(obj.rgrid>0.07); nmax(1,:)=squeeze(max(max(N(1:nrhalf,:,:),[],1),[],2)); nmax(2,:)=squeeze(max(max(N(nrhalf+1:end,:,:),[],1),[],2)); nlabel='n_{e,max} [m^{-3}]'; ndlabel='n_{e,max}'; else t0dst=find(obj.t0d>=obj.t2d(timesteps(1)),1,'first'); t0dlst=find(obj.t0d<=obj.t2d(timesteps(end)),1,'last'); tn=obj.t0d(t0dst:t0dlst); nmax=obj.npart(t0dst:t0dlst)*obj.weight; nlabel='Nb e^-'; ndlabel='Nb e^-'; end if species_id ==1 [currents,pos]=obj.OutCurrents(timesteps,subdiv); P=obj.neutcol.neutdens*obj.kb*300/100;% pressure at room temperature in mbar currents=currents/P; else % for ionic currents [currents,pos]=obj.OutCurrents_species(timesteps,subdiv); P=obj.neutcol.neutdens*obj.kb*300/100;% pressure at room temperature in mbar currents=currents/P; end % hack to sum ionic + electronic current if all_cur_id==1 [el_curr,pos]=obj.OutCurrents(timesteps,subdiv); P=obj.neutcol.neutdens*obj.kb*300/100;% pressure at room temperature in mbar out.elec_currents=el_curr/P; [ion_curr,pos]=obj.OutCurrents_species(timesteps,subdiv); P=obj.neutcol.neutdens*obj.kb*300/100;% pressure at room temperature in mbar out.ion_currents=ion_curr/P; totCurr_el = sum(out.elec_currents(1:end-1,:),1); totCurr_ion = sum(out.ion_currents,1); TotalCurrent = totCurr_el+totCurr_ion; out.temps = tn/taucol; end % plot f=figure('Name',sprintf('%s Charges',obj.name)); tiledlayout(2,1) nexttile % Plot the evolution of nb of particles yyaxis right for i=1:size(nmax,1) p=plot(tn/taucol,nmax(i,:),'b','linewidth',2.2,'Displayname',sprintf('%s, %d',ndlabel,i)); hold on end ylabel(nlabel) axl=gca; axl.YAxis(2).Color=p.Color; ylim([0 inf]) if(obj.B(1,1)>obj.B(end,1)) lname='HFS'; rname='LFS'; else lname='LFS'; rname='HFS'; end yyaxis( 'left'); map=colormap(lines); set(axl,'linestyleorder',{'-',':','--','*','+'},... 'ColorOrder',map(2:7,:), 'NextPlot','replacechildren') p(1)=plot(axl,obj.t2d(timesteps)/taucol,movmean(currents(1,:),nmean),'Displayname',lname,'linewidth',1.8); hold on p(2)=plot(axl,obj.t2d(timesteps)/taucol,movmean(currents(2,:),nmean),'Displayname',rname,'linewidth',1.8); % Plot the currents for i=3:size(currents,1) p(i)=plot(axl,obj.t2d(timesteps)/taucol,movmean(currents(i,:),nmean),'Displayname',sprintf('border %i',i-2),'linewidth',1.8); end if all_cur_id ==0 plot(axl,obj.t2d(timesteps)/taucol,movmean(sum(currents(:,:),1,'omitnan'),nmean),'k-','Displayname','total','linewidth',1.8); else % plot(axl,obj.t2d(timesteps)/taucol,movmean(sum(out.elec_currents + out.ion_currents,1,'omitnan'),nmean),'k-','Displayname','total','linewidth',1.8); plot(axl,obj.t2d(timesteps)/taucol,movmean(TotalCurrent,nmean),'k-','Displayname','total','linewidth',1.8); hold on p(size(currents,1))=plot(axl,obj.t2d(timesteps)/taucol,movmean(out.ion_currents(end,:),nmean),'Displayname',sprintf('border %i',i-2),'linewidth',1.8); end hold on xlabel(tlabel) ylabel('I/p_n [A/mbar]') grid on set(gca,'fontsize',12) ax.YAxis(1).Color='black'; %legend('Orientation','horizontal','location','north','numcolumns',3) if ~isempty(toptitle) title(toptitle) end ax2=nexttile; geomw=obj.geomweight(:,:,1); geomw(geomw<=0)=0; geomw(geomw>0)=NaN; [c1,hContour]=contourf(ax2,obj.zgrid*1000,obj.rgrid*1000,geomw, [0 0]); hold on drawnow; grid on; for i=1:length(pos) plot(ax2,pos{i}(1,:)*1000,pos{i}(2,:)*1000,'linestyle',p(i+2).LineStyle,... 'color',p(i+2).Color,'marker',p(i+2).Marker,... 'displayname',sprintf('border %i',i),'linewidth',1.8) hold on end title('Domain') plot(ax2,ones(size(obj.rgrid))*obj.zgrid(1)*1000,obj.rgrid*1000,'linestyle',p(1).LineStyle,... 'color',p(1).Color,'marker',p(1).Marker,... 'displayname',lname,'linewidth',1.8) plot(ax2,ones(size(obj.rgrid))*obj.zgrid(end)*1000,obj.rgrid*1000,'linestyle',p(2).LineStyle,... 'color',p(2).Color,'marker',p(2).Marker,... 'displayname',rname,'linewidth',1.8) xlabel('z [mm]') ylabel('r [mm]') grid on set(gca,'fontsize',12) hFills=hContour.FacePrims; [hFills.ColorType] = deal('truecoloralpha'); % default = 'truecolor' try hFills(1).ColorData = uint8([150;150;150;255]); for idx = 2 : numel(hFills) hFills(idx).ColorData(4) = 0; % default=255 end catch end %legend('Orientation','horizontal','location','north','numcolumns',4) fprintf('mean total current: %f [A/mbar]\n',mean(sum(currents(:,max(1,size(currents,2)-30):end),1,'omitnan'))); %if nargin <3 % sgtitle(sprintf('\\phi_b-\\phi_a=%.2g kV, B=%f T',(obj.potout-obj.potinn)*obj.phinorm/1e3,mean(obj.B(:)))) %elseif ~isempty(toptitle) % sgtitle(toptitle) %end if length(subdiv)>1 obj.savegraph(f,sprintf('%s/%s_totIEvol%i%i_div',obj.folder,obj.name,scalet,dens),[16 14]); else obj.savegraph(f,sprintf('%s/%s_totIEvol%i%i',obj.folder,obj.name,scalet,dens),[16 14]); end end % % function displaytotcurrevol(obj,timesteps,species_id,all_cur_id,toptitle,scalet,dens,subdiv,nmean) % % Computes and display the time evolution of the outgoing % % currents at time obj.t2d(timesteps) % %scalet=true scales the time by the ellastic collision % %frequency % %dens = true plot the time evolution of the maximum electron % %density in the simulation domain otherwise plot the total % %number of electrons in the domain % % also plot in a subplot the color coded boundary corresponding % % to each current % if nargin<2 % timesteps=1:length(obj.t2d); % end % if nargin<3 % species_id =1; % end % if nargin<4 % all_cur_id=0; % end % if nargin<5 % toptitle=""; % end % if nargin<6 % scalet=true; % end % if nargin <7 % dens=true; % end % if nargin<8 % subdiv=1; % end % if nargin<9 % nmean=1; % end % % if scalet % if obj.neutcol.present % vexb0=(obj.Ez(:,:,1).*obj.Br'-obj.Er(:,:,1).*obj.Bz')./(obj.B'.^2); % vexb0(obj.geomweight(:,:,1)<=0)=0; % E=0.5*obj.msim/obj.weight*mean(abs(vexb0(:)))^2/obj.qe; % taucol=1/(obj.neutcol.neutdens*mean(abs(vexb0(:)))*(obj.sigio(E)+obj.sigmela(E)+obj.sigmio(E))); % try % Sio_S=1e17*(obj.neutcol.neutdens*mean(abs(vexb0(:)))*obj.sigio(E))/(obj.maxwellsrce.frequency*obj.weight/(pi*(obj.maxwellsrce.rlim(2)^2-obj.maxwellsrce.rlim(1)^2)*diff(obj.maxwellsrce.zlim))) % catch % end % tlabel='t/\tau_d [-]'; % else % taucol=2*pi/obj.omece; % tlabel='t/\tau_ce [-]'; % end % else % taucol=1e-9; % tlabel='t [ns]'; % end % % if dens % if species_id==1 % N=obj.N(:,:,timesteps); % else % N=obj.species_moments.N(:,:,timesteps); % end % geomw=obj.geomweight(:,:,1); % geomw(geomw<0)=0; % geomw(geomw>0)=1; % N=N.*geomw; % %[~,idl]=max(N(:,:,end),[],'all','linear'); % %[ir,iz]=ind2sub(size(geomw),idl); % %nmax=squeeze(max(max(N,[],1),[],2)); % tn=(obj.t2d(timesteps)); % nmax=zeros(2,length(tn)); % nrhalf= floor(0.5*length(obj.rgrid));%find(obj.rgrid>0.07); % % nmax(1,:)=squeeze(max(max(N(1:nrhalf,:,:),[],1),[],2)); % nmax(2,:)=squeeze(max(max(N(nrhalf+1:end,:,:),[],1),[],2)); % % % nlabel='n_{e,max} [m^{-3}]'; % ndlabel='n_{e,max}'; % else % t0dst=find(obj.t0d>=obj.t2d(timesteps(1)),1,'first'); % t0dlst=find(obj.t0d<=obj.t2d(timesteps(end)),1,'last'); % tn=obj.t0d(t0dst:t0dlst); % nmax=obj.npart(t0dst:t0dlst)*obj.weight; % nlabel='Nb e^-'; % ndlabel='Nb e^-'; % end % % if all_cur_id == 0 % if species_id ==1 % [currents,pos]=obj.OutCurrents(timesteps,subdiv); % P=obj.neutcol.neutdens*obj.kb*300/100;% pressure at room temperature in mbar % currents=currents/P; % else % for ionic currents % [currents,pos]=obj.OutCurrents_species(timesteps,subdiv); % P=obj.neutcol.neutdens*obj.kb*300/100;% pressure at room temperature in mbar % currents=currents/P; % end % else % [currents_el,pos]=obj.OutCurrents(timesteps,subdiv); % P=obj.neutcol.neutdens*obj.kb*300/100;% pressure at room temperature in mbar % currents_el=currents_el/P; % [currents_ion,pos]=obj.OutCurrents_species(timesteps,subdiv); % currents_ion = current_ion/P; % end % % f=figure('Name',sprintf('%s Charges',obj.name)); % tiledlayout(2,1) % nexttile % % Plot the evolution of nb of particles % yyaxis right % for i=1:size(nmax,1) % p=plot(tn/taucol,nmax(i,:),'b','linewidth',2.2,'Displayname',sprintf('%s, %d',ndlabel,i)); % hold on % end % ylabel(nlabel) % axl=gca; % axl.YAxis(2).Color=p.Color; % ylim([0 inf]) % % if(obj.B(1,1)>obj.B(end,1)) % lname='HFS'; % rname='LFS'; % else % lname='LFS'; % rname='HFS'; % end % % yyaxis( 'left'); % map=colormap(lines); % set(axl,'linestyleorder',{'-',':','--','*','+'},... % 'ColorOrder',map(2:7,:), 'NextPlot','replacechildren') % p(1)=plot(axl,obj.t2d(timesteps)/taucol,movmean(currents(1,:),nmean),'Displayname',lname,'linewidth',1.8); % hold on % p(2)=plot(axl,obj.t2d(timesteps)/taucol,movmean(currents(2,:),nmean),'Displayname',rname,'linewidth',1.8); % % Plot the currents % for i=3:size(currents,1) % p(i)=plot(axl,obj.t2d(timesteps)/taucol,movmean(currents(i,:),nmean),'Displayname',sprintf('border %i',i-2),'linewidth',1.8); % end % plot(axl,obj.t2d(timesteps)/taucol,movmean(sum(currents(:,:),1,'omitnan'),nmean),'k-','Displayname','total','linewidth',1.8); % hold on % xlabel(tlabel) % ylabel('I/p_n [A/mbar]') % grid on % set(gca,'fontsize',12) % ax.YAxis(1).Color='black'; % % %legend('Orientation','horizontal','location','north','numcolumns',3) % % if ~isempty(toptitle) % title(toptitle) % end % % ax2=nexttile; % geomw=obj.geomweight(:,:,1); % geomw(geomw<=0)=0; % geomw(geomw>0)=NaN; % [c1,hContour]=contourf(ax2,obj.zgrid*1000,obj.rgrid*1000,geomw, [0 0]); % hold on % drawnow; % grid on; % % for i=1:length(pos) % plot(ax2,pos{i}(1,:)*1000,pos{i}(2,:)*1000,'linestyle',p(i+2).LineStyle,... % 'color',p(i+2).Color,'marker',p(i+2).Marker,... % 'displayname',sprintf('border %i',i),'linewidth',1.8) % hold on % end % title('Domain') % plot(ax2,ones(size(obj.rgrid))*obj.zgrid(1)*1000,obj.rgrid*1000,'linestyle',p(1).LineStyle,... % 'color',p(1).Color,'marker',p(1).Marker,... % 'displayname',lname,'linewidth',1.8) % plot(ax2,ones(size(obj.rgrid))*obj.zgrid(end)*1000,obj.rgrid*1000,'linestyle',p(2).LineStyle,... % 'color',p(2).Color,'marker',p(2).Marker,... % 'displayname',rname,'linewidth',1.8) % xlabel('z [mm]') % ylabel('r [mm]') % grid on % set(gca,'fontsize',12) % hFills=hContour.FacePrims; % [hFills.ColorType] = deal('truecoloralpha'); % default = 'truecolor' % try % hFills(1).ColorData = uint8([150;150;150;255]); % for idx = 2 : numel(hFills) % hFills(idx).ColorData(4) = 0; % default=255 % end % catch % end % %legend('Orientation','horizontal','location','north','numcolumns',4) % % % fprintf('mean total current: %f [A/mbar]\n',mean(sum(currents(:,max(1,size(currents,2)-30):end),1,'omitnan'))); % % %if nargin <3 % % sgtitle(sprintf('\\phi_b-\\phi_a=%.2g kV, B=%f T',(obj.potout-obj.potinn)*obj.phinorm/1e3,mean(obj.B(:)))) % %elseif ~isempty(toptitle) % % sgtitle(toptitle) % %end % if length(subdiv)>1 % obj.savegraph(f,sprintf('%s/%s_totIEvol%i%i_div',obj.folder,obj.name,scalet,dens),[16 14]); % else % obj.savegraph(f,sprintf('%s/%s_totIEvol%i%i',obj.folder,obj.name,scalet,dens),[16 14]); % end % % end function display1Dpotentialwell(obj,timestep,rpos) % Display the potential well along the magentic field line % passing by rgrid(rpos) at the center of the simulation space if iscell(timestep) timestep=cell2mat(timestep); end f=figure('Name',sprintf('%s 1D Potential well',obj.name)); model=obj.potentialwellmodel(timestep); z=model.z; r=model.r; Pot=model.pot; rathet=model.rathet; if (mod(rpos, 1) ~= 0) [~,rpos]=min(abs(obj.rgrid-rpos)); end crpos=obj.rgrid(rpos); id=find(timestep==0); timestep(id)=[]; n=obj.N(:,:,timestep); if(~isempty(timestep==0)) N0=zeros(obj.N.nr+1,obj.N.nz+1); n=cat(3,n(:,:,1:id-1),N0,n(:,:,id:end)); end n=mean(n,3); linepot=zeros(length(obj.zgrid),length(timestep)); rathetpos=obj.rAthet(rpos,ceil(length(obj.zgrid)/2)); F=scatteredInterpolant(z',rathet',Pot(:,1)); for i=1:length(timestep) F=scatteredInterpolant(z',rathet',Pot(:,i)); linepot(:,i)=F(obj.zgrid,rathetpos*ones(size(obj.zgrid))); %linepot(:,i)=griddata(z,rathet,pot(:,i),obj.zgrid,rathetpos); end linepot=mean(linepot,2); [Zinit,~]=meshgrid(obj.zgrid,obj.rAthet(:,1)); n=griddata(Zinit,obj.rAthet,n,obj.zgrid,rathetpos); plot(obj.zgrid,linepot) ylabel('Potentiel [eV]') xlabel('z [m]') xlim([obj.zgrid(1) obj.zgrid(end)]) hold(gca, 'on') yyaxis right plot(obj.zgrid,n) ylabel('n [m^{-3}]') if length(timestep)==1 title(sprintf('Potential well t=%1.2f [ns] r=%1.2f [mm]',obj.t2d(timestep)*1e9,1e3*crpos)) else title(sprintf('Potential well t=[%1.2f-%1.2f] [ns] r=%1.2f [mm]',obj.t2d(timestep(1))*1e9,obj.t2d(timestep(end))*1e9,1e3*crpos)) end obj.savegraph(f,sprintf('%s/%s_well1Dr_%d',obj.folder,obj.name,rpos)); end function displayVdistribRThetZ(obj,timestep, rpos, zpos) %displayVdistribRThetZ plot the velocity distribution function % in m/s %extracted from the markers at position window from rpos(1) %rpos(end) and zpos(1) to zpos(end) % and at time obj.tpart(timestep) %rpos and zpos are given as grid indices if(obj.species(1).R.nt>=2) if nargin<2 timesteppart=length(obj.tpart); timestep=timesteppart; else timesteppart=timestep; end if nargin<3 || isempty(rpos) rpos=1:length(obj.rgrid); rspan=[obj.rgrid(1) obj.rgrid(end)]; else r=[obj.rgrid(1);(obj.rgrid(1:end-1)+obj.rgrid(2:end))*0.5;obj.rgrid(end)]; rspan=[r(rpos) r(rpos+1)]; end if nargin<4 || isempty(zpos) zpos=1:length(obj.zgrid); zspan=[obj.zgrid(1) obj.zgrid(end)]; else z=[obj.zgrid(1);(obj.zgrid(1:end-1)+obj.zgrid(2:end))*0.5;obj.zgrid(end)]; zspan=[z(zpos) z(zpos+1)]; end nbp=min(obj.nbparts(1),obj.species(1).R.nparts); R=obj.species(1).R(1:nbp,1,false); Z=obj.species(1).Z(1:nbp,1,false); Vr=obj.species(1).VR(1:nbp,1,false); Vz=obj.species(1).VZ(1:nbp,1,false); Vthet=obj.species(1).VTHET(1:nbp,1,false); ids=R>=rspan(1) & R<=rspan(2) & Z>=zspan(1) & Z<=zspan(2); Vr=Vr(ids); Vz=Vz(ids); Vthet=Vthet(ids); vTr=std(Vr,1); vTz=std(Vz,1); vTthet=std(Vthet,1); nbp=min(obj.nbparts(timesteppart),obj.species(1).R.nparts); Rend=obj.species(1).R(1:nbp,timesteppart,false); Zend=obj.species(1).Z(1:nbp,timesteppart,false); Vrend=obj.species(1).VR(1:nbp,timesteppart,false); Vzend=obj.species(1).VZ(1:nbp,timesteppart,false); Vthetend=obj.species(1).VTHET(1:nbp,timesteppart,false); ids=Rend>=rspan(1) & Rend<=rspan(2) & Zend>=zspan(1) & Zend<=zspan(2); nbtot=sum(ids) Vrend=Vrend(ids); Vzend=Vzend(ids); Vthetend=Vthetend(ids); vTrend=std(Vrend,1); vTzend=std(Vzend,1); vTthetend=std(Vthetend,1); binwidth=abs(max(Vrend)-min(Vrend))/sqrt(length(Vrend)); f=figure('Name',sprintf("%s vrz distrib",obj.file)); [~,time2did]=min(abs(obj.t2d-obj.tpart(timestep))); subplot(1,4,1); obj.dispV(Vr,Vrend,'V_r [m/s]',[1,timesteppart]) [~,time2did]=min(abs(obj.t2d-obj.tpart(timestep))); if length(rpos)==1 vexb=-obj.Er(rpos,zpos,time2did)/obj.Bz(zpos,rpos)'; vexb=mean(vexb(:)); if ~isempty(obj.neutcol.ela_cross_sec) % plot the radial drift velocity as nu_dE_r/(B\Omega_c) vdr=obj.neutcol.neutdens*obj.sigmela(vexb^2*obj.me*0.5/obj.qe)*vexb*-obj.Er(rpos,zpos,time2did)... ./(obj.B(zpos,rpos)'.*obj.B(zpos,rpos)'*obj.qe/obj.me); vdr=mean(vdr(:)); ylimits=ylim; plot(vdr*[1 1],ylimits,'k--','displayname',sprintf('V_{d,pred}=%1.2g [m/s]',vdr)) end end subplot(1,4,2); obj.dispV(Vthet,Vthetend,'V\theta [m/s]',[1,timesteppart]) hold on drawnow ylimits=ylim; if length(rpos)==1 if ~isempty(obj.Erxt) vexbext=-obj.Erxt(rpos,zpos)/obj.Bz(zpos,rpos)'; plot(vexbext*[1 1],ylimits,'k--','displayname',sprintf('V_{ExB,ext}=%1.2g [m/s]',vexbext)) end plot(vexb*[1 1],ylimits,'k-.','displayname',sprintf('V_{ExB,tot}=%1.2g [m/s]',vexb)) end subplot(1,4,3); obj.dispV(Vz,Vzend,'Vz [m/s]',[1,timesteppart]) subplot(1,4,4); obj.dispV(sqrt(Vr.^2+(Vthet).^2+Vz.^2),sqrt(Vrend.^2+(Vthetend).^2+Vzend.^2),'Vtot [m/s]',[1,timesteppart],'maxwell') sgtitle(sprintf('t=%1.2e[ns] r=[%2.1f, %2.1f] [mm] z=[%2.1f, %2.1f] [mm]',obj.tpart(timestep)*1e9, rspan*1e3, zspan*1e3)) obj.savegraph(f,sprintf('%s/%sParts_V_RZ',obj.folder,obj.name),[25 14]); end end function displayEkin(obj,timestep, rpos, zpos) %displayEkin plot the kinetic energy distribution function in %eV %extracted from the markers at position window from rpos(1) %rpos(end) and zpos(1) to zpos(end) % and at time obj.tpart(timestep) %rpos and zpos are given as grid indices if(obj.species(1).R.nt>=2) if nargin<2 timesteppart=[1 length(obj.tpart)]; else if length(timestep)<2 timesteppart=[1 timestep]; else timesteppart=[timestep(1) timestep(end)]; end end if nargin<3 || isempty(rpos) rspan=[obj.rgrid(1) obj.rgrid(end)]; else r=[obj.rgrid(1);(obj.rgrid(1:end-1)+obj.rgrid(2:end))*0.5;obj.rgrid(end)]; rspan=[r(rpos) r(rpos+1)]; end if nargin<4 || isempty(zpos) zspan=[obj.zgrid(1) obj.zgrid(end)]; else z=[obj.zgrid(1);(obj.zgrid(1:end-1)+obj.zgrid(2:end))*0.5;obj.zgrid(end)]; zspan=[z(zpos) z(zpos+1)]; end nbp=min(obj.nbparts(timesteppart(1)),obj.species(1).R.nparts); R=obj.species(1).R(1:nbp,timesteppart(1),false); Z=obj.species(1).Z(1:nbp,timesteppart(1),false); Ekin=obj.Ekin(1:nbp,timesteppart(1),false); ids=R>=rspan(1) & R<=rspan(2) & Z>=zspan(1) & Z<=zspan(2); Ekin=Ekin(ids)/obj.qe; nbp=min(obj.nbparts(timesteppart(2)),obj.species(1).R.nparts); Rend=obj.species(1).R(1:nbp,timesteppart(2),false); Zend=obj.species(1).Z(1:nbp,timesteppart(2),false); Ekinend=obj.Ekin(1:nbp,timesteppart(2),false); ids=Rend>=rspan(1) & Rend<=rspan(2) & Zend>=zspan(1) & Zend<=zspan(2); Ekinend=Ekinend(ids)/obj.qe; f=figure('Name',sprintf("%s E_k distrib",obj.file)); obj.dispV(Ekin,Ekinend,'E_k',timesteppart,'maxwell') sgtitle(sprintf('dt=%1.2e[ns] r=[%2.1f, %2.1f] [mm] z=[%2.1f, %2.1f] [mm]',obj.dt*1e9, rspan*1e3, zspan*1e3)) obj.savegraph(f,sprintf('%s/%sParts_E_kin',obj.folder,obj.name)); end end function displayVdistribParPer(obj,timestep, rpos, zpos, gcs) %displayVdistribParPer plot the velocity distribution function % in m/s for the parallel and perpendicular velocity %extracted from the markers at position window from rpos(1) %rpos(end) and zpos(1) to zpos(end) % and at time obj.tpart(timestep) %rpos and zpos are given as grid indices % gcs define if you give the perpendicular velocity in the % guiding center frame or in the laboratory frame if(obj.species(1).R.nt>=2) if nargin<2 timesteppart=length(obj.tpart); else timesteppart=timestep; end if nargin<3 || isempty(rpos) rspan=[obj.rgrid(1) obj.rgrid(end)]; else r=[obj.rgrid(1);(obj.rgrid(1:end-1)+obj.rgrid(2:end))*0.5;obj.rgrid(end)]; rspan=[r(rpos) r(rpos+1)]; end if nargin<4 || isempty(zpos) zspan=[obj.zgrid(1) obj.zgrid(end)]; else z=[obj.zgrid(1);(obj.zgrid(1:end-1)+obj.zgrid(2:end))*0.5;obj.zgrid(end)]; zspan=[z(zpos) z(zpos+1)]; end if nargin<5 gcs=false; % define if we look in the guiding center system end nbp=min(obj.nbparts(1),obj.species(1).R.nparts); R=obj.species(1).R(1:nbp,1,false); Z=obj.species(1).Z(1:nbp,1,false); ids=R>=rspan(1) & R<=rspan(2) & Z>=zspan(1) & Z<=zspan(2); Vperp=obj.Vperp(1:nbp,1,false,gcs); Vpar=obj.Vpar(1:nbp,1,false); Vperp=Vperp(ids); Vpar=Vpar(ids); nbp=min(obj.nbparts(timesteppart),obj.species(1).R.nparts); R=obj.species(1).R(1:nbp,timesteppart,false); Z=obj.species(1).Z(1:nbp,timesteppart,false); ids=R>=rspan(1) & R<=rspan(2) & Z>=zspan(1) & Z<=zspan(2); Vperpend=obj.Vperp(1:nbp,timesteppart,false,gcs); Vparend=obj.Vpar(1:nbp,timesteppart,false); Vperpend=Vperpend(ids); Vparend=Vparend(ids); %binwidth=abs(max(Vparend)-min(Vparend))/500; f=figure('Name',sprintf("%s v parper distrib",obj.file)); subplot(1,2,1) if gcs lgd='v_\perp gcs [m/s]'; else lgd='v_\perp [m/s]'; end obj.dispV(Vperp,Vperpend,lgd,[1,timesteppart], 'maxwell') subplot(1,2,2) obj.dispV(abs(Vpar),abs(Vparend),'v_{par} [m/s]',[1,timesteppart],'None') sgtitle(sprintf('t=%1.2e[ns] r=[%2.1f, %2.1f] [mm] z=[%2.1f, %2.1f] [mm]',obj.tpart(timestep)*1e9, rspan*1e3, zspan*1e3)) obj.savegraph(f,sprintf('%s/%sParts_V_parper',obj.folder,obj.name)); if gcs obj.savegraph(f,sprintf('%s/%sParts_V_parpergcs',obj.folder,obj.name)); else obj.savegraph(f,sprintf('%s/%sParts_V_parper',obj.folder,obj.name)); end end end function display2DVdistrib(obj,timestep, rpos, zpos, gcs) %display2DVdistrib plot the velocity distribution function % in m/s for the parallel and perpendicular velocity % and for the radial azimuthal velocity % as a 2D contour plot the show the velocity phase space distribution %extracted from the markers at position window from rpos(1) %rpos(end) and zpos(1) to zpos(end) % and at time obj.tpart(timestep) %rpos and zpos are given as grid indices % gcs define if you give the perpendicular velocity in the % guiding center frame or in the laboratory frame if(obj.species(1).R.nt>=2) if nargin<2 timesteppart=length(obj.tpart); else timesteppart=timestep; end if nargin<3 || isempty(rpos) rspan=[obj.rgrid(1) obj.rgrid(end)]; else r=[obj.rgrid(1);(obj.rgrid(1:end-1)+obj.rgrid(2:end))*0.5;obj.rgrid(end)]; rspan=[r(rpos(1)) r(rpos(end)+1)]; end if nargin<4 || isempty(zpos) zspan=[obj.zgrid(1) obj.zgrid(end)]; else z=[obj.zgrid(1);(obj.zgrid(1:end-1)+obj.zgrid(2:end))*0.5;obj.zgrid(end)]; zspan=[z(zpos(1)) z(zpos(end)+1)]; end if nargin<5 gcs=false; % define if we look in the guiding center system end nbp=min(obj.nbparts(timesteppart),obj.species(1).R.nparts); R=obj.species(1).R(1:nbp,timesteppart,false); Z=obj.species(1).Z(1:nbp,timesteppart,false); ids=R>=rspan(1) & R<=rspan(2) & Z>=zspan(1) & Z<=zspan(2); Vperp=obj.Vperp(1:nbp,timesteppart,false,gcs); Vpar=obj.Vpar(1:nbp,timesteppart,false); Vr=obj.species(1).VR(1:nbp,timesteppart,false); Vthet=obj.species(1).VTHET(1:nbp,timesteppart,false); Vper=Vperp(ids); Vpar=Vpar(ids); Vr=Vr(ids); Vthet=Vthet(ids); nbp=sum(ids(:)); f=figure('Name',sprintf("%s v parper distrib",obj.file)); subplot(2,1,1) [N,Xedges,Yedges] = histcounts2(Vpar,Vper,20); Xedges=(Xedges(1:end-1)+Xedges(2:end))/2; Yedges=(Yedges(1:end-1)+Yedges(2:end))/2; contourf(Xedges,Yedges,N') xlabel('v_{par} [m/s]') ylabel('v_{\perp} [m/s]') c=colorbar; c.Label.String='Counts'; subplot(2,1,2) [N,Xedges,Yedges] = histcounts2(Vthet,Vr,20); Xedges=(Xedges(1:end-1)+Xedges(2:end))/2; Yedges=(Yedges(1:end-1)+Yedges(2:end))/2; contourf(Xedges,Yedges,N') %histogram2(Vthet,Vr,'displaystyle','tile','binmethod','auto') %scatter(Vthet,Vr) xlabel('v_\theta [m/s]') ylabel('v_r [m/s]') c=colorbar; c.Label.String='Counts'; sgtitle(sprintf('t=%1.2e[ns] r=[%2.1f, %2.1f] [mm] z=[%2.1f, %2.1f] [mm] N=%3i',mean(obj.tpart(timestep))*1e9, rspan*1e3, zspan*1e3,nbp)) mkdir(sprintf('%s/vdist',obj.folder)) if gcs obj.savegraph(f,sprintf('%s/vdist/%sParts_V_2dparpergcs_r%iz%it%i',obj.folder,obj.name,floor(mean(rpos)),floor(mean(zpos)),floor(mean(timestep)))); else obj.savegraph(f,sprintf('%s/vdist/%sParts_V_2dparper_r%iz%it%i',obj.folder,obj.name,floor(mean(rpos)),floor(mean(zpos)),floor(mean(timestep)))); end end end function [p, maxnb, c]=displayPhaseSpace(obj,type,partsstep, Rindex, Zindex,legendtext, figtitle, f, maxnb, c, gcs) if nargin<8 f=figure; f=gca; end if nargin<7 figtitle=sprintf('r=%1.2f [mm] z=%1.2f [mm] \\Delta\\phi=%1.1f[kV] R=%1.1f',obj.rgrid(Rindex)*1e3,obj.zgrid(Zindex)*1e3,(obj.potout-obj.potinn)*obj.phinorm/1e3,obj.Rcurv); end if nargin <6 legendtext=sprintf('t=%1.3g [s]',obj.tpart(partsstep)); end fieldstep=find(obj.tpart(partsstep(end))==obj.t2d,1); if nargin>=10 ctemp=c; n=zeros(length(c{1}),length(c{2})); else nbins=15; n=zeros(nbins); end if nargin <11 gcs=true; end for i=1:length(partsstep) odstep=find(obj.tpart(partsstep(i))==obj.t0d); nbp=min(obj.species(1).R.nparts,obj.nbparts(partsstep(i))); Rp=obj.species(1).R(1:nbp,partsstep(i),false); Zp=obj.species(1).Z(1:nbp,partsstep(i),false); deltar=obj.dr(2)/2; deltarm=obj.rgrid(Rindex)-sqrt(obj.rgrid(Rindex)^2-deltar^2-2*obj.rgrid(Rindex)*deltar); deltaz=obj.dz/2; Indices=Rp>=obj.rgrid(Rindex)-deltarm & Rp=obj.zgrid(Zindex)-deltaz & Zp0)),max(Blines(obj.geomweight(:,:,1)>0)),20); Blines(obj.geomweight(:,:,1)<0)=NaN; [~,h1]=contour(ax1,obj.zgrid*1000,obj.rgrid*1000,Blines,real(levels),'-.','color','k','linewidth',1.5,'Displayname','Magnetic field lines'); % Draw the metallic boundaries and the geometry itself [c1,hContour]=contourf(ax1,obj.zgrid*1000,obj.rgrid*1000,-geomw,[0,0],'linewidth',1.5); drawnow; xlim(ax1,[obj.zgrid(1)*1000 obj.zgrid(end)*1000]) % Change the color of the metallic boundaries to grey hFills=hContour.FacePrims; [hFills.ColorType] = deal('truecoloralpha'); % default = 'truecolor' try hFills(end).ColorData = uint8([150;150;150;255]); for idx = 1 : numel(hFills)-1 hFills(idx).ColorData(4) = 0; % default=255 end catch end grid on; hold on; f.PaperOrientation='landscape'; f.PaperUnits='centimeters'; papsize=[16 14]; f.PaperSize=papsize; set(ax1,'fontsize',14) %axis equal obj.savegraph(f,sprintf('%sfluid_dens',obj.name)) end function display_ionicconfigurration(obj, fieldstart, fieldend, species_id) %displayconfiguration plot the configuration of the simulation % domain withe boundaries, the magnetic field lines the % electric equipotential lines and the electron density % averaged in time between t2d(fieldstart) and t2d(fieldend) % species_id: gathers the ion species indices in an array. for ii = 1 :species_id(end-1) dens(ii,:,:)=mean(obj.species_moments(ii).N(:,:,fieldstart:fieldend),3); end geomw=obj.geomweight(:,:,1); maxdens=max(dens(:)); geomw(geomw<0)=0; geomw(geomw>0)=maxdens; dens(geomw<=0)=0; geomw(geomw>0)=NaN; f=figure('Name', sprintf('%s fields',obj.name)); ax1=gca; title(sprintf('Configuration')) %dens(dens<=1e13)=NaN; %% electron density for ii =1:2 h(ii)=contourf(ax1,obj.zgrid*1000,obj.rgrid*1000,dens(ii,:,:),50,'Displayname','n_e [m^{-3}]', 'linestyle','none'); hold on; end colormap(flipud(hot)); %% Magnetic field lines Blines=obj.rAthet; levels=linspace(min(Blines(obj.geomweight(:,:,1)>0)),max(Blines(obj.geomweight(:,:,1)>0)),20); [~,h1]=contour(ax1,obj.zgrid*1000,obj.rgrid*1000,Blines,real(levels),'-.','color','k','linewidth',1.5,'Displayname','Magnetic field lines'); %% Equipotential lines Pot=mean(obj.pot(:,:,fieldstart:fieldend),3); Pot(obj.geomweight(:,:,1)<0)=NaN; %levels=8;%[-3.4 -5 -10 -15 -20 -25];%7; potcolor='b';%[0.3660 0.6740 0.1880]; [c1,h2]=contour(ax1,obj.zgrid*1000,obj.rgrid*1000,Pot,'--','color',potcolor,'ShowText','on','linewidth',1.2,'Displayname','Equipotentials [kV]'); clabel(c1,h2,'Color',potcolor) % Grey outline shows metallic parts [c1,hContour]=contourf(ax1,obj.zgrid*1000,obj.rgrid*1000,geomw, [0 0]); drawnow; % set the axia limits xlim(ax1,[obj.zgrid(1)*1000 obj.zgrid(end)*1000]) if(obj.conformgeom) ylim([ax1 ],[obj.rgrid(1)*1000 obj.rgrid(rgridend)*1000]) else ylim([ax1],[obj.rgrid(1)*1000 obj.rgrid(end)*1000]) end legend([h1,h2],{'Magnetic field lines','Equipotentials [V]'},'location','northeast') xlabel(ax1,'z [mm]') ylabel(ax1,'r [mm]') c = colorbar(ax1); c.Label.String= 'n[m^{-3}]'; view(ax1,2) grid on; hFills=hContour.FacePrims; [hFills.ColorType] = deal('truecoloralpha'); % default = 'truecolor' try hFills(1).ColorData = uint8([150;150;150;255]); for idx = 2 : numel(hFills) hFills(idx).ColorData(4) = 0; % default=255 end catch end [~, name, ~] = fileparts(obj.file); % with this you could show the outline of the maxwellian source % if obj.maxwellsrce.present % rlen=diff(obj.maxwellsrce.rlim); % zlen=diff(obj.maxwellsrce.zlim); % rectangle('Position',[obj.maxwellsrce.zlim(1) obj.maxwellsrce.rlim(1) zlen rlen]*1000,'Edgecolor','g','Linewidth',2,'Linestyle','--') % end % in case of coaxial configuration, extend the display domain % and add grey rectangles to show metallic boundaries if( obj.walltype >=2 && obj.walltype<=4) rectangle('Position',[obj.zgrid(1) obj.r_b obj.zgrid(end)-obj.zgrid(1) 0.001]*1e3,'FaceColor',[150 150 150]/255,'Edgecolor','none') ylimits=ylim; ylim([ylimits(1),ylimits(2)+1]) end if sum(obj.geomweight(:,1,1))==0 rectangle('Position',[obj.zgrid(1) obj.r_a-0.001 obj.zgrid(end)-obj.zgrid(1) 0.001]*1e3,'FaceColor',[150 150 150]/255,'Edgecolor','none') ylimits=ylim; ylim([ylimits(1)-1,ylimits(2)]) end f.PaperUnits='centimeters'; %axis equal papsize=[14 5 ]; obj.savegraph(f,sprintf('%s/%sFields',obj.folder,obj.name),papsize); end % function displayconfiguration(obj,fieldstart,fieldend) % %displayconfiguration plot the configuration of the simulation % % domain withe boundaries, the magnetic field lines the % % electric equipotential lines and the electron density % % averaged in time between t2d(fieldstart) and t2d(fieldend) % dens=mean(obj.N(:,:,fieldstart:fieldend),3); % geomw=obj.geomweight(:,:,1); % maxdens=max(dens(:)); % geomw(geomw<0)=0; % geomw(geomw>0)=maxdens; % dens(geomw<=0)=0; % geomw(geomw>0)=NaN; % % % % f=figure('Name', sprintf('%s fields',obj.name)); % ax1=gca; % title(sprintf('Configuration')) % %dens(dens<=1e13)=NaN; % %% electron density % h=contourf(ax1,obj.zgrid*1000,obj.rgrid*1000,dens,50,'Displayname','n_e [m^{-3}]', 'linestyle','none'); % hold on; % colormap(flipud(hot)); % %% Magnetic field lines % Blines=obj.rAthet; % levels=linspace(min(Blines(obj.geomweight(:,:,1)>0)),max(Blines(obj.geomweight(:,:,1)>0)),20); % [~,h1]=contour(ax1,obj.zgrid*1000,obj.rgrid*1000,Blines,real(levels),'-.','color','k','linewidth',1.5,'Displayname','Magnetic field lines'); % % %% Equipotential lines % Pot=mean(obj.pot(:,:,fieldstart:fieldend),3); % Pot(obj.geomweight(:,:,1)<0)=NaN; % %levels=8;%[-3.4 -5 -10 -15 -20 -25];%7; % potcolor='b';%[0.3660 0.6740 0.1880]; % [c1,h2]=contour(ax1,obj.zgrid*1000,obj.rgrid*1000,Pot,'--','color',potcolor,'ShowText','on','linewidth',1.2,'Displayname','Equipotentials [kV]'); % clabel(c1,h2,'Color',potcolor) % % % Grey outline shows metallic parts % [c1,hContour]=contourf(ax1,obj.zgrid*1000,obj.rgrid*1000,geomw, [0 0]); % % drawnow; % % % set the axia limits % xlim(ax1,[obj.zgrid(1)*1000 obj.zgrid(end)*1000]) % if(obj.conformgeom) % ylim([ax1 ],[obj.rgrid(1)*1000 obj.rgrid(rgridend)*1000]) % else % ylim([ax1],[obj.rgrid(1)*1000 obj.rgrid(end)*1000]) % end % legend([h1,h2],{'Magnetic field lines','Equipotentials [V]'},'location','northeast') % xlabel(ax1,'z [mm]') % ylabel(ax1,'r [mm]') % % c = colorbar(ax1); % c.Label.String= 'n[m^{-3}]'; % view(ax1,2) % % grid on; % hFills=hContour.FacePrims; % [hFills.ColorType] = deal('truecoloralpha'); % default = 'truecolor' % try % hFills(1).ColorData = uint8([150;150;150;255]); % for idx = 2 : numel(hFills) % hFills(idx).ColorData(4) = 0; % default=255 % end % catch % end % [~, name, ~] = fileparts(obj.file); % % % with this you could show the outline of the maxwellian source % % if obj.maxwellsrce.present % % rlen=diff(obj.maxwellsrce.rlim); % % zlen=diff(obj.maxwellsrce.zlim); % % rectangle('Position',[obj.maxwellsrce.zlim(1) obj.maxwellsrce.rlim(1) zlen rlen]*1000,'Edgecolor','g','Linewidth',2,'Linestyle','--') % % end % % % in case of coaxial configuration, extend the display domain % % and add grey rectangles to show metallic boundaries % if( obj.walltype >=2 && obj.walltype<=4) % rectangle('Position',[obj.zgrid(1) obj.r_b obj.zgrid(end)-obj.zgrid(1) 0.001]*1e3,'FaceColor',[150 150 150]/255,'Edgecolor','none') % ylimits=ylim; % ylim([ylimits(1),ylimits(2)+1]) % end % if sum(obj.geomweight(:,1,1))==0 % rectangle('Position',[obj.zgrid(1) obj.r_a-0.001 obj.zgrid(end)-obj.zgrid(1) 0.001]*1e3,'FaceColor',[150 150 150]/255,'Edgecolor','none') % ylimits=ylim; % ylim([ylimits(1)-1,ylimits(2)]) % end % f.PaperUnits='centimeters'; % %axis equal % % papsize=[14 5 ]; % % % obj.savegraph(f,sprintf('%s/%sFields',obj.folder,obj.name),papsize); % end function displaymagfield(obj) %displaymagfield display the magnetic field lines and the %amplitude of the magnetic field using a contour % also show the domain boundaries B=obj.B'; f=figure('Name', sprintf('%s B field',obj.name)); B(obj.geomweight(:,:,1)<0)=NaN; ax1=gca; title(sprintf('Configuration')) Blv=linspace(min(B(:)),max(B(:)),25); if length(Blv)<2 Blv=min(B(:))*[1 1]; end h=contourf(ax1,obj.zgrid*1000,obj.rgrid*1000,B,Blv,'Displayname','B [T]', 'linestyle','none'); hold on; %% Magnetic field lines Blines=obj.rAthet; levels=linspace(min(Blines(obj.geomweight(:,:,1)>0)),max(Blines(obj.geomweight(:,:,1)>0)),30); Blines(obj.geomweight(:,:,1)<0)=NaN; [~,h1]=contour(ax1,obj.zgrid*1000,obj.rgrid*1000,Blines,real(levels),'r-.','linewidth',1.5,'Displayname','Magnetic field lines'); colormap(ax1,'parula') % Grey outline geomw=obj.geomweight(:,:,1); geomw(geomw>0)=NaN; geomw(geomw<0)=min(B(:)); [c1,hContour]=contourf(ax1,obj.zgrid*1000,obj.rgrid*1000,geomw, [0 0]); drawnow; + caxis([0 0.6]) xlim(ax1,[obj.zgrid(1)*1000 obj.zgrid(end)*1000]) if(obj.conformgeom) ylim([ax1 ],[obj.rgrid(1)*1000 obj.rgrid(rgridend)*1000]) else ylim([ax1],[obj.rgrid(1)*1000 obj.rgrid(end)*1000]) end %legend([h1],{'Magnetic field lines'},'location','northwest') xlabel(ax1,'z [mm]') ylabel(ax1,'r [mm]') %title(ax1,sprintf('Density t=[%1.2g-%1.2g]s n_e=%1.2gm^{-3}',M.t2d(fieldstart),M.t2d(fieldend),double(maxdens))) c = colorbar(ax1); c.Label.String= '|B| [T]'; view(ax1,2) %set(h,'edgecolor','none'); grid on; hFills=hContour.FacePrims; [hFills.ColorType] = deal('truecoloralpha'); % default = 'truecolor' %caxis([min(B(:)) max(B(:))]) try hFills(1).ColorData = uint8([150;150;150;255]); for idx = 2 : numel(hFills) hFills(idx).ColorData(4) = 0; % default=255 end catch end [~, name, ~] = fileparts(obj.file); if( obj.walltype >=2 && obj.walltype<=4) rectangle('Position',[obj.zgrid(1) obj.r_b obj.zgrid(end)-obj.zgrid(1) 0.001]*1e3,'FaceColor',[150 150 150]/255,'Edgecolor','none') ylimits=ylim; ylim([ylimits(1),ylimits(2)+1]) end if(isempty(obj.spl_bound)) rectangle('Position',[obj.zgrid(1) obj.r_a-0.001 obj.zgrid(end)-obj.zgrid(1) 0.001]*1e3,'FaceColor',[150 150 150]/255,'Edgecolor','none') ylimits=ylim; ylim([ylimits(1)-1,ylimits(2)]) end f.PaperUnits='centimeters'; %axis equal set(gca,'fontsize',14) papsize=[14 5 ]; pos=f.Position; pos(3)=floor(1.5*pos(3)); f.Position=pos; axis equal obj.savegraph(f,sprintf('%s/%s_Bfield',obj.folder,obj.name),papsize); end function displaySurfFlux(obj,timestep, subdiv, species_id,scalet) %displaySurfFlux plot the current densities %on the domain boundaries for time t2d(timestep) %directly on the boundaries themselves %make it easier to see where the currents are collected if nargin<3 subdiv=1; end if nargin<4 species_id =1; end if nargin<5 scalet = false; end if species_id ==1 mflux= obj.Metallicflux(timestep,subdiv); lflux= -squeeze(obj.Axialflux(timestep,1,species_id))'; rflux= squeeze(obj.Axialflux(timestep,length(obj.zgrid),species_id))'; - qe = obj.qe; + qe = obj.qsim/obj.weight; else mflux= obj.MetallicFlux_species(timestep,subdiv); lflux= -squeeze(obj.Axialflux(timestep,1,species_id))'; rflux= squeeze(obj.Axialflux(timestep,length(obj.zgrid),species_id))'; - qe = obj.species(species_id-1).q; + qe = obj.species(species_id).q/obj.species(species_id).weight*obj.species(1).weight; end time=obj.t2d(timestep); if nargin<3 ids=1:length(mflux); end %% P=obj.neutcol.neutdens*obj.kb*300/100;% pressure at room temperature in mbar f=figure('name','fluxevol'); linew=3; %obj.displaysplbound(gca,1e3); % Grey outline geomw=obj.geomweight(:,:,1); geomw(geomw>0)=NaN; geomw(geomw<0)=0; [c1,hContour]=contourf(obj.zgrid*1000,obj.rgrid*1000,geomw, [0 0]); hold on contour(obj.zgrid*1e3,obj.rgrid*1e3,obj.geomweight(:,:,1),[0 0],'b-','linewidth',1.5); hold on for i=1:length(mflux.p) x=mflux.p{i}(1,:)*1000; y=mflux.p{i}(2,:)*1000; y(end)=NaN; - c=mean(mflux.gamma{i},2)'*qe/(100^2)/P; + c=abs(mean(mflux.gamma{i},2)'*qe/(100^2)/P); %c=mflux.gamma{i}'*obj.qe/(100^2)/P; %c=mflux.gamma{i}'*qe/(100^2)/P; - c(c<=1e-4*max(c))=NaN; + c(c==0)=NaN; patch(x,y,c,'EdgeColor','interp','LineWidth',linew); hold on end x=obj.zgrid(1)*ones(size(obj.rgrid))*1000; y=obj.rgrid*1000; y(end)=NaN; c=mean(lflux,1)*qe/(100^2)/P; %c=lflux*obj.qe/(100^2)/P; %c=lflux*qe/(100^2)/P; - c(c<=1e-4*max(c))=NaN; + c(c==0)=NaN; patch(x,y,c,'EdgeColor','interp','LineWidth',linew); x=obj.zgrid(end)*ones(size(obj.rgrid))*1e3; y=obj.rgrid*1000; y(end)=NaN; c=mean(rflux,1)*qe/(100^2)/P; %c=rflux*obj.qe/(100^2)/P; %c=rflux*qe/(100^2)/P; - c(c<=1e-4*max(c))=NaN; + c(c==0)=NaN; patch(x,y,c,'EdgeColor','interp','LineWidth',linew); if scalet == false title(sprintf('t=%4.2f [ns]',mean(time)*1e9)) else if obj.neutcol.present vexb0=(obj.Ez(:,:,1).*obj.Br'-obj.Er(:,:,1).*obj.Bz')./(obj.B'.^2); vexb0(obj.geomweight(:,:,1)<=0)=0; E=0.5*obj.msim/obj.weight*mean(abs(vexb0(:)))^2/obj.qe; taucol=1/(obj.neutcol.neutdens*mean(abs(vexb0(:)))*(obj.sigio(E)+obj.sigmela(E)+obj.sigmio(E))); try Sio_S=1e17*(obj.neutcol.neutdens*mean(abs(vexb0(:)))*obj.sigio(E))/(obj.maxwellsrce.frequency*obj.weight/(pi*(obj.maxwellsrce.rlim(2)^2-obj.maxwellsrce.rlim(1)^2)*diff(obj.maxwellsrce.zlim))) catch end tlabel='t/\tau_d [-]'; else taucol=2*pi/obj.omece; tlabel='t/\tau_ce [-]'; end title(sprintf('t/\\tau_d=%4.2f [-]', mean(time)/taucol)) end - + title('') c=colorbar; c.Label.String= 'j\cdotn [A/(cm^2 mbar)]'; xlabel('z [mm]') ylabel('r [mm]') colormap(jet) set(gca,'colorscale','log') set(gca,'fontsize',10) - + caxis([1e-3 10]) + axis equal + f.Position=f.Position.*[1 1 1.2 1]; %% Magnetic field lines Blines=obj.rAthet; levels=linspace(min(Blines(obj.geomweight(:,:,1)>0)),max(Blines(obj.geomweight(:,:,1)>0)),15); Blines(obj.geomweight(:,:,1)<0)=NaN; [~,h1]=contour(obj.zgrid*1000,obj.rgrid*1000,Blines,real(levels),'k-.','linewidth',1.5,'Displayname','Magnetic field lines'); %axis equal drawnow % Set boundaries to gray hFills=hContour.FacePrims; [hFills.ColorType] = deal('truecoloralpha'); % default = 'truecolor' try hFills(1).ColorData = uint8([150;150;150;255]); for idx = 2 : numel(hFills) hFills(idx).ColorData(4) = 0; % default=255 end catch end pos=f.Position; %pos(3)=floor(1.5*pos(3)); f.Position=pos; %axis equal xlim([obj.zgrid(1) obj.zgrid(end)]*1e3+0.1*[-1 1]) - xlim([20*1e-3 obj.zgrid(end)]*1e3+0.1*[-1 1]) + %xlim([20*1e-3 obj.zgrid(end)]*1e3+0.1*[-1 1]) ylim([obj.rgrid(1) obj.rgrid(end)]*1e3+0.1*[-1 1]) drawnow pause(0.5) c.Ticks=[1e-2 1e-1 1 1e1 1e2]; - obj.savegraph(f,sprintf('%s/%s_surfFlux_it2d_%i',obj.folder,obj.name,floor(mean(timestep))),[16 14]); + obj.savegraph(f,sprintf('%s/%s_surfFlux_it2d_%i_spec%i',obj.folder,obj.name,floor(mean(timestep)),species_id),[16 14]); end % interactive window to display the terms of the pressure tensor guiPressure(obj,logdensity,showgrid,fixed,temperature) % interactive window to display the electron density, magnetic % field lines, electric potential and field at given time steps guiFields(obj,logdensity,showgrid,fixed,parper) function displaycollfreq(obj) %displaycollfreq plot the collision frequencies in Hz/mbar for a range of %electron kinetic energies in eV for the different collision %processes considered: ionisation and elastic collisions E=logspace(1,4,1000); v=sqrt(2/obj.msim*obj.weight*E*obj.qe); P=obj.neutcol.neutdens*obj.kb*300/100;% pressure at room temperature in mbar tauio=P./(obj.neutcol.neutdens*obj.sigio(E).*v); tauiom=P./(obj.neutcol.neutdens*obj.sigmio(E).*v); tauelam=P./(obj.neutcol.neutdens*obj.sigmela(E).*v); f=figure('name','t scales coll'); loglog(E,1./tauio,'displayname','ionisation','linewidth',1.5) hold on loglog(E,1./tauiom,'displayname','ionisation momentum','linewidth',1.5) loglog(E,1./tauelam,'displayname','elastic','linewidth',1.5) loglog(E,1./tauio+1./tauiom+1./tauelam,'displayname','total drag','linewidth',1.5) loglog([E(1) E(end)],1./(2*pi/obj.omece)* [1 1],'--','displayname','cyclotronic','linewidth',1.5) xlabel('Electron kinetic energy [eV]') ylabel('\nu [Hz/mbar]') legend('location','southeast') grid on obj.savegraph(f,sprintf('%s/collfreqscales',obj.folder),[14 12]); end function displaycrosssec(obj) %displaycrosssec plot the collision crosssections in m^2 for a range of %electron kinetic energies in eV for the different collision %processes considered: ionisation and elastic collisions E=logspace(1,4,1000); sig_io=obj.sigio(E); sig_iom=obj.sigmio(E); sig_elam=obj.sigmela(E); f=figure('name','t scales coll'); loglog(E,sig_io,'displayname','ionisation','linewidth',1.5) hold on loglog(E,sig_iom,'displayname','ionisation momentum','linewidth',1.5) loglog(E,sig_elam,'displayname','elastic','linewidth',1.5) loglog(E,sig_io+sig_elam+sig_iom,'displayname','total drag','linewidth',1.5) xlabel('Energy [eV]') ylabel('\sigma [m^{2}]') legend('location','southeast') grid on obj.savegraph(f,sprintf('%s/coll_cross_sec_scales',obj.folder),[14 12]); end %------------------------------------------ % Helper functions needed for other functions function [zpos,rpos]=getpos(obj,tstep) % interactive window to return an specific axial and radial % position picked from the cloud density if nargin<2 tstep=length(obj.t2d); end n=obj.N(:,:,tstep); n(obj.geomweight(:,:,1)<0)=NaN; figure contourf(obj.zgrid,obj.rgrid,n); xlabel('z [m]') ylabel('r [m]') [x,y]=ginput(1); zpos=find(x>obj.zgrid,1,'last'); rpos=find(y>obj.rgrid,1,'last'); hold on plot(obj.zgrid(zpos),obj.rgrid(rpos),'rx') fprintf('zpos=%i rpos=%i z=%1.4f r=%1.4f\n',zpos,rpos,obj.zgrid(zpos),obj.rgrid(rpos)) end function changed=ischanged(obj) %ischanged Check if the file has been changed since the initial loading of the file %and if some data must be reloaded try filedata=dir(obj.fullpath); checkedtimestamp=filedata.date; if (max(checkedtimestamp > obj.timestamp) ) changed=true; return end changed=false; return catch changed=true; return end end function dispV(obj,V,Vend,label,t, dist, vd) %dispV generic functio to plot the velocity distribution and %comapare two timesteps V and Vend at time t(1) and t(2) if nargin<6 dist='gaussian'; end if nargin<7 vd=0; end vmean=mean(V(~isnan(V))); vtherm=std(V(~isnan(V)),1); vmeanend=mean(Vend(~isnan(Vend))); vthermend=std(Vend(~isnan(Vend)),1); if(length(V)>1) [Counts,edges]=histcounts(V,'binmethod','sqrt'); binwidth=mean(diff(edges)); plot([edges(1) 0.5*(edges(2:end)+edges(1:end-1)) edges(end)],[0 Counts 0],'DisplayName',sprintf("t=%2.3d [ns]",obj.tpart(t(1))*1e9)); hold on end hold on [Counts,edges]=histcounts(Vend,'binmethod','sqrt'); plot([edges(1) 0.5*(edges(2:end)+edges(1:end-1)) edges(end)],[0 Counts 0],'DisplayName',sprintf("t=%2.3d [ns]",obj.tpart(t(2))*1e9)); if strcmp(dist,'maxwell') vfit=linspace(0,edges(end),300); a=vmeanend/sqrt(2); dist=sqrt(2/pi)*vfit.^2.*exp(-((vfit).^2-vd^2)/2/a^2)/a^3; dist=dist/max(dist); plot(vfit,max(Counts)*dist,'displayname',sprintf('Maxw mu=%2.2g sigma=%2.2g',vmeanend,vthermend)) elseif strcmp(dist,'gaussian') vfit=linspace(edges(1),edges(end),300); dist=exp(-(vfit-vmeanend).^2/2/vthermend^2); plot(vfit,max(Counts)*dist,'displayname',sprintf('gauss mu=%2.2g sigma=%2.2g',vmeanend,vthermend)) end ylabel('counts') xlabel(label) grid on legend('location','southoutside','orientation','vertical') end function cross_sec=fit_cross_sec(obj,energy,crosssec_table) %Interpolate the cross-section at the given energy using the %crosssec_table and an exponential fitting cross_sec=0; if (energy<=0 || isnan(energy) || isinf(energy)) return end id=find(energy>crosssec_table(:,1),1,'last'); if(isempty(id)) id=1; end id=min(size(crosssec_table,1)-1,id); id=max(1,id); cross_sec=crosssec_table(id,2)*(energy/crosssec_table(id,1))^crosssec_table(id,3); %cross_sec=crosssec_table(id,2)+(crosssec_table(id+1,2)-crosssec_table(id,2))*(energy-crosssec_table(id,1))/((crosssec_table(id+1,1)-crosssec_table(id,1))); end function fighandle=savegraph(obj, fighandle, name, papsize) %% Saves the given figure as a pdf a .fig and an eps using export_fig % fighandle is the handle to the figure being saved % name is the path to the saved file without extension % papsize is the dimension of the pdf print in cm if (nargin < 4) papsize=[14 16]; end %export_fig(fighandle,name,'-png','-r300') exportgraphics(fighandle,sprintf('%s.png',name),'Resolution',300) print(fighandle,name,'-dpdf','-fillpage') savefig(fighandle,name) fighandle.PaperUnits='centimeters'; set(fighandle, 'Color', 'w'); fighandle.PaperSize=papsize; exportgraphics(fighandle,sprintf('%s.eps',name)) export_fig(fighandle,name,'-eps','-painters') end function sig=dsigmaio(obj,Ekin, Ebar, Ei, E0, chi, gamma) % calculates the integrand used for the ionisation collision % cross section for momentum exchange for the incoming electron % it is only used by obj.sigmiopre gamma=reshape(gamma,1,[],1); chi=reshape(chi,1,1,[]); siggamma=sin(gamma).*(E0^2+8*(1-chi)*(Ekin-Ei)*E0)./(E0+4*(1-chi)*(Ekin-Ei)-4*(1-chi)*(Ekin-Ei).*cos(gamma)).^2/2; sigchi=(Ekin-Ei)./(Ebar*atan((Ekin-Ei)/(2*Ebar)).*(1+(chi*(Ekin-Ei)/Ebar).^2)); dp=1- trapz(gamma,sqrt((1-chi).*(1-Ei/Ekin)).*cos(gamma).*siggamma,2);%- trapz(gamma,sqrt((1-chi).*(1-Ei/Ekin)).*cos(gamma).*siggamma,2); sig=sigchi.*dp; end function sigm=sigmiopre(obj,E, init) % returns the precalculated values used for the interpolation % of the ionisation collision cross-section for momentum % exchange for the incoming electron if nargin <3 init=false; end if(~init &&( ~obj.neutcol.present || isempty(obj.neutcol.io_cross_sec))) sigm=zeros(size(E)); return end Ebar=obj.neutcol.scatter_fac; Ei=obj.neutcol.Eion; E0=obj.neutcol.E0; nE=numel(E); nchi=300; ngamma=300; gamma=linspace(0,pi,ngamma); chi=linspace(0,0.5,nchi); %sigm2=zeros(nE,nchi); sigm=zeros(size(E)); for i=1:nE if(E(i)>=Ei) sigm2=zeros(nchi,1); for j=1:nchi %sigm2(j)=trapz(alpha,trapz(gamma,obj.dsigmaio(E(i),Ebar,Ei,E0,chi(j),alpha,gamma),2),1); sigm2(j)=obj.dsigmaio(E(i),Ebar,Ei,E0,chi(j),gamma); end sigm(i)=trapz(chi,sigm2)*obj.sigio(E(i),init); %sigm(i)=trapz(chi,trapz(alpha,trapz(gamma,dsigmaio(obj,E(i),Ebar,Ei,E0,chi,alpha,gamma),2),1),3)*obj.sigio(E(i),init); end end end end end diff --git a/matlab/Continuityspline.m b/matlab/Continuityspline.m index d648de6..83b389a 100644 --- a/matlab/Continuityspline.m +++ b/matlab/Continuityspline.m @@ -1,111 +1,112 @@ function [Continuity]=Continuityspline(M,it,norm,log,contourscale, zlims) -%ForceBalance Show the radial force balance -% Plot the three radial forces for the given time-step it or averaged +%Continuitysplone Show the different contributions to the continuity equation +% Plot the three contributions to the continuity equation at the given time-step it or averaged % over the range of time steps defined in it if strcmp(it,':') it=floor(0.95*size(M.t2d)):size(M.t2d); end switch nargin case 2 contourscale=0.2; norm=false; log=false; zlims=[-inf inf]; case 3 log=false; contourscale=0.2; zlims=[-inf inf]; case 4 contourscale=0.2; zlims=[-inf inf]; case 5 zlims=[-inf inf]; case 6 otherwise error("Invalid number of arguments") end contourcolor=[0 0 0];%[255 20 147]/255; if(it(1)==1) it=it(2:end); end if(it(end)==length(M.t2d)) it=it(1:end-1); end N=M.N(:,:,it); maxdens=max(N(:)); densitycontour=contourc(M.zgrid,M.rgrid,mean(N,3),[contourscale contourscale]*maxdens); rgridmax=sum(M.nnr(1:2)); %% Continuity t=M.t2d(it); dndt=zeros(size(N,1),size(N,2),size(N,3)); S=zeros(size(N,1),size(N,2),size(N,3)); ndivu=zeros(size(N,1),size(N,2),size(N,3),3); ugradn=zeros(size(N,1),size(N,2),size(N,3),2); [R,~]=meshgrid(M.rgrid,M.zgrid); R=R'; Rinv=1./R; Rinv(isinf(Rinv))=0; geommask=M.geomweight(:,:,1)<0; for i=1:size(N,3) ddt=(M.N(:,:,it(i)+1)-M.N(:,:,it(i)-1))./(M.t2d(it(i)+1)-M.t2d(it(i)-1)); ddt(geommask)=0; dndt(:,:,i)=ddt; - ndivu1=N(:,:,i).*(M.fluidUR.der(:,:,it(i),[1 0])); + ndivu1=2*N(:,:,i).*(M.fluidUR.der(:,:,it(i),[1 0])); ndivu1(geommask)=0; ndivu(:,:,i,1)=ndivu1; - ndivu2=N(:,:,i).*(M.fluidUR(:,:,it(i)).*Rinv); + ndivu2=2*N(:,:,i).*(M.fluidUR(:,:,it(i)).*Rinv); ndivu2(geommask)=0; ndivu(:,:,i,2)=ndivu2; ndivu3=N(:,:,i).*(M.fluidUZ.der(:,:,it(i),[0 1])); ndivu3(geommask)=0; ndivu(:,:,i,3)=ndivu3; - ugradn1= M.fluidUR(:,:,it(i)).*M.N.der(:,:,it(i),[1 0]); + ugradn1= 2*M.fluidUR(:,:,it(i)).*M.N.der(:,:,it(i),[1 0]); ugradn1(geommask)=0; ugradn(:,:,i,1)=ugradn1; ugradn2= M.fluidUZ(:,:,it(i)).*M.N.der(:,:,it(i),[0 1]); ugradn2(geommask)=0; ugradn(:,:,i,2)=ugradn2; + Si=zeros(size(ddt)); if M.neutcol.present && ~isempty(M.neutcol.io_cross_sec) % average kinetic energy in each direction % Er=M.fluidEkin(1,:,:,it(i)); % Ethet=M.fluidEkin(2,:,:,it(i)); % Ez=M.fluidEkin(3,:,:,it(i)); % Ek=squeeze((Er+Ethet+Ez)/M.qe); % % % corresponding particle velocity % U=squeeze(sqrt(2*M.weight/M.msim*(Er+Ethet+Ez))); U=-M.Er(:,:,it(i))./M.Bz'; Ek=0.5*M.msim/M.weight/M.qe*U.^2; Ek(N(:,:,i)<=0)=0; % ionisation cross section per cell sigio=M.sigio(Ek); - Si=M.neutcol.neutdens.*N(:,:,i).*sigio.*U; + Si=Si+M.neutcol.neutdens.*N(:,:,i).*sigio.*U; end if M.maxwellsrce.present Si=Si+M.maxwellsrce.frequency*M.weight/(pi*diff(M.maxwellsrce.zlim)*(M.maxwellsrce.rlim(2)^2-M.maxwellsrce.rlim(1)^2)); end Si(geommask)=0; S(:,:,i)=Si; end Continuity.N=N; Continuity.dndt=dndt; Continuity.ndivu=ndivu; Continuity.ugradn=ugradn; Continuity.maxdens=maxdens; Continuity.it=it; Continuity.S=S; end diff --git a/matlab/DensityVideosaving.m b/matlab/DensityVideosaving.m index 0e284b0..747ec80 100644 --- a/matlab/DensityVideosaving.m +++ b/matlab/DensityVideosaving.m @@ -1,161 +1,192 @@ % Create a video showing the time evolution of the electron cloud density % and the equipotential lines % Draws on top the metallic geometry and the magnetic field lines % Set the starting and ending time frames initfieldstep=1; tend=length(M.t2d);%1000;%length(M.t2d);%min(60000,length(M.t2d)); % set the timestep of drawing -step=2; +step=5; % defines the upper limit of the color scale -maxN=2.5e17; +maxN=6.5e17; minN=5e12; %prepare the video writer parameters filename=[M.name,'_dens_log_presentation.avi']; videowriterobj=VideoWriter([M.folder,'/',filename]); videowriterobj.FrameRate=50; videowriterobj.Quality=90; open(videowriterobj); tsize=20; if M.neutcol.present vexb0=(M.Ez(:,:,1).*M.Br'-M.Er(:,:,1).*M.Bz')./(M.B'.^2); vexb0(M.geomweight(:,:,1)<=0)=0; E=0.5*M.msim/M.weight*mean(abs(vexb0(:)))^2/M.qe; taucol=1/(M.neutcol.neutdens*mean(abs(vexb0(:)))*(M.sigio(E)+M.sigmela(E)+M.sigmio(E))); try Sio_S=1e17*(M.neutcol.neutdens*mean(abs(vexb0(:)))*M.sigio(E))/(M.maxwellsrce.frequency*M.weight/(pi*(M.maxwellsrce.rlim(2)^2-M.maxwellsrce.rlim(1)^2)*diff(M.maxwellsrce.zlim))) catch end tlabel='\tau_d'; else taucol=2*pi/M.omece; tlabel='\tau_ce'; end %% Fields f=figure('Name', sprintf('%s fields',M.name),'Position',[0 0 1600 900]); ax1=gca; % extract and plot the initial density dens=M.N(:,:,initfieldstep); dispdens=dens; colormap(flipud(hot)); geomw=M.geomweight(:,:,1); dispdens(geomw<=0)=0; Nlvls=logspace( log10(minN), log10(maxN),50); %Nlvls=linspace(1e12,maxN,50); [h,curve]=contourf(ax1,M.zgrid*1000,M.rgrid*1000,dispdens,Nlvls,'Displayname','n_e [m^{-3}]'); set(curve,'linecolor','none'); colormap(flipud(hot)); hold on; % Draws the magnetic field lines Blines=M.rAthet; levels=linspace(min(Blines(M.geomweight(:,:,1)>0)),max(Blines(M.geomweight(:,:,1)>0)),20); Blines(M.geomweight(:,:,1)<0)=NaN; [~,h1]=contour(ax1,M.zgrid*1000,M.rgrid*1000,Blines,real(levels),'-.','color','k','linewidth',1.5,'Displayname','Magnetic field lines'); % extract and draw the equipotentials pot=M.pot(:,:,initfieldstep); pot(geomw<1e-4)=NaN; pot(geomw<0)=NaN; potcolor='b'; [c1,h2]=contour(ax1,M.zgrid*1000,M.rgrid*1000,pot/1e3,'--','color',potcolor,'ShowText','on','linewidth',1.2,'Displayname','Equipotentials [kV]'); clabel(c1,h2,'Color',potcolor,'fontsize',tsize,'LabelSpacing',800) % Draw the metallic boundaries and the geometry itself -[c1,hContour]=contourf(ax1,M.zgrid*1000,M.rgrid*1000,-geomw,[0,0],'linewidth',1.5); +geomw=M.geomweight(:,:,1); +geomw(geomw<1e-6)=0; +geomw(geomw>1e-6)=NaN; +[c1,hContour]=contourf(ax1,M.zgrid*1000,M.rgrid*1000,geomw, [0 0]); +hold on +dirw=M.dirichletweight(:,:,1); +geomw=M.geomweight(:,:,1); +dirw(geomw<=1e-6&dirw>=1e-6)=0; +dirw(dirw>0)=NaN; +[c1,hContour2]=contourf(ax1,M.zgrid*1000,M.rgrid*1000,dirw, [0 0]); drawnow; -xlim(ax1,[M.zgrid(1)*1000 M.zgrid(end)*1000]) +grid on; if(M.conformgeom) ylim(ax1,[M.rgrid(1)*1000 M.rgrid(rgridend)*1000]) else ylim(ax1,[M.rgrid(1)*1000 M.rgrid(end)*1000]) end % Add the legend and labels legend([h1,h2],{'Magnetic field lines','Equipotentials [kV]'},'location','southwest') xlabel(ax1,'z [mm]') ylabel(ax1,'r [mm]') c = colorbar(ax1); c.Label.String= 'Electron density [m^{-3}]'; view(ax1,2) grid on; set(ax1,'fontsize',tsize); % Change the color of the metallic boundaries to grey +% We add the coloring for the solid parts of the geometry +% Metallic parts hFills=hContour.FacePrims; [hFills.ColorType] = deal('truecoloralpha'); % default = 'truecolor' try - hFills(end).ColorData = uint8([150;150;150;255]); - for idx = 1 : numel(hFills)-1 + hFills(1).ColorData = uint8([150;150;150;255]); + for idx = 2 : numel(hFills) + hFills(idx).ColorData(4) = 0; % default=255 + end +catch +end +% Dielectrics +hFills=hContour2.FacePrims; +[hFills.ColorType] = deal('truecoloralpha'); % default = 'truecolor' +try + hFills(1).ColorData = uint8([255;165;0;255]); + for idx = 2 : numel(hFills) hFills(idx).ColorData(4) = 0; % default=255 end catch end % if necessary extend the display of the inner and outer cylinders if(M.walltype~=9) rectangle('Position',[M.zgrid(1)-2e-4 M.rgrid(1)-3e-4 M.zgrid(end)-M.zgrid(1)+4e-4 3e-4]*1000,'FaceColor',[150 150 150]/255,'linewidth',1.5) rectangle('Position',[M.zgrid(1) M.rgrid(end) M.zgrid(end)-M.zgrid(1) 2e-4]*1000,'FaceColor',[150 150 150]/255,'EdgeColor','none') ylim([M.rgrid(1)-2e-4 M.rgrid(end)+2e-4]*1000) end %rectangle('Position',[M.zgrid(1) M.rgrid(1) 0.06-M.zgrid(1) 0.06-M.rgrid(1)]*1000,'FaceColor',[150 150 150]/255,'EdgeColor','none') % give the time in the title title(sprintf('t= %1.2f [ns]',M.t2d(initfieldstep)*1e9)) % if isfield(M.maxwellsrce,'time_start') && M.maxwellsrce.time_start<=M.t2d(1) % rectangle('Position',[M.maxwellsrce.zlim(1) M.maxwellsrce.rlim(1) diff(M.maxwellsrce.zlim) diff(M.maxwellsrce.rlim)]*1000,'linestyle','--') % end %Adapt the color axis limits and set log scale set(ax1,'ColorScale','log') caxis([Nlvls(1) Nlvls(end)]); % Run the loop to update the electric potential and electron density for i=initfieldstep:step:tend title(ax1,sprintf('t= %1.2f %s',M.t2d(i)/taucol,tlabel),'fontsize',tsize-2) dens=M.N(:,:,i); dispdens=dens; dispdens(geomw<=0)=0; pot=M.pot(:,:,i)./1e3; pot(geomw<1e-4)=NaN; curve.ZData=dispdens; h2.ZData=pot; caxis(ax1,[Nlvls(1) Nlvls(end)]); %Curve2.YData=pot(rAthetpos,1:end); drawnow; hFills=hContour.FacePrims; - [hFills.ColorType] = deal('truecoloralpha'); % default = 'truecolor' - try - hFills(1).ColorData = uint8([150;150;150;255]); - for idx = 2 : numel(hFills) - hFills(idx).ColorData(4) = 0; % default=255 - end - catch +[hFills.ColorType] = deal('truecoloralpha'); % default = 'truecolor' +try + hFills(1).ColorData = uint8([150;150;150;255]); + for idx = 2 : numel(hFills) + hFills(idx).ColorData(4) = 0; % default=255 end +catch +end +% Dielectrics +hFills=hContour2.FacePrims; +[hFills.ColorType] = deal('truecoloralpha'); % default = 'truecolor' +try + hFills(1).ColorData = uint8([255;165;0;255]); + for idx = 2 : numel(hFills) + hFills(idx).ColorData(4) = 0; % default=255 + end +catch +end writeVideo(videowriterobj,getframe(f)); end close(videowriterobj); \ No newline at end of file diff --git a/matlab/coaxial_ion_loss_criteria.m b/matlab/coaxial_ion_loss_criteria.m index 57b4700..26e999c 100644 --- a/matlab/coaxial_ion_loss_criteria.m +++ b/matlab/coaxial_ion_loss_criteria.m @@ -1,287 +1,287 @@ %% wr+ H0=3.2e-14; P0=8.66e-25; r0=0.005; qe=1.60217662E-19; me=9.109383E-31; eps_0=8.85418781762e-12; vlight=299792458; ne=6e17; ne=5*logspace(10,19,5000); kb=1.38e-23; T=300; P=1e-9*100000; estimneutraldensity=P/(kb*T) I=40; V=90; alpha=1.3; B0=0.21; L=0.48; z=0.0; % Davidson prefix='Davidson'; phia=-60000; phib=0; R=1.5; B0=0.21; width=0.48; b=0.16; a=0.001; r=0.0079; zmin=0.0; zmax=-width/2; deltar=(R-1)/(R+1)*besseli(1,2*pi*r/width)*(width/2/pi)*(cos(2*pi*zmin/width)-cos(2*pi*zmax/width)); rb_=0.00764; rbplus=0.0842; Te=400; %eV %1rbplus=0.020; % Davidson test prefix='Davidson'; phia=-60000; phib=0; -R=1.5; +R=15; B0=0.21; width=0.48; b=0.16; a=0.001; rb_=0.0076; r=9.7e-3 ; zmin=0.0; zmax=-width/8; deltar=(R-1)/(R+1)*besseli(1,2*pi*r/width)*(width/2/pi)*(cos(2*pi*zmin/width)-cos(2*pi*zmax/width)); rbplus=rb_ + max(deltar,0.0026); rcenter=r+deltar Te=400; %eV %1rbplus=0.020; % rb_=0.01; % rbplus=rb_+0.1; % r=(rb_+rbplus)/2; % r=0.015 % deltar=(R-1)/(R+1)*r; -%ITER -prefix='ITER' -R=1.0001; -phia=-5000; -phib=0; -b=0.0792; -a=0.064; -r=0.080; -deltar=(R-1)/(R+1)*r; -rb_=0.0766; -rbplus=0.079; +% %ITER +% prefix='ITER' +% R=1.0001; +% phia=-5000; +% phib=0; +% b=0.0792; +% a=0.064; +% r=0.080; +% deltar=(R-1)/(R+1)*r; +% rb_=0.0766; +% rbplus=0.079; spcharge=@(ne)-qe*ne/2/eps_0; deltaphicloud=@(ne) Phi(r+deltar,rb_,rbplus,a,b,phia,phib, ne)-Phi(r,rb_,rbplus,a,b,phia,phib, ne); deltaphivacuum=(phib-phia)/log(b/a)*log((r+deltar)/r); figure rforphi=linspace(a,b,1000); phir=zeros(length(rforphi),1); for i=1:length(rforphi) phir(i)=Phi(rforphi(i),rb_,rbplus,a,b,phia,phib, 6e17); end plot(rforphi,phir) title('Phi') figure plot((rforphi(1:end-1)+rforphi(2:end))/2,-diff(phir)./diff(rforphi)) title('E_r') Emaxcloud=1/(R-1)*deltaphicloud(ne); Emaxvacuum=1/(R-1)*deltaphivacuum rgrid=linspace(1e-3,16e-2,500); zgrid=linspace(-0.24,0.24,1000); GainedE=zeros(length(rgrid),length(zgrid)); for i=1:length(zgrid) drgrid=(R-1)/(R+1)*besseli(1,2*pi*rgrid/width)*(width/2/pi)*(cos(2*pi*0/width)-cos(2*pi*zgrid(i)/width)); GainedE(:,i)=-(Phivacuum(rgrid,a,b,phia,phib)-Phivacuum(rgrid+drgrid,a,b,phia,phib)); end figure title(sprintf('\\phi_a=%3.2f kV \\phi_b=%3.2f kV R=%3.2f',phia/1e3,phib/1e3, R)) surface(zgrid,rgrid,GainedE); xlabel('z') ylabel('r') c=colorbar; c.Label.String='E [eV]'; meanE=mean(mean(abs(GainedE(20:375,ceil(length(zgrid)/2):floor(5*length(zgrid)/6))),2))/2 %% figure('name',sprintf('%s Phi_a=%3.2f kV Phi_b=%3.2f kV r=%3.2f mm R=%3.2f',prefix,phia/1e3,phib/1e3,r*1e3, R)); loglog(ne,abs(Emaxcloud),'displayname','flat top density cloud') hold on loglog([ne(1) ne(end)], Emaxvacuum*[1 1],'displayname','Vacuum') xlabel('electron density [m^{-3}]') ylabel('|E_{min}| [eV]') title(sprintf('%s \\Phi_a=%3.2f kV \\Phi_b=%3.2f kV r=%3.2f mm R=%3.2f',prefix,phia/1e3,phib/1e3,r*1e3, R)) savefig(sprintf('%s_Phia%3.2f_Phib%3.2f_r%3.2f_R%3.2f.fig',prefix,phia/1e3,phib/1e3,r*1e3, R)) figure subplot(2,2,1) sgtitle(sprintf('%s \\Phi_a=%3.2f kV \\Phi_b=%3.2f kV r_0=%3.2f mm z_0=%3.2f mm R=%3.2f',prefix,phia/1e3,phib/1e3,(r+deltar)*1e3,z*1e3, R)) neinter=5e13; vpar=linspace(1,vlight,1000); vper=sqrt(-2*qe/me*deltaphicloud(neinter)/(R-1)+vpar.^2/(R-1))/vlight; vpar=vpar/vlight; vpar=vpar(real(vper)~=0); vper=vper(real(vper)~=0); %Davidson vperp phi0=Phi(r,rb_,rbplus,a,b,phia,phib, neinter); vrz=sqrt(2/me*H0+2/me*qe*phi0-1/me^2*(P0/r+qe*Athet(r,z,B0,width,R))^2); theta=2*pi*linspace(0,1,1000); vthet=(P0/r+qe*Athet(r,z,B0,width,R))/me; vperdav=sqrt((vrz^2*cos(theta).^2+vthet^2))/vlight; vpardav=vrz*sin(theta)/vlight; vpargauss=sqrt(Te*qe/me)*linspace(-1,1,200); vpergauss=sqrt(2*Te*qe/me)*sqrt(1-vpargauss.^2*me/Te/qe); vpargauss=[flip(vpargauss(2:end)) vpargauss]/vlight; vpergauss=[-flip(vpergauss(2:end)) vpergauss]/vlight; plot(vpar,vper,'b-') hold on plot(vpar,-vper,'b-') plot(-vpar,vper,'b-') plot(-vpar,-vper,'b-') xlabel('\beta_z [m/s]') ylabel('\beta_\perp [m/s]') title(sprintf('electrons n_e=%3.2e m^{-3}',neinter)) grid h(1)=plot(vpardav,vperdav,'r--','Displayname',sprintf('Dav H0=%#.2g eV P0=%#.2g kg m^2 s^{-1}',H0/qe,P0)); h(2)=plot(vpargauss,vpergauss,'g--','Displayname',sprintf('Gauss Te=%#.2g eV',Te)); legend(h) legend('location','northoutside') xlim([-1 1]) ylim([-1 1]) subplot(2,2,3) neinter=5e17; vpar=linspace(1,vlight,1000); vper=sqrt(-2*qe/me*deltaphicloud(neinter)/(R-1)+vpar.^2/(R-1))/vlight; vpar=vpar/vlight; vpar=vpar(real(vper)~=0); vper=vper(real(vper)~=0); %Davidson vperp phi0=Phi(r,rb_,rbplus,a,b,phia,phib, neinter); vrz=sqrt(2/me*H0+2/me*qe*phi0-1/me^2*(P0/r+qe*Athet(r,z,B0,width,R))^2); theta=2*pi*linspace(0,1,1000); vthet=(P0/r+qe*Athet(r,z,B0,width,R))/me; vperdav=sqrt((vrz^2*cos(theta).^2+vthet^2))/vlight; vpardav=vrz*sin(theta)/vlight; vpargauss=sqrt(Te*qe/me)*linspace(-1,1,200); vpergauss=sqrt(2*Te*qe/me)*sqrt(1-vpargauss.^2*me/Te/qe); vpargauss=[flip(vpargauss(2:end)) vpargauss]/vlight; vpergauss=[-flip(vpergauss(2:end)) vpergauss]/vlight; plot(vpar,vper,'b-') hold on plot(vpar,-vper,'b-') plot(-vpar,vper,'b-') plot(-vpar,-vper,'b-') xlabel('\beta_z [m/s]') ylabel('\beta_\perp [m/s]') title(sprintf('electrons n_e=%3.2e m^{-3}',neinter)) grid h(1)=plot(vpardav,vperdav,'r--','Displayname',sprintf('Dav H0=%#.2g eV P0=%#.2g kg m^2 s^{-1}',H0/qe,P0)); h(2)=plot(vpargauss,vpergauss,'g--','Displayname',sprintf('Gauss Te=%#.2g eV',Te)); xlim([-1 1]) ylim([-1 1]) subplot(2,2,2) neinter=5e13; vpar=linspace(1,vlight,1000); m=28.0134/1000*6.02214076e23; vper=sqrt(2*qe/m*deltaphicloud(neinter)/(R-1)+vpar.^2/(R-1))/vlight; vpar=vpar/vlight; vpar=vpar(real(vper)~=0); vper=vper(real(vper)~=0); plot(vpar,vper,'b-') hold on plot(vpar,-vper,'b-') plot(-vpar,vper,'b-') plot(-vpar,-vper,'b-') xlabel('\beta_z [m/s]') ylabel('\beta_\perp [m/s]') title(sprintf('N_2^+ ions n_e=%3.2e m^{-3}',neinter)) grid xlim([-1 1]) ylim([-1 1]) subplot(2,2,4) neinter=5e17; vpar=linspace(1,vlight,1000); vper=sqrt(2*qe/m*deltaphicloud(neinter)/(R-1)+vpar.^2/(R-1))/vlight; vpar=vpar/vlight; vpar=vpar(real(vper)~=0); vper=vper(real(vper)~=0); plot(vpar,vper,'b-') hold on plot(vpar,-vper,'b-') plot(-vpar,vper,'b-') plot(-vpar,-vper,'b-') xlabel('\beta_z [m/s]') ylabel('\beta_\perp [m/s]') title(sprintf('N_2^+ ions n_e=%3.2e m^{-3}',neinter)) grid savefig(sprintf('%s_Phia%3.2f_Phib%3.2f_r%3.2f_z%3.2f_R%3.2f_cone.fig',prefix,phia/1e3,phib/1e3,(r+deltar)*1e3,z*1e3, R)) xlim([-1 1]) ylim([-1 1]) %% figure r=double(M.rgrid); r(r<1e-3)=1e-3; r(r>16e-2)=16e-2; phi=zeros(length(r),1); for i=1:length(r) phi(i)=Phi(r(i),14e-2,15e-2,0.001,16e-2,-60000,0,0); end plot(r,phi) phim=phi*ones(1,length(M.zgrid)); function Atheta=Athet(r,z,B0,width,R) Atheta=0.5*B0*(r-width/pi*(R-1)/(R+1)... .*besseli(1,2*pi*r/width).*cos(2*pi*z/width)); end function phi=Phi(r,rbm,rbp,a,b,phia,phib, ne) qe=1.60217662E-19; me=9.109383E-31; eps_0=8.85418781762e-12; q=-qe; phibp=1/log(b/a)*(ne/2*q/eps_0*rbm^2*log(b/rbp)*log(rbp/rbm)+(q*ne/2/eps_0*(rbp^2-rbm^2)*(log(rbp/a)-0.5)+phia)*log(b/rbp)+phib*log(rbp/a)); phibm=1/log(b/a)*(-q/eps_0*ne/2*rbm^2*log(rbm/a)*log(rbp/rbm)+(q/eps_0*ne/2*(rbp^2-rbm^2)*(log(b/rbp)+0.5)+phib)*log(rbm/a)+phia*log(b/rbm)); if(r=a) phi=((phibm-phia)*log(r)+phia*log(rbm)-phibm*log(a))/log(rbm/a); elseif(r>=rbm && r<=rbp) phi=-q/eps_0*ne/4*(r^2-rbp^2)+phibp+(phibp-phibm+q/eps_0*ne/4*(rbp^2-rbm^2))*log(r/rbp)/log(rbp/rbm); elseif(r>rbp && r<= b) phi=((phib-phibp)*log(r)+phibp*log(b)-phib*log(rbp))/log(b/rbp); else error('invalid radial position') end end function phi=Phivacuum(r,a,b,phia,phib) phi=((phib-phia)*log(r)+phia*log(b)-phib*log(a))/log(b/a); end \ No newline at end of file diff --git a/matlab/helper_functions/rbfinder.m b/matlab/helper_functions/rbfinder.m index ae36ec7..c11cd29 100644 --- a/matlab/helper_functions/rbfinder.m +++ b/matlab/helper_functions/rbfinder.m @@ -1,150 +1,163 @@ +%% Computes the initial cloud dimensions for the case of an annular cloud +% trapped by a magnetic mirror configuration (see Davideon nonneutral plasma book chapter 4.3.2 p.117) + %% wr+ H0=3.2e-14; P0=8.66e-25; r0=0.005; -consideredne=5e16; +consideredne=1.5e17; %% wr- % H0=2.0e-16; % P0=-5.7e-25; % r0=0.0025; %% simulated % 5e14 5e15 1e16 5e16 1e17 2e17 3e17 4e17 1e18 3e18 5e18 1e19 r_sim= [0.00497, 0.0053, 0.0056, 0.0059, 0.00628, 0.0050, 0.0053, 0.0052, 0.0054, 0.0052, 0.0054];%, 0.0063]; rplussim=[0.0124, 0.0118, 0.0118, 0.0118, 0.0121, 0.0137, 0.0140, 0.016, 0.0163, 0.020, 0.025];%, 0.042]; nsim= [4.8e14, 4.12e15, 7.5e15, 2.54e16, 4.19e16, 6.42e16, 8.55e16, 9.79e16, 1.34e17, 2.408e17, 2.416e17];%, 3.49e17]; B0=0.21; -Rcurv=1.5; +Rcurv=2.5; L=0.48; z=0.0; + + + qe=1.60217662E-19; me=9.109383E-31; eps0=8.85418781762e-12; +Bcenter=B0;%*(1-(Rcurv-1)/(Rcurv+1)*besseli(0,2*pi*0.003/0.48)); +wce=qe*Bcenter/me; + +H0/wce/P0 + +P0=H0/wce/(1.1*(2/(Rcurv+1))); + ne=5*logspace(14,19,800); rb_=zeros(size(ne)); rbplus=zeros(size(ne)); i=1; minus=@(r) 1-(P0/r+qe*0.5*B0*(r-L/pi*(Rcurv-1)/(Rcurv+1)*besseli(1,2*pi*r/L)*cos(2*pi*z/L)))^2/(2*me*H0); %minus=@(r) 1+qe*((phib-phia)*log(r)+phia*log(b)-phib*log(a))/(log(b/a))/H0-(P0/r+qe*0.5*B0*(r-L/pi*(Rcurv-1)/(Rcurv+1)*besseli(1,2*pi*r/L)*cos(2*pi*z/L)))^2/(2*me*H0); format long; rb_(i)=fzero(minus,r0); plus=@(r) qe^2*ne(i)*rb_(i)/(eps0*H0)*(r-rb_(i)-rb_(i)*log(r/rb_(i)))+1-1/(2*me*H0)*(P0/r+qe*0.5*B0*(r-L/pi*(Rcurv-1)/(Rcurv+1)*besseli(1,2*pi*r/L)*cos(2*pi*z/L)))^2; %plus=@(r) 1+qe*((phib-phia)*log(r)+phia*log(b)-phib*log(a))/(log(b/a))/H0-(P0/r+qe*0.5*B0*(r-L/pi*(Rcurv-1)/(Rcurv+1)*besseli(1,2*pi*r/L)*cos(2*pi*z/L)))^2/(2*me*H0); rbplus(i)=fzero(plus,5*rb_(i)); remainder=ones(size(ne)); remainder(i)=plus(rbplus(i)); for i=2:length(ne) try minus=@(r) 1-(P0/r+qe*0.5*B0*(r-L/pi*(Rcurv-1)/(Rcurv+1)*besseli(1,2*pi*r/L)*cos(2*pi*z/L)))^2/(2*me*H0); %minus=@(r) 1+qe*((phib-phia)*log(r)+phia*log(b)-phib*log(a))/(log(b/a))/H0-(P0/r+qe*0.5*B0*(r-L/pi*(Rcurv-1)/(Rcurv+1)*besseli(1,2*pi*r/L)*cos(2*pi*z/L)))^2/(2*me*H0); - rb_(i)=fzero(minus,0.004); + rb_(i)=fzero(minus,rb_(i-1)); rb_t=rb_(i); plus=@(r) qe^2*ne(i)*rb_t/(eps0*H0)*(r-rb_t-rb_t*log(r/rb_t))+1-1/(2*me*H0)*(P0/r+qe*0.5*B0*(r-L/pi*(Rcurv-1)/(Rcurv+1)*besseli(1,2*pi*r/L)*cos(2*pi*z/L)))^2; %plus=@(r) 1+qe*((phib-phia)*log(r)+phia*log(b)-phib*log(a))/(log(b/a))/H0-(P0/r+qe*0.5*B0*(r-L/pi*(Rcurv-1)/(Rcurv+1)*besseli(1,2*pi*r/L)*cos(2*pi*z/L)))^2/(2*me*H0); rbplus(i)=fzero(plus,1.5*rbplus(i-1)); remainder(i)=plus(rbplus(i)); catch end end f=figure; %subplot(2,1,1) semilogx(ne(remainder~=1),rbplus(remainder~=1)*1e3,'-','displayname','r_b^+') hold on semilogx(ne,rb_*1000,'-','displayname','r_b^-') semilogx(nsim,rplussim*1e3,'+--','displayname','r_b^+ simulated','linewidth',1.5) semilogx(nsim,r_sim*1e3,'+--','displayname','r_b^- simulated','linewidth',1.5) legend ylabel('r_b [mm]') ylim([0 160]) xlabel('n_e(r_b^-) [m^{-3}]') % subplot(2,1,2) % semilogx(ne(remainder~=1),remainder(remainder~=1),'x--') % ylabel('remainder [a.u.]') % xlabel('n_e(r_b^-) [m^{-3}]') f.PaperOrientation='landscape'; f.PaperUnits='centimeters'; papsize=[10 10]; f.PaperSize=papsize; print(f,'rbne','-dpdf','-fillpage') i=find(consideredne>=ne,1,'last'); z=linspace(0,L/2,1000); rb_z=zeros(size(z)); rbplusz=rb_z; minus=@(r) 1-(P0/r+qe*0.5*B0*(r-L/pi*(Rcurv-1)/(Rcurv+1)*besseli(1,2*pi*r/L)*cos(2*pi*z(1)/L)))^2/(2*me*H0); rb_z(1)=fzero(minus,rb_(i)); rb_t=rb_z(1); z_t=z(1); plus=@(r) qe^2*ne(i)*rb_t/(eps0*H0)*(r-rb_t-rb_t*log(r/rb_t))+1-1/(2*me*H0)*(P0/r+qe*0.5*B0*(r-L/pi*(Rcurv-1)/(Rcurv+1)*besseli(1,2*pi*r/L)*cos(2*pi*z_t/L)))^2; rbplusz(1)=fzero(plus,rbplus(i)); remainder(1)=plus(rbplusz(1)); for j=2:length(z) minus=@(r) 1-(P0/r+qe*0.5*B0*(r-L/pi*(Rcurv-1)/(Rcurv+1)*besseli(1,2*pi*r/L)*cos(2*pi*z(j)/L)))^2/(2*me*H0); format long; try rb_z(j)=fzero(minus,rb_z(j-1)); rb_t=rb_z(j); z_t=z(j); plus=@(r) qe^2*ne(i)*rb_t/(eps0*H0)*(r-rb_t-rb_t*log(r/rb_t))+1-1/(2*me*H0)*(P0/r+qe*0.5*B0*(r-L/pi*(Rcurv-1)/(Rcurv+1)*besseli(1,2*pi*r/L)*cos(2*pi*z_t/L)))^2; rbplusz(j)=fzero(plus,rbplusz(j-1)); remainder(j)=plus(rbplusz(j)); catch end end figure() z=[-flip(z(2:end)) z]; rb_z=[flip(rb_z(2:end)) rb_z]; rbplusz=[flip(rbplusz(2:end)) rbplusz]; plot(z(rb_z~=0),rb_z(rb_z~=0),'b') hold on plot(z(rbplusz~=0),rbplusz(rbplusz~=0),'r') ylabel('r_b [m]') ylim([0 0.16]) xlim([-L/2 L/2]) xlabel('z [m]') title(sprintf('n_e=%7.2e [m^{-3}]',ne(i))) ind=rbplusz~=0 & rb_z~=0& ~isnan(rbplusz) & ~isnan(rb_z); ra=rb_z(ind); rb=rbplusz(ind); zvol=z(ind); ra=(ra(1:end-1)+ra(2:end))/2; rb=(rb(1:end-1)+rb(2:end))/2; VOL=2*pi*diff(zvol).*min(ra).*(rb-ra); nplasma=2116800 Nbesl=ne(i)*VOL; Nbe=sum(Nbesl) Nmacrosl=floor(Nbesl/Nbe*nplasma); Nmacro=sum(Nmacrosl) remain=nplasma-Nmacro Nmacrosl(ceil(length(Nmacrosl)/2-remain/2):floor(length(Nmacrosl)/2+remain/2))=Nmacrosl(ceil(length(Nmacrosl)/2-remain/2):floor(length(Nmacrosl)/2+remain/2))+1; Nmacrosl(floor(length(Nmacrosl)/2))=Nmacrosl(floor(length(Nmacrosl)/2))+nplasma-sum(Nmacrosl); Nmacro=sum(Nmacrosl) remain=nplasma-Nmacro msim=me*Nbe/nplasma qsim=qe*Nbe/nplasma datas.ra=ra; datas.rb=rb; datas.z=zvol; datas.npartsslice=Nmacrosl; datas.m=me; datas.weight=sum(Nbesl)/nplasma; datas.q=-qe; datas.H0=H0; datas.P0=P0; datas.temperature=10000; datas.velocitytype=2; datas.radialtype=1; \ No newline at end of file