IAS-Astrophysics / athenak

Performance-portable version of the Athena++ astrophysical AMR-MHD code using Kokkos.
BSD 3-Clause "New" or "Revised" License
23 stars 13 forks source link

MRI2d results after commit c7e3547 on face-centered flux correction #577

Closed liangwang0734 closed 1 month ago

liangwang0734 commented 1 month ago

The commit c7e3547dd42f1fc6a8e9b915008da85d49357fcc seems to cause substantial differences at least in the mri2d.cpp test with ifield=2 (constant Bz case) and isothermal eos.

After this commit, the test shows fast-developing large boundary fluctuations, increasing the computing time for the initial stages.

After I manually reverted this commit, the results are more similar to the athena++ results.

The zero-net-flux case does not seem to be much impacted, possibly due to the fact that initially the sinusoidal Bz is zero at the radial boundary.

Questions:

image

jfields7 commented 1 month ago

Ironically, that commit is reverting other changes which broke face-centered AMR, so simply removing it isn't an option. Can you try commit 4bc58b0342a58d001d4c3024d3e3c889d8edb35d, which is what I was trying to recover, to see if you still have the same issues?

jmstone commented 1 month ago

The temporary solution is indeed to revert to using an earlier version of the code. When the partially completed implementation of the 3D shearing box BCs was merged to main, it contained a logic error that broke AMR flux corrections as Jacob reported and patched. This will all be fixed as soon as I finish the 3D shearing box and commit the final version to main (which will be more thoroughly tested so it does not break MHD AMR!), hopefully in a few weeks.