mcfost icon indicating copy to clipboard operation
mcfost copied to clipboard

APR support

Open JotaRata opened this issue 2 months ago • 1 comments

Type of PR: modification to existing code

Description: Added support for Adaptive particle refinement when coupled with Phantom (#139) The main changes are:

  • Deallocation of arrays that depend on N_cells
  • Multiply each type mass by 2**(-apr_level)
  • run_mcfost_phantom and phantom_2_mcfost recieve an optional apr_level argument to avoid breaking existing code (i.e. when running MCFOST in post)

Testing: Ran test Phantom simulations with MCFOST=yes APR=yes. Temperature profile matches the control even inside the APR regions.

  • There are still bugs that need to be solved

Did you run the botscheck that the code and comments follow the code of conduct? no

Did you update relevant documentation in the docs directory? no

JotaRata avatar Nov 10 '25 02:11 JotaRata

I have two questions:

  1. Regarding how the number of photons should be handled when using MCFOST with a variable number of particles. Do you think user should be able to choose between having a fixed number of photons or a fixed photon-to-particle ratio?

  2. How the distribution of re-emitted photons would change if particles are now concentrated more inside the APR regions?

JotaRata avatar Nov 11 '25 04:11 JotaRata