Dear fluka user,
I want to simulate proton therapy nozzle, there are two different magnetic field, MAGNETI and MAGNET2. Therefore, I have edited the magnetic field file (magfld.f,in the usermvax folder of the FLUKA installation directory ), but how to active this two different magnetic fields in flair?
best regards
jiewang
Dear Jiewang,
the magnetic field routine is automatically activated, if your input file has a MNGFILED card with Bx, By and Bz set to 0.0.
You can have a look on the manual for more information: https://flukafiles.web.cern.ch/flukafiles/manual/13.2.11.html
Cheers,
David
To expand @horvathd answer, note that the field is actually invoked and applied ONLY in the geometry regions declared as magnetic in ASSIGNMAt (as pointed out in the manual section he indicated).
Also, you may want not to change the original user routine template (provided in src/user/ - according to the packages CERN nowadays distributes from https://fluka.cern - and no longer in usermvax), but copy it in your working directory and modify it there according to your needs.
Best
Francesco
Dear David,
Thanks for your reply, two different magnetic field were definited by myself in a new file named magfld_mod
Dear jiewang,
Your magnetic field routine is incompatible with the FLUKA version released by CERN.
To fix the issue, please have a look on this topic:
Cheers,
David
Dear David,
Thank you for your reply and suggestions. I have solved this problem.
Best regards
jiewang