Packet Initialization

The gamma ray portion of TARDIS also uses the idea of packets of photons from [AbbottLucy85] and [Lucy99a] (see Energy Packet Initialization) These packets are given an energy in the comoving frame which is equal to the total energy divided by the number of packets. They are also given a frequency that is equal to the packet energy divided by Planck’s constant, h.

The packets are also given a direction made up of two angles, \(\theta\) and \(\phi\), where \(\theta\) is a polar angle between 0 and \(\pi\) and \(\phi\) is an azimuth angle between 0 and \(2\pi\). We sample these angles using the following equations [CarterCashwell75]:

\[ \begin{align}\begin{aligned}\cos{\theta} = 1-2 z_1\\\phi = 2\pi z_2\end{aligned}\end{align} \]

The packets are also given a time and location where they start propagating the ejecta. We use the following equations to give the starting location:

\[v = \left[zv_{\text{inner}}^3 + (1-z)v_{\text{inner}}^3\right]^{1/3}\]

where vinner and vouter are the inner and outer velocities of the shell and z is a random number between [0,1).

Then to get the radial position, r, we multiply this velocity by the packet time.

Finally, to get the Cartesian coordinates we use the equations:

\[ \begin{align}\begin{aligned}x = r\sin{\theta}\cos{\phi}\\y = r\sin{\theta}\cos{\phi}\\z = r\cos{\theta}\end{aligned}\end{align} \]