Problem to set DIVBM in source.f file

From: Sébastien WURTH (
Date: Mon Sep 05 2005 - 16:46:41 CEST

  • Next message: Burge, F \(Frances\): "Modelling kerma with FLUKA"

    Hello all,

    Let me please remind you what brought me here :

    **** First Message ***

    /Date: Wed, 31 Aug 2005 15:24:22 +0200
    > From: "[ISO-8859-1] Sébastien WURTH" <>
    > To:
    > Subject: How can I define a non monoenergetic source in FLUKA ?
    > Dear FLUKA developpers,
    > I'm trying to simulate a source of cobalt 60.
    > I've read the manual very carefully, and a large part of the mailing
    > list archive
    > but I didn't find the right answer to my question.
    > How can I define a non monoenergetic source (or beam) ? By using the
    > subroutine source introduced by command SOURCE I guess,
    > but I don't know how to define two energies in source.f. I've tried to
    > define it with the two BEAM cards, but FLUKA seems to overwrite
    > the first one when reading the second one.
    > The answer may be very simple, but I can't find it.
    > Thank you for your help.
    > Best regards.
    > Sébastien WURTH./

    **** Reply of G. BATTISTONI ****

    /I would do like in the following:
    suppose that you have 2 different energy lines. The first emission line
    has probability P (0<P<1) and the second 1-P
    Then you create your source.f with a logic in which
    for a fraction of cases proportional to P you assign energi n.1
    and for the complementary fraction of cases you give energy n.2

            if (flrndm(xdummy).Le.prob1) then
                    pbeam = energy1
                    pbeam = energy2

    It is up to you to provide the right values for prob1, energy1 and
    For instance you can pass these values to the source.f using the
    numerical fields of SOURCE card: they appear inside source as the vector
    WHASOU(n) with n =0,1,2,..,6
            Giuseppe Battistoni/


    _/So, there is my new problem :/_

    I did the changes by calling source.f with SOURCE card, setting my
    parameters in the WHASOU fields of SOURCE... compiling, linking, etc.
    The run goes to the end, but the results are not quite what I was expecting.

    It seems that FLUKA understands that my source (beam) is not isotropic
    anymore, but directed to z axis,
    although I gave a value to variable DIVBM in my source.f file.

    I set DIVBM to 1.E4 to describe an isotropic source, value taken from
    the examples in BEAM card
    description section from the manual. By the way, I discovered a little
    mistype in the example of an isotropic Cs-137 source,
    kinetic energy should be -661.7E-6 GeV instead of -661.7E-3 GeV,
    shouldn't it ?

    Anyway, my question is : Is there any particular place in source.f where
    those assignments have to be made ?
    In the user initialization part for example ? I tried this one though,
    but nothing changed.
    I tried after the energy part (an analogy to BEAM card in my logic), but
    nothing changed, once again.
    It appears to me that DIVBM is not read properly (and maybe the energy
    part too (not sure about that)).

    I did a run without changing anything in the source.f file given in
    $FLUPRO/usermvax, the results are quite the same when I
    gave a value to DIVBM.

    Thank you for your help.

    Best regards.

    Sébastien Wurth.

  • Next message: Burge, F \(Frances\): "Modelling kerma with FLUKA"

    This archive was generated by hypermail 2.1.6 : Mon Sep 05 2005 - 23:29:49 CEST