Re: [fluka-discuss]: magnetic field in vacuum

From: Santana, Mario <msantana_at_slac.stanford.edu>
Date: Tue, 25 Feb 2014 12:15:57 -0800

>- Do I need to do anything specific with the step-size inside a magnetic
>field region?

Most of the times you don't really need as you already have several
controls in the MAGFLD card (which can actually override the settings in
step size). It will depend how strong the field is, how small the region,
how light the particle, and what is the purpose of the magnetic field
(e.g. are you tracking particles along a long beam-line and you want them
to perfectly describe the betatron oscillations?). Note that step-size
definition may be more important for the regions adjacent to those where
you define your magnetic field.
You can play with the values and see if the results are satisfactory.
Obviously the smaller the step, the more CPU it should take.

>- How does one find the optimum step-size if the region is not filled with
>vacuum?
If it is in a solid my guess is that the step-size will be controlled by
the interaction mechanisms, so I wouldn't impose one based on magnetic
tracking only. Also in such cases I'd say you are not looking for an ideal
tracking (as opposed to beam tracking through a magnetic lattice).

>- Is the default step-size in a magnetic field region written out
>somewhere in the output files?

Look in the output file for the tag 'Regions: materials and fields'. You
will find a table with each region, its material, whether there's fields
and what are the step-size min/max values.

