FMKS, unlike MKS, is broken on the torus problem -- in 2D the disk blows up after about 200M.
This PR aims to fix that.
At the moment it looks like the issue was a bug in the singularity fix code (only being applied to theta = 0 but not theta = pi, using abs instead of fabs)
This PR fixes unrelated bugs in the polar axis singularity fixup code and in using function arguments for GetNorm_
It turns out the problem is when reflecting the X2 component of the magnetic field about the polar axis in FMKS. Why this plagues phoebus but not harm is currently unknown. Outflow BCs for X2 work fine, and this is probably a moot point once we switch to face-centered fields.
We add a polar BC option for X2 but all this does is enable a special fix flux option; otherwise it looks just like reflection in GenericBC.
PR Checklist
[ ] Adds a test for any bugs fixed. Adds tests for new features.
[x] Format your changes by calling scripts/bash/format.sh.
PR Summary
FMKS, unlike MKS, is broken on the torus problem -- in 2D the disk blows up after about 200M.
This PR aims to fix that.
At the moment it looks like the issue was a bug in the singularity fix code (only being applied to theta = 0 but not theta = pi, usingThis PR fixes unrelated bugs in the polar axis singularity fixup code and in using function arguments forabs
instead offabs
)GetNorm_
It turns out the problem is when reflecting the X2 component of the magnetic field about the polar axis in FMKS. Why this plagues phoebus but not harm is currently unknown. Outflow BCs for X2 work fine, and this is probably a moot point once we switch to face-centered fields.
We add a
polar
BC option for X2 but all this does is enable a special fix flux option; otherwise it looks just like reflection inGenericBC
.PR Checklist
scripts/bash/format.sh
.