Closed bprather closed 1 month ago
The particular ratio of the un-normalized field is very dependent on torus size and adiabatic index, as one might suspect, but not too much on spin.
Indexes and sizes at spin 0.9375:
12/24 G5/3 7.328340434092419
20/41 G13/9 32.798673249803585
20/41 G1.65 45.97006872447211
20/41 G1.6 43.139474342430056
20/41 G4/3 24.149477307464718
20/41 G5/3 46.86564316290881
40/80 G5/3 499.7851368492688
40/80 G5/3 (lower res) 494.7122346366759
Spins at gamma=5/3 20/41:
MAD -0.125 42.20982131423358
MAD 0.125 43.166460300895956
MAD -0.25 41.70337498842309
MAD 0.25 43.62106378779599
MAD -0.5 40.662107072927505
MAD 0.5 44.48529252304539
MAD -0.75 39.58821345093395
MAD 0.75 45.29844988956158
MAD -0.9375 38.70490073540681
MAD 0.9375 45.841224343122306
MAD 0 42.696306777060705
This is fixed in the "oldstable" 2024.5.1 and stable 2024.9, so I'm closing it. This needs to be kept in mind for simulations which began in July or earlier, though, notably for the Illinois library on Frontier.
When initializing B, KHARMA has an option
beta_min
, which sets the ratio of the maximum pressure to maximum magnetic pressure to a desired value by renormalizing the magnetic field. When running with face-centered fieldsb_field/solver = face_ct
, this fails to happen. The normalization is applied to the cell-centered magnetic field representation, which was subsequently replaced by the (non-normalized) averaged face-centered field.This is fixed in a branch, PR today. Hopefully I can add a test comparing KHARMA's FM torus initialization to pyharm's independent implementation to avoid any similar errors in the future.
It remains to assess the extent of the damage. Happily, un-normalized aligned MAD simulations at gamma=5/3 (relevant for the very expensive INCITE runs) all have
beta_min
~ 40, which is not unusable so long as we record this. SANEs fall around ~130-150. I have checked, and this does not affect Illinois v5 simulations -- it is limited to simulations usingface_ct
magnetic fields, all more recent than anything in what I'd call widespread "production" use.If you have
pyharm
installed, you can use a short script to verify what your actualbeta_min
turned out to be:I now have tables of the common values at gamma=5/3 and with the usual MAD torus size of rin=20 r_g, rmax=41 r_g if these would be useful. The starting values for different runs with the same physical parameters agree to about 0.1% relative error, as one might hope.