PrincetonUniversity / athena

Athena++ radiation GRMHD code and adaptive mesh refinement (AMR) framework
https://www.athena-astro.app
BSD 3-Clause "New" or "Revised" License
239 stars 127 forks source link

Integrate passive scalars into the EOS #359

Closed msbc closed 1 year ago

msbc commented 3 years ago

Is your feature request related to a problem? Please describe. I want to extend the General EOS capabilities to include passive scalars. For example, one could have a composition dependant EOS and use the passive scalars to track composition.

My main purpose of this feature request is to gather input from others to help me implement this feature myself.

Describe the solution you'd like The primary issue here is that the EOS is called within the Riemann Solver. Therefore the face reconstructed passive scalars need to be passed to the Riemann Solver, and then passed to the EOS calls within. Currently the reconstruction and the flux calculations for the hydro and scalar variables are completely separated with different function calls and different tasks. Ideally, these would be unified in some way.

The two main ways I see of doing this is either:

  1. Extending the hydro athena array to include the scalars, so that the zeroth scalar index is NHYDRO (when MHD is disabled).
  2. Keep the hydro and scalar arrays separated but combine the two separate flux/reconstruction functions/tasks.

Describe alternatives you've considered A possible alternative would be to add scalar reconstruction to the hydro steps but to only use this computation for the Riemann problem and to disregard it and recompute it in the scalar task. This adds unnecessary computation but is probably least likely to break something.

Additional context My knowledge of the task list is very poor and I would like need help modifying it.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.