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

From: Mikhail Polkovnikov <pmk_at_ihep.ru>
Date: Wed, 18 May 2016 22:18:14 +0300

On 18.05.2016 16:18, Francesco Cerutti wrote:
>
> 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
>> ***************************************************
>>
>>
Dear Uwe,

In case of cylindrical isotropic source along Z-axis you can try to set
cosines and coordinates as:

* Cosines (TXFLK,TYFLK,TZFLK)
       CALL RACO( TXX, TYY, TZZ)
       TXFLK (NPFLKA) = TXX
       TYFLK (NPFLKA) = TYY
       TZFLK (NPFLKA) = TZZ

* Particle coordinates

       CALL SFECFE( SFE, CFE)
       RD = RADIUS * SQRT( FLRNDM(ZDUMMY) )
       XFLK (NPFLKA) = RD * SFE
       YFLK (NPFLKA) = RD * CFE
       ZFLK (NPFLKA) = ZMIN + (ZMAX - ZMIN) * FLRNDM(ZDUMMY)


ZMIN, ZMAX are minimum and maximum coordinates of the cylinder. RADIUS
is the radius of the source.
If in your input the source is the M1 region (two cylindrical sources
along the Z-axis with the same radius) you can try source in attachment,
however i haven't tested it thoroughly.
Parameters of the source is set in the SOURCE card.

*...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....
SOURCE 12.0 126.5 138.45 141.55 152.17


Best regards,
Mikhail



__________________________________________________________________________
You can manage unsubscription from this mailing list at https://www.fluka.org/fluka.php?id=acc_info

Received on Wed May 18 2016 - 22:54:13 CEST

This archive was generated by hypermail 2.3.0 : Wed May 18 2016 - 22:54:17 CEST