danieljprice / phantom

Phantom Smoothed Particle Hydrodynamics and Magnetohydrodynamics code
https://phantomsph.github.io
Other
103 stars 230 forks source link

Track accretion energy #552

Closed danieljprice closed 4 months ago

danieljprice commented 4 months ago

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