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

From: Alfredo Ferrari <alfredo.ferrari_at_cern.ch>
Date: Mon, 24 Feb 2014 18:59:00 +0100

... if you have really a lot of these statement it means there are issues
either with the geometry or the accuracy parameters for the magnetic field
tracking.

                  Ciao
                 Alfredo


+----------------------------------------------------------------------+
| Alfredo Ferrari || Tel.: +41.22.76.76119 |
| CERN-EN/STI || Fax.: +41.22.76.69474 |
| 1211 Geneva 23 || e-mail: Alfredo.Ferrari_at_cern.ch |
| Switzerland || |
+----------------------------------------------------------------------+

On Mon, 24 Feb 2014, REDDELL, BRANDON D. (JSC-EV511) wrote:

> Hello,
>
> Is it reasonable to expect a larger *.err file when using the magnetic field in FLUKA. I have a lot of statements such as below. Region 3 is where the magnetic field is. All (or most) particle trajectories pass through this region and then into region 4. I'm not sure if these error statements are because of my choice in stepsize.
>
>
> Geomtr: Particle in region 3 (cell # 0) in position -4.545250219E+01 3.974091972E+02 -9.581085993E+02
> is now causing trouble, requesting a step of 3.561574808E-04 cm
> to direction 1.281491000E-01 -9.914775958E-01 -2.345176459E-02, error count: 5
> R2: 4.000000000E+02 R3: 1.038254347E+03 cm
> X*U (2D): -3.998470127E+02 X*U (3D): -3.773776753E+02 cm
> X*UOLD(2D): -3.178127075E+02 X*UOLD(3D): -2.953433702E+02 cm
> Kloop: 747826, error code: -3 Nfrom: 3 Ntrack: 6
> old direction 6.931231389E-01 -7.204375955E-01 -2.345176459E-02, lagain, lstnew, lsense F F F
> Particle index 1 total energy 1.049244169E+00 GeV
> Try again to establish the current region moving the particle of a 8.035041212E-06 long step
> We succeeded in saving the particle: current region is n. 4 (cell # 0)
>
>
> I've listed my geometry and magnetic field statements in other emails, but have listed them here again.
>
> .
> .
> .
> MGNFIELD 20.0 0.2 0.10 0.0 0.0 10.0
> STEPSIZE 0.5 0.0 VAC2 0.0 0.0 0.0
> EMF EMF-OFF
> *---o---- ----o---- ----o---- ----o---- ----o---- ----o---- ----o---- ----o----
> GEOBEGIN COMBNAME
> 0 0 Targets
> SPH BLKH 0.0 0.0 0.0 5.D4
> SPH SPCE 0.0 0.0 0.0 2.5D4
> * BField Region
> RCC B1 0.0 0.0 -1000.0 0.0 0.0 2000.0 1030.0
> RCC B2 0.0 0.0 -1000.0 0.0 0.0 2000.0 400.0
> * cylinder for materials (vacuum for now)
> RCC HAB1 0.0 0.0 -500.0 0.0 0.0 1000.0 300.0
> RCC HAB2 0.0 0.0 -496.0 0.0 0.0 992.0 296.0
> * spherical surface to measure flux
> SPH D01a 0.0 0.0 0.0 28.2095
> SPH D01b 0.0 0.0 0.0 27.2095
> .
> .
> .
> END
> BH 5 +BLKH -SPCE
> VAC1 5 +SPCE -B1
> VAC2 5 +B1 -B2
> VAC3 5 +B2 -HAB1
> .
> .
> .
> END
> GEOEND
> *---o---- ----o---- ----o---- ----o---- ----o---- ----o---- ----o---- ----o----
> .
> .
> ASSIGNMA BLCKHOLE BH
> ASSIGNMA VACUUM VAC1
> ASSIGNMA VACUUM VAC2 1.0
> ASSIGNMA VACUUM VAC3
>
> ________________________________________
> From: Santana, Mario [msantana_at_slac.stanford.edu]
> Sent: Tuesday, February 18, 2014 2:43 PM
> To: Mina Nozar; Francesco Cerutti
> Cc: Dr. Vittorio Boccone; REDDELL, BRANDON D. (JSC-EV511); FLUKA discussion
> Subject: Re: [fluka-discuss]: magnetic field in vacuum
>
> 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 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=triu
>>>>> 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 Mon Feb 24 2014 - 20:16:57 CET

This archive was generated by hypermail 2.3.0 : Mon Feb 24 2014 - 20:17:01 CET