Re: [fluka-discuss]: Giant .err files and the FLRNDM(XDUMMY) function

From: Horváth Dávid <David.Horvath_at_eli-beams.eu>
Date: Sun, 2 Jun 2019 16:37:22 +0000

Dear Li,

I just took a glance on your source routine. You need to use to declare the a,b,c,d,e,f variables as DOUBLE PRECISION, and use proper double precision numbers when you calculate them.

For example:
For 0 you can use the predefined ZERZER variable, or simply write 0.0D+0
Similarly for 1 -> ONEONE or 1.0D+0
And for 2 -> TWOTWO or 2.0D+0

I hope this solves your problem.

Kind regards,
Dávid Horváth

Junior Researcher
Radiation Protection
ELI Beamlines

E: david.horvath_at_eli-beams.eu
T: +420 266 051 283
M: Za Radnicí 835, 25241 Dolní Břežany, Czech Republic


________________________________________
From: owner-fluka-discuss_at_mi.infn.it <owner-fluka-discuss_at_mi.infn.it> on behalf of 李想 <20184220031_at_stu.suda.edu.cn>
Sent: 02 June 2019 17:37:45
To: FLUKA
Subject: [fluka-discuss]: Giant .err files and the FLRNDM(XDUMMY) function

Dear FLUKA experts,

When I try to read in starting values from a source file, I get huge .err files.
There are just thousands and thousands of entries of the form
'NEXT SEEDS: 0 0 0 0 0 0 181CD 3039 0 0
 GEOFAR, TXYZ: 1.00000000307931
  0.802703738212585 0.274877756834030 0.529253184795380
    Nfrom, Nreg, X, Y, Z 61 3
   0.00000000000000 0.00000000000000 0.00000000000000
 Jtrack, Etrack 1 0.938274996540000
          1 9 9 0.0000000E+00 1.0000000E+30 0
 NEXT SEEDS: 4 0 0 0 0 0 181CD 3039 0 0
 GEOFAR, TXYZ: 0.999999945620182
  0.661658883094788 -0.586962759494781 0.466564178466797
    Nfrom, Nreg, X, Y, Z 61 3
   0.00000000000000 0.00000000000000 0.00000000000000
 Jtrack, Etrack 1 0.938292349500000
          2 8 8 0.0000000E+00 1.0000000E+30 0
                                                     ... '

I have learned that their cause is the fact that the direction cosines read by the source.f
routine are not properly normalized (in double precision!) . But the direction cosines I
set in source.f as follows
' * Cosines (tx,ty,tz)
         a=-1+2*FLRNDM(DUMMY)
         b=-1+2*FLRNDM(DUMMY)
         c=-1+2*FLRNDM(DUMMY)
         d=a**2+b**2+c**2
         TXFLK (NPFLKA) = a/SQRT(d)
         TYFLK (NPFLKA) = b/SQRT(d)
         TZFLK (NPFLKA) = c/SQRT(d) '
And when I changed the setting of directional cosine as
' TXFLK (NPFLKA) = 0 TYFLK (NPFLKA) = 0 TZFLK (NPFLKA) = 1 ',
I got the results
'NEXT SEEDS: 0 0 0 0 0 0 181CD 3039 0 0
          1 9 9 2.8705597E-04 1.0000000E+30 0
 NEXT SEEDS: 1 0 0 0 0 0 181CD 3039 0 0
          2 8 8 2.5403500E-04 1.0000000E+30 0
 NEXT SEEDS: 2 0 0 0 0 0 181CD 3039 0 0
          3 7 7 1.9836426E-04 1.0000000E+30 0
 NEXT SEEDS: 3 0 0 0 0 0 181CD 3039 0 0
          4 6 6 1.7148256E-04 1.0000000E+30 0
 NEXT SEEDS: 4 0 0 0 0 0 181CD 3039 0 0
          5 5 5 1.4781952E-04 1.0000000E+30 0 '
This seems to indicate that I realy made a mistake in the setting of directional cosine, but what was wrong?
And I still seem to have problems after I changed it ,that really frustrates me.
I uploaded my files if you have time please take a look.


Regards
Li




__________________________________________________________________________
You can manage unsubscription from this mailing list at https://www.fluka.org/fluka.php?id=acc_info
Received on Sun Jun 02 2019 - 19:25:36 CEST

This archive was generated by hypermail 2.3.0 : Sun Jun 02 2019 - 21:28:38 CEST