MGNDATA input format

Dear FLUKA experts,

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?

Best regards
Roman

Hello Roman,

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.

Right now, you wrote:

*...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....
MGNDATA          0.0       2.0       0.0                              BEND      
MGNDATA          0.0       2.0       0.0                               &        
MGNDATA          0.0       2.0       0.0                               &&       
MGNDATA          0.0       2.0       0.0                               &&    

This is not a suitable format. Given the grid:

     y
     ^
     |
     3------4
     |      |    
     1------2---> x

You need to provide the 2D data as:

*...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....
MGNDATA        Bx(1)      By(1)     Bx(2)     By(2)     Bx(3)     By(3)BEND      
MGNDATA        Bx(4)      By(4)                                        &        

I attach a working copy.
test_MGNDATA.flair (2.2 KB)

Cheers,
Daniele

3 posts were split to a new topic: MGNDATA: ERROR Field BEND not found or in not correct order