RE: [fluka-discuss]: Source-Generic distribution

From: Joachim Vollaire <joachim.vollaire_at_cern.ch>
Date: Mon, 17 Feb 2014 13:42:25 +0000

Dear Renata,

To complement what Giuseppe just said, one trick is (for debugging purposes at the beginning) to write an echo in the output file of the energy you sampled (just run 100 particles to avoid creating a monster file) to ensure you have the logic you intent and see the distribution makes sense.

      WRITE(LUNOUT,*)
     & 'Energy ',TKEFLK (NPFLKA)

In that case you are not sampling with the correct function as indicated by Giuseppe and (by chance) you ended with an energy greater than 1 MeV which is the upper limit used for the tabulation (see manual) considering the BEAM card you used.

Note that if you sample with a max energy of 1 MeV you should use for the BEAM card something a little greater in the BEAM card to avoid running into that proplem.

     Default (command BEAM not requested): not allowed! The WHAT(1) value of the
              BEAM command is imperatively required, in order to set up the
              maximum energy of cross-section tabulations.

Cheers
Joachim


-----Original Message-----
From: owner-fluka-discuss_at_mi.infn.it [mailto:owner-fluka-discuss_at_mi.infn.it] On Behalf Of Giuseppe Battistoni
Sent: 17 February 2014 14:17
To: rleanza_at_lns.infn.it; fluka-discuss_at_fluka.org
Subject: Re: [fluka-discuss]: Source-Generic distribution

Dear Renata
samplig a variable (energy in this case) from a given function requires a different mathematics.
Please study the following lecture from FLUKA courses:
https://www.fluka.org/free_download/course/dresden2013/Lectures/09_Statistics_and_sampling_1013.pdf
If you have problems let us know

        Giuseppe Battistoni


On 2/17/14 12:37 PM, rleanza_at_lns.infn.it wrote:
> Dear fluka users,
>
> I have create a source.f file to simulate an electrons beam. The
> Kinetic energy change from 0 to 1 Mev according the function:
> a*sqrt(X)*exp(-(X/b)), where a and b are two constants (a=156000,
> b=20000). I compile and build the source.f and it is ok.
> When I try to run, it doesn't work. I'm attaching my source.f file.
> Could you kindly guide me where the error should be?
> Best regards,
>


--
INFN Milano
via Celoria 16, 20133 Milano, Italy
tel: +39 02 50317307
fax: +39 02 50317617
Received on Mon Feb 17 2014 - 15:52:40 CET

This archive was generated by hypermail 2.3.0 : Mon Feb 17 2014 - 15:52:41 CET