>Thank you in advance,
>Mina
>
>> Yes, it does.
>>
>>
>> On 2/24/14 12:20 PM, "Mina Nozar" <nozarm_at_triumf.ca> wrote:
>>
>>>Thank you Mario and Francesco. I am clear on this now.
>>>
>>>I do have another question. Does FLUKA handle magnetic field through
>>>non-vacuum regions?
>>>We have a case here where the vacuum box region of a bending magnet
>>>upstream of the 100 kW beam dump can be filled with stainless steel.
>>>This is to get the back-scattered electrons shower in the s.s. region
>>>with the s.s. providing some attenuation for photons. The energy of the
>>>back-scattered electrons (going through the beam pipe is below 10 MeV.
>>>
>>>I don't see any obvious bending happening when I turn the material in
>>>the B field region to s.s. Maybe it is because the B field immediately
>>>steers the electrons into the s.s. region.
>>>
>>>Just wanted to make sure the FLUKA allows for having magnetic field
>>>inside a non-vacuum region.
>>>
>>>Thanks a lot,
>>>Mina
>>>
>>>On 14-02-18 12:43 PM, Santana, Mario wrote:
>>>> No, you always need to set the appropriate flag in ASSIGNMAT,
>>>> regardless
>>>> whether you use a simple field (MAGNFIELD only) or a programmed one
>>>> (magfld.f) .
>>>>
>>>
>>>On 14-02-18 11:50 AM, Francesco Cerutti wrote:
>>>>
>>>> Not at all. A region will be considered as magnetic only if it is
>>>> declared as such in the respective ASSIGNMAT card. And the reason for
>>>> that is what I indicated below as second and more important argument.
>>>>
>>>> Cheers
>>>>
>>>> Francesco
>>>>
>>>> **************************************************
>>>> Francesco Cerutti
>>>> CERN-EN/STI
>>>> CH-1211 Geneva 23
>>>> Switzerland
>>>> tel. ++41 22 7678962
>>>> fax ++41 22 7668854
>>>> On 2/18/14 11:17 AM, "Mina Nozar" <nozarm_at_triumf.ca> wrote:
>>>>
>>>>> Dear Francesco,
>>>>>
>>>>> So do I understand correctly that if one needs to assign/associate a
>>>>> magnetic field to a region of interest in the ASSIGNMAT card, if one
>>>>> uses the MAGNFIELD card for a simple magnetic field setting but NOT
>>>>>if
>>>>> one uses the magfld.f to set and assign the magnetic field to a given
>>>>> region.
>>>>>
>>>>> Thanks and best wishes,
>>>>> Mina
>>>>>
>>>>> On 14-02-14 12:57 PM, Francesco Cerutti wrote:
>>>>>> Dear Mina,
>>>>>>
>>>>>> first of all we just saw with Brandon that, if you are fine with a
>>>>>> constant field, you do not need to write a magfld.f routine but it
>>>>>>is
>>>>>> enough to define it in the MGNFIELD card. Then ASSIGNMAT is
>>>>>>essential
>>>>>> to tell the code in which regions that field should be applied.
>>>>>>
>>>>>> Furthermore and more important, you definitely do not want to ask
>>>>>>the
>>>>>> code to go always through the magnetic tracking algorithm - by far
>>>>>> more complex than a straight step - despite the fact that no
>>>>>>magnetic
>>>>>> field is present in your region, and to call the magfld.f routine at
>>>>>> each substep to get back a humiliating zero.
>>>>>>
>>>>>> Ciao
>>>>>>
>>>>>> Francesco
>>>>>>
>>>>>> **************************************************
>>>>>> Francesco Cerutti
>>>>>> CERN-EN/STI
>>>>>> CH-1211 Geneva 23
>>>>>> Switzerland
>>>>>> tel. ++41 22 7678962
>>>>>> fax ++41 22 7668854
>>>>>>
>>>>>> On Fri, 14 Feb 2014, Mina Nozar wrote:
>>>>>>
>>>>>>> Hello Francesco and everyone else.
>>>>>>>
>>>>>>> Just trying to understand the flow/logic of assigning magnetic
>>>>>>> fields
>>>>>>> in a region.
>>>>>>>
>>>>>>> Here is my understanding and a question where I lack
>>>>>>> understanding...
>>>>>>>
>>>>>>> 1) MGNFIELD card activates calling the subroutine MAGFLD defined in
>>>>>>> mgfld.f
>>>>>>> 2) In subroutine MAGFLD, one defines the intensity and direction of
>>>>>>> the magnetic field(s) and assigns it to a given region(s).
>>>>>>> 3) Set Field to Magfiled in the ASSINMAT card for the region(s)
>>>>>>>with
>>>>>>> magnetic field.
>>>>>>>
>>>>>>> What I don't understand is why do we need to turn on magnetic field
>>>>>>> in the ASSIGNMAT card? Is this not already set via MAGFLD?
>>>>>>>
>>>>>>> Best wishes,
>>>>>>> Mina
>>>>>>>
>>>>>>> On 14-02-14 01:57 AM, Francesco Cerutti wrote:
>>>>>>>> Hallo,
>>>>>>>>
>>>>>>>> actually, in case of constant magnetic field in all magnetic
>>>>>>>> regions, the
>>>>>>>> MGNFIELD card is enough (as stated in the manual). It will
>>>>>>>> automatically
>>>>>>>> feed the default magfld routine (the one provided in usermvax,
>>>>>>>> where in
>>>>>>>> fact the comment
>>>>>>>> * 2 Tesla uniform field along +z:
>>>>>>>> does not apply) and you do NOT need to link the latter into a
>>>>>>>> customized
>>>>>>>> executable, unless you want to modify it, since it is already in
>>>>>>>>the
>>>>>>>> standard FLUKA library and linked in the standard executable.
>>>>>>>>
>>>>>>>> Cheers
>>>>>>>>
>>>>>>>> Francesco
>>>>>>>>
>>>>>>>> **************************************************
>>>>>>>> Francesco Cerutti
>>>>>>>> CERN-EN/STI
>>>>>>>> CH-1211 Geneva 23
>>>>>>>> Switzerland
>>>>>>>> tel. ++41 22 7678962
>>>>>>>> fax ++41 22 7668854
>>>>>>>>
>>>>>>>> On Thu, 13 Feb 2014, Dr. Vittorio Boccone wrote:
>>>>>>>>
>>>>>>>>> No you should still include and link the default magfld routine
>>>>>>>> which is
>>>>>>>>> configured for a uniform magnetic field, as explained in the
>>>>>>>> lecture and > the
>>>>>>>>> tutorial.
>>>>>>>>> Best
>>>>>>>>> V.
>>>>>>>>> Sent from my iPad
>>>>>>>>>> On 13/feb/2014, at 22:42, "REDDELL, BRANDON D. (JSC-EV511)"
>>>>>>>>> <brandon.d.reddell_at_nasa.gov> wrote:
>>>>>>>>>> Thanks Vittorio.
>>>>>>>>>> So in my simple problem, I am not using the magfld.f
>>>>>>>> routine,
>>>>>>>>> just only the MGNFIELD card. So, could you confirm if
>>>>>>>>> these
>>>>>>>>> cards should work:
>>>>>>>>>> MGNFIELD 20.0 0.2 0.10 0.0
>>>>>>>>> 0.0 1.0
>>>>>>>>> STEPSIZE 0.5 0.0 VAC2 0.0
>>>>>>>>> 0.0 0.0
>>>>>>>>> EMF
>>>>>>>>> EMF-OFF
>>>>>>>>> .
>>>>>>>>> .
>>>>>>>>> .
>>>>>>>>> ASSIGNMA VACUUM VAC2 1.0
>>>>>>>>> (the 1 here is at WHAT(5)
>>>>>>>>>> Thanks.
>>>>>>>>>> Brandon
>>>>>>>>
>>>>>>>>___________________________________________________________________
>>>>>>>>__
>>>>>>>>__
>>>>>>>> _____
>>>>>>>>>> From: Vittorio Boccone [dr.vittorio.boccone_at_ieee.org]
>>>>>>>>> Sent: Thursday, February 13, 2014 2:47 PM
>>>>>>>>> To: REDDELL, BRANDON D. (JSC-EV511);
>>>>>>>>>fluka-discuss_at_fluka.org
>>>>>>>>> Subject: Re: [fluka-discuss]: magnetic field in vacuum
>>>>>>>>>> Sure, check out the magnetic field exercise (solution) on the
>>>>>>>> advanced
>>>>>>>>> course:
>>>>>>>>>
>>>>>>>>
>>>>>>>>http://www.fluka.org/fluka.php?id=course&sub=program&navig=2&which=
>>>>>>>>tr
>>>>>>>>iu
>>>>>>>> mf20
>>>>>>>>>> 12
>>>>>>>>> Best
>>>>>>>>> V.
>>>>>>>>>> On 2/13/2014 8:47 PM, REDDELL, BRANDON D. (JSC-EV511) wrote:
>>>>>>>>>> FLUKA Users/Experts,
>>>>>>>>>>>> Do the magnetic field settings in a region (using
>>>>>>>> MGNFIELD
>>>>>>>>> card along with WHAT card 5 in ASSIGNMA Card) work if the
>>>>>>>>> region of the B field is a vacuum?
>>>>>>>>>>>> Brandon
>>>>>>>>>>>>
>>>>>>>
>>>>
>>>
>>
>>
>>
>
>
Received on Tue Feb 25 2014 - 22:25:45 CET

This archive was generated by hypermail 2.3.0 : Tue Feb 25 2014 - 22:25:49 CET