Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

account for accreted/injected energy in conservation checks / .ev file #457

Open
danieljprice opened this issue Jul 21, 2023 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@danieljprice
Copy link
Owner

At present the code-stopping energy conservation checks (I_WILL_NOT_PUBLISH_CRAP) are switched off if particles are accreted or there is heating/cooling [energy injection/removal] in the simulation.

Would be better if this could be properly accounted for, so that the "true" energy error can still be estimated even in these cases. However, would also be helpful to have total energy that reflects any heating/cooling. Suggestion would be to:

  1. account for accreted particles (particles deleted with negative energy) by adding to Eacc (as a global parameter)
  2. account for injected energy, e.g. sink particle heating, with new Einject (e.g. set equal to luminosity*time for constant sink particle luminosity)
  3. account for heating/cooling, possibly also in Einject?
  4. add new total energy variable (etot_all) that indicates the total energy including all injected/removed energy, similar to angtot_all and momtot_all variables that include accreted components

A possible further extension would be to also compute etot_all for isothermal (and maybe also locally isothermal??) simulations to reflect the conserved integral quantity (which is not the total energy in this case but there is still a conserved quantity)

@danieljprice danieljprice changed the title would be helpful to account for accreted/injected energy account for accreted/injected energy in conservation checks / .ev file Jul 21, 2023
@danieljprice danieljprice added the enhancement New feature or request label Jul 21, 2023
Yrisch added a commit to Yrisch/phantom that referenced this issue Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant