Re: special beams in FLUKA

From: Markus Brugger <>
Date: Mon, 24 Nov 2008 10:53:19 +0100

Hi Luis,

the problem you describe requires a user defined source-routine. As you
already mentioned, a good source of explanations can be found not only
in the manual but also in the respective course documentation, the
latest version being available at:

To produce the concentric rings (elliptical) of source particles you'll
have to sample the particle positions accordingly (e.g., in X and Y).
What concerns the particle type, perhaps a quick trial how to do it
based on a cummulative sampling:


* first initialization
      DO 1 I=3D1,MAXUBP
         K =3D 2*I-1 + IWSHIFT
            NUBP =3D NUBP+1
            IDUBP(NUBP) =3D INT(WHASOU(K))
            FRCUBP(NUBP) =3D WHASOU(K+1)
         SAMUBP(I) =3D ZERZER


* later in the sampling part
* sample/modify particle type
* use the FLUKA random number generator to sample the particle fraction
      FRAC =3D FLRNDM(0.0)
      DO 10 I=3D1,NUBP
* sampling cummulative particle type fractions
            ILOFLK(NPFLKA) =3D IDUBP(I)
            SAMUBP(I) =3D SAMUBP(I)+ONEONE
            NALL =3D NALL+1
            GOTO 11

hope this helps, cheers


> -----Original Message-----
> From: [mailto:owner-fluka-
>] On Behalf Of Fernandez-Hernando, JL (Juan)
> Sent: Mittwoch, 19. November 2008 15:54
> To:
> Subject: special beams in FLUKA
> Dear all,
> I want to perform a few simulations with special beams and I was
> wondering
> if perhaps someone has already done this before and modified her/his
> source routine in a very similar way than I would need to.
> In one of the simulations I would like to have a beam made of
> concentric rings. Each ring has a different particle density.
> In another simulation I want to be able to have two different
> beams of different particles in the same run. And I also wonder
> if it is possible to have ellipsoidal rings instead of circular ones.
> If anyone has already made source routines to achieve what I describe
> above I would be really grateful if they would allow me to use them.
> Otherwise I bet I will send more emails to this group asking for clues
> on how to do what I intend to. I am also trying to make sense of the
> 'how to modify the source routine' lecture.
> Thanks for your time,
> Luis
Received on Mon Nov 24 2008 - 23:00:56 CET

This archive was generated by hypermail 2.2.0 : Mon Nov 24 2008 - 23:00:56 CET