Implementation¶
Finite volume method¶
In the KiT-RT, we employ the finite volume method (FVM) to model and compute the particle evolutions. It’s a generic method for conservation laws. Consider the following PDE,
Here, \(\mathbf{u}\) represents any vector of states and \(\mathbf{f}\) represents the corresponding flux tensor. To solve the equation numerically, we can sub-divide the spatial domain into finite cells. For a particular cell \(i\), we take the volume integral over the total volume of the cell, which gives,
On integrating the first term to get the volume average and applying the divergence theorem to the second, this yields
where \(S_i\) represents the total surface area of the cell and \(\mathbf n\) is a unit vector normal to the surface and pointing outward. The equivalent formulation results