Re: [fluka-discuss]: Numerical precision in FLUKA

From: roberta volpe <roberta.volpe_at_cern.ch>
Date: Thu, 15 Oct 2015 15:01:07 +0200

Dear Paola,
thank for your suggestion, indeed in my modified mgdraw.f I was using an
unfitting format in writing the txt file.

Anyway, now, I fixed it, using:
200 FORMAT(' ',A,5E25.15)
......
WRITE(42.0,200),'333333',JTRACK,ETRACK-AM(JTRACK),
     $ CXTRCK,CYTRCK,CZTRCK

And the values I get for CZTRCK (for angle < 0.4mrad ) are:
  CZTRCK=1 or CZTRCK=0.999999940395355E+00
and nothing between these values.

See, as an example for angle grater than 0 and less than 0.4mrad, few
output lines below (*).

So, now it doesn't seem a numerical precision issue anymore.
Do you have any idea on how to cope with that?
Thank you,
Roberta

(*)
333333 0.700000000000000E+01 0.489577674865723E+02
-0.379900448024273E-03 0.734752029529773E-04 0.999999940395355E+00
 333333 0.100000000000000E+01 0.398913940429688E+03
 0.243720045546070E-03 0.187961297342554E-03 0.999999940395355E+00
 333333 0.100000000000000E+01 0.378580841064453E+03
 0.240417313762009E-03 0.217997265281156E-03 0.999999940395355E+00
 333333 0.100000000000000E+01 0.398872375488281E+03
-0.289755815174431E-03 -0.169058344908990E-03 0.999999940395355E+00
333333 0.100000000000000E+01 0.398769622802734E+03
-0.195283661014400E-03 -0.303217006148770E-03 0.999999940395355E+00
 333333 0.100000000000000E+01 0.398898071289062E+03
 0.582441571168602E-04 0.355932890670374E-03 0.999999940395355E+00
 333333 0.100000000000000E+01 0.398916778564453E+03
-0.868009956320748E-04 0.254166428931057E-03 0.999999940395355E+00

2015-10-13 7:36 GMT+02:00 Paola Sala <paola.sala_at_mi.infn.it>:

> Hi
> it looks like there is some single precision variable, either in the
> writing or reading procedure, that cuts your rounding.
> Please check all the steps, and be sure to use double precision variables
> (the default in FLUKA) and to write them with enough decimals.
> You might also want to try the predefined FLUKA scoring options.
> Ciao
> Paola
> > Dear experts,
> > I have a question on the numerical precision which FLUKA can get on the
> > angular distributions.
> > I simulated a 400 GeV proton beam incident on a thick Be target, 50 cm
> > long.
> > I modified the mgdraw.f routine in order to get an ASCII file with the
> > information I need.
> > I am interested in the particles produced and going out of the target at
> > very small angle, say less than 0.2 mrad. I simulated my geometry with
> > cylindrical symmetry along z axis, so I am interested in particles with
> > ZSCO close to 1.
> > I see that the next value less than 1 is ZSCO=0.99999994, corresponding
> to
> > an angle of 0.00034641 rad. So I cannot get a continuous distribution in
> > that angle range.
> > I am attaching two plots to show you the issue, they show the polar angle
> > vs kinetic energy for neutrons, one is with angle less than 10 mrad, and
> I
> > suppose that the distribution is reasonable, and the other is for angle<1
> > mrad.
> > I am wondering if there is any way to increase the precision.
> > Also, can you please tell me if the distribution I get is the expected
> one
> > or if you see further issues with that?
> > Thank you,
> > best regards,
> > Roberta Volpe
> >
>
>
> Paola Sala
> INFN Milano
> tel. Milano +39-0250317374
> tel. CERN +41-227679148
>
>


__________________________________________________________________________
You can manage unsubscription from this mailing list at https://www.fluka.org/fluka.php?id=acc_info
Received on Thu Oct 15 2015 - 16:34:34 CEST

This archive was generated by hypermail 2.3.0 : Thu Oct 15 2015 - 16:34:43 CEST