Spectral Power-law Formation by Sequential Particle Acceleration in Multiple Flare Magnetic Islands
Author
Silvina Guidoni
Title
Spectral Power-law Formation by Sequential Particle Acceleration in Multiple Flare Magnetic Islands
Description
The notebook generates two Mathematica interactive plots (Figures 16 and 18 of the paper published in the Astrophysical Journal, https://doi.org/10.3847/1538-4357/ac39a5), where the user can drag sliders to change parameters t, r, n, alpha, and background temperature T, to interactively update the plots.
Category
Academic Articles & Supplements
Keywords
power law particle acceleration thermal sequential
URL
http://www.notebookarchive.org/2022-03-7v1j79x/
DOI
https://notebookarchive.org/2022-03-7v1j79x
Date Added
2022-03-17
Date Last Modified
2022-03-17
File Size
91.11 kilobytes
Supplements
Rights
CC BY-NC-SA 4.0
Download
Open in Wolfram Cloud
This file contains supplementary data for S. E. Guidoni, J. T. Karpen and C. R. DeVore, “Spectral Power-law Formation by Sequential Particle Acceleration in Multiple Flare Magnetic Islands,” Astrophysical Journal, 925(2), 2022 191. https://doi.org/10.3847/1538-4357/ac39a5.
Spectral Power-law Formation by Sequential Particle Acceleration in Multiple Flare Magnetic Islands
Spectral Power-law Formation by Sequential Particle Acceleration in Multiple Flare Magnetic Islands
Silvina Guidoni
This notebook generates Figures 16 and 18 of the paper as two Mathematica interactive plots.
(*Note:Thefirstcellmaytakeacoupleofminutestorun,buttherestofthecellsrunmuchfaster*)
(*FunctiondefinitionsfortheAnalyticalModel*)(*GeneralformofindividualcycleddistributionswithenergyeninunitsofKT*)(*Maxwellian(a=1/2)*)(*Exponential(a=0)*)generalform[r_,j_,a_,en_]=;(*Fulldistribution*)Ffn[r_,t_,n_,a_,en_]=Sum[generalform[r,j,a,en],{j,1,n}]+generalform[r,n,a,en];(*Spectralindex*)deltaspec[t_,r_]=1-;(*gfunction*)gfunct[t_,r_,a_,x_]=Exp[-];(*Extremalocationofgfunction*)Simplify[Solve[D[gfunct[t,r,a,x],x]0,x]]Simplify[D[gfunct[t,r,a,x],{x,1}]](*Maximalocationofgjfunction*)maxxk[t_,r_,a_]=Log10[a+deltaspec[t,r]];(*Maximaofgjfunction*)maxxg[t_,r_,a_]=;(*Firstderivativeofgjfunction*)dgdx[t_,r_,a_,x_]=gfunct[t,r,a,x]Log[10](a+deltaspec[t,r]-);(*Secondderivativeofgjfunction*)d2gdx2[t_,r_,a_,x_]=gfunct[t,r,a,x](-);(*Pulsegfullwidth=2*)gwidth[t_,r_,a_]=2.0/(Sqrt[deltaspec[t,r]+a]Log[10]);(*Pulsewidth-separationratio*)overlap[t_,r_,a_]=gwidth[t,r,a]/Log10[r];(*function*)finitegfunction[t_,r_,a_,x_,n_]=Sum[gfunct[t,r,a,x-jLog10[r]],{j,1,n}]+gfunct[t,r,a,x-nLog10[r]];(*Periodicfunction*)fullgfunction[t_,r_,a_,x_]=Sum[gfunct[t,r,a,x-jLog10[r]],{j,-Infinity,Infinity}];(*Approximationofperiodicfunctionwithfinitesum,forplottingpurposes*)approxfullgfunction[t_,r_,a_,x_,nmin_,nmax_]=Sum[gfunct[t,r,a,x-jLog10[r]],{j,-nmin,nmax}];(*Approximationoffulldistributioninpowerrange*)Ffnapproximation[r_,t_,nmin_,nmax_,a_,en_]=approxfullgfunction[t,r,a,Log10[en],nmin,nmax];(*DefineFourierSeries*)Needs["FourierSeries`"](*FunctiontocalculateFouririerseriesfor*)foutrfunct[t_,r_,y_,a_]=gfunct[t,r,a,yLog10[r]];(*Averageofgisfouriertransformatv=0,*)(*Analytical*)averg[t_,r_,a_]=FourierTransform[foutrfunct[t,r,y,a],y,0,FourierParameters{0,-2π}];(*Numerical*)avergN[t_,r_,a_]:=NFourierTransform[foutrfunct[t,r,y,a],y,0,FourierParameters{0,-2π}];(*PowerlawnormalizationconstantC*)(*Analytical*)cnorm[t_,r_,a_]=averg[t,r,a];(*Numerical*)cnormN[t_,r_,a_]:=avergN[t,r,a];
1
Gamma[1+a]
a
en
j
r
Exp
-en
j
r
j
r
(1-t)
t
j
t
n
t
Log10[t]
Log10[r]
x
10
(a+deltaspec[t,r])x
10
x
m
a+deltaspec[t,r]
a+deltaspec[t,r]
x
10
2
(Log[10])
2
(a+deltaspec[t,r]-)
x
10
x
10
-g()
x
m
g''()
x
m
(n)
g
f
t
1-t
(1-t)
-deltaspec[t,r]
en
Gamma[1+a]t
ℱ
0
ℱ
0
ℱ
0
(1-t)
Gamma[1+a]t
(1-t)
Gamma[1+a]t
Out[]=
x
Log1+a-
Log[t]
Log[r]
Log[10]
Out[]=
-Log[10]((-1+-a)Log[r]+Log[t])
x1+a-
Log[t]
Log[r]
10
-
x
10
x
10
Log[r]
In[]:=
(*ConvertTtokeV*)boltzmanncosnt=1.380649;(*Joule/Kelvin*)eleccharge=1.6021766210;(*Coulombs*)(*ImputtemperatureinMK*)kTMKtokeV[TMK_]=TMKboltzmanncosnteleccharge;(*keV*)kTMKtokeV[2]
k
B
-23
10.0
-19
10.0
3
10.0
Out[]=
0.172347
In[]:=
(*Figurecolors*)Redfig=RGBColor,,Bluefig=RGBColor,,Greenfig=RGBColor,,colorfig=Bluefig(*Coloroffigure*)
204
255
51
255
17
255
0
255
119
255
187
255
0
255
153
255
136
255
Out[]=
Out[]=
Out[]=
Out[]=
In[]:=
(*Figuretextsettings*)align[Left]={-1,0};align[Center]={0,0};basefontsize=14;(*TextlabelsandLines*)SetOptions[Plot,BaseStyle{FontFamily"Times",Italic,FontSizebasefontsize}];(*TextFormat*)textsizeplot=14;
In[]:=
(***Plot***)Manipulate(*Approximatelengthofpower-law*)powerlawrange=numpulsesLog10[rrr];(*plotlimits*)(*x-axisrange*)ff1=0.2;ff2=0.5;xmin=;xmax=;maxexpx=Round[Log10[xmax]];minexpx=Round[Log10[xmin]];jumpexpx=1;(*juminexponentofxtickmarks*)jumpexpx=(maxexpx-minexpx)6.0;(*juminexponentofxtickmarks*)(*Transferfactor*)ttt=;(*y-axislogsettings*)ymax=cnormN[ttt,rrr,aa];maxexpy=Round[Log10[ymax]];ymin=cnormN[ttt,rrr,aa]Ffn[rrr,ttt,numpulses,aa,xmin]cnormN[ttt,rrr,aa];minexpy=Round[Log10[ymin]];jumpexpy=(maxexpy-minexpy)4.0;(*juminexponentofytickmarks*)thickness1=0.002;(*thicknessofpower-law*)thickness2=0.004;(*thicknessofdistribution*)(*x-Axislabel*)xaxislabeltext=Text[Style["x-axis: to convert to keV, multiply by "<>ToString[NumberForm[kTMKtokeV[tMK],{3,2}]]<>" (T = "<>ToString[NumberForm[tMK,{3,1}]]<>"MK)",Black,FontSizetextsizeplot]];(*PlotVerticallineatE_leb*)(*PlotVVerticallineatE_heb*)wavy=LogLogPlotFfn[rrr,ttt,numpulses,aa,en],cnormN[ttt,rrr,aa],{en,xmin,xmax},GridLines,,None,GridLinesStyle{{Dashed,Black,Thickness[thickness2]},None},PlotStyle{{Redfig,Thickness[thickness2]},{Black,Thickness[thickness1]}},PlotRange{{xmin,xmax},{ymin,ymax}},PlotLabelxaxislabeltext,AxesStyleDirective[Black,Thickness[0.002],Arrowheads[{0.0,0.03}]],AxesLabel"(T)",Style"",Black,FontSizetextsizeplot,TicksStyleDirective[FontSizetextsizeplot],{{texp,-3,"Transfer factor "},-8,0,0.3,Appearance"Labeled"},{{rrr,4.45,"Efficiency r"},1.1,10,0.1,Appearance"Labeled"},{{numpulses,5,"Cycles n"},1,20,1,Appearance"Labeled"},{{aa,0,"α"},0,0.5,0.1,Appearance"Labeled"},{{tMK,2,"T(MK)"},0.5,40,1,Appearance"Labeled"},SaveDefinitionsTrue
maxxk[ttt,rrr,aa]-ff1powerlawrange
10
(maxxk[ttt,rrr,aa]+numpulsesLog10[rrr])+ff2powerlawrange
10
texp
10.0
-deltaspec[ttt,rrr]
xmin
-deltaspec[ttt,rrr]
xmax
-deltaspec[ttt,rrr]
xmin
-deltaspec[ttt,rrr]
en
maxxk[ttt,rrr,aa]+Log10[rrr]
10
maxxk[ttt,rrr,aa]+numpulsesLog10[rrr]
10
E
k
B
(n)
f
f
texp
t
Out[]=
| ||||||||||||||||||||||||||||
|
In[]:=
(***********)(*Plot*)(*Plotgfnfunction(normalizeeverythingtofouriertermk=0*)Manipulate(*Transferfactor*)ttt=;(*Approximatelengthofpower-law*)powerlawrange=numpulsesLog10[rrr];(*numberofpulsestotheleftandrightforapproximationofperiodicfunction*)divide=3;ntermmin=Quotient[numpulses,divide];ntermmax=numpulses+ntermmin;(*x-axisrange*)ff=0.2;xmin=maxxk[ttt,rrr,aa]-ffpowerlawrange;xmax=(maxxk[ttt,rrr,aa]+numpulsesLog10[rrr])+ffpowerlawrange;(*y-axisrange*)ymin=0.0;percmax=0.1;ymax=1.0(1.0+percmax);(*normalizationconstant,*)normf=avergN[ttt,rrr,aa];(*Sumofpulses*)(*Print["Normalization constant: ",normf];*)cconst=Graphics[{Dashed,colorfig,Thick,Line[{{xmin,1.0},{xmax,1.0}}]}];(*normalized*)fff=Plot[{finitegfunction[ttt,rrr,aa,x,numpulses]/normf},{x,xmin,xmax},PlotRange{{xmin,xmax},{ymin,ymax}},TicksStyle{Black,Directive[FontOpacity0,FontSize0]},AxesLabel{"x= log ",None},PlotStyle{{colorfig,Thickness[0.003]}},AxesStyleDirective[Black,Thickness[0.002],Arrowheads[{0.0,0.03}]]];(*normalizedwithn=≈∞*)largen=Plot[{approxfullgfunction[ttt,rrr,aa,x,ntermmin,ntermmax]/normf},{x,xmin,xmax},PlotRange{{xmin,xmax},{ymin,ymax}},PlotStyle{{Dotted,colorfig,Thickness[0.003]}},AxesStyleDirective[Black,Thickness[0.002],Arrowheads[{0.0,0.03}]]];(*Verticallineatmaxoffirstpulse,estimatedleb*)xmaxleb=Graphics[{Black,Line[{{maxxk[ttt,rrr,aa]+Log10[rrr],1.0(1.0-percmax)},{maxxk[ttt,rrr,aa]+Log10[rrr],ymax}}]}];(*Verticallineatmaxoffirstpulse,estimatedleb*)xmaxheb=Graphics[{Black,Line[{{maxxk[ttt,rrr,aa]+numpulsesLog10[rrr],1.0(1.0-percmax)},{maxxk[ttt,rrr,aa]+numpulsesLog10[rrr],ymax}}]}];(*Sequenceofnormalizedpulses,exceptlast*)(*limitrangeofplottoseveralpulsewidthstopreventtoosmallnumbers*)numwidths=2;gpulses=Table[Plot[{gfunct[ttt,rrr,aa,x-jLog10[rrr]]/normf},{x,maxxk[ttt,rrr,aa]+jLog10[rrr]-numwidthsgwidth[ttt,rrr,aa],maxxk[ttt,rrr,aa]+jLog10[rrr]+numwidthsgwidth[ttt,rrr,aa]},PlotRange{{xmin,xmax},{ymin,ymax}},PlotStyle{{Dotted,Black,Thickness[0.002]}},TicksStyle{Black,Directive[FontOpacity0,FontSize0]},AxesStyleDirective[Black,Thickness[0.002],Arrowheads[{0.0,0.03}]]],{j,1,numpulses-1}];(*Lastpulse,whichisdifferentlyweightedin*)gpulselast=Plot(gfunct[ttt,rrr,aa,x-numpulsesLog10[rrr]])normf,{x,maxxk[ttt,rrr,aa]+numpulsesLog10[rrr]-numwidthsgwidth[ttt,rrr,aa],maxxk[ttt,rrr,aa]+numpulsesLog10[rrr]+numwidthsgwidth[ttt,rrr,aa]},PlotRange{{xmin,xmax},{ymin,ymax}},PlotStyle{{Dotted,Black,Thickness[0.002]}},AxesStyleDirective[Black,Thickness[0.002],Arrowheads[{0.0,0.03}]];www=Show[fff,cconst,largen,xmaxleb,xmaxheb,gpulses,gpulselast],{{texp,-3,"Transfer factor "},-8,-0.00001,0.03,Appearance"Labeled"},{{rrr,2.12,"Efficiency r"},1.1,10,0.1,Appearance"Labeled"},{{numpulses,9,"Cycles n"},1,20,1,Appearance"Labeled"},{{aa,0,"α"},0,0.5,0.1,Appearance"Labeled"},SaveDefinitionsTrue
(n)
g
f
texp
10.0
ℱ
0
(n)
g
f
E
(n≈∞)
g
f
(n)
g
f
1
1-ttt
texp
t
Out[]=
Cite this as: Silvina Guidoni, "Spectral Power-law Formation by Sequential Particle Acceleration in Multiple Flare Magnetic Islands" from the Notebook Archive (2022), https://notebookarchive.org/2022-03-7v1j79x
Download