Re: [fluka-discuss]: Source spectrum energy definition

From: Paola Sala <paola.sala_at_mi.infn.it>
Date: Sun, 12 Jul 2020 16:34:36 +0200

Dear Alice
there are a few issues with your source routine.
- you open the spectrum file on unit 89, then try to read it from unit 21,
then write back someting on unit 89 ==> open the file on 21
- if you use "OPEN" you should specify the full path. Otherwise, you can
use the OAUXFI call (see attach) which looks for the file in the working
directory, flupro directory, home directory.
- The number of lines to be read is much more than the number of lines in
the spectrum file. Either use the correct one, or skip with an "END" label
in the read statement (see attach)
- The energy in the spectrum, I suppose it is in MeV? One should convert
to GeV
- last but not least: the sampled energy and weight are never used in the
source routine. One should assign the energy to the TKEFLK variable, and
the weight to the WEI variable (see attached), otherwise the code will not
know.
I do not knoe if you really wanted to simulate tthe spectrum by assigning
weights to the particles. This is of corse fine if you use intrinsuc
scoring, it can be a bit more problematic idf you, in the future, wish to
implement someting more tailored. Also, by just selecting the energy
intervals, you'll get peaks, maybe you would like to have steps instead,
like an histogram

I would advise you to read the lectures and look at the exercises from the
last advanced course:
https://agenda.infn.it/event/20624/timetable/#all.detailed
Go to the wednesday program

In attach, a modified source starting from your one
Paola


> Dear fluka experts,
> I'm trying to simulate a X-ray source using for the first time a SOURCE
> routine.
> I want to simulate photons with an energy spectrum defined in file
> spec10.dat (the two columns represent respectively energy and weight).
> I compile the source.f without errors but I met a problem in the
> simulation running (it never ends).
> I attach the files for simulation.
>
> Any help will be appreciated.
>
> Thanks in advance,
> Alice
>


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 Sun Jul 12 2020 - 18:03:35 CEST

This archive was generated by hypermail 2.3.0 : Sun Jul 12 2020 - 18:03:39 CEST