Quasistatic2DWakefieldIon#

class wake_t.physics_models.plasma_wakefields.Quasistatic2DWakefieldIon(density_function, r_max, xi_min, xi_max, n_r, n_xi, ppc=2, dz_fields=None, r_max_plasma=None, parabolic_coefficient=None, p_shape='cubic', max_gamma=10, plasma_pusher='ab2', ion_motion=False, ion_mass=1.67262192595e-27, free_electrons_per_ion=1, laser=None, laser_evolution=True, laser_envelope_substeps=1, laser_envelope_nxi=None, laser_envelope_nr=None, laser_envelope_use_phase=True, field_diags=['rho', 'E', 'B', 'a'], particle_diags=[], use_adaptive_grids=False, adaptive_grid_nr=16, adaptive_grid_r_max=None, adaptive_grid_r_lim=None, adaptive_grid_diags=['E', 'B'])[source]#

This class calculates the plasma wakefields using the gridless quasi-static model in r-z geometry originally developed by P. Baxevanis and G. Stupakov [1].

The model implemented here includes additional features with respect to the original version in [1]. Among them is the support for laser drivers, particle beams (instead of an analytic charge distribution), non-uniform and finite plasma density profiles, as well as an Adams-Bashforth pusher for the plasma particles (in addition the original Runke-Kutta pusher).

As a kinetic quasi-static model in r-z geometry, it computes the plasma response by evolving a 1D radial plasma column from the front to the back of the simulation domain. A special feature of this model is that it does not need a grid in order to compute this evolution, and it allows the fields E and B to be calculated at any radial position in the plasma column.

In the Wake-T implementation, a grid is used only in order to be able to easily interpolate the fields to the beam particles. After evolving the plasma column, E and B are calculated at the locations of the grid nodes. Similarly, the charge density rho and susceptibility chi of the plasma are computed by depositing the charge of the plasma particles on the same grid. This useful for diagnostics and for evolving a laser pulse.

Parameters:
density_functioncallable

Function that returns the density value at the given position (z, r). This parameter is given by the PlasmaStage and does not need to be specified by the user.

r_maxfloat

Maximum radial position up to which plasma wakefield will be calculated.

xi_minfloat

Minimum longitudinal (speed of light frame) position up to which plasma wakefield will be calculated.

xi_maxfloat

Maximum longitudinal (speed of light frame) position up to which plasma wakefield will be calculated.

n_rint

Number of grid elements along r to calculate the wakefields.

n_xiint

Number of grid elements along xi to calculate the wakefields.

ppcarray_like, optional

Number of plasma particles per radial cell. It can be a single number (e.g., ppc=2) if the plasma should have the same number of particles per cell everywhere. Alternatively, a different number of particles per cell at different radial locations can also be specified. This can be useful, for example, when using adaptive grids with very narrow beams that might require more plasma particles close to the axis. To achieve this, an array-like structure should be given where each item contains two values: the number of particles per cell and the radius up to which this number should be used. For example to have 8 ppc up to a radius of 100µm and 2 ppc for higher radii up to 500µm ppc=[[100e-6, 8], [500e-6, 2]]. When using this step option for ppc the r_max_plasma argument is ignored. By default ppc=2.

dz_fieldsfloat, optional

Determines how often the plasma wakefields should be updated. For example, if dz_fields=10e-6, the plasma wakefields are only updated every time the simulation window advances by 10 micron. By default dz_fields=xi_max-xi_min, i.e., the length the simulation box.

r_max_plasmafloat, optional

Maximum radial extension of the plasma column. If None, the plasma extends up to the r_max boundary of the simulation box.

p_shapestr, optional

Particle shape to be used for the beam charge deposition. Possible values are 'linear' or 'cubic' (default).

max_gammafloat, optional

Plasma particles whose gamma exceeds max_gamma are considered to violate the quasistatic condition and are put at rest (i.e., gamma=1., pr=pz=0.). By default max_gamma=10.

plasma_pusherstr, optional

