Description:
Attempt to address #457, add book-keeping of energy removed from the simulation due to accretion
Testing:
Low-resolution simulations of polytropes plunging into central potential with fixed accretion radius, e.g. using SETUP=grtde with both Newtonian gravity and GR. We now attempt to keep track all of the energy of the accreted particles, including the deleted potential, kinetic, thermal and magnetic energies. Previously the accreted energy in the .ev file was just GM/r, so only included the potential energy. Some caveats:
the accounting seems to work if particles are accreted radially or as cold streams
keeping track of Epotacc assumes that the object doing the accretion does not move (i.e. the potential is fixed in space and time). Since accreted particles are left in the position where they were accreted, this will be wrong for time-dependent potentials. This does NOT work with accretion onto sink particles for this reason (and in this case Eacc is reported as zero in the .ev file).
for accretion that occurs either non-radially or with significant thermal energy (e.g. through a disc) the bookkeeping does not currently seem to work. This could either be a bug or a conceptual misunderstanding of what should be kept track of here.
Did you run the bots? no
Did you update relevant documentation in the docs directory? no
Type of PR: other
Description: Attempt to address #457, add book-keeping of energy removed from the simulation due to accretion
Testing: Low-resolution simulations of polytropes plunging into central potential with fixed accretion radius, e.g. using SETUP=grtde with both Newtonian gravity and GR. We now attempt to keep track all of the energy of the accreted particles, including the deleted potential, kinetic, thermal and magnetic energies. Previously the accreted energy in the .ev file was just GM/r, so only included the potential energy. Some caveats:
Did you run the bots? no
Did you update relevant documentation in the docs directory? no