@@ -331,46 +424,70 @@ class BeamIonElement(Element):
...
@@ -331,46 +424,70 @@ class BeamIonElement(Element):
"""
"""
Represents an element for simulating beam-ion interactions.
Represents an element for simulating beam-ion interactions.
Apertures and monitors for the ion beam (instances of IonAperture and
IonMonitor) can be added to tracking after the BeamIonElement object has
been initialized by using:
beam_ion.apertures.append(aperture)
beam_ion.monitors.append(monitor)
If the a IonMonitor object is used to record the ion beam, at the end of
tracking the user should close the monitor, for example by calling:
beam_ion.monitors[0].close()
Parameters
Parameters
----------
----------
ion_mass : float
ion_mass : float
The mass of the ions in kg.
The mass of the ions in [kg].
ion_charge : float
ion_charge : float
The charge of the ions in Coulomb.
The charge of the ions in [C].
ionization_cross_section : float
ionization_cross_section : float
The cross section of ionization in meters^2.
The cross section of ionization in [m^2].
residual_gas_density : float
residual_gas_density : float
The residual gas density in meters^-3.
The residual gas density in [m^-3].
ring : instance of Synchrotron()
ring : instance of Synchrotron()
The ring.
The ring.
ion_field_model : str
ion_field_model : {'weak', 'strong', 'PIC'}
The ion field model, the options are 'weak' (acts on each macroparticle), 'strong' (acts on c.m.), 'PIC'.
The ion field model used to update electron beam coordinates:
- 'weak': ion field acts on each macroparticle.
- 'strong': ion field acts on electron bunch c.m.
- 'PIC': a PIC solver is used to get the ion electric field and the
result is interpolated on the electron bunch coordinates.
For both 'weak' and 'strong' models, the electric field is computed
using the Bassetti-Erskine formula [1], so assuming a Gaussian beam
distribution.
For 'PIC' the PyPIC package is required.
For 'PIC' the PyPIC package is required.
electron_field_model : str
electron_field_model : {'weak', 'strong', 'PIC'}
The electron field model, the options are 'weak', 'strong', 'PIC'.
The electron field model, defined in the same way as ion_field_model.
ion_element_length : float
ion_element_length : float
The length of the beam-ion interaction region. For example, if only a single interaction point is used this should be equal to ring.L.
The length of the beam-ion interaction region. For example, if only a
x_radius : float
single interaction point is used this should be equal to ring.L.
The x radius of the aperture.
y_radius : float
The y radius of the aperture.
n_steps : int
The number of records in the built-in ion beam monitor. Should be number of turns times number of bunches because the monitor records every turn after each bunch passage.
n_ion_macroparticles_per_bunch : int, optional
n_ion_macroparticles_per_bunch : int, optional
The number of ion macroparticles generated per electron bunch passed. Defaults to 30.
The number of ion macroparticles generated per electron bunch passage.
ion_beam_monitor_name : str, optional
Defaults to 30.
If provided, the name of the ion monitor output file. It must end with an extension '.hdf5'.