INDIAN INSTITUTE OF TECHNOLOGY ROORKEE ELECTROMAGNETIC SIMULATION CODES FOR DESIGNING CAVITIES -1 Puneet Jain IIT ROORKEE SRFSAT Workshop, IUAC N. Delhi September 21, 2017
2 OUTLINE 1. Overview of Electromagnetic Codes in Accelerators 1.1 Historical Development 1.2 Need 2. Two-Dimensional RF Codes 2.1 URMEL 2.2 SuperFish 3. Three-Dimensional RF Codes 3.1 GdfidL 3.2 HFSS
3 Computational Modeling of Accelerators Early accelerators were designed without computers at all Fields were found analytically, or with scale-models. This resulted in the drift tube shapes in the early LINACS, which were worked out analytically by Bob Gluckstern. In the 1960's, the first codes were written. Electromagnetics codes to find resonant frequencies of simple structures Particle simulation codes to calculate the beam dynamics. The first simulation runs were run with a few hundred particles. The simulation may take hours. Now, 10 8-10 9 particles in the bunch may be run, equaling the actual number of particles in the bunch. These simulations also may take hours, showing that software expansion keeps pace with computation speed. Advances simulations now are very sophisticated: e-cloud, multipactoring, wakefield, chaotic behavior are accurately modeled.
4 Need of Computational Modeling - (1) RF Cavity: Space enclosed by conducting walls that can sustain an infinite number of resonant electromagnetic modes Shape is selected so that a particular mode can efficiently transfer its energy to a charged particle. An isolated mode can be modeled by an LRC circuit.
Need of Computational Modeling - (2) 5
Need of Computational Modeling - (3) Quality Factor, Q, defined as Q = ω U P d, is a f.o.m. of all accelerating cavities U = 1 P d = 1 2 R S H 2 da 2 μ 0 H 2 dv H 2 = ε 0 E 2 μ 0 J 2 1 0 2.405 r R dv = 2 π L r dr U = 1 2 μ 0 R ε 0 E 2 μ 0 2 π L r J 2 1 2.405 r 0 0 R dr U = πε 0 E 2 0 L R 2 J 2 1 2.405 2 da = 2 π r dr 2 + 2 π R dz P d = π ε 0 R S E 0 2 J 1 2 2.405 R L μ 0 1 + R L Q = ω U P d = 1 R S ω R μ 0 2 1 + R L Γ 453 Ω 1 + R L Purely Geometry dependent For synchronism, t = 1 2 T RF L c = π ω Γ 453 Ω 2. 405 1 + π = π R 2.405 c 257 Ω R L = 2.405 π 6
7 Types of Simulations Beam Dynamics Number of macroparticles 10 8 or more Using clusters with Teraflop capability Electrodynamics Accurate calculation of complex 3-D structures New approaches to boundary conditions over wide scale of detail Multipactoring must iterate over large number of initial conditions Mechanical CAD Detailed modeling of complex structures Thermal, atmospheric deformation, vacuum, weight, alignment BUT: computers are not enough. They are a tool, an essential tool, in designing and diagnosing accelerators.
8 Electromagnetics Solvers EM solvers may be divided into 2-D and 3-D categories. The 2-D solvers may be used in a majority of cases, and are easier and faster to use. Los Alamos Accelerator Code Group (LAACG) The 3-D solvers are just now becoming good enough to give quantitatively accurate results. http://pbpl.physics.ucla.edu/computing/code_overview/ 2-D solvers (partial list) Superfish - Oldie but goodie. The standard. https://en.wikipedia.org/wiki/accelerator_physics_codes Urmel-T - The European choice, finds many modes in one run. 3-D solvers (partial list) https://www.classe.cornell.edu/~dcs/bmad/ Mafia - The standard. Difficult to use, and is now obsolete. GdfidL - Similar to Mafia, FD solver for MW equations, eigenvalues and vectors for arbitrary rf structures, can calculate the induced wakefields by a passing charge. CST Microwave Studio - Replacing Mafia. Accurate boundary conditions. ANSYS electromagnetics module / HFSS part of an industry standard CAD code, quite accurate results for surface fields. Omega3 - Kwok Ko's SLAC group, now commercialized, finite element Superlans - Russian code
9 URMEL Over the past sixty years, the numerical modeling of RF cavities has gained wide acceptance in the accelerator community Sophisticated computer codes, particularly those that model in three dimensions; many accelerator components are inherently 3D such as the input coupler cavity in a LINAC Advent of powerful yet affordable workstations with large memory, ultrafast processors to make feasible the simulations of realistic structures Since early 1960s the RF cavity designers worked extensively on CAD codes- LALA and TWAP, modeled cylindrically symmetric structures Later, they were superseded by other (2D) codes, most notably SUPERFISH and URMEL
10 URMEL (T. Weiland) URMEL calculates resonant modes of any azimuthal mode number m = 0,1,2 (monopole, dipole, quadrupole, etc.). By transforming the Maxwell's equations into a linear algebraic eigenvalue problem, the frequency solutions are found as out of a large matrix. The computed modes are in ascending order. Mathematical procedures guarantee that NO MODES ARE MISSED. Avoids problems with the choice of a drive-point but offers actually only a rectangular mesh (SUPERFISH needs a drive-point; sometimes difficult). The combined use of URMEL in the frequency domain and of the complementary code TBCI in the time domain enables a complete analysis of long range - low frequency - forces (narrow band impedances) and short range - high frequency - forces (broad band impedances).
Finite Difference (FD) vs Finite Element (FE) One of the important differences is MESH In FD, the mesh is rectangular, regular, very large mesh points In FE, the mesh is triangular, irregular, lesser number of mesh points The 2D geometry for a single cell of a SLAC-type accelerator structure as modeled by a FD code (URMEL) and a FE code (YAP) FE (YAP) approximates the disk shape more closely with an irregular mesh than FD (URMEL) does with a regular mesh; improvement is more dramatic in 3D geometries and it is particularly relevant when one considers tuning cavities of complex shapes to high precision. Tedious to setup structure in FE unless mesh generation is automated!! 11
URMEL-T Like URMEL, it is also a 2D simulation package which evaluates EM properties of cylindrical symmetric accelerating structures in the frequency and time domain. URMEL-T uses a triangular mesh generation techniques, as opposed to its predecessor URMEL, which used rectangular methods. URMEL-T not only allows for the solutions of longitudinal modes but it also has the ability to solve for Dipole (or transverse) modes. 12
13 URMEL (URMEL-T): Brief Description Both use electric (or magnetic) field components in the (r, z) plane as unknowns. These codes run on an arbitrarily shaped cylindrically symmetric structure that may contain some material bodies (ε, μ). An automatic mesh generator that needs only the total number of mesh points as input, generates a suitable mesh. Geometry of 1 - cell SC 2 PETRA 7-cell cavity Triangular mesh generated by URMEL-T Rectangular mesh generated by URMEL
14 URMEL (URMEL-T): Brief Description Both codes calculate for a given cylindrical mode number m (m = 0: monopole, m = 1: dipole,...) a set of N modes (N typically 50) and all related quantities such as shunt impedance and quality factor. Many measurements have been undertaken to verify the correctness of the computation. URMEL and UREML-T user guide: https://lib-extopc.kek.jp/preprints/pdf/1987/8705/8705238.pdf Lowest dipole mode f = 874 MHz Accelerating monopole mode f = 509 MHz Higher mode computed by URMEL-T in the multi-cell model at f = 1273 MHz
15
SUPERFISH: Objectives 16
POISSON SUPERFISH: Useful Resource 17
POISSON/ SUPERFISH: History 18
19 POISSON SUPERFISH: Outline Poisson Superfish is a collection of programs for calculating static magnetic and electric fields and radio-frequency electromagnetic fields in either 2-D Cartesian coordinates or axially symmetric cylindrical coordinates. The programs generate a triangular mesh fitted to the boundaries of different materials in the problem geometry (Finite Element Methods). Plotting programs and other postprocessor codes present the results in various forms. Solvers: Automesh: generates the mesh (always the first program to run) Fish: RF solver Cfish: Version of Fish that uses complex variables for the rf fields, permittivity, and permeability. Poisson: Magnetostatic and electrostatic field solver Pandira: Another static field solver (can handle permanent magnets) SFO, SF7 : Postprocessing Autofish: Combines Automesh, Fish and SFO DTLfish, DTLCells, CCLfish, CCLcells, CDTfish, ELLfish, ELLCAV, MDTfish, RFQfish, SCCfish: For tuning specific cavity types. Kilpat, Force, WSFPlot, etc.
SUPERFISH: Useful Resource 20
SUPERFISH: Installation on Win Machine 21
SUPERFISH: Input Requirements 22
23 SUPERFISH: Input Requirements The cavity is a solid of revolution. The outline of the solid is given as a list of straight line segments and circular arcs. (Some allow elliptical arcs.) A pillbox cavity is entered as three straight lines. The cavity has the radius R and the length along z of L. Boundary Conditions and Symmetry Planes: The pillbox cavity, like many cavities, has a symmetry plane at z = L/2. The computational effort is halved by computing only half the cavity volume and applying a symmetry boundary condition. In a symmetric TM 010 cavity, the electric field is parallel to the axis at the symmetry point (E r = 0). If the symmetry plane were a conductor, the fields would be unaffected as the electric field is perpendicular to the symmetry plane. We can specify the symmetry plane as an electric (metallic) boundary, except that no power is dissipated on tis surface.
Hello World 24
Feed SUPERFISH 25
SUPERFISH Output 26
SUPERFISH in the Field 27
Post processing : Interpolate Field along a Line 28
Post processing : Integral Field along the Line 29
Summary: What do we get from this? 30
How about Higher Order Modes (HOMs)? 31
FISH scan for HOMs 32
SUPERFISH for superconducting RF cavity 33
FISH scan for HOMs 34
More in next lecture 35