- Home
- Users & Science
- Accelerators
- Instrumentation & Equipment
- Scientific Software Developed by the ID Group
- Radia
- Examples of Radia Computations

One finds below a number of examples of radia computations illustrating some particular aspects of a 3D magnetostatic study. One should remember that a complete description of each Radia functions is provided in html format in the distribution. The user interested in more information concerning a particular radia function should refer to this documentation. One should consider the examples of this page as a complement to the documentation intended to help the user getting started for a particular problem. The examples listed have been produced by various members of the ESRF ID group. We welcome anyone interested to provide more examples. This page will probably grow with time and will constitute a set of computation templates that can be useful for both the novice and experienced user.

- Selfinductance : Self and mutual inductance omputation of a set of coils with or without iron.
- Force and torque computation between coils iron volumes and magnet volumes.
- Very Important hints to save memory and time during a Radia computation.
- Compute the trajectory of an electron in a 3D magnetic field by means of a Runge Kutta integration
- A Notebook ready to be used to optimize the termination of an Apple-II undulator with negligible horizontal and vertical field integrals at any gap and phase.
- Multipoles : Generating permanent magnet multipoles.
- How to simulate the reversible and irreversible Demagnetization of a permanent magnet under temperature. The application is made with a spherically shaped permanent magnet block.
- RadiaToTrack is a notebook which computes magnetic field and focusing (tune shifts) experienced by an electron at an arbitrary injection position. It also generates a map file for tracking electrons in a tracking code like BETA . This makes possible the accurate and fast computation of the reduction of the dynamic aperture induced by insertion devices. In order to ease the use of such files by an other tracking code, the tracking algorithm implemented in BETA is presented in details. A number of predefine functions allow an easy generation of vertical /horizontal field pure-permanent magnet undulators/wigglers, hybrid (with and without side blocks) vertical field devices and Helios, AppleII or Spring-8 type variable polarization undulators.
- Shim : A tutorial example explaining how to compute the field and field integral signature produced by an iron shim located at the surface of a pure permanent magnet array.
- ShimHyb : The same as above but the shim is placed on the surface of an hybrid undulator structure.
- Sextupole. A simple and rudimentary sextupole example which illustrates the use of rotationnal symmetries with a multiplicity different than a power of 2. This example also make use of more advanced mathematica type programming to automatize the optimization of geomertrical and/or magnetic parameters.
- Quad. The quadrupole already presented in the Example#6 is revisited. A deeper use of the Mathematica language is made which allows an easy systematic study of the effect of each parameters such as segmentation, dimensions, chamfer, current density... This example could serve as a starting template for a complete 3D design and optimization of a qaudrupole magnet.
- ElecUnd : A simple notebook to compute and optimize the central field and power consumption of an electromagnet undulator.

- Example#1 of the Radia Distribution : This is a trivial example which gives the principle of a Radia computation, it initializes Radia and performs a field computation from a simple permanent magnet. It is intended to be used for checking that Radia is correctly installed.
- Example#2 of the Radia Distribution : This example illustrates the computation and plot of the magnetic field and field integrals produced by a set of racetrack coils.
- Example#3 of the Radia Distribution : This example creates a short permanent magnet undulator of the hybrid type. It solves it and provides some plots of the field. It also plots the magnetization versus magnetic field of the pole material . It presents a simple way of optimizing one geometrical parameter through a loop containing a new model creation followed by solving followed by a field computation.
- Example#4 of the Radia Distribution : This a simple example showing how to create a magnet with a spherical shape. It checks the field inside the sphere which is now (from analytical integration) to be uniform.
- Example#5 of the Radia Distribution : This example shows how to simulate a simple dipole magnet. It is an iron dominated magnet where the field geometry in the gap of the yoke is dominated by the distribution of magnetization in the yoke rather than the field directly produced by the coils.
- Example#6 of the Radia Distribution : This example shows how to simulate a simple quadrupole magnet with hyperbolic pole faces and chamfer. It displays and solves the structure and shows how to compute the integrated multipole content of the field, how to visualize the magnetization in the iron through a 3D arrow plot. It also saves the field profile in a tab delimited text file and output the geometry in a DXF format (Autocad). This example has since been revisited and improved in several ways, the new version is here.

- The example files are formatted Mathematica notebook compressed in zip format. After decompression, they can be opened in Mathematica on any platform (Mac, Windows, Unix). To run these examples you must have mathematica and Radia installed on your computer. These examples have been created for a tutorial purpose.

For Macintosh users. One may decompress the file using zipit (simples for non experienced person) or Stuffit with expander enhancer (better but a bit more delicate to install) or any other utility capable of decompressing a zip archived. After decompressing the file, it is recommended to start Mathematica, open the decompressed file that should be named something like **.nb and re-save it immediately under the same or a different name. This make a file with the Mathematica notebook icon (in the finder) that is ready for a double-click.