Re: How to vary some parameter automatically per run

From: Marco Mauri (
Date: Mon Aug 20 2007 - 11:35:23 CEST

  • Next message: Rollet Sofia: "FLUKA and micro-PET? -2-"

    I think the best way to handle this is by a shell script that changes
    the value of the energy set in the input file and than starts the

    For instance (just to give you an idea):



    # Reading energies from file
    # (assuming that each line in the file contains only the energy value)
    energies=(`cat $ENERGIES_FILE `)

    #Cycle through all energies:
    for element in ${energies[@]}
    #Modifying the energy in the input file:
    awk '
      if ($0~/^BEAM/)
        #change BEAMcard definition to suit your needs (must contain the
    full BEAM card)
    %10s MUON+", e_string)
        print BEAMcard
      else print $0
    ' e_string=$element $INPUTFILE > $INPUTFILE.temp


    # to do: running fluka

    #End cycle


    Yung-Shun Yeh wrote:

    > Dear FLUKA users,
    > I don't know if this question is appropriate in this forum.
    > I am doing a simulation about estimation of muon-induced neutrons. In
    > this simulation, I must vary the energy of primary muon and then do
    > the simulation again. Earlier I varied the energy by hand, but it is
    > not good method. Could anyone teach me any good way to deal with this
    > routine. Thank you very much.
    > Best regards,
    > Yung-Shun

  • Next message: Rollet Sofia: "FLUKA and micro-PET? -2-"

    This archive was generated by hypermail 2.1.6 : Wed Aug 22 2007 - 23:49:11 CEST