Re: [fluka-discuss]: about reading an external spectrum file with source.f

From: Francesco Cerutti <Francesco.Cerutti_at_cern.ch>
Date: Wed, 18 May 2016 15:18:43 +0200

Dear Uwe,

from a technical point of view, your simulation ingredients have three
main problems:

1. you say that your spectrum is in MeV, but nowhere you seem to perform
the required transformation into GeV. Do it in the source routine:

       TKEFLK (NPFLKA) = ESAMPLE * EMVGEV

EMVGEV is a FLUKA double precision real variable [that's why it is called
EMVGEV and not MEVGEV, the latter being a name corresponding to an integer
variable] equal to 1.0D-03, as you can see in
the $FLUPRO/flukapro/\(DBLPRC\) file

2. In case of an user written source, the only relevant information in the
BEAM card is the particle type (properly set to NEUTRON in your case) and
the particle energy. Since the latter is actually set in the source
routine, what is in the BEAM card shall be intended as an upper limit of
your spectrum, used by the code for initialization purposes (affecting
various tabulations, e.g. the stopping power one). Since your spectrum
reaches 30 MeV (in fact even 30 GeV in your wrong setup), you should put
there 30 MeV and not 3 MeV. That's the reason of your abort.

3. As in 2, the possibility of defining an extended (cylindrical)
isotropic source through BEAM and BEAMPOS is lost in case of the use of
the source routine. Inside the latter, it's up to you to sample
accordingly the neutron direction cosines (TXFLK(NPFLKA),TYFLK(NPFLKA) and
TZFLK(NPFLKA)) as well as the neutron position (XFLK(NPFLKA),YFLK(NPFLKA)
and ZFLK(NPFLKA)). To define the position, you can profit from the
parameters XBEAM,YBEAM and ZBEAM as input in the BEAMPOS card.
This requires some thinking and a few lines of code, but it is not a
prohibitive challenge.

Best

Francesco

**************************************************
Francesco Cerutti
CERN-EN/STI
CH-1211 Geneva 23
Switzerland
tel. ++41 22 7678962
fax ++41 22 7668854

On Wed, 18 May 2016, Uwe Riesterer (uwe.riesterer_at_hs-furtwangen.de) wrote:

>
> Dear FLUKA users
>
>  
>
> I want to simulate a simple isotropic neutron volume source with a given
> specific spectrum, averaged over the whole source. For the spectrum reading
> I use a separate file with the corresponding energy data [ MeV ] and the
> corresponding neutron flux [ n/(cm2*s) ]. And my goal is to measure the
> resulting flux and dose outside the geometry.
>
>  
>
> I´m not very familiar with programming so I oriented myself on the exercise8
> from the 8th FLUKA course in Greece. I tried to modify the source.f user
> routine, to read the spectrum from the external file. But during the runs
> FLUKA does not generate any output and I have no idea where the problems are
> ...?!
>
>  
>
> I just want to read from an external file my individual neutron spectrum.
>
> The remaining BEAM details should correspond to the BEAM-card and the
> BEAMPOS-cards from the input.
>
> What commands are exactly needed? Or does a basic version of source.f exist
> to do that?
>
>  
>
> Could you help me further, please?
>
>  
>
>  
>
> Friendly regards
>
> Uwe
>
>  
> ***************************************************
> Riesterer Uwe
>
> Furtwangen University of Applied Sciences
> Security & Safety Engineering
> ***************************************************
>
>

__________________________________________________________________________
You can manage unsubscription from this mailing list at https://www.fluka.org/fluka.php?id=acc_info
Received on Wed May 18 2016 - 16:50:54 CEST

This archive was generated by hypermail 2.3.0 : Wed May 18 2016 - 16:50:58 CEST