It is generally believed that the observed afterglow results from slowing down of a relativistic shell on the external ISM. The afterglow is produced, in this case, by an external shock. A second alternative is of "continuous emission". The "inner engine" that powers the GRB continues to emit energy for much longer duration with a lower amplitude  and may produce the earlier part (first day or two in GRB970228 and GRB970508) of the afterglow. It is most likely that both processes take place to some extent . We discuss in this section theoretical models for the production of the afterglow focusing on the external shock model.
9.1. Hydrodynamics of a Slowing Down Relativistic Shell
Within the external shock model there are several possible physical assumptions that one can make. The "standard" model assumes adiabatic hydrodynamics (energy losses are negligible and do not influence the hydrodynamics), slow cooling (the electrons radiate a small fraction of the energy that is generated by the shock) and synchrotron emission [17, 18, 21, 22, 23, 247, 47]. However there are other possibilities. First, the electrons' energy might be radiated rapidly. In this case the radiation process is fast and the observed flux is determined by the rate of energy generation by the shock. If the electrons carry a significant fraction of the total internal energy fast cooling will influence the hydrodynamics which will not be adiabatic any more. In this case we have a radiative solution [25, 24] which differs in its basic scaling laws from the adiabatic one. The different possibilities are summarized in Table 9.1
|Adiabatic Hydrodynamics||Radiative Hydrodynamics|
|Slow Cooling||Arbitrary e||Impossible|
|Fast Cooling||e < 1||e 1|
9.1.1. A Simple Collisional Model
We consider first a simple model for the slowing down of the shell. In this model the slowing down is described by a series of infinitesimal inelastic collisions between the shell and infinitesimal external masses. We assume a homogeneous shell described by its rest frame energy M (rest mass and thermal energy) and its Lorentz factor . Initially, E0 = M0 c2 0. The shell collides with the surrounding matter. We denote the mass of the ISM that has already collided with the shell by m(R). As the shell propagates it sweeps up more ISM mass. Additional ISM mass elements, dm, which are at rest collides inelastically with the shell.
Energy and momentum conservation yield:
where dE is the thermal energy produced in this collision. We define as the fraction of the shock generated thermal energy (relative to the observer frame) that is radiated. The incremental total mass satisfies:
These equations yields analytic relations between the Lorentz factor and the total mass of the shell:
and between m(R) (and therefore R) and .
These relations completely describe the hydrodynamical evolution of the shell.
Two basic features can be seen directly from Eq. 116. First, we can estimate the ISM mass m that should be swept to get significant deceleration. Solving Eq. 116 with an upper limit 0 / 2 and using 0 >> 1 we obtain the well known result: a mass m M0 / (20) is required to reach = 0 / 2. Apparently this result is independent of the cooling parameter .
A second simple result can be obtained in the limit that 0 >> >> 1:
so that R-3/(2-). For = 0 this yields the well known adiabatic result:
and R-3/2 [238, 18, 22, 23, 247]. For = 1 this yields the completely radiative result:
and R-3 [238, 24, 25].
For comparison with observations we have to calculate the observed time that corresponds to different radii and Lorentz factors. The well known formula
is valid only for emission along the line of sight from a shell that propagates with a constant velocity. Sari  pointed out that as the shell decelerates this formula should be used only in a differential sense:
Eq. 120 should be combined with the relation 117 or 118 and integrated to get the actual relation between observed time and emission radius. For an adiabatic expansion, for example, this yields: tobs = R / 162 c . Eq. 120 is valid only along the line of sight. The situation is complicated further if we recall that the emission reaches the observe from an angle of order -1 around the line of sight. Averaging on all angles yields another numerical factor [254, 255, 256] and altogether we get
where the value of the numerical factor, cga, depends on the details of the solution and it varies between ~ 3 and ~ 7. Using Eqs. 121 and 117 or 118 we obtain the following relations between R, and t:
where L (3E / 4 n mp c2 )1/3 is the radius where the external mass equals the mass of the shell.
One can proceed and use the relation between R and and tobs (Eqs. 122 and 123) to estimate the physical conditions at the shocked material using Eqs. 44. Then one can estimate the emitted radiation from this shock using Eqs. 56 and 57. However, before doing so we explore the Blandford-McKee self similar solution , which describes more precisely the adiabatic expansion. This solution is inhomogeneous with a well determined radial profile. The matter at the front of the shell moves faster than the average speed. This influences the estimates of the radiation emitted from the shell.
9.1.2. The Blandford-McKee Self-Similar Solution
Blandford & McKee  discovered a self-similar solution that describes the adiabatic slowing down of an extremely relativistic shell propagating into the ISM. Using several simplifications and some algebraic manipulations we rewrite the Blandford-McKee solution as :
where n(r, t), e(r, t) and (r, t) are, respectively, the density, energy density and Lorentz factor of the material behind the shock (not to be confused with the ISM density n) and (t) = (R(t)) is the Lorentz factor of material just behind the shock. n(r, t) and e(r, t) are measured in the fluid's rest frame while (r, t) is relative to an observer at rest. The total energy in this adiabatic flow equals E = E0, the initial energy. The scaling laws of R(t) and (t) that follow from these profiles and from the condition that the total energy in the flow equals E is:
The scalings 125 are consistent with the scalings 122 and 123 which were derived using conservation of energy and momentum. They provide the exact numerical factor that cannot be calculated by the simple analysis of section 9.1.1. These equations can serve as a starting point for a detailed radiation emission calculation and a comparison with observations.
The Blandford-McKee solution is adiabatic and as such it does not allow for any energy losses. With some simplifying assumptions it is possible to derive a self-similar radiative solution in which an arbitrary fraction of the energy generated by the shock is radiated away .