Re: [fluka-discuss]: problem with MAGFLD routine in new FLUKA release

From: Lev Shekhtman <lshekhtm_at_mail.cern.ch>
Date: Tue, 28 Dec 2021 02:15:36 +0100

Dear Stefan, I put

BTZ = DSQRT( ONEONE - BTX**2 - BTY**2 )

for normalization as you suggested, and it works!

Thank you very much and Happy New Year!

Lev.



On Thu, 23 Dec 2021, Stefan E. Mueller wrote:

> Dear Lev,
>
> it may be that numerical checks have become more strict with the new version.
> Anyway, what happens if you do
>
> BTZ = DSQRT(2.D0*BTZ**2+BTY**2+BTX**2-1.D0)
>
> or even more simple
>
> BTZ = DSQRT( ONEONE - BTX**2 - BTY**2 )
>
> ?
>
> Is there a difference if you print the norm for UaMGFLD, VMGFLD, WMGFLD and
> your BTX, BTY, BTZ:
>
> WRITE(*,*) 'NORM of UMGFLD, VMGFLD, WMGFLD: ', DSQRT(UMGFLD**2 + VMGFLD**2 +
> WMGFLD**2)
>
> WRITE(*,*) 'NORM of BTX, BTY, BTZ: ', DSQRT(BTX**2 + BTY**2
> + BTZ**2)
>
> ? (This should appear in the .log file in output)
>
> Cheers,
>
> Stefan
>
> --
> Stefan E. Mueller
> Department of Information Services and Computing - Computational Science
> and Institute of Radiation Physics
> Helmholtz-Zentrum Dresden-Rossendorf
> Tel: +49 (0351) 260 3847
> Stefan.Mueller_at_hzdr.de
> http://www.hzdr.de
>
> Vorstand: Prof. Dr. Sebastian M. Schmidt, Dr. Diana Stiller
> Vereinsregister: VR 1693 beim Amtsgericht Dresden
>
> On Thu, 23 Dec 2021, Lev Shekhtman wrote:
>
>> Dear Stefan, thank you for your reply. In my code (see attached to my
>> first mail) I have the following lines:
>>
>> DOUBLE PRECISION BTX,BTY,BTZ,B,BR,BZ
>> ...
>> BTZ = DSQRT(2*BTZ**2+BTY**2+BTX**2-1.D0)
>>
>> In previous FLUKA releases this worked properly and there was no complain
>> about normalization. Why it does not work in the new one?
>>
>> Regards, Lev.
>>
>>
>> On Wed, 22 Dec 2021, Stefan E. Mueller wrote:
>>
>>> Dear Lev,
>>>
>>> it seems to me that FLUKA is complaining about the normalization of the
>>> BTX, BTY, BTZ values. From the manual (MGNFIELD card, Note2) ):
>>>
>>> (I)t is imperative that MAGFLD returns normalised values of BTX, BTY and
>>> BTZ such that the sum of their squares is = 1.0
>>> IN DOUBLE PRECISION.
>>>
>>> Apparently, for your values this condition is not fulfilled (while it is
>>> the case for the pre-defined UMGFLD, VMGFLD, WMGFLD values in the
>>> CMEMFL-common, so if you have those values override your BTX, BTY, BTZ
>>> this will of course work).
>>>
>>> Cheers,
>>>
>>> Stefan
>>>
>>> --
>>> Stefan E. Mueller
>>> Department of Information Services and Computing - Computational Science
>>> and Institute of Radiation Physics
>>> Helmholtz-Zentrum Dresden-Rossendorf
>>> Tel: +49 (0351) 260 3847
>>> Stefan.Mueller_at_hzdr.de
>>> http://www.hzdr.de
>>>
>>> Vorstand: Prof. Dr. Sebastian M. Schmidt, Dr. Diana Stiller
>>> Vereinsregister: VR 1693 beim Amtsgericht Dresden
>>>
>>> On Tue, 2 Nov 2021, Lev Shekhtman wrote:
>>>
>>>> Dear FLUKA experts, I got a problem with new FLUKA release. My MAGFLD
>>>> routine does not work any more. The old and new versions of MAGFLD are
>>>> attached to this mail. The old version was working properly with 2018,
>>>> 2019 and 2020 releases. In the last release there are the following
>>>> lines
>>>> added:
>>>>
>>>> BTX = UMGFLD
>>>> BTY = VMGFLD
>>>> BTZ = WMGFLD
>>>> B = BIFUNI
>>>>
>>>> that overwrite my field. If I remove them I get the following error:
>>>>
>>>> Abort called from MAGNEW reason U/V/WMGCUR UNNORMALIZED !! Run stopped!
>>>> STOP U/V/WMGCUR UNNORMALIZED !!
>>>>
>>>> The same I get if I put my code after these lines. Please help.
>>>>
>>>> With best regards, Lev Shekhtman.
>>>>
>>>>
>>>
>>
>

__________________________________________________________________________
You can manage unsubscription from this mailing list at https://www.fluka.org/fluka.php?id=acc_info
Received on Tue Dec 28 2021 - 04:39:32 CET

This archive was generated by hypermail 2.3.0 : Tue Dec 28 2021 - 04:39:35 CET