The pusher used to evolve the plasma particles. Possible values are 'ab2' (Adams-Bashforth 2nd order).

ion_motionbool, optional

Whether to allow the plasma ions to move. By default, False.

ion_massfloat, optional

Mass of the plasma ions. By default, the mass of a proton.

free_electrons_per_ionint, optional

Number of free electrons per ion. The ion charge is adjusted accordingly to maintain a quasi-neutral plasma (i.e., ion charge = e * free_electrons_per_ion). By default, 1.

laserLaserPulse, optional

Laser driver of the plasma stage.

laser_evolutionbool, optional

If True (default), the laser pulse is evolved using a laser envelope model. If False, the pulse envelope stays unchanged throughout the computation.

laser_envelope_substepsint, optional

Number of substeps of the laser envelope solver per dz_fields. The time step of the envelope solver is therefore dz_fields / c / laser_envelope_substeps.

laser_envelope_nxi, laser_envelope_nrint, optional

If given, the laser envelope will run in a grid of size (laser_envelope_nxi, laser_envelope_nr) instead of (n_xi, n_r). This allows the laser to run in a finer (or coarser) grid than the plasma wake. It is not necessary to specify both parameters. If one of them is not given, the resolution of the plasma grid with be used for that direction.

laser_envelope_use_phasebool, optional

Determines whether to take into account the terms related to the longitudinal derivative of the complex phase in the envelope solver.

field_diagslist, optional

List of fields to save to openpmd diagnostics. By default [‘rho’, ‘E’, ‘B’, ‘a_mod’, ‘a_phase’].

field_diagslist, optional

List of particle quantities to save to openpmd diagnostics. By default [].

use_adaptive_gridsbool, optional

Whether to use adaptive grids for each particle bunch, instead of the general (n_xi x n_r) grid.

adaptive_grid_nrint or list of int, optional

Radial resolution of the adaptive grids. If only one value is given, the same resolution will be used for the adaptive grids of all bunches. Otherwise, a list of values can be given (one per bunch and in the same order as the list of bunches given to the track method). If the value is None, no adaptive grid will be used for the corresponding bunch, which will instead use the base grid.

adaptive_grid_r_maxfloat or list of float, optional

Specify a fixed radial extent for the adaptive grids. If not given, the radial extent of the grids is continuously adapted with the transverse size of the bunches. If only one value is given, the same extent will be used for all adaptive grids. Otherwise, a list of values can be given (one per bunch and in the same order as the list of bunches given to the track method). The individual values can be float or None (in which case, no fixed radial extent is used for the corresponding grid).

adaptive_grid_r_limfloat or list of float, optional

Specify a limit to the radial extent of the adaptive grids. If not given, the radial extent of the grids is continuously adapted to fit the whole transverse size of the bunches. If only one value is given, the same limit will be used for all adaptive grids. Otherwise, a list of values can be given (one per bunch and in the same order as the list of bunches given to the track method). The individual values can be float or None (in which case, no radial limit is used for the corresponding grid). Bunch particles that escape the grid transversely with deposit to and gather from the base grid (if they haven’t escaped from it too).

adaptive_grid_diagslist, optional

List of fields from the adaptive grids to save to openpmd diagnostics. By default [‘E’, ‘B’].

References

[1] (1,2)

P. Baxevanis and G. Stupakov, “Novel fast simulation technique for axisymmetric plasma wakefield acceleration configurations in the blowout regime,” Phys. Rev. Accel. Beams 21, 071301 (2018), https://link.aps.org/doi/10.1103/PhysRevAccelBeams.21.071301

Methods

adjust_dt(t_final)

Autoadjust the time step of the field update.

calculate_field(bunches)

Calculate field using the current properties and given bunches.

evolve_properties(bunches)

Evolve field properties.

gather(x, y, z, t, ex, ey, ez, bx, by, bz, ...)

Gather all field components at the specified locations.

get_openpmd_diagnostics_data(global_time)

Get the data for including the field in the openPMD diagnostics.

initialize_properties(bunches)

Initialize field properties.

update(bunches)

Update field to the next time step.