Multiple complex source in Fluka

Hi,

This is in continuation to the discussion on Multiple source designing in Fluka
(See previous discussion link: Multiple sources )

My doubt is that, instead mono-energetic beam, if I want to use spectrum of energy as source and want to produce 4 beam spots using SPECSOUR option, then how to insert and compile SOURCE.f file.

waiting for your reply.

Dear ArghyaC,

unfortunately, the SPECSOUR card is ignored if a source routine is linked. So you need to specify each beam parameter in the routine.

You can select a beam like:

random = FLRNDM(XDUMMY)

if (random .lt. beam1_probablility) then
   beam_1_parameters ...
else if (random .lt. beam1_probability + beam2_probability) then
   beam_2_parameters ...
else if (random .lt. beam1_probability + beam2_probability + beam3_probability) then
   beam_3_parameters ...
else
   beam_4_parameters ...
end if

Where

beam1_probability + beam2_probability + beam3_probability + beam4_probability = 1

I hope this made it clear.

Cheers,
David

1 Like