High Brightness Electron Beam Diagnostics and their ... - CASA

High Brightness Electron Beam Diagnostics and their ... - CASA High Brightness Electron Beam Diagnostics and their ... - CASA

casa.jlab.org
from casa.jlab.org More from this publisher
04.08.2013 Views

ofthelinechargeandtheobserverelectron.Theretardedangle0isrelatedtothepresentangle directionfromthelinecenterandtheobserverelectron.Thequantityinbracketmustbeevaluated forthepresentanglesrij(resp.fij)thatcorrespondstotheanglebetweentherear(resp.front) wherei,iaretheusualLorentzfactorsfortheorbitinglinei,bnijisthenormedvectoralongthe wherejisthetotaltransversedisplacementoftheobserverelectronwithrespecttothetrajectory ofthelinecharge. ThedenominatorofEqn.(B.9)canalsobeexpressedasafunctionoftheretardedtimeusinggeo- iandtheobserverjwehave: byatranscendequationderivedfromgeometricalconsideration.Forinstanceforthelinecharge metricalconsideration. 2iR2i(0)2=2j+2Ri(Ri+xj)(1cos(0)) (B.10) linechargecanbereplacedbyamacroparticlewhichcarry,asinPARMELA,auniformcharge. Theextensiontoabunchofelectrondescribedbyamacroparticlemodelisstraightforward:the whereNisthenumberofmacroparticleinthemodel. Infactthis\pointbypoint"typemacroparticlealgorithmhasalreadybeenimplementedinthe Thereforethetotalelectriceldproducedbythebunchofmacroparticleataretardedtimeonan JLabPARMELAversiontosimulatemacropaticleinteractionviaspace-chargeforce.Hencewe observermacroparticleatthepresenttimesimplywritesasthesum: caneasilymodifytheexistingalgorithmtosimulateCSRselfinteraction. TheretardedangleisevaluatedasdescribedbyCarlstenusinganiterativeprocesstosolvethe Etotal j=NXi=1Ei;j (B.11) transcendentequationEqn.(B.10).ThemodeldescribedintheprevioussectionasbeenimplementedintheJLabversionofPARMELA(bothaHP9000andaCrayC90versions).Pratically, whenthebunchentersabendinwhichtheuserwishtoincludeCSRinteraction,theradiusofthe trajectoryofeachmacroparticleisealuatedandthen,basedongeometricalconsideration,allthe parameterinEqn.(B.9)arecomputedandtheeldduetobunchonamacroparticleisevaluated. intheBENDCSRcardthesubroutinecsriscalled. Thisoperationisperformedforeachmacroparticleandthereforealargenumberofiterationis BENDcard.Thiscardmustbeusedtoindicatethebendingmagnetwheretheuserwishtosimulate CSRinteraction.Secondly,wehavemodiedtheprogramPARMDYNsothatwhentheelectronsare showningrey:rstlywehaveintroducedanewcardBENDCSRwhichfollowthesamesyntaxasthe needed.TypicalCPUtimeneededtorunoneFELchicaneisapproximately1hrwallclock.A blockdiagramofthePARMELAcodeispresentedinFig.B.1.Themodicationperformedare

Initialization MAIN Stop INPUT DECK INPUT BEAM START/RESTART PARMDYM (particle dynamics) SCHEFF Space-Charge Loop on time steps Loop on particles SAVE CSR Csr Interaction FigureB.1:Parmelasimpliedalgorithm. BENDCSR BEND DRIFT QUAD POISSON CELL SWAP/ OUPUT BRANCHES Yes No LAST PARTICLE OUPUT No End Yes END

Initialization MAIN<br />

Stop<br />

INPUT DECK INPUT BEAM START/RESTART<br />

PARMDYM (particle dynamics)<br />

SCHEFF<br />

Space-Charge<br />

Loop on time steps<br />

Loop on particles<br />

SAVE<br />

CSR<br />

Csr Interaction<br />

FigureB.1:Parmelasimpliedalgorithm.<br />

BENDCSR BEND DRIFT QUAD POISSON CELL<br />

SWAP/ OUPUT BRANCHES<br />

Yes<br />

No<br />

LAST<br />

PARTICLE<br />

OUPUT<br />

No End Yes<br />

END

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!