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

From: Luigi Salvatore Esposito <luigi.salvatore.esposito_at_cern.ch>
Date: Sun, 2 Jun 2019 16:28:01 +0000

Dear Li,
use everywhere double precision constants in your code

         a=-1.0D+0+2.0D+0*FLRNDM(DUMMY)
         b=-1.0D+0+2.0D+0*FLRNDM(DUMMY)
         c=-1.0D+0+2.0D+0*FLRNDM(DUMMY)
         d=a**2.0D+0+b**2.0D+0+c**2.0D+0

Let us know if you still have problem.
Hope this could help.
Cheers luigi


On 2 Jun 2019, at 17:37, 李想 <20184220031_at_stu.suda.edu.cn<mailto:20184220031_at_stu.suda.edu.cn>> wrote:

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



<Pd-103.RAD><source.f><tx.flair><tx.inp>


__________________________________________________________________________
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:18:33 CEST

This archive was generated by hypermail 2.3.0 : Sun Jun 02 2019 - 19:27:35 CEST