Peano 4
|
This directory hosts the original methodology as discussed in
A preprint of this document is available from https://arxiv.org/abs/2203.01174.
The present algorithm is rather simple. For the modified right-hand side, we need a solution to the Poisson equation \( - \Delta \phi = -\pi G/\rho \). Actually, it is not the integral over \( \rho \) but over the difference of \( \rho \) to the baseline density. We have a fundamental solution to this operator and hence can compute \( \phi \) (or \( \nabla \phi \) respectively, which is the quantity of interest), but for this, we to know \( \int -\pi G/\rho dx \).
We discretise time and make the right-hand side of the current time step feed into the solution of the subsequent time step. Our algorithm reads as follows:
The integral \( \int -\pi G/\rho dx \) can be complex. However, we know that the function has rotation symmetry. Therefore, we discretise the domain into layers similar to an onion. We bucket the solution. In the example above, we have four layers \( \rho _1, \rho _2, \rho _3, \rho _4 \). That is, we write \( \int -\pi G/\rho dx = \sum _{i} \int _{r_i,r_i+1} -\pi G/\rho V_i dr \), where r is the radius away from the centre, and V is the volume of the corresponding shell. Every time we have updated a cell, we look into which onion ring the cell centre falls and accumulate the corresponding \( \rho _i \). We discretise the onion, and then we sort cells into these shells. This gives us an approximation for the volume, where the term \( V_i \) is implicitly approximated through the cells' volumes.
The logic of the accumulation of the overdensities is realised within the class applications::exahype2::euler::sphericalaccretion::MassAccumulator. The accumulator is not only able to keep track of the discretised density distribution within shells, it also provides the tools to interpolate between those buckets.
The outcome feeds into the Euler equation's source term via a gravitional model such as applications::exahype2::euler::sphericalaccretion::addGravitationalSource_AlphaCDM(). It accepts the mass resulting from the overdensity in a region and translates it into a vector driving the PDE.
The integration of the modified source term into the PDE is straightforward, as ExaHyPE's API offers a source term callback function already.
To realise the accumulation, we add a volume- or dof-wise postprocessing kernel to the solution. All ExaHyPE solvers offer such a feature (the exahype2.solvers.rkdg.actionsets.DoFWisePostprocessSolution action set is an example).
Finally, we have to ensure that the mass accumulator's MPI exchange routines are called after each and every time step.