Assign different fields to different regions with MGNCREAT

Dear FLUKA experts

I have started recently to use FLUKA. I have two regions (representing two different bending magnets): is there a smart way of defining different magnetic field strengths for each region with MGNCREAT?

Hello @abaratto,

Yes you can.

Add a single MGNCREAT card with type=DIPOLE and insert a field name in the SDUM (first field - before the type field - in Flair).
Next, define two MGNFIELD cards with the strength and the region to which to associate the dipole field.
Please let us know if you need further assistance.
Kind regards

1 Like

P.S. The magnetic field settings are reported in the output file in the sections “Magnetic fields” and “Magnetic field region assignments”