Professional Documents
Culture Documents
Superfish Manual
Superfish Manual
Superfish Manual
ch/rflectures
SUPERFISHEXERCISE
1416/6/2010
CASRFDenmark SuperfishExercise
Wouldyou liketodesignacavity?
Superfishis2D.The2coordinatescanbeRZincylindricalorXYincartesian.
Lossesmustbesmall(perturbationmethod).
Pleasecomeupwithyourownideasofwhatyouwouldliketodo!
Examplesforyourinspiration:
Noseconecavity:
Ferritecavity:
RFQ:
2pi/3TWstructure:
DTL:
14
16/6/2010
Ellipticalcavities:
CASRFDenmark SuperfishExercise
Poisson/Superfish
ThehistoryofthesecodesstartsinthesixtiesatLBLwithJim Spoerlwhowrotethe
codesMESH andFIELD.TheyalreadysolvedPoissonsequationinatriangular
mesh.
RonHolsinger,KlausHalbachandothersfromLBLimprovedthecodessignificantly;
thecodeswerenowcalledLATTICE,TEKPLOT andPOISSON.
From1975,whenHolsingercametoLosAlamos,developmentcontinuedthereand
Superfishcametolife(Frenchpoisson =Englishfish).Itcoulddoeigenfrequencies!
Since1986,theLosAlamosAcceleratorCodeGroup(LAACG)hasreceivedfunding
fromtheU.S.DepartmentofEnergytomaintainanddocumentastandardversion
ofthesecodes.
In1999,LloydYoung,HarunoriTakeda,andJamesBillentookoverthesupportof
acceleratordesigncodes,whichwereheavilyusedinthedesignoftheSNS.
ThecodeswereportedtoDOS/Windowsfromtheearlynineties,thelatestversion
7isfrom2003.Tomyknowledge,otherversionsarepresentlynotsupported.
Toinstallandruninotherenvironments,pleaseseehere:http://www.winehq.org/
TheLosAlamosAcceleratorCodegroupmaintainthesecodesstill todaywith
competenceandfreeofcharge.
http://laacg1.lanl.gov/laacg/services/services.phtml
1416/6/2010
CASRFDenmark SuperfishExercise
ToinstallSuperfish
Pleaseregisterwhenyoudownload!
ThelatestversionisPoissonSuperfish_7.18from2007.
IassumethatyouhavethefilePoissonSuperfish_7.18.exedownloaded.
Doubleclicktoinstall(youneedadministratorrights!)
1416/6/2010
CASRFDenmark SuperfishExercise
Followthroughtheinstallationprocess
1416/6/2010
CASRFDenmark SuperfishExercise
Irecommendtoaccepttheinstallationfolderlocation
1416/6/2010
CASRFDenmark SuperfishExercise
Aftertheinstallation
Theinstallationshould
havecreatedthe
followinggroup
accessibleunder
Start Programs.
Thisfoldercontains
shortcuts.
1416/6/2010
CASRFDenmark SuperfishExercise
Aftertheinstallation2
Theactualprograms,
documentationandexample
filesshouldbeinthe
installationfolder,normally
C:\LANL
Pleaselookatthe
Documentationfiles,which
areextensive!
Irecommendnottousethe
(Word)macros!Dont
convertthem!
1416/6/2010
CASRFDenmark SuperfishExercise
Autofish
ProbablytheeasiestwaytouseSuperfishisAutofish,whichcombinesthe
mesherAutomesh,thesolverFish andthepostprocessorSFO.
Autofishinputfileshavethesuffix.af,
theycontainthenamelistinputsREG,PO andMT
TostartAutofish,doubleclickonafilewiththeAFextension.ToopentheAF
fileinNotepad,rightclickonthefileandchooseEdit.
Hereanexample,the
fileS500.af:
1416/6/2010
CASRFDenmark SuperfishExercise
Namelistinput
Superfishpassesanumberofparameterswithsocallednamelists;thisisan
oldFORTRANconceptthatallowsrelativelyfreeformatinput.Theformatis
&keyword{variable=value,variable=value,...}&
Acceleratingcavitywithanellipticalsegment!aComment
®KPROB=1,FREQ=700.0,DX=.1,!KPROB=1>Superfish
NBSUP=1,NBSLO=0,NBSRT=1,NBSLF=0,
ICYLIN=1,CCL=1
IRTYPE=1,RMASS=2.0,TEMPK=2.0,TC=9.2,RESIDR=0.10E07,
XDRI=5.1350,YDRI=18.600&
&POX=0.00,Y=0.00&
&POX=0.00,Y=5.00&
&PONT=2,X0=0,Y0=8,A=1.5,B=3,X=1.4918,Y=0.3127&
&POX=1.903,Y=15.533&
&PONT=2,X0=5.1350,Y0=15.36350,X=0.00,Y=3.23650&
&POX=5.1350,Y=0.00&
&POX=0.00,Y=0.00&
1416/6/2010
CASRFDenmark SuperfishExercise
10
Inputofthegeometry
ItisnotaGUI.Youinputthecontourpointbypointlikethis:
&po
&po
&po
&po
&po
&po
&po
&po
&po
&po
x=
x=
x=
x=
x=
x=
x=
x=
x=
x=
0.0,
0.0,
2.0,
15,
15,
11.5,
12,
30.0,
30.0,
0.0,
y= 0.0
y= 23.469
y= 23.469
y= 10.469,
y= 9.1375
y= 6.866
y= 5,
y= 5.0
y= 0.0
y= 0.0
&
&
&
nt=5, radius=13 &
&
&
nt=4, radius=1 &
&
&
&
Forcylindricalproblems,xrunsalongtheaxis,yistheradius.
NTdescribesthetypeofcurve:NT=1forastraightline(default);NT=2fora
circularorellipticalarccenteredonX0,Y0;NT=3forasectionofanhyperbola
symmetricabouttheslope=1linethatpassesthroughthepoint X0,Y0;NT=4fora
counterclockwisecirculararcofagivenRADIUS;andNT=5foraclockwisecircular
arcofagivenRADIUS.(VariableRisanotasynonymforRADIUS forNT=4or5.)
1416/6/2010
CASRFDenmark SuperfishExercise
11
AfterexecutionofAutofish
Doubleclickings500.afhas
runAutofishandthe
followingfileswere
created:
OUTAUT.TXT:
OUTFIS.TXT:
S500.PMI:
S500.SFO:
S500.T35:
TAPE35.INF:
1416/6/2010
DetailedtextoutputfromAutomesh
Listofproblemconstantsanddetailedlogofiterations
youllneeditincaseyoumadeamistakewiththegeometry
Transittimedata canbeusedasinputtoPANDIRA
Fieldsonallsurfaces,summaryofcavitydata!Shunt,...
Thebinarysolutionfile
Informationonthestatusofthe.T35file
CASRFDenmark SuperfishExercise
12
WSFPlot
WSFplotplotsoutputfromprogramsAutomesh,Fish,CFish,Poisson,andPandira.
Itreadstheandplotstheproblemgeometryboundariesplusmesh lines,field
contours,arrows,orcircles.
Forcomplexrffields,WSFplotplotstherealandimaginarypartsindifferent
colors.
ForSuperfishproblems,WSFplotplotsthedrivepointasablack dot.WSFplotalso
displaysthefieldcomponentsatthelocationofthecursor.
Youcanexplorethefielddistributionintheproblemgeometrybymovingthe
mouseorbypressingthearrowkeys.
TostartWSFPlot,justdoubleclickonthe.T35 file.
1416/6/2010
CASRFDenmark SuperfishExercise
13
Howlongtomakethebeamtube?
Thebeamtubeshouldnormallybeawaveguidebelowcutoff;i.e.thefieldsdecay
exponentiallylikewhere
e z
f c2 f 2
ThecutofffrequencyfortheTM01modeinthebeamtubeis
fc
114.8
MHz a / m
Choosethelengthofthebeamtubesuchthatthefieldsattheir endissmallenough.
a 73 mm f c 1.58 GHz
f 80 MHz
Example:,.Whentheoperatingfrequencyis,
33 / m
theattenuationconstantis.
Tohavethefieldsdecayby40dB(afactor100),theexponentshouldbe4.605,
correspondingtoalengthof14cm.
1416/6/2010
CASRFDenmark SuperfishExercise
14
File:GAP51.AF
LHC/PS80MHzprototypegap51mm
®kprob=1,freq=80.,norm=1,ezerot=638298,
kmethod=1,beta=1,zctr=0.4,&
&pox=23.5,y=0.0&
&pox=23.5,y=7.3&
&pox=8.0,y=7.3&
&pox=8.0,y=9.0&
&pox=4.0,y=9.0&
&pont=2,x0=4.0,y0=10.0,r=1.0,theta=0.0&
&pox=3.0,y=12.5&
&pont=2,x0=10.0,y0=12.5,r=7.0,theta=52.283&
&pont=2,x0=+0.4,y0=25.95,r=10.0,theta=175.815&
&pont=2,x0=150.0,y0=15.0,r=160.0,theta=170.00&
&pont=2,x0=150.0,y0=15.0,r=160.0,theta=165.00&
&pont=2,x0=150.0,y0=15.0,r=160.0,theta=160.09&
&pont=2,x0=14.59,y0=64.0,r=16.0,theta=90.0&
&pox=36.50,y=80.0&
&pont=2,x0=36.50,y0=64.0,r=16.0,theta=11.804&
&pont=2,x0=6.57,y0=55.0,r=60.0,theta=0.0&
&pont=2,x0=36.43,y0=55.0,r=17.00theta=52.57199&
&pont=2,x0=36.43,y0=55.0,r=17.00theta=90.00&
&pox=34.98528,y=38.00000&
&pont=2,x0=34.98528,y0=24.34315,x=8.42851,y=10.74569&
&pox=4.77985,y=18.00784&
&pont=2,x0=9.1,y0=12.5,r=7.0,theta=180.0&
&pox=2.1,y=10.0&
&pont=2,x0=3.1,y0=10.0,r=1.0,theta=90.0&
&pox=7.1,y=9.0&
&pox=7.1,y=7.3&
&pox=23.5,y=7.3&
&pox=23.5,y=0.0&
&pox=23.5,y=0.0&
1416/6/2010
CERNPS80MHzcavity
CASRFDenmark SuperfishExercise
15
1st exercise:Inputthegeometry!
Alldimensionsinmm!
r=250
Tip:Writeyournamelistintoafile
namedfilename.am,andstartitlike
Thiswillallowyoutotestitjust
doubleclickingonit.
r=50
Lengthtobedeterminedforanoperatingfrequency
wellbelowcutoff beamtuberadius50mm,field
shouldhavedecayedbyatleast40dB.
1416/6/2010
CASRFDenmark SuperfishExercise
16
Whatistheminimumlengthofthebeamtube?
Thebeamtuberadiusof50mmresultsinacutofffrequencyof
f f
2
c
fc
114.8
2296 .
MHz 0.05
m
2
f c f
for:
f
MHz
2
f c 48 / m
c
Forthefieldstobedampedbyafactor100(40dB),werequire e 100 or
ln100 4.605 ,sowegetanecessaryminimumlengthofabout10cm.
1416/6/2010
CASRFDenmark SuperfishExercise
17
Apossiblesolution:
Ebeltoft cavity
® kprob=1, dx=3,
freq=150,icylin=1,
norm=1,ezerot=5000000,kmethod=1,beta=1,conv=0.1 &
&po x= 0.0,y= 0.0 &
&po x= 0.0,y=470.0 &
&po x=250.0,y=220.0,nt=5, radius=250.0 &
&po x=250.0,y=200.0 &
&po x=200.0,y=150.0,nt=5, radius= 50.0 &
&po x=100.0,y=150.0 &
&po x=100.0,y= 50.0,nt=4, radius= 50.0 &
&po x=250.0,y= 50.0 &
&po x=250.0,y= 0.0 &
&po x= 0.0,y= 0.0 &
Ifthisisinputtoafilefilename.af,youmaydirectlyrunitbydoubleclickingit.
1416/6/2010
CASRFDenmark SuperfishExercise
18
Solutionsummary
Superfishoutputsummaryforproblemdescription:
Ebeltoftcavity
Problemfile:C:\EBELTOFT2010\NUMERICAL\SF\EXERCISE\TEST0.AF61520105:45:28
Allcalculatedvaluesbelowrefertothemeshgeometryonly.
Fieldnormalization(NORM=1):EZEROT=5.00000MV/m
Frequency=157.56044MHz
Particlerestmassenergy=938.272029MeV
Beta=1.0000000
NormalizationfactorforE0=5.081MV/m=36452.569
Transittimefactor=0.9840418
Storedenergy=15.1276087Joules
Usingstandardroomtemperaturecopper.
Surfaceresistance=3.27480milliOhm
Normalconductorresistivity=1.72410microOhmcm
Operatingtemperature=20.0000C
Powerdissipation=413.7217kW
Q=36198.4Shuntimpedance=15.601MOhm/m
Rs*Q=118.542OhmZ*T*T=15.107MOhm/m
r/Q=104.333OhmWakelossparameter=0.02582V/pC
Averagemagneticfieldontheouterwall=9682.62A/m,15.3511W/cm^2
MaximumH(atZ,R=205.84,150.342)=26461.5A/m,114.652W/cm^2
MaximumE(atZ,R=50.255,105.044)=32.3177MV/m,2.40527Kilp.
RatioofpeakfieldsBmax/Emax=1.0289mT/(MV/m)
PeaktoaverageratioEmax/E0=6.3604
AsyouseefromtheSuperfishoutputsummary attheendoftheSFOfile,Superfish
hasinterpretedthesegment#3asahalfstem.Thisisnotwhatweintended!
Tofixthiscreateafilefilename.seg andindicateexplicitlythewallsegments.
1416/6/2010
CASRFDenmark SuperfishExercise
19
SEGfile
TheSEGfileindicateswhichboundarysegmentsaremetall,whicharestems,which
aresymmetryplanes.HeretheminimumSEGfiletoourexample:
filename.seg:
FieldSegments
2
3
4
EndData
End
AfterhavingdefinedtheSEGfile,thelossesarecorrectlycalculatedasindicatedatthe
endoftheSFOfile:
Wall segments:
Segment
Zend
Rend
Emax
Power
P/A
dF/dZ
dF/dR
(mm)
(mm)
(MV/m)
(kW)
(W/cm^2)
(MHz/mm)
(MHz/mm)
---------------------------------------------------------------------------------------------0.0000
470.00
2
250.00
220.00
0.7567
211.9
22.65
-0.2848
-0.2467
3
250.00
200.00
0.7594
16.42
62.21
-3.2477E-02
0.000
4
200.00
150.00
2.083
78.56
94.67
-9.5774E-02 -0.1018
5
100.00
150.00
12.92
92.63
98.29
0.000
-8.9557E-02
6
100.00
50.000
32.37
30.54
30.95
1.019
0.000
7
250.00
50.000
2.619
8.1074E-04 1.7204E-03
0.000
3.9304E-04
---------------------------------------------------------------------------------------------Total
430.1
1416/6/2010
CASRFDenmark SuperfishExercise
20
2nd exercise:Tunecavityto150MHz
Hint:usetheinformationintheSFOfile!
Wall segments:
Segment
Zend
Rend
Emax
Power
P/A
dF/dZ
dF/dR
(mm)
(mm)
(MV/m)
(kW)
(W/cm^2)
(MHz/mm)
(MHz/mm)
---------------------------------------------------------------------------------------------0.0000
470.00
2
250.00
220.00
0.7567
211.9
22.65
-0.2848
-0.2467
3
250.00
200.00
0.7594
16.42
62.21
-3.2477E-02
0.000
4
200.00
150.00
2.083
78.56
94.67
-9.5774E-02 -0.1018
5
100.00
150.00
12.92
92.63
98.29
0.000
-8.9557E-02
6
100.00
50.000
32.37
30.54
30.95
1.019
0.000
7
250.00
50.000
2.619
8.1074E-04 1.7204E-03
0.000
3.9304E-04
---------------------------------------------------------------------------------------------Total
430.1
Forexample,movethesegment2in+Rdirectiontotunedown
and/ormovethesegment6inZdirectiontotunedown.
1416/6/2010
CASRFDenmark SuperfishExercise
21
Apossiblesolutiontotuneto150MHz
Ebeltoft cavity
® kprob=1, dx=3,
freq=150,icylin=1,
norm=1,ezerot=5000000,kmethod=1,beta=1,conv=0.1 &
&po x= 0.0, y= 0.0 &
&po x= 0.0, y=500.0 &
&po x=250.0, y=250.0,nt=5, radius=250.0 &
&po x=250.0, y=200.0 &
&po x=200.0, y=150.0,nt=5, radius= 50.0 &
&po x= 99.26,y=150.0 &
&po x= 99.26,y= 50.0,nt=4, radius= 50.0 &
&po x=250.0, y= 50.0 &
&po x=250.0, y= 0.0 &
&po x= 0.0, y= 0.0 &
1416/6/2010
CASRFDenmark SuperfishExercise
22
OtherparameterssetinREGnamelist:
KPROB=1
CONV=0.1
DX=3
FREQ=150
NORM=1,EZEROT=5000000
KMETHOD=1,BETA=1
1416/6/2010
;indicatesaSuperfishproblem.
;setsgeometricscaletomm(mm/cm=0.1)
;setsmeshsizeto3mm
;setsstartingvalueforeigenfrequencysearch
;normalizesfieldsto5MV/macceleratinggradient
(includingtransittimeeffects)
;forcestheparticlevelocitytothespeedoflight.
CASRFDenmark SuperfishExercise
23
Solutionsummary:
All calculated values below refer to the mesh geometry only.
Field normalization (NORM = 1):
EZEROT =
5.00000 MV/m
Frequency
=
150.00577 MHz
Particle rest mass energy
=
938.272029 MeV
Beta = 1.0000000
Normalization factor for E0 = 5.073 MV/m =
34383.609
Transit-time factor
=
0.9856796
Stored energy
=
15.7073852 Joules
Using standard room-temperature copper.
Surface resistance
=
3.19533 milliOhm
Normal-conductor resistivity
=
1.72410 microOhm-cm
Operating temperature
=
20.0000 C
Power dissipation
=
408.5964 kW
Q
=
36232.4
Shunt impedance =
15.744 MOhm/m
Rs*Q =
115.774 Ohm
Z*T*T =
15.296 MOhm/m
r/Q =
105.543 Ohm Wake loss parameter =
0.02487 V/pC
Average magnetic field on the outer wall =
9132.51 A/m, 13.3249 W/cm^2
Maximum H (at Z,R = 205.831,150.341)
=
25537.2 A/m, 104.192 W/cm^2
Maximum E (at Z,R = 49.399,103.725)
=
32.7996 MV/m, 2.48702 Kilp.
Ratio of peak fields Bmax/Emax
=
0.9784 mT/(MV/m)
Peak-to-average ratio Emax/E0
=
6.4660
1416/6/2010
CASRFDenmark SuperfishExercise
24
Examplecavitytunedto150MHz
1416/6/2010
CASRFDenmark SuperfishExercise
25
CanSuperfishdotravellingwaves?
hereahintonapapertissue...
1416/6/2010
CASRFDenmark SuperfishExercise
26
3rd exercise:HowtoconstructaTWsolutionfromaSWsolution?
Floquetstheorem:
Foraperiodicstructurewithperiod,Floquetstheoremstatesthatithassolutions
thataresimilarfromoneperiodtothenext,theirdifferencecanbecharacterizedby
justacomplexfactor.
Thesesolutionsarethemodes oftheperiodicstructure(alsoBlochwaves).
Ifwerestrictourselvestoalosslessstructure,thenforapropagatingmodethe
complexfactorhastheabsolutevalue1andischaracterizedbyjustarotationin
e j
phase;forthisreason,letuswritethefactoras.
f z f z e j
Itdescribesthefieldofaforwardtravellingwave.
Floquetstheoremfurtherstatesthatifthereisasolution,thereisalsothe
e j
complexconjugatesolution.Thecomplexconjugateoftheabovedescribesthe
e j
backwardtravellingwave:
f * z f * z e j
isthephaseadvancepercell.
1416/6/2010
CASRFDenmark SuperfishExercise
27
Standingwave
Ifyousuperimposeaforwardtravellingandabackwardtravellingwavewiththe
sameamplitude,youobtainastandingwave.Superfishwillcalculatestanding
waves.Ifwillbearealfunctionofz:
s z f z f * z
Wewillnowtrytoinverttheabovethoughtsandtrytoextractthecomplex
f z
functionfromtherealfunctionthatwehaveobtainedfromSuperfish.
s z
f z
Wecanuseourknowledgeabouttheperiodicityof,sincetheSuperfish
solutionforthefieldisknownformorethanoneperiod;therealsolutioninthe
nextcellisalsoknown:
s z f z e j f * z e j
j
nd gives:
e
Multiplyingthe1st equationwithandsubtractingthe2
s z s z e j f z e j e j
s z s z e j
f z
Thiscanbesolvedfor
.
e j e j
1416/6/2010
CASRFDenmark SuperfishExercise
28
Example:CTF3DBA
Here(simplified)3cellsofthedrivebeam
acceleratorofCTF3,theCLICTestFacilityatCERN.
Shownbelowisthestandingwavepattern
obtainedbythesuperpositionoftwocounter
running2/3modesandtheaxialfieldonaxis.
1416/6/2010
CASRFDenmark SuperfishExercise
29
Themodesofthe3cellclosedstructure:
0mode:2.938GHz
/3mode:2.959GHz
2/3mode:2.999GHz
mode:3.019GHz
1416/6/2010
CASRFDenmark SuperfishExercise
30
Reconstructingthetravellingwave:
Extractthefieldonaxis:tothisend,youcall
theinterpolationprogramSF7,whichcan
extractthefield*).Tostartit,rightclickonthe
T35file(PoissonSuperfishSolution)and
selectInterpolate(SF7) fromthepulldown
menu;youwillseethewindowshownhere.
Selecttheaxis!Thiswillcreatethefile
OUTSF7.TXT fromwhichyoucanreadwith
anotherprogram(IusedMathematica).The
axialfieldontheaxislookslikethis:
*)Duringthelecture,Ishowedadifferent,moredifficultway, soIdliketo
acknowledgeCiprianPlostinar,whopointedthismoreelegantsolutionouttome!
1416/6/2010
CASRFDenmark SuperfishExercise
31
Mathematicaimplementation:
HerenowapossibleMathematica implementationtosolve
1416/6/2010
CASRFDenmark SuperfishExercise
s z s z e j
f z
e j e j
32