Re: [fluka-discuss]: problems of adding magnetic field to a specific region

From: Mikhail Polkovnikov <pmk_at_ihep.ru>
Date: Thu, 12 Dec 2019 07:50:37 +0300

On 12.12.2019 7:15, yangt_at_ihep.ac.cn wrote:
>
> Dear Mikhail,
>
> Thanks for your help. now the routine file runs successfully.But I
> have some puzzles.
>
> a. in my original magneticfiled.f file,I don't declare the variable
> type,how to conclude the float type, and why does it only add the
> character "N" before the variable can change the variable to integer
> type, it seems the manual does't give the information.
>
> b. for the source.f file, do you mean the codes:
>
> centerx=-0.00124885*(xx-X0)
> centery=0.00140949*(yy-Y0)
> have errors? and it must be changed as:
>
> centerx=-0.00124885d+00 * (xx - X0)
>   centery=0.00140949d+00 * (yy - Y0)
> ?
>
> so dose it mean the float type constant must be changed to the above
> format? but I don't know why the original type have errors?
>
>
> best regards!
>
> Yang
>
>
> -----原始邮件-----
> *发件人:*"Mikhail Polkovnikov <Михаил Полковников>" <pmk_at_ihep.ru>
> *发送时间:*2019-12-12 02:45:58 (星期四)
> *收件人:* yangt_at_ihep.ac.cn, fluka-discuss_at_fluka.org
> *抄送:*
> *主题:* Re: [fluka-discuss]: problems of adding magnetic field to a
> specific region
>
> On 06.12.2019 8:20, yangt_at_ihep.ac.cn wrote:
>>
>> Dear FLUKA experts and users,
>>
>>
>> Recently, I want to add a magnetic field to a certain region, I
>> copy the main code from the advanced course website,however, I
>> find it doesn't apply the field successfully. I submitted the
>> problems several days ago, but yet I don't receive some
>> suggestions. After submitting, I have checked the code carefully
>> for several days, and I can't find the problem.
>>
>> the code of applying to the region is as follows:
>>
>>          CALL GEON2R("pipenei2",pipe2,IERR)
>> CALL GEON2R("pipenei4",pipe4,IERR)
>> WRITE (LUNOUT,*) ' "pipenei2" region is number: ',pipe2
>>          WRITE (LUNOUT,*) ' "pipenei4" region is number: ',pipe4
>>
>> after running, fluka reports errors:
>>
>>  "pipenei2" region is number: 2.3715151000379834E-322
>>   "pipenei4" region is number:   2.4703282292062327E-322
>>  Abort called from MAGFLD reason NO MAGNETIC FIELD IN THIS
>> REGION! Run stopped!
>>  STOP NO MAGNETIC FIELD IN THIS REGION!
>> so the magnetic field is not applied successfully.
>>
>> I don't know where the problem is.
>>
>> attachments are the input file and the magnetic subroutine file.
>>
>> any suggestion is appreciable!
>>
>> best regards!
>>
>> Yang.
>>
> Greetings. Yang,
>
>
> 1. In MAGFLD routine variables from margetic field region must
> integer type, not a float point type (npipe2, npipe2 instead of
> pipe2, pipe2).
>
> 2. GCC gfortran 9.2 have found another error is source routine
> (incorrect definition of a constant)
>
> All the changes in the attachment.
>
>
Dear Yang,


a. https://web.stanford.edu/class/me200c/tutorial_77/05_variables.html,
https://docs.oracle.com/cd/E19957-01/805-4939/6j4m0vn9v/index.html

When declare variable value use either "INTEGER pipe2" for explicit
declaration , or "npipe2" for implicit one.

b. It is better define float point constants as a double precision with
exponent value.



__________________________________________________________________________
You can manage unsubscription from this mailing list at https://www.fluka.org/fluka.php?id=acc_info
Received on Thu Dec 12 2019 - 07:11:48 CET

This archive was generated by hypermail 2.3.0 : Thu Dec 12 2019 - 07:41:50 CET