Sample Input data for ELFIN The Three-Dimensional Free Electron Laser Simulation Code Takeshi NAKAMURA SPring-8 Kamigori-cho, Ako-gun, Hyogo 678-12, JAPAN nakamura@spring8.or.jp 1) High Gain Long Undulator Below is the input file for the case B in Table 1 in "OPTICAL GUIDING SIMULATIONS FOR HIGH GAIN-SHORT WAVE LENGTH FELs," J.E. LaSALA, D.A.G. DEACON and E.T. SCHARLEMANN, Nucl. Instr. and Meth. A250(1986)389. ===ELFIN input data========================================================== Num_of_Grid Num_of_Particle 128 16000 ===== Number_of_Repetition ================================================== ELFIN repeats the section between BEGIN...END in Configulation defined below 1 -----Configuration of System ------------------------------------------------ (elemant names are within 6 characters) 'AINI ESRC FEL TERM' ==== Element Parameter ekind=[FEL,ESOURC,AINIT,MIRROR,AFREE,OUTPUT,TERM]===== Name Kind_of_Element 'FEL' 'FEL' ----------------------------------------------------------------------------- Width_of_Calcuraion_Area(SquareArea) 3.200000e-03 ----------------------------------------------------------------------------- Num_of_Sampling_Points Num_of_Step_along_Z 18 36 -----------WIGGLER PARAMETERS------------------------------------------------ Length aw0(r.m.s.) Period hx hy Kind[OPTIC,STATIC] 27.0000 (4.0600,0) 0.1140 (55.1157,0) (55.1157,0) 'STATIC' ----------------------------------------------------------------------------- wignum wigpar(1) wigpar(2) wigpar(3) wigpar(4)(reserved parameter for wig.) 1 0. 0. 0. 0. -----------SPATIAL FILTERING (width and # of spline on it )------------------ Filter_Width(If you don't want, this >> width ) Num_of_Splining 3.200000e-03 1 ---OUTPUT CONTROL PARAMETERS ------------------------------------------------ Laser_Histgram(x y) _Print(x y) Particle_Histgram(x y) _Print(x y) 1 1 1 1 1 1 1 1 ============================================================================= Name Kind_of_Element 'ESRC' 'ESOURC' ----------------------------------------------------------------------------- Peak_Current(A) 2.7000e+02 ----------------------------------------------------------------------------- Gamma Gamma_Spread(r.m.s. for Gaussian) 2.0000e+03 1.1578e+00 ----------------------------------------------------------------------------- Distrbution_Type(Gaussian=0) 0.0 ----------------------------------------------------------------------------- X X_Spread Beta_x Beta_x_Spread Distance_To_Weist 0.0000e+00 2.7600e-04 0.0000e+00 3.0800e-05 0.0000 ---Same parameters as x direction above-------------------------------------- Y Y_Spread Beta_Y Beta_Y_Spread Distance_To_Weist 0.0000e+00 2.7600e-04 0.0000e+00 3.0800e-05 0.0000 ----------------------------------------------------------------------------- 4-Dimemsional_Dstribution_Type(x,bx,y,by) 0.0 ----------------------------------------------------------------------------- Num_of_Longitudinal_Points 4 --- seed for random number generator ---------------------------------------- Random_Seed Update_Seed_or_not_for_each_time_This_module_called 5 0 --- ignore this ------------------------------------------------------------- redfct 0.0 ============================================================================= Name Kind_of_Element 'AINI' 'AINIT' ----------------------------------------------------------------------------- Width 3.200000e-03 ----------------------------------------------------------------------------- Laser_Wave_Length Input_Power Weist_Size(1/e) Distance_To_Weist 2.5000e-07 1.0000e+01 6.0000e-04 4.5000 ============================================================================= Name Kind_of_Element 'DEBUG' 'DEBUG' ============================================================================= Name Kind_of_Element 'TERM' 'TERM' ============================================================================= 2) Oscillator Following is an input file for oscillator configulation with a cavity. This is for the case of Table 1 in "THREE-DIMENSIONAL SIMULATIONS OF FREE ELECTRON LASER PHYSICS," B. D. McVey, Nucl. Instr. and Meth. A250(1986)449. ===ELFIN input data========================================================== Num_of_Grid Num_of_Particle 128 16000 ===== Number_of_Repetition ================================================== ELFIN repeats the section between BEGIN...END in Configulation defined below 3 -----Configuration of System ------------------------------------------------ (elemant names are within 6 characters) 'AINI BEGIN ESRC FEL AF1 OUT MRF AF2 AFH OUT AFH AF3 OUT MRB AF4 END TERM ' ==== Element Parameter ekind=[FEL,ESOURC,AINIT,MIRROR,AFREE,OUTPUT,TERM]===== Name Kind_of_Element 'FEL' 'FEL' ----------------------------------------------------------------------------- Width_of_Calcuraion_Area(SquareArea) 1.280000e-02 ----------------------------------------------------------------------------- Num_of_Sampling_Points Num_of_Step_along_Z 9 36 -----------WIGGLER PARAMETERS------------------------------------------------ Length aw0(r.m.s.) Period hx hy Kind[OPTIC,STATIC] 1.0 (5.4089850e-01,0) 2.73e-02 (0,0) (2.30153e+02,0) 'STATIC' ----------------------------------------------------------------------------- wignum wigpar(1) wigpar(2) wigpar(3) wigpar(4)(reserved parameter for wig.) 1 0. 0. 0. 0. -----------SPATIAL FILTERING (width and # of spline on it )------------------ Filter_Width(If you don't want, this >> width ) Num_of_Splining 1.280000e-02 1 ---OUTPUT CONTROL PARAMETERS ------------------------------------------------ Laser_Histgram(x y) _Print(x y) Particle_Histgram(x y) _Print(x y) 1 1 1 1 1 1 1 1 ============================================================================= Name Kind_of_Element 'ESRC' 'ESOURC' ----------------------------------------------------------------------------- Peak_Current(A) 1.00000e+02 ----------------------------------------------------------------------------- Gamma Gamma_Spread(r.m.s. for Gaussian) 42.6869 2.134345e-1 ----------------------------------------------------------------------------- Distrbution_Type(Uniform=-2) -2 ----------------------------------------------------------------------------- X X_Spread Beta_x Beta_x_Spread Distance_To_Weist 0.00000e+00 5.67785e-04 0.00000e+00 1.68190e-03 5.00000e-01 ---Same parameters as x direction above-------------------------------------- Y Y_Spread Beta_Y Beta_Y_Spread Distance_To_Weist 0.00000e+00 5.67785e-04 0.00000e+00 1.68190e-03 5.00000e-01 ----------------------------------------------------------------------------- 4-Dimemsional_Dstribution_Type(x,bx,y,by) 0.0 ----------------------------------------------------------------------------- Num_of_Longitudinal_Points 16 --- seed for random number generator ---------------------------------------- Random_Seed Update_Seed_or_not_for_each_time_This_module_called 5 0 --- ignore this ------------------------------------------------------------- redfct 0.0 ======== Initial Laser Field ================================================= Name Kind_of_Element 'AINI' 'AINIT' ----------------------------------------------------------------------------- Width 1.280000e-02 ----------------------------------------------------------------------------- Laser_Wave_Length Input_Power Weist_Size(1/e) Distance_To_Weist 1.00000e-05 1.00000e+01 1.41835e-03 5.00000e-01 ============================================================================= Name Kind_of_Element 'OUT' 'OUTPUT' ---OUTPUT CONTROL PARAMETERS ------------------------------------------------ Laser_Histgram(x y) _Print(x y) Particle_Histgram(x y) _Print(x y) 1 0 1 0 1 0 1 0 ============================================================================= Name Kind_of_Element 'MRF' 'MIRROR' -Width_of_Calcuration Area -------------------------------------------------- Width 5.120000e-02 -Curvature---Diameter-Refrectance--Tilts------Shifts-------Num_of_Spline----- x y x y 3.350000e+00 1.0 0.80 0.0 0.0 0.0 0.0 2 ============================================================================= Name Kind_of_Element 'MRB' 'MIRROR' ----------------------------------------------------------------------------- Width 5.120000e-02 -Curvature---Diameter-Refrectance--Tilts------Shifts-------Num_of_Spline----- x y x y 3.800000e+00 1.0 1.0 0.0 0.0 0.0 0.0 2 ======= Free Space for Laser ================================================ Name Kind_of_Element 'AF1' 'AFREE' ----------------------------------------------------------------------------- Width_At_Entrance Width_At_Exit 1.280000e-02 5.120000e-02 ----------------------------------------------------------------------------- Length 2.726193e+00 ============================================================================= Name Kind_of_Element 'AF2' 'AFREE' ----------------------------------------------------------------------------- Width_At_Entrance Width_At_Exit 5.120000e-02 1.280000e-02 ----------------------------------------------------------------------------- Length 2.726193e+00 ============================================================================= Name Kind_of_Element 'AF3' 'AFREE' ----------------------------------------------------------------------------- Width_At_Entrance Width_At_Exit 1.280000e-02 5.120000e-02 ----------------------------------------------------------------------------- Length 3.191807e+00 ============================================================================= Name Kind_of_Element 'AF4' 'AFREE' ----------------------------------------------------------------------------- Width_At_Entrance Width_At_Exit 5.120000e-02 1.280000e-02 ----------------------------------------------------------------------------- Length 3.191807e+00 ============================================================================= Name Kind_of_Element 'AFH' 'AFREE' ----------------------------------------------------------------------------- Width_At_Entrance Width_At_Exit 1.280000e-02 1.280000e-02 ----------------------------------------------------------------------------- Length 5.000000e-01 ============================================================================= Name Kind_of_Element 'DEBUG' 'DEBUG' ============================================================================= Name Kind_of_Element 'TERM' 'TERM' ============================================================================= 3) Variable Name in ELFIN and Input File Following input file shows that the relation of the variable name used in ELFIN and input data for the case 2). ===ELFIN input data========================================================== Num_of_Grid Num_of_Particle ===== Number_of_Repetition ================================================== ELFIN repeats the section between BEGIN...END in Configulation defined below -----Configuration of System ------------------------------------------------ (elemant names are within 6 characters) ===== FEL device: CALL rnfel in fel.f ======================================= Name Kind_of_Element CALL rnfel in fel.f 'FEL' 'FEL' ----------------------------------------------------------------------------- Width_of_Calcuraion_Area(SquareArea) ----------------------------------------------------------------------------- Num_of_Sampling_Points Num_of_Step_along_Z -----------WIGGLER PARAMETERS------------------------------------------------ Length aw0(r.m.s.) Period hx hy Kind[OPTIC,STATIC] ----------------------------------------------------------------------------- wignum wigpar(1) wigpar(2) wigpar(3) wigpar(4)(reserved parameter for wig.) -----------SPATIAL FILTERING (width and # of spline on it )------------------ Filter_Width(If you don't want, this >> width ) Num_of_Splining ---OUTPUT CONTROL PARAMETERS ------------------------------------------------ Laser_Histgram(x y) _Print(x y) Particle_Histgram(x y) _Print == Electron Source : CALL rnesrc in esrc.f ================================== Name Kind_of_Element 'ESRC' 'ESOURC' ----------------------------------------------------------------------------- Peak_Current(A) ----------------------------------------------------------------------------- Gamma Gamma_Spread(r.m.s. for Gaussian) ----------------------------------------------------------------------------- Distrbution_Type(Gaussian=0) ----------------------------------------------------------------------------- X X_Spread Beta_x Beta_x_Spread Distance_To_Weist ---Same parameters as x direction above-------------------------------------- Y Y_Spread Beta_Y Beta_Y_Spread Distance_To_Weist ----------------------------------------------------------------------------- 4-Dimemsional_Dstribution_Type(x,bx,y,by) ----------------------------------------------------------------------------- Num_of_Longitudinal_Points --- seed for random number generator ---------------------------------------- Random_Seed Update_Seed_or_not_for_each_time_This_module_called --- ignore this ------------------------------------------------------------- sptfct == Initial Laser Field: CALL rnaini in aini.f =============================== Name Kind_of_Element AINI 'AINIT' ----------------------------------------------------------------------------- Width ----------------------------------------------------------------------------- Laser_Wave_Length Input_Power Weist_Size(1/e) Distance_To_Weist === Output Control : CALL output in output.f ================================ Name Kind_of_Element 'OUT' 'OUTPUT' ---OUTPUT CONTROL PARAMETERS ------------------------------------------------ Laser_Histgram(x y) _Print(x y) Particle_Histgram(x y) _Print(x y) === Mirror : CALL rnmirr in mirror.f ======================================== Name Kind_of_Element 'MRF' 'MIRROR' -Width_of_Calcuration Area -------------------------------------------------- Width -Curvature-Diameter-Refrectance----Tilts----------Shifts----Num_of_Spline---- x y x y ============================================================================= Name Kind_of_Element 'MRB' 'MIRROR' ----------------------------------------------------------------------------- Width -Curvature-Diameter-Refrectance----Tilts----------Shifts----Num_of_Spline---- x y x y === Free Space for Laser : CALL rnafre in afee.f ============================ Name Kind_of_Element 'AF1' 'AFREE' ----------------------------------------------------------------------------- Width_At_Entrance Width_At_Exit ----------------------------------------------------------------------------- Length ============================================================================= Name Kind_of_Element 'AF2' 'AFREE' ----------------------------------------------------------------------------- Width_At_Entrance Width_At_Exit ----------------------------------------------------------------------------- Length ============================================================================= Name Kind_of_Element 'AF3' 'AFREE' ----------------------------------------------------------------------------- Width_At_Entrance Width_At_Exit ----------------------------------------------------------------------------- Length ============================================================================= Name Kind_of_Element 'AF4' 'AFREE' ----------------------------------------------------------------------------- Width_At_Entrance Width_At_Exit ----------------------------------------------------------------------------- Length ============================================================================= Name Kind_of_Element 'AFH' 'AFREE' ----------------------------------------------------------------------------- Width_At_Entrance Width_At_Exit ----------------------------------------------------------------------------- Length ============================================================================= Name Kind_of_Element 'DEBUG' 'DEBUG' ============================================================================= Name Kind_of_Element 'TERM' 'TERM' =============================================================================