Multiple source using directives

Dear Experts,
as you suggested in the discussion Multiple isotope source in a single input, I created a multiple source as in the picture:

I have two question:

  1. How can I run such an input using command line in linux/unix? I use FLUKA/FLAIR in a shared cluster for scientific computing and I need to submit the run only with command line instead of using FLAIR Run tab. For exampe, I would like to run 1 cycle for each isotope, obtaining five different fort.17 files which I need to sum at the end. Usually, I use this script to submit the run:

submit_shared_fluka_kalculus -e $HOME/work/GMX/source_volume (exe file name) -n 1 -s 1 GMX_HPGe (input file name)

  1. To combine the different fort.17 files, I use FLAIR (detsuw) to create tab.lis file.
    Is the tab.lis file the sum of each the single isotope contribution?

Thank You.
Regards
Corrado

Dear Corrado,

To run simulations with preprocessors from the command line, you need to create separate input files, with only the relevant isotope enabled.

The detsuw program calculates the average of the different fort.17 files, so it would give you meaningful results if the activities of the different isotopes are the same.

Since you are already using a source routine, you may want to implement the isotope switching in there. This would give you the ability to use different activities with only one simulation. (Unless you want to change the ratio of activities after the run.)

Cheers,
David

Dear David,
thank you for your answer.

Yes, my sources have different activities, so it would be useful to implement isotope switching and their activities in the source routine. The important thing form me is to obtain an unique final spectrum which is the sum of each isotope contribution.

I am using the modified source routine
source_volume.f (9.8 KB)
which you suggested in the following discussion
Volumetric source of complex geometry
to simulate a volume source in marinelli beaker.

Could you tell me how to modify routine source to obtain what you said?

Cheers

Corrado

Dear Corrado,

you need to use if statements
you need to change the variables IARES, IZRES and IISRES on lines 99-101 to the mass, atomic, and isomer numbers of the individual isotopes using code similar to Multiple complex source in Fluka - #2 by horvathd

IPROA, IPROZ and IPROM variables store the values set on the HI-PROPE card in the FLUKA input.

Cheers,
David

Dear David,

thank you very much for your suggestion.

If I well understood, I have to add an IF statement like the follow:

(Radioactive) isotope:
      IF ( IJBEAM .EQ. -2 .AND. LRDBEA ) THEN
        random = FLRNDM(XDUMMY)
         IF (random .lt. A_(1)/A_(tot)) THEN
         IARES  = 241
         IZRES  = 95
         IISRES = 0
         else if (random .lt. A_(2)/A_(tot) + A_(1)/A_(tot)) THEN
         IARES  = 109
         IZRES  = 48
         IISRES = 0
         else if (random .lt. ...) THEN
         .....
         .....
        end if 

Where A_(i) and A_(tot) are the activity of each radionuclide and total activity respectively.
In this way I will be obtain an unique spectrum normalized per A_(tot), right?

I hope I understood correctly.

Cheers,
Corrado

Dear Corrado,

Yes, this is the idea. (You may optimize a code a bit, by precalculating the cumulative probabilities for each isotope.)

The FLUKA results will be still normalized per decay in you case, so you need to multiply them with the total activity.

One more thing to keep in mind. FLUKA simulates the whole decay chain of the isopoes, as all daughters are in equilibrium.

Cheers,
David

Dear David,

thank you!

Yes, as you suggest, I will pre calculate the probabilities A_(i)/A_(tot) and I will insert their cumulative values directly into the subroutine.

Last question: Can I exclude from the simulation the alpha particle coming from Am-241 to save CPU time? Using PART-THR card?

Cheers,

Corrado

Dear Corrado,

yes, you can use the PART-THR card, to stop the transport of alpha particles.

Cheers,
David

1 Like

Great!

Thank you again.

Cheers

Corrado