I am trying to implement a 2D interpolated magnetic field via MGNDATA but cannot make it work: test_MGNDATA.flair (1.8 KB)
If I stick to the manual / FLAIR enforced format (“One such card should be provided per grid point”), FLUKA aborts with
ERROR: not all field data values provided
# missing data 2
Abort called from MFDTST reason Missing field data Run stopped!
STOP Missing field data
If on the other hand I ignore the manual and force FLAIR to create continuation lines instead, as suggested here, FLUKA finishes without issues but does not use the data:
B-data: Min= 0.00000 Max= 0.00000
So I am wondering what else must be done to get an interpolated B-field?
I see you are using a 2D interpolation. You need to use one MNGDATA card for each magnetic field that you want to define.
It is important to remember that the magnetic field is in the (x, y) plane. In other words, the Bz component is always zero, and you need to define only Bx and By.
Since the MGNCREAT card states that you provide Nx=2 and Ny=2 points for the interpolation, you need in total 2*2 points times 2 magnetic field component for each point. The total number of data points you need to provide is therefore 8.