NonLinearColdFluidWakefield#

class wake_t.physics_models.plasma_wakefields.NonLinearColdFluidWakefield(density_function, r_max, xi_min, xi_max, n_r, n_xi, dz_fields=None, beam_wakefields=False, p_shape='linear', laser=None, laser_evolution=True, laser_envelope_substeps=1, laser_envelope_nxi=None, laser_envelope_nr=None, laser_envelope_use_phase=True)[source]#

This class computes the plasma wakefields using a nonlinear cold fluid theory in one spatial dimension with a three-component fluid momentum, as described in [1]. This implies that only longitudinal plasma waves are modeled, i.e., it assumes infinitely broad laser pulses and particle beams.

This 1D model is in Wake-T extended to 2D in r-z geometry by computing the 1D plasma response at each radial slice.

Given the assumptions of the model, it is only accurate for broad drivers where the radial plasma waves can be neglected. For a laser driver, it is typically accurate up to \(a_0 \lesssim 1\). For electron beams it has not been yet fully tested, but given the typically narrow width of the beams, only very low charges can be accurately modeled.

For a much more general model, see Quasistatic2DWakefield.

Parameters:
density_functioncallable

Function that returns the density value at the given position z. 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. Required only if mode=’cold_fluid_1d’.

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.

dz_fieldsfloat, optional

Determines how often the plasma wakefields should be updated. If dz_fields=0 (default value), the wakefields are calculated at every step of the Runge-Kutta solver for the beam particle evolution (most expensive option). If specified, the wakefields are only updated in steps determined by dz_fields. For example, if dz_fields=10e-6, the plasma wakefields are only updated every time the simulation window advances by 10 micron. By default, if not specified, the value of dz_fields will be xi_max-xi_min, i.e., the length the simulation box.

beam_wakefieldsbool, optional

Whether to take into account beam-driven wakefields (False by default). This should be set to True for any beam-driven case or in order to take into account the beam-loading of the witness in a laser-driven case.

p_shapestr, optional

Particle shape to be used for the beam charge deposition. Possible values are ‘linear’ or ‘cubic’.

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.

References

[1]

T. Mehrling, “Theoretical and numerical studies on the transport of transverse beam quality in plasma-based accelerators,” PhD thesis (2014), http://dx.doi.org/10.3204/DESY-THESIS-2014-040

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.