One-sided anomaly near polar axis in GRMHD with SMR #714
Replies: 3 comments 2 replies
|
In your configuration, the refined grid should be contacting the pole, and I have to admit that Mesh refinement touching the pole is not very well tested. Does it run smoothly without refinement? If so, I appreciate if you could look in to the ghost cell values on the pole. You can either print them in the code, or use VTK output with ghost_zone enabled. If some values (particularly B-fields) there are not appropriate, we have to fix it. I am not very familiar with GR. And unfortunately, the most knowledgeable person left the field, so we are on our own. |
|
Hi @tomidakn, thanks for the suggestions. As you requested, I examined the ghost cell values on the pole (with ghost-zone VTK output enabled). I also ran a no-refinement version and, additionally, a global uniform Level-1 version (no SMR level boundaries) to further isolate the SMR factor. The analysis below was prepared with AI assistance, which I've tried my best to understand and verify. Apologies in advance if anything is off. The raw data files (VTK + athdf) are available here (Google Drive) if you'd like to verify directly. Ghost-Cell DiagnosticsShort answer: the polar BC implementation itself is fine. Ghost-cell values were compared against the corresponding physical cells in the Here's a concrete example at
However, a more revealing diagnostic is the gradient between the ghost cell and its adjacent physical cell right at the polar axis. The polar BC fills ghost cells from the
The PLM reconstruction at the
The polar BC is doing exactly what it should — the problem is that in a non-axisymmetric flow, "copy from Additional Runs with Different SMR ConfigurationsAs you suggested, I also ran the simulation without refinement, and additionally with global uniform Level-1 refinement (no level boundaries). Here's what happened: No refinement (base grid Global uniform Level-1 (effective Videos (
N/S Asymmetry Profile (Original Case,
|
|
|
|
|
|
|
|
|
|
|
|---|---|---|---|---|---|---|---|---|
| [1, 10) | 8.73e-03 | 7.87e-03 | 1.1× | 2.29e+01 | 4.07e+00 | 5.6× | 1.3 | 1.2 |
| [10, 30) | 5.05e-04 | 4.23e-04 | 1.2× | 1.44e-01 | 7.49e-02 | 1.9× | 1.4 | 1.5 |
| [30, 100) | 3.06e-04 | 1.85e-04 | 1.7× | 7.94e-03 | 1.05e-02 | 0.8× | 11 | 2.4 |
| [100, 300) | 6.38e-05 | 1.80e-05 | 3.5× | 4.01e-04 | 9.62e-05 | 4.2× | 16 | 7.0 |
| [300, 600) | 3.51e-04 | 5.76e-06 | 61× | 3.69e-03 | 8.92e-06 | 413× | 9.0 | 4.6 |
| [600, 1200) | 1.37e-04 | 1.92e-06 | 72× | 1.24e-03 | 1.01e-06 | 1235× | 8.2 | 3.0 |
The transition at <refinement2> — in the original mesh, that's where the Level-2 polar region transitions to a different AMR structure.
Raw Data
The data archive (Google Drive) contains the snapshot at
| File | Number | Physical time |
|---|---|---|
mad98.block{N}.prim.02501.vtk (× 800) |
02501 | |
mad98.block{N}.user.02501.vtk (× 800) |
02501 | |
mad98.prim.00251.athdf |
00251 | |
mad98.user.00001.athdf |
00001 |
The VTK and HDF5 prim counters inherited the original run's numbering, while the HDF5 user output was newly added for this diagnostic run and started from 0. All four correspond to the same physical time.
If you'd like to inspect the polar ghost cells directly, the 128 blocks touching the north polar axis (
0, 1, 4, 5, 8, 9, 12, 13, 32, 33, 36, 37, 40, 41, 44, 45,
64, 65, 68, 69, 72, 73, 76, 77, 96, 97, 100, 101, 104, 105, 108, 109,
256, 257, 260, 261, 264, 265, 268, 269, 288, 289, 292, 293, 296, 297, 300, 301,
320, 321, 324, 325, 328, 329, 332, 333, 352, 353, 356, 357, 360, 361, 364, 365,
512, 513, 516, 517, 520, 521, 524, 525, 530, 531, 534, 535, 538, 539, 542, 543,
548, 549, 552, 553, 556, 557, 560, 561, 566, 567, 570, 571, 574, 575, 578, 579,
656, 657, 660, 661, 664, 665, 668, 669, 674, 675, 678, 679, 682, 683, 686, 687,
692, 693, 696, 697, 700, 701, 704, 705, 710, 711, 714, 715, 718, 719, 722, 723
These blocks have
Would appreciate any thoughts on the cross-pole gradient issue — happy to discuss further.
|
Thank you for the update. I quickly looked at the data, but please understand I am very busy. I guess the fact it is one-sided is just coincidence (it can happen randomly on either side) and probably not fundamental. The data shows anomalously different magnetic fields (all the directions) on the pole, which likely means that the polar boundary condition for the magnetic field is not working properly. Yes, it properly copies the data from the other side of the pole, but it does not mean it is correct nor stable. First of all, the pole is a singular point, and all the faces and edges of the first active cell coincide. The hydrodynamic fluxes through these faces do not matter so much because the surface area is zero and they do not contribute to evolution. However, the EMF_r along the radial edges on the pole (j=js for example) directly appears in the evolution of the magnetic fields in the first active cells along the pole. I think the treatment of this is the root of the issue. When the polar boundary is in use, we replace the EMF_r with its average over all the edges in the phi-direction (see how flux_north/south_* are processed in flux_correction_fc.cpp), because they are actually the same edge. This is intended to be good for everyone, but it may be bad for everyone, possibly because of the turbulent nature of your problem. If the EMF_r on the pole before averaging are very different, the averaging actually can destroy the smooth distribution. So, how can we fix it? I do not have a silver bullet, and it can be problem specific. I'm afraid that it takes trials-and-errors. I can suggest, but without any warranty, to try for example...
|
Uh oh!
There was an error while loading. Please reload this page.
Hi all,
I've been running a 3D GRMHD MAD simulation with Athena++ (Kerr-Schild,
a = 0.98,tilt_angle = 0, full θ coverage,polarboundary condition,rk2/xorder = 2) and I'm seeing a numerical anomaly. I'd appreciate any thoughts or pointers from the community.Starting around$\rho$ is anomalously high and $\gamma$ is saturating against the
t ≈ 23,000–24,000, the north hemisphere (z > 0) begins to develop anomalous behavior near the polar axis — density starts climbing in a column along +z, and the Lorentz factor begins rising towardgamma_max. Over the next ~2,000–3,000 time units, this spreads from the axis outward. Byt ≈ 26,000, essentially the entire north hemisphere is contaminated:gamma_max = 50ceiling across large areas.Meanwhile, the south hemisphere stays fine.
The comparison panel below shows$\rho$ (top) and $\gamma$ (bottom) in the x–z plane at three times:

And here's the evolution sampled every Δt = 500:
I'm using
refinement = staticwith multiple Level 2 boxes placed near both poles (r ∈ [30, 1200], θ/π ∈ [~0.005, ~0.17] for the north, symmetric counterpart for the south). The anomaly starts in the region covered by these refinement boxes and spreads outward from there. The refinement layout is symmetric between north and south, but only the north develops the problem.The following relevant input parameters are used:
gr_torusa = 0.980.0°outflow, polarpolar, azimuthalperiodicstatic, Level 2 near both polesgamma_maxsigma_maxbeta_minrk2,xorder = 2Configure line:
> python configure.py --prob=gr_torus -g -b --coord=kerr-schild --flux=hlle --nghost=2 --cxx icpx -mpi -hdf5However, this simulation costs computational resources. I am therefore unable to provide a quick reproducible example.
Any suggestions for diagnostics that might help pin down the root cause?
Thanks!
All reactions