Particle Acceleration in Mildly Relativistic Outflows of Fast Energetic Transient Sources

Recent discovery of fast blue optical transients (FBOTs) as a new class of energetic transient sources can shed light on the long-standing problem of supernova-long gamma-ray burst connections. A distinctive feature of such objects is the presence of modestly relativistic outflows which place them in between the non-relativistic and relativistic supernovae-related events. Here we present the results of kinetic particle-in-cell and Monte Carlo simulations of particle acceleration and magnetic field amplification by shocks with the velocities in the interval between 0.1 and 0.7 c. These simulations are needed for the interpretation of the observed broad band radiation of FBOTs. Their fast, mildly to moderately relativistic outflows may efficiently accelerate relativistic particles. With particle-in-cell simulations we demonstrate that synchrotron radiation of accelerated relativistic electrons in the shock downstream may fit the observed radio fluxes. At longer timescales, well beyond those reachable within a particle-in-cell approach, our nonlinear Monte Carlo model predicts that protons and nuclei can be accelerated to petaelectronvolt (PeV) energies. Therefore, such fast and energetic transient sources can contribute to galactic populations of high energy cosmic rays.


Introduction
The time domain astronomy operating now at all wavebands from radio to gamma rays has provided unique information on highly energetic processes in transient astrophysical objects such as supernovae (SNe), gamma-ray bursts (GRBs), fast radio bursts and others. The pioneer program of a dedicated search for supernovae in the optical band started by Fritz Zwicky in 1936, which has later allowed, in particular, obtaining fundamental results on the accelerated expansion of the Universe via spectroscopy of SN type Ia, is now ongoing with great perspectives [1]. The capabilities of fast and sensitive wide field imaging suggested for the forthcoming Large Synoptic Survey Telescope (LSST) would allow detecting many thousands of luminous SNe and tidal disruption events (TDEs) per year as well as studying other types of transient sources [2]. Together with the LSST, the currently operating wide field [3] and survey [4] X-ray observatories along with the future high energy missions [5][6][7], gravitational wave and neutrino observatories will allow revealing the physical nature of various types of energetic space transients.
The fast blue optical transients (FBOTs) [8][9][10][11] are among the most interesting recent discoveries. Their appearance is somewhat different from most of the core-collapse SNe [8,12]. Together with the low-luminosity GRBs they possibly belong to the intermediate class of phenomena filling the gap between non-relativistic SNe and "standard" long duration gamma-ray bursts, and which could have volumetric rates well above that of the GRBs [13,14]. The duration of with the relativistic wind from the central engine were constructed in [31]. The formation of relativistic flows in the interaction of the powerful non-thermal radiation produced by the central machine with the supernova ejecta was considered in the papers [32,33].
Very luminous optical FBOT events with light curves extending to a couple of weeks can be expected in the case of shock breakout into a dense circumstellar shell produced by the dense progenitor wind a few years before the SN event [34][35][36]. The presence of an hour timescale central engine activity with a luminosity of about 10 47 erg s −1 producing mildly relativistic jet was proposed in [15] to model SN 2006aj associated with a low-luminosity GRB. The bright high frequency radio emission of FBOTs and, possibly, the hard X-ray component detected in some events of this type, is produced by relativistic electrons accelerated by shocks driven by fast moderately relativistic outflows from the central engine. Moreover, the synchrotron self-absorption effects [37] are apparent in some FBOT spectra.
The SN shock breakout is usually accompanied by a bright ultraviolet (UV) flash, and it is likely that afterwards the shock enters a collisionless regime [38] with the X-ray dominated spectrum. Some models of relativistic shock breakout which consider a multifluid structure of a relativistic shock mediated by radiation in a cold electron-proton plasma are currently under discussion [39,40]. A MeV gamma-ray flash of the total energy ∼10 48 erg lasting from a few seconds to a few hours was predicted in [41,42] for some SN events. At the later SN stages (after a few days from the event) the radiative shock is transforming into a collisionless plasma shock regulated by kinetic plasma instabilities. A specific feature of the collisionless shocks is their ability to create a powerful non-thermal particle population and to accelerate relativistic particles [43]. The collisionless shock structure and the efficiency of particle acceleration depend on the shock speed, on magnetic field inclination to the shock normal and on the plasma magnetization parameter [44,45]. Modeling of particle acceleration by non-relativistic shocks of velocities below 0.1 c in supernova remnants was discussed in [46] while studies of relativistic shocks was presented in [47].
Kinetic simulations of the efficiencies of the shock ram pressure conversion to magnetic fluctuations and relativistic particles are needed to provide an adequate interpretation of the observed non-thermal radiation. The mildly relativistic magneto-hydrodynamic (MHD) flows were shown (see, e.g., [48,49]) to be the most efficient environment providing the maximum energies of the accelerated nuclei for a given magnetic/kinetic luminosity of the power engine. Recent models suggested a possibility of cosmic ray acceleration to ultra high energies in the low-luminosity GRBs associated with SNe (see, e.g., [50,51]) and in relativistic SNe [52]. Fast outflows from SNe with dense circumstellar shells could accelerate cosmic rays up to the high energy regime on a few weeks timescale (e.g., [53,54]).
The structure and particle acceleration in the fast collisionless shocks can be successfully modeled with the kinetic particle-in-cell (PIC) technique [43,55] at many thousands of the particle gyro-scales. On the other hand, as the observed multi-wavelength spectra of supernova remnants and GRBs compellingly demonstrated that the spectra of accelerated particles extend to many decades in the particle momentum, a combination of both microscopic (see Section 2) and macroscopic kinetic models (see Section 3) is necessary to construct realistic models of such sources. Cosmic ray acceleration by supernova remnants is a subject of extensive modeling [46,52,[56][57][58][59]. One of the most uncertain points is at what stage PeV regime cosmic rays can be accelerated. We discuss in Section 3 high energy cosmic ray acceleration in FBOT-type sources as potential pevatrons.
Here we will present 2D PIC simulation of sub and mildly relativistic shocks within the shock speed interval 0.1-0.7 c in proton-electron plasmas which could be applied to FBOT sources modeling. The fiducial case in our work is 0.3 c.
Earlier, Park et al. [60] presented a set of 1D PIC models of shocks in a range of velocities up to 0.1 c. They performed in the 1D case long simulation runs up to 5 × 10 5 ω −1 pe . For higher shock speed of 0.75 c Crumley et al. [61,62] published 2D PIC simulation results. In the quasi-parallel shock of a velocity 0.75 c simulation of about 4100 ω −1 pi duration allowed them to model Bell-mediated shock. In particular, they noted that acceleration of electrons is likely initially associated with the shock drift acceleration and then switches to diffusive shock acceleration regime as it was seen in [60].
To model radio emission observed from CSS161010, where the shock velocity of about 0.3 c was suggested by observations, we make 2D PIC simulations with m p /m e ratio of 100, which are limited to the timescale ∼7 × 10 4 ω −1 pe . We discuss possible extrapolations of electron spectra to the energy range needed to model the radio emission.

Particle-in-Cell Simulations of Fast Mildly Relativistic Shocks
In this section, we present the results of particle-in-cell simulations of mildly relativistic shocks at gyro-scales with application to the observed non-thermal emission from FBOTs.
To simulate the structure and non-thermal particle acceleration by a mildly relativistic collisionless shock wave we have employed the publicly available code Smilei developed by Derouillat et al. [63]. This code is based on explicit Finite Differences Time Domain approach for solving Maxwell equations and on a relativistic solver for particle movement with charge-conserving algorithm proposed by [64].
For model shock initialization we employ a common approach: a homogeneous plasma flow collides with an ideal reflecting wall. The simulation box is two-dimensional, with the number of cells Nx = 204,800 in the direction along the flow velocity and Ny = 400 in the transverse direction, while particle velocities and the electromagnetic field are represented by full 3D vectors. Homogeneous plasma flows in through the right boundary and the reflecting wall is placed at the left boundary. Boundary conditions in the transverse direction are periodic. The initial magnetic field B lies in the plane of the simulation inclined by the angle θ to the velocity of the flow. The electric field is initialized to compensate the Lorentz force in the laboratory frame E = − v × B/c. The velocity of plasma flow v is 0.3 c and its Lorentz-factor γ is 1.05. The magnetization σ = B 2 /4πnγm p c 2 , where n is upstream concentration and m p is mass of proton, in all the modeled configurations is about 10 −4 . The electron mass m e is artificially increased up to m p /m e = 100 in order to save computational resources. All the quantities obtained from the simulation can be scaled with respect to the plasma concentration, which can be chosen arbitrary during the data analysis. The spatial grid step is dx = 0.2c/ω e and the time step is dt = 0.09 ω −1 e , where ω e is electron plasma frequency ω e = 4πne 2 /m e γ, e is the absolute value of the electron charge. Within such a setting the simulation box size along the x-axis corresponds to 500 gyroradii of protons in plasma flow r g = m p vcγ/eB and along the y-axis-to 1 gyroradius. The maximum simulation time is 7 × 10 4 ω −1 e or about 100 inverse proton gyrofrequencies. For plasma concentration n ≈ 1 cm −3 , this corresponds to timescale about 1 s, which is much smaller than the typical activity period of FBOTs.
The efficiency of particle acceleration depends on the inclination angle θ, especially in the case of relativistic flows [44,61,62,65]. To participate in the diffusive acceleration process, a particle needs to escape from the shock front and if it moves along the magnetic field, the maximum velocity along the x-axis is c cos(θ ), and it should be larger than the shock velocity v sh (all quantities here are measured in the upstream frame). As one can see in Figure 1, the high energy tail of the electron distribution is much higher for a quasiparallel shock. Such an angle dependence may lead to the presence of different electron distributions within one object, and this may possibly explain the difference between the spectral indices of synchrotron radio and inverse Compton X-ray radiation observed in FBOT AT2018cow [9].
For further modeling of synchrotron radiation from FBOT CSS161010 we have used a setup with parameters v = 0.3 c, σ = 0.0002 and θ = 30 • (a quasiparallel shock). Time evolution of the concentration profile in such a shock averaged in the transverse direction is shown in Figure 2 and the corresponding magnetic field at the moment 7 × 10 4 ω −1 e is shown in Figure 3.
With the computed concentration profile we can determine the coordinate of the shock front: we consider that x sh is the first point from the right where the concentration is two times larger than that in the far upstream. The average shock velocity is the ratio of the shock coordinate and the simulation time v sh = x sh /t. At later times the shock wave propagation is close to a stationary regime. The shock velocity measured in the downstream frame is close to the constant value v sh ≈ 0.085 c. In the upstream (observer) frame it corresponds to v sh = (v sh + v)/ 1 + v sh v/c 2 ≈ 0.38 c.  The simulations have allowed us to compute model distributions of electrons. In the downstream region such distributions have a complex shape, where one can see two main components: a thermal peak and a power law tail at high energies. At low energies (E < 5m e c 2 ) we approximate the distribution with a Maxwell-Juttner function: an iterative process is employed to minimize the functional f (T) = 5m e c 2 m e c 2 simulated electron distribution function and F mj (E, T) is Maxwell-Juttner distribution function, and find the effective temperature. For high energies (20 m e c 2 < E < 50 m e c 2 ) we follow a least squares approach for linear regression in double logarithmic coordinates and obtain the power law spectral index. The electron spectrum in a close downstream of the shock (5000 grid cells behind the shock) at time t = 70,000 ω −1 e for the setup with σ = 0.0002 and θ = 30 • and its approximation with temperature T e = 5 × 10 10 K and spectral index s = 3.59 are shown in Figure 4.
Time dependence of electron distribution function at later stages of simulation is shown in Figure 5. Distribution is not stationary and one can see the oscillation of the electron spectral distribution due to the influence of magneto-hydrodynamic instabilities, as described in [61,66]. So we have chosen the electron distribution at time t = 70,000 ω −1 e for the further modeling.
Recent observations of FBOTs [8][9][10][11] discussed above have shown that their synchrotron spectra are strongly influenced by synchrotron self-absorption. At the given time moment, observable radio fluxes rise as F ν ∝ ν 5/2 for low frequencies, then have a peak and fade with a power law tail, which depends on the particular electron distribution function. Additionally, the time dependence of such spectrum is very specific and its details could be used to imply a number of source parameters: the magnetic field and the shock radius can be determined from the measured maximum of the light-curve F max at given frequency ν, once the fractions of energy in accelerated electrons and magnetic field e and B are established, with the relations derived by Chevalier [37].
where s is the electron spectral index, derived from the power law tail of emissivity spectrum and its time dependence, c 1 , c 5 , c 6 are the Pacholczyk constants [67], depending on s, E 1 is the minimum energy of the electron power law distribution, which usually equals to the electron rest energy, f is the filling factor-the emitting fraction of the source volume, and D is the distance to the source. A problem of this method is that it needs a lot of assumptions about the shock structure and electron distribution. In this model the emitting region is considered to be a homogeneous flat disk with the radius r and depth f × r. There is also a model modification for a spherical source with an account for source inhomogenuity [17]. The electron distribution is considered to be a power law. Additionally, fractions of energy e and B are unknown and are often chosen according to the equipartition rule e = B = 1/3. However the simulation results show, that these values are unlikely to be that large. Following Chevalier [68] we define the energy fractions in terms of the upstream kinetic energy density (m p + m e )n u v sh 2 , where n u is the upstream concentration. In this notation e = E e /ρ u v sh 2 and B = B 2 / 8π(m p + m e )n u v sh 2 , E e is the accelerated electron energy evaluated by subtracting from the total electron energy, that corresponds to the Maxwell-Juttner fit of the distribution function. The values obtained by particle-in-cell simulations in our fiducial setup are e = 0.014 and B = 0.03. They depend on the initial conditions, but for a wide variety of parameters we see that the fraction of energy in magnetic field is lower than 10%. Particle-in-cell simulations have rather small scales and cannot describe the influence of long wave upstream instabilities caused by high energy particles, but Monte Carlo simulations show similar values, as described below.
Using the electron distribution function obtained from the PIC simulation we can evaluate the spectral density of the energy flux of synchrotron radiation from the source, taking into account the effect of synchrotron self absorption. Standard formulae for that effect are described in detail in [69]. Emitted power per unit frequency per unit volume is where φ is the angle between the magnetic field and the line of sight, ν c is the critical frequency ν c = 3e 2 B sin(φ)E 2 /4πm e 3 c 5 , and K 5/3 is the modified Bessel function. The absorption coefficient is The obtained spectral density is further integrated over the volume of the source, which is described as a spherical shell, whose volume is determined by a filling factor f = 0.5. Hence the total emissivity and observable flux at distance D can be derived. The magnetic field B is considered constant and perpendicular to the line of sight. The concentration in the stellar wind depends on radius as n ∝ r −2 , but in the downstream of the shock we assume it constant. The electron distribution function is also constant in the volume of the source. This modeling is further applied to explain the spectrum of the FBOT transient CSS161010. As described in [10] at time t = 357 days after explosion its shock velocity was v sh = 0.36c, which corresponds to the modeled upstream plasma flow velocity vs. = 0.3c, measured in the downstream frame. At this moment, parameters derived with Equations (1) and (2), assuming the equipartition regime e = B = 1/3, are as follows: the magnetic field B = 0.052 G, the outer radius R = 3.3 × 10 17 cm, the concentration n = 1.9 cm −3 , the electron spectral index s = 3.5, which is similar to that obtained from a PIC simulation, and the minimum energy The thermal electrons may contribute substantially to the observed synchrotron spectrum and it was shown in [70] that models with the power law electron distribution might be oversimplified. Additionally, equipartition regime is not very reasonable assumption. Thus, the use of the realistic kinetic simulations is important to model broad band radiation spectra of FBOTs. We have compared the observed fluxes to three models of source emission, evaluated with power law electron distribution and two distributions obtained from PIC simulation: with extrapolation of power law tail to higher energies (E max = 500 m e c 2 ) and without it . For the first case, we have used the parameters described above. In order to evaluate parameters B and R of the simulated particle distribution, we minimized the functional where ν i are the observed frequencies, F obs (ν i ) are the observed fluxes and F(ν i , B, R)-the modeled fluxes, using the gradient descent algorithm. We employed six measurements from [10]: four made with VLA at day 357 at frequencies 1.5, 3.0, 6.05 and 10 GHz and two made by GMRT at day 350 at frequencies 0.33 and 0.61 GHz. Concentration in these equations is determined by the magnetic field B , obtained from the PIC simulation. One can see that distribution, obtained directly from particle-incell simulation, cannot correctly fit the power law tail in observational data, so we had to extrapolate the simulated electron distribution to higher energies because the PIC approach requires a lot of computational resources and thus is not suitable to simulate the considered system up to timescales long enough to form a long tail of accelerated particles. The modeled parameters for extrapolated distribution are B = 0.069 G, R = 3.0 × 10 17 cm and concentration n = 210 cm −3 . The values of the magnetic field and radius are rather close to the values from [10], while the concentration is much higher. These results are illustrated in Figure 6.  One can see that the parameters of the shock (especially the concentration), obtained from the radiation model strongly depend on the electron distribution function. This should be kept in mind during interpretation of the observational data.

A Monte Carlo Model of Cosmic Ray Acceleration in Fast Transient Sources
We have developed a Monte Carlo model of particle acceleration by collisionless shock waves. Acceleration occurs according to the first-order Fermi mechanism when particles are scattered by magnetic fluctuations and cross the shock front many times-the so-called diffusive shock acceleration (DSA). The distribution function of the accelerated particles has a significant anisotropy in the upstream of the shock, and this anisotropy leads to development of plasma instabilities in the upstream. The development of plasma instabilities also leads to a magnetic field amplification (MFA) in the upstream. The pressure of the accelerated particles can be on the order of the total momentum flux flowing onto the shock. In this case, the pressure gradient of the accelerated particles leads to modification of the plasma flow in the upstream.
The Monte Carlo code employed to describe the DSA and MFA is one-dimensional, stationary, nonlinear and plane-parallel. We consider acceleration of protons. The nonrelativistic model described in [71] has been modified to be applicable for the case of relativistic shocks. Within this model all the particles are divided into background and accelerated ones: the accelerated particles are those that have crossed the shock front from the downstream to the upstream at least once. The accelerated particles are treated individually. Background particles are described via macroscopic parameters under the assumption of their local Maxwell distribution function up to the injection point near the shock front in the upstream. After this point, the background particles are described as particles, which allows us not to add any additional parameters to describe the injection of particles into the acceleration process. During the propagation of particles, they are scattered elastically and isotropically in the rest frame of the scattering centers according to the pitch-angle scattering approach [72][73][74][75][76]. The reference frame of the scattering centers for background particles moves with a speed u(x) relative to the rest frame of the shock. The rest frame of the scattering centers for accelerated particles moves with a speed u(x) + v scat (x) relative to the rest frame of the shock. u(x) is the speed of the background plasma flow. The presence of v scat (x) is due to the fact that with the development of resonant instability, the modes propagating only in a certain direction relative to the background plasma are amplified. v scat (x) will be determined below.
Between the scatterings the particles uniformly move straightforward. The distance between particle scatterings is proportional to its mean free path, which we define as: where k is the absolute value of the wavenumber of modes that make up magnetic fluctuations, p is the particle momentum, x is the particle coordinate that is counted from the front of the shock wave. Negative values of x correspond to the upstream, positive values correspond to the downstream.
where W(x, k) is the spectral density of the turbulence energy.
k res pc eB ls (x, k res ) = 1, B ls is the large-scale magnetic field: where B 0 is the constant longitudinal magnetic field. The particle propagates until it gets outside of the model box to the far downstream or crosses the free escape boundary (FEB) located at x = x FEB in the far upstream. The iterative scheme of the employed numerical model allows us to keep the conservation laws of momentum and energy fluxes near the shock front. In the stationary relativistic case these are are formulated as follows. The law of conservation of particle flux (automatically kept here) has the form: where γ(x) = 1/ 1 − β 2 (x) is the Lorentz factor of the background plasma flow, β(x) = u(x)/c, n(x) is the background plasma number density, F n0 is the particle flux in the far upstream.
The conservation law of momentum flux takes the form: , F px0 is the momentum flux in the far unperturbed upstream, Q ESC px is the momentum flux carried away by the accelerated particles through the FEB (Q ESC px = F cr px (x FEB )), F cr px (x) is the momentum flux of the accelerated particles. The conservation law of energy flux takes the form: where F en0 is the energy flux in the far unperturbed upstream, Q ESC en is the energy flux carried away by accelerated particles through the FEB (Q ESC en = F cr en (x FEB )), F cr en (x) is the energy flux of the accelerated particles.
To keep the conservation laws (12) and (13), it is necessary to determine the profile of the background plasma flow u(x) in the upstream and the full compression by the shock R tot by means of an iterative process. At the initial iteration, approximate profiles u(x), v scat (x) in the upstream, W(x, k) and the full shock compression R tot are set. Then the particles are propagated and their distribution function is calculated accordingly. In the far downstream, the momentum distribution function of all the particles in the rest frame of the flow is isotropic. Thus, it is possible to determine the adiabatic index of the entire plasma in the downstream Γ p2 based on the obtained particle distribution function. Here and below, the subscript 0(2) denotes the values in the far upstream (downstream). In these designations R tot = β 0 /β 2 .
To find the full compression, we write down the flux conservation laws (11), (12) and (13) for the far upstream and for the downstream.
We determine the current values Q ESC en , Q ESC px and Γ p2 at this iteration of the quantities from the distribution function obtained after particle propagation. The value P w2 is also calculated based on the equation given below. Thus, three unknowns R tot , P p2 and n 2 remain in the Equations (14)- (16). Solving these equations, we find a new value of R tot . The value R tot for the next iteration is found by averaging the new value and the old one.
A new profile of the flow velocity in the upstream is determined according to the formula based on (12): where the values obtained after propagation of particles are in the right part of the expression. The background plasma momentum flux is F th px (x) = γ 2 (x)β 2 (x)Φ th (x) + P th (x). The turbulence momentum flux is F w px (x) = γ 2 (x)β 2 (x)Φ w (x) + P w (x). γ old (x)β old (x) is determined by the flow profile at the previous iteration. Selection of the flow profile based on the expression (17) in the area where the background flow is described in the form of particles, works well in the case of non-relativistic motion, when calculating in this area F th px (x) based on the distribution function of background particles. In the relativistic case, as shown in [77], the momentum flow in the iterative process converges to a greater value than in the far upstream, when using (17) near the shock wave front. Hence, following [77] we smooth out the flow profile u(x) near the shock front. The new speed profile is then averaged with the old one. Below we describe the equations that are used to calculate the values included in F th px (x) and F w px (x). The turbulence energy spectrum defining F w px (x) is found based on the solution of the following equation: where L(x, k) is the turbulent energy dissipation. The spectral flux of the turbulent energy (turbulent cascade) is: where ρ(x) is the background plasma density, where C Kolm is the Kolmogorov's constant, which is here taken equal to C Kolm = 1.6. The expression (19) is derived from [78]. G(x, k) is the growth rate of the turbulent energy in the background plasma rest frame due to plasma instabilities. Similar to [71], here we considered the growth rate of current instabilities-the Bell's non-resonant [79] and resonant instability. The accelerated particle current, which determines the growth rates, is calculated in the rest frame of the scattering centers, after propagation of particles. Differentiating the Equations (12) and (13) by x, using (11), and excluding from the equations the term proportional to n(x) we get the following relation: If we assume that each of the components of the system is affected only by the change of (γ(x)β(x)), that is, the change in energy and momentum flux occurs adiabatically due to the change of the flow velocity, we can divide the Equation (21) into separate adiabatic equations for the components: The Equation (23) in this case is equivalent to the Equation (18) integrated by k in the absence of MFA and dissipation. In the presence of MFA and dissipation after integration by k, the Equation (18) will take the form (similar to (23)): where the dissipation term is L(x) = (k) L(x, k)dk. Here we use the following expression for the turbulent energy dissipation: where k b is the Boltzmann's constant, T th (x) is the background plasma temperature (P th (x) = n(x)k b T th (x)). In this model, it is assumed that in the downstream Π(x, k) = 0 and L(x, k) = 0. From the comparison of Equations (23) and (25) one can see that there are two additional terms in the right side of (25). To fulfill the total energy conservation Equation (21), these terms must be compensated by introducing additional terms into the equations for the remaining components of the system. We assume that the dissipation of the turbulent energy flow leads to heating of the background plasma. An increase in the energy flow turbulence due to MFA can be compensated by scattering accelerated particles in the frame of scattering centers moving with the speed u(x) + v scat (x). Then the equation for the energy flux of the accelerated particles will take the form: Within the considered geometry we introduce v scat (x) as follows: up to the injection point of the background particles in the upstream. After the injection point and before the shock front v scat (x) = v ampl (x). In the downstream v scat (x) = 0. In this model, we assume that part of the energy flux taken from the accelerated particle flux in the region where v ampl (x) < v A,e f f (x) , goes to heat the background plasma. Thus, the equation determining the change in the energy flux of the background plasma has the form: where After the injection point of background particles and in the downstream v diss (x) = 0. Substituting the expression for Φ th (x) into the Equation (34), we obtain the following equation for the background plasma pressure: The solution of the Equation (35) defines F th px (x) in the expression (17). To solve the Equation (18), one needs to set the profile W(x, k) on the FEB x = x FEB . We define W(x FEB , k) ∼ k − 5 3 -the Kolmogorov's spectrum at the FEB with the energy-carrying scale L en . W(x FEB , k) is normalized as follows: Based on the developed Monte Carlo model, we have performed calculations of proton acceleration by mildly relativistic shocks, which are thought to come out during explosions of some SN kinds. In this case, the shocks often propagate into the wind of the pre-supernova star. The number density of particles (protons) in the stellar wind can be estimated as: whereṀ is the mass-loss rate of the pre-supernova, v w is the speed of the stellar wind, r is the distance from the center of the star. ForṀ = 10 −4 M yr −1 , v w = 1000 km s −1 and r = 10 15 cm: n w ≈ 3 × 10 6 cm −3 . This estimate is used to estimated the number density n 0 in the far upstream. L en = 3 × 10 16 cm in all the calculations. We assume that the free escape boundary is at 0.2 of the current radius of the shock. The calculation parameters and their results are presented in Table 1.
The spatial coordinate x in the figures is measured in r g0 = m p cu 0 /eB 0 . For the model A1: x FEB = −4.782 × 10 6 r g0 .
As can be seen from Figure 7, with an increase of the shock speed, the maximum momentum of accelerated particles increases. The value B also increases with an increase in the velocity of the shock wave in the range of simulated shock velocities 0.1-0.5 c and it decreases slightly for the shock velocity of 0.7c (see Table 1) where the transition to relativistic shock regime occurs. Particle-in-cell simulations of electron and proton spectra in the trans-relativistic regime were discussed in [61,62].   Table 1 is reflected in the legend. Figure 8 shows particle distribution functions used for evaluations of the models A1, A2 and A3, with varying values of x FEB and the magnetic field at the FEB. Note, that with an increase of the FEB distance, the strength of the magnetic field on the FEB decreases proportionally. It can be seen that in these configurations the maximum momenta of the accelerated particles are almost the same. The current of the highest energy particles near the FEB amplify turbulent fluctuations due to the small-scale Bell's instability on scales much smaller than their own gyroradius. In Figure 9, the spectral energy density of the turbulence is shown at various upstream points for the model A1. Furthermore, it takes time to significantly amplify the magnetic field, and thus, the amplitude of the amplified turbulent field in a significant part of the upstream differs slightly from its value at the FEB (see Figure 10). The gyroradius of the highest energy particles near the FEB turns out to be significantly larger than the scale of the amplified fluctuations, which leads to a small contribution of the expression (8) to the free path (5). Thus, the free path (5) of the highest energy particles in a significant part of the upstream is determined by the contribution (6) with the initial turbulent field. That is, the free path (5) of the highest energy particles in a significant part of the upstream is λ(x, p) ∼ p/B 0 according to the normalization (36). The non-relativistic theory of DSA gives a simple estimate of the maximum momentum p max in the case of an upstream path independent of the coordinate: λ(p max )c/3u 0 ≈ x FEB . Accordingly, our model has a good estimate: p max ∼ B 0 x FEB . In Figure 11, the independence of the maximum particle momentum from the number density n 0 in the far upstream is illustrated. In Figure 12, it is shown, that with an increase of the magnetic field B 0 with the other parameters kept constant, the maximum particle momentum increases.  Table 1 is reflected in the legend.
We have made the following estimate of the acceleration time τ a of the particles to their maximum momentum. In the estimation, we assume that the mean free path of the highest energy particles with momentum p max in most of the upstream can be estimated by the gyroradius in the magnetic field B 0 . Thus, taking into account that the magnetic field in the downstream is much stronger and, accordingly, the diffusion coefficient of particles is much smaller than in the upstream τ a ≈ 3D(p max )/u 2 0 , where D(p max ) = λ(p max )c/3 ≈ p max c 2 /3eB 0 is the diffusion coefficient of the highest energy particles in the upstream. Accordingly, the estimate of the particle acceleration time to the momentum p max has the form: In the considered models we assume that the current radius of the shock is R f = 5|x FEB |. The expansion time of the supernova remnant can be estimated as the ratio of the current shock radius to the shock velocity. Accordingly, the estimate for the expansion time has the form: It can be seen from the expressions (39), (40) that the expansion time is longer than the acceleration time for the model (see Table 1), the maximum momentum can be estimated from Figure 7, which confirms the self-consistency of the stationary model we have employed.  . Particle distribution function in the shock rest frame, the thick curves correspond to the point x = 0 (the front shock), the thin curves correspond to the point x = x FEB . The correspondence to Table 1 is reflected in the legend.  Table 1 is reflected in the legend.

Discussion and Conclusions
In order to understand the processes of non-thermal particle acceleration at work in fast and energetic transients we have carried out and presented above a microscopic gyro-scale modeling of the collisionless shock structure and non-thermal particle spectra, which show a strong dependence of both electron and proton acceleration efficiency on the shock obliquity.
In this context one should keep in mind that the particle-in-cell simulation assumed a fixed homogeneous magnetic field and cold flow of the incoming particles in the shock upstream at the boundary of the simulation box. On the other hand, fast non-thermal particles can penetrate into the upstream plasma flow. It is clear from the results of the Monte Carlo modeling presented in Section 3 (see, in particular, Figure 10) that the efficient cosmic ray acceleration at the shock may provide a strong magnetic field amplification and modification of the upstream plasma flow. The cosmic ray pressure gradient in the shock upstream decelerates the incoming plasma flow and the cosmic ray driven instabilities may highly amplify the fluctuating magnetic fields well outside the particle-in-cell simulation box which is limited by a few hundred of the proton gyroradii around the plasma sub-shock. Such simulations show the potential importance of the feedback effects which cannot be modeled with the microscopic particle-in-cell simulations so far. Therefore we have used here the particle-in-cell model to simulate the electron injection and acceleration in sub and mildly relativistic shocks of fast energetic transients together with Monte Carlo modeling. While the Monte Carlo technique describes the structure of upstream flow modified by the accelerated particles at scales well above the proton gyro-scales, it cannot be used to simulate the electron injection where particle-in-cell approach is required. Thus, we used the combination of the two techniques to model radio emission.
In our study, of electron spectrum convergence in quasi-parallel shock of 0.3c speed we observed some non-monotonic temporal behavior of the electron spectra as it is shown in Figure 5. This could be due to the development of Bell's instability as it was found earlier in [61] and which mediate the quasi-parallel shock structure at proton gyro-scales. The maximum electron energy achievable in our simulation was about 50 m e c 2 and we extrapolate the spectral slope to larger energy. We extended the spectra from 50 to 500 m e c 2 using the same spectral slope, it is enough to model radio spectra. This is an assumption in our case. However, the extrapolation seems to be justified by the presence of a power-law such as a spectral component with a similar slope right after the thermal peak in Crumley et al. simulation (see the electron spectra presented in Figure 7 [61] in the electron momentum range between 0.1 and 30 m p c ). A similar spectral component is also apparent right after the peak of the spectrum in our steady Monte Carlo simulations (see, e.g., our Figure 8).
We applied 2D kinetic PIC simulations for sub-relativistic flows with velocity of 0.3 c to model the spectra of electrons and protons. The dynamical range of the full kinetic PIC simulations is limited but the electron spectrum extrapolated with account for the results of Monte Carlo simulations is enough to model the observed radio emission in the fast transients where such fast outflows were found. In the Monte Carlo model the particle-in-cell simulated domain where the electron injection occurs correspond to the sub-shock structure which is apparent at x = 0 in Figure 10. The plasma compression ratio at the sub-shock of the cosmic ray modified shock is about 3 and the spectra of particles accelerated at the sub-shock in the low energy regime (c.f. the proton spectral slope right after the peak in Figure 8) are consistent with the ones obtained within the particle-in-cell simulation dynamical range. The gyroradius of electrons with Lorentz-factor of 1000 in our simulations is about the gyroradius of protons with Lorentz-factor of 10. The spectral index of proton distribution simulated with Monte Carlo model at Lorentz-factor of 10 is consistent with the PIC electron spectrum extrapolated to ∼500 m e c 2 . This allows to model the non-thermal emission and to understand the origin of the synchrotron radio emission of FBOTs. Additionally, one may assume an explanation of their hard X-ray spectrum using the dependence of the electron power law distribution index on the shock obliquity. As can be seen in Figure 1 it leads to the presence of relativistic electron populations of comparable intensities within a range of spectral indices along the curved shock surface expected in a wide angle outflow. In this case the synchrotron radio emission could have rather steep spectral indices, while the X-ray component produced by the inverse Compton scattering of the intense optical radiation by the relativistic electrons with the harder spectral index may appear to be flatter.
The simplified macroscopic Monte Carlo kinetic model was used in Section 3 to estimate the maximum energies of the accelerated cosmic ray nuclei. The model accounted for both the nonlinear feedback effects of the flow modification by the cosmic ray pressure gradient and magnetic turbulence amplification by cosmic ray driven instabilities in the upstream of a plain mildly relativistic shock. The model demonstrated a possibility of PeV regime proton acceleration in the shocks driven by mildly relativistic outflows of fast energetic transients on a few weeks timescale.
Transient objects of different types such as gamma-ray bursts and tidal disruption events [80][81][82] are widely discussed as possible sources of the observed high energy neutrinos.
The search of PeV gamma-ray sources have recently revealed a number of potential galactic pevatron sources (see, e.g., [83][84][85][86]). The analysis presented in [59] allowed the authors to conclude that the extended galactic supernova remnants are not likely to be pevatrons, while some other types of galactic sources associated with the SN events in the compact clusters of young massive stars [87] and gamma-ray binaries with compact relativistic stars [88,89] can produce PeV photons and neutrinos. While PeV photons undergo strong attenuation and can be detected mostly from the galactic sources, high energy neutrinos from extragalactic energetic transients can be detected with currently operating and future neutrino observatories simultaneously with LSST optical transients detection.