Following here is a brief description of the new input.nml file required for the simulation parameters definition, through an example.
&GRID
nx = 7168,
ny = 3584,
nz = 1,
ny_targ = 3500,
k0 = 100.0,
yx_rat = 2.0
/nxis the number of grid points in the x direction- for PWFA simulations, it is required that this number contains the number of cpus of the y and z domains defined by
nprocx,nprocyandnproczin order to be sure that FFTs are working as expected
- for PWFA simulations, it is required that this number contains the number of cpus of the y and z domains defined by
nyis the number of points in the y direction- in order to be sure that the simulation is working as expected, it is better to always use a number that contains
nprocx,nprocyandnprocz
- in order to be sure that the simulation is working as expected, it is better to always use a number that contains
nzis the number of points in the z direction; for a 2D simulaton, usenz = 1- in order to be sure that the 3D simulation is working as expected, it is better to always use here a number that contains the number of cpu assigned to split the z domain (
mpi_ntot/pey)
- in order to be sure that the 3D simulation is working as expected, it is better to always use here a number that contains the number of cpu assigned to split the z domain (
ny_targis the transverse size of the target, expressed in number of grid cell filled with particles (if the simulation is a 3D one, the target is a square in the xy plane)k0defines the resolution, being the number of points per μm along x, so that Δx = 1/k0 [μm]; please remember to set a value small enough to solve the skin depthyx_ratis the ratio between the resolution along x and y: Δy = yx_rat/k0 [μm].zx_ratis the ratio between the resolution along x and z: Δz = zx_rat/k0 [μm]; the resolution along z is the same as for y if this parameter is not defined.
With those parameters, the full box size (in μm) is: Lx = nx / k0, Ly = yx_rat * ny / k0, Lz = zx_rat * nz / k0
&SIMULATION
LPf_ord = 2,
der_ord = 2,
str_flag = 0,
iform = 0,
model_id = 1,
dmodel_id = 3,
ibx = 0,
iby = 0,
ibz = 0,
ibeam = 1
/Lpf_ordis the integration scheme order. Lpf_ord=2 for standard leap-frog, Lpf_ord_ord=4 for RK4der_ordis the order of the finite difference scheme. der_ord=2 or 3 for Lpf_ord=2, der_ord=4 for RK4- der_ord=3 assures optimized wave (Laser) propagation in under dense plasma.
str_flaghas three possible different values:0for uniform grid1to enable stretching along transverse axes2to enable stretching along all axes, but for x it is only on the right side of the box (need testing)
iformhas two possible different values:0: Esirkepov's scheme for charge conservation (particle by particle) (to be preferred)1: Esirkepov's scheme for charge conservation (inverted on grid along x) (not allowed for MPI decomposition along the x coordinate)2: no charge preserving (better energy conservation assured)
model_idhas five possible different values1laser is p-polarized2laser is s-polarized3laser is circularly polarized4laser is described by its envelope approximation model5the driver is an electron beam. Its description must be given in a separate namelist block6the driver is a proton bunch. Its description must be given in a separate namelist block
dmodel_idhas five possible different values1uniform - the simulation is done usingnspspecies (electrons, Z_1,Z_2,Z_3) all distributed along the target x-profile2empty model3preplasma - the simulation is tested in this configuration: threensp=3species (electrons, Z_1, Z_2), with a preplasma made of Z_1 + e, a bulk made of Z_1 + e and a contaminant layer made of Z_2 + e4foam - the simulation is tested in this configuration: threensp=3species (electrons, Z_1, Z_2), with a foam made of Z_2 + e, a bulk made of Z_1 + e and a contaminant layer made of Z_2 + e5nanowires target with size parameters lpy(1),lpy(2) and species (e+Z_1) + a uniform bulk (e+Z_2)6nanotubes target with size parameters lpy(1),lpy(2) and species (e+Z_1) + a uniform bulk (e+Z_2)
ibx,iby,ibzare the boundary conditions:0open1reflective2periodic
ibeam: for PWFA (model_id #5/#6):012
&TARGET_DESCRIPTION
nsp = 3,
nsb = 1,
ion_min(1) = 4,
ion_max(1) = 11,
atomic_number(1) = 13,
mass_number(1) = 26.98,
ion_min(2) = 1,
ion_max(2) = 1,
atomic_number(2) = 1,
mass_number(2) = 1.0,
ion_min(3) = 1,
ion_max(3) = 1,
atomic_number(3) = 1,
mass_number(3) = 1.0,
ionz_model = 0,
ionz_lev = 0,
t0_pl(1) = 0.0003,
t0_pl(2) = 0.0,
t0_pl(3) = 0.0,
t0_pl(4) = 0.0,
np_per_xc(1) = 12,
np_per_xc(2) = 4,
np_per_xc(3) = 4,
np_per_xc(4) = 4,
np_per_xc(5) = 4,
np_per_xc(6) = 4,
np_per_yc(1) = 9,
np_per_yc(2) = 3,
np_per_yc(3) = 4,
np_per_yc(4) = 4,
np_per_yc(5) = 4,
np_per_yc(6) = 4,
lpx(1) = 0.0,
lpx(2) = 0.0,
lpx(3) = 2.0,
lpx(4) = 0.0,
lpx(5) = 0.08,
lpx(6) = 0.0,
lpx(7) = 0.01,
lpy(1) = 0.0,
lpy(2) = 0.0,
n_over_nc = 100.0,
np1 = 1.0,
np2 = 10.0
/nspis the number of species (be careful and coherent withdmodel_id)nsbatomic_number(i)are the atomic number (Z) that define each element speciesion_min(i)are the initial ionization status of the element speciesion_max(i)are the maximum ionization status of the element speciesmass_number(i)are the mass number (A) that define the exact isotope of a givenatomic_number(i). Here following you can find the only elements known by ALaDyn
Hydrogen (atomic_number = 1) - mass_number = 1.0
Helium (atomic_number = 2) - mass_number = 4.0
Lithium (atomic_number = 3) - mass_number = 6.0
Carbon (atomic_number = 6) - mass_number = 12.0
Nitrogen (atomic_number = 7) - mass_number = 14.0
Oxygen (atomic_number = 8) - mass_number = 16.0
Neon (atomic_number = 10) - mass_number = 20.0
Aluminium (atomic_number = 13) - mass_number = 26.98
Silicon (atomic_number = 14) - mass_number = 28.09
Argon (atomic_number = 18) - mass_number = 39.948
Titanium (atomic_number = 22) - mass_number = 47.8
Nickel (atomic_number = 28) - mass_number = 58.7
Copper (atomic_number = 29) - mass_number = 63.54t0_pl(i), withifrom 1 to 4, are the initial temperatures in MeV for the different speciesnp_per_xc(i)Please note that ifnp_per_xc(1) =0, it just means to ignore the plasma and simply do a laser propagation simulation.dmodel_id=1: i=1 indicates the number of electrons, i=2 the number of macroparticles of Z_1 species, i=3 the number of macroparticles of Z_2 species and i=4 the number of macroparticles of Z_3 species.dmodel_id=3,4: i=1,2 are the number of electrons and ions per cell along x/y in the bulk, i=3,4 refer to the front layer and i=5,6 to the contaminants.
np_per_yc(i): the same asnp_per_xc, this describes the number of particles per cell along transverse directions (valid also for z for 3D simulations)lpx(1)is the length [μm] of the upstream layer (foam or preplasma), having densityn1/nclpx(2)is the length [μm] of the ramp (linear or exponential depending on themdl) connecting the upstream layer with the central one (made with bulk particles)lpx(3)is the length [μm] of the central layer (bulk), having densityn2/nclpx(4)is the length [μm] of the ramp (linear), connecting the bulk with the contaminants (made with bulk particles)lpx(5)is the length [μm] of the downstream layer (contaminants), having densityn3/nclpx(6)is the angle α of incidence, between the laser axis and the target planelpx(7)is the offset [μm] between the end of the laser and the beginning of the target (if zero, the target starts right at the end of the laser pulse). The offset is calculated before laser rotation, so mind the transverse size iflx(6) ≠ 0, in order to avoid laser initialization inside the target.lpy(1)defines the wire size [μm]lpy(2)defines the distance [μm] between wires (interwire size)n_over_ncis the density in the central layer (bulk)- LWFA case: density is in units of critical density
- PWFA case: the density is in units of (a nominal value) nc=1e18 cm-3
np1is the density in the upstream layer (foam/preplasma)np2is the density in the downstream layer (contaminants)ionz_lev: if set to 0, we disable ionization; if 1, only one electron can be extracted per ion, if accessible, per timestep; if 2, it ionizes all the accessible levels in a single timestepionz_modeldescribes the various ionization models:- 1 (pure ADK as in chen et al (2013), the best one for wake sims)
- 2 (ADK averaged over cycles, as in chen et al (2013),
W_AC=<W_DC>, best for envelope simulations) - 3 (
W_AC+BSI, added barrier suppression ionization) - 4 (Minimum between ADK and BSI ionization values. Here the ADK value is computed averaging on
m, the magnetic quantum number of the ionized electrons as in Alistair Lawrence-Douglas PhD thesis)
&LASER
G_prof = .true.,
nb_laser = 1,
t0_lp = 16.5,
xc_lp = 16.5,
tau_fwhm = 33.0,
w0_y = 6.2,
a0 = 3.0
lam0 = 0.8
lp_delay = 20.59
lp_offset = 0,
t1_lp = 200.0,
tau1_fwhm = 24.74,
w1_y = 3.5,
a1 = 0.45,
lam1 = 0.4,
/G_proflogical flag: if true the pulse is temporally gaussian, if false it has acos^2shapenb_lasernumber of (identical) laser pulses injectedxc_lpis the position (in μm) along x of the central point of the laser envelopet0_lpis the distance (in μm) after which the laser is focused; so the focus is atxf = xc_lp + t0_lptau_fwhmis the FWHM pulse duration (in fs)w0_yis the transverse waist FWHM (in μm)a_0is the laser adimensional parameter: a0=eA/(me c2) of all the pulses injectedlam0is the laser wavelength (in μm) of all the pulses injectedlp_delayis the distance between the center of every injected laser pulselp_offsetis the distance between the center of the last injected pulse and the center of another different pulse injected (if different from 0)t1_lpsame ast0_lp, but for the additional pulse injected withlp_offset!=0tau1_fwhmsame astau_fwhm, but for the additional pulse injected withlp_offset!=0w1_ysame asw0_y, but for the additional pulse injected withlp_offset!=0a1same asa0, but for the additional pulse injected withlp_offset!=0lam1same aslam0, but for the additional pulse injected withlp_offset!=0
&MOVING_WINDOW
w_sh = 20,
wi_time = 100.0,
wf_time = 150.0,
w_speed = 1.0
/w_shis the number of time steps after which the moving-window is called, repeatedlywi_timeis the absolute time at which the window starts moving. nb: in order to block the MW from a certain simulation, the only tested path is to set awi_timegreater than the ending time of the simulation itself.w_speed=0should also work, but is not tested for nowwf_timeis the absolute time at which the window stops movingw_speedis the speed over c of the moving window
&OUTPUT
nouts = 10,
iene = 200,
nvout = 3,
nden = 1,
npout = 0,
nbout = 0,
jump = 1,
pjump = 1,
xp0_out = 0.0,
xp1_out = 100.0,
yp_out = 20.0,
tmax = 100.0,
cfl = 0.8,
new_sim = 0,
id_new = 0,
dump = 0,
L_env_modulus = .true.,
P_tracking = .true.,
/noutsis the number of binary outputs during the relative time of the simulationieneis the number of text outputs during the relative time of the simulationnvoutis the number of fields written. For a 2D P-polarized case, we have just 3 fields, Ex, Ey and Bz; in all the other cases there are 6 fields with these IDs: 1=Ex, 2=Ey, 3=Ez, 4=Bx, 5=By, 6=Bz. At eachnoutsstep, every field withID ≤ nvoutwill be dumped.ndencan have three different values; every output is divided by species on different files:1: writes only the particle density n on the grid2: writes also the energy density n ・ gamma on the grid3: writes also the currents J on the grid
npout1: writes only the electron phase space2: writes only the proton phase space- in general it writes only the phase space of the n-th species, with
n=npv; ifn=npv>nps, it writes the phase spaces of all the particle species
nbout(only for PWFA)1: writes only the electron phase space2: writes only the proton phase space- in general it writes only the phase space of the n-th species, with
n=npv; ifn=npv>nps, it writes the phase spaces of all the particle species
jump: jump on grid points; ifjump=2, it means that each processor is going to write only one point every two. Mind that it's extremely important thatjumpis a divisor of the number of grid points per processor, otherwise the grid output will be corruptedpjump: jump on particles; ifpjump=2, it means that each processor is going to write the phase space of just one particle every two.xp0_out,xp1_outandyp_outonly particles contained inside the box defined byxp0 < x < xp1,|y| < yp_outwill be printed in the outputtmaxis the relative time (in μm, because it is multiplied by c) that the simulation is going to be evolved. Being relative, it's going to be added to the time eventually already reached before the restart. To obtain the time in fs, you have to divide it by 0.299792458 [speed of light in μm/fs]cflis the Courant–Friedrichs–Lewy parameter ( Wikipedia CFL-parameter page )new_sim: identifies if a simulation is newnew=0(data is recreated from initial conditions) or if it is a restartnew=1(dump are going to be read)id_newidentifies the starting number of the output files (ifnew=0) or the last one written in the previous step (ifnew=1)dump1: each processor will dump a binary file for everynoutin order to enable restart0: dumps are suppressed
L_env_moduluslogical flag, only ifmodel_id=4: if true the code generates the absolute value of the laser envelope amplitude, otherwise gives the real and imaginary part in two separate filesP_trackinglogical flag, if true the particle tracking is enabled
&TRACKING
nkjump = 1,
tkjump = 4,
txmin = 55.,
txmax = 75.,
tymin = -80.,
tymax = 80.,
tzmin = -20.,
tzmax = 20.,
t_in = 0.,
t_out = 200.,
/nkjumpa tracked particle everynkjumpis written in the output filetkjumpa snapshot of the tracked particles phase space is taken everytkjumptimesteptxminto select particles with initial longitudinal coordinatex > txminto be trackedtxmaxto select particles with initial longitudinal coordinatex < txmaxto be trackedtyminto select particles with initial transverse coordinatey > tyminto be trackedtymaxto select particles with initial transverse coordinatey < tymaxto be trackedtzminto select particles with initial transverse coordinatez > tzminto be trackedtzmaxto select particles with initial transverse coordinatez < tzmaxto be trackedt_ininitial tracking timet_outfinal tracking time
&MPIPARAMS
nprocx = 1,
nprocy = 64,
nprocz = 1
/nprocxdefines the number of processor the simulation will be splitted along thexcoordinatenprocydefines the number of processor the simulation will be splitted along theycoordinatenproczdefines the number of processor the simulation will be splitted along thezcoordinate- mind that usually we do not split along
xand we use the same number of processor alongyandz(for 3D simulations) or we definenprocz=1explicitly for 2D simulations. No guarantees are given if you want to explore other configurations (that should work anyway).
- mind that usually we do not split along