[fluka-discuss]: RE: Macro for handling multiple runs in FLAIR

From: Vasilis Vlachoudis <Vasilis.Vlachoudis_at_cern.ch>
Date: Fri, 16 Jan 2015 16:44:09 +0000

Hi Ali,

yes it can be done in flair (actually it was answered before in the list)

Use the fluka card "#define" to define a variable in the input e.g.

#define E 1.0

Then on the beam card you have to replace the what(1) with the negative of the variable
There are two ways:

1st) set in the energy field "=-E"
with = is the flair way, writing the expression in the input with a special comment.
Flair is substituting the input file with the result of the expression
(there are quite a lot of functions and possibilities, see function evaluation on the flair manual)

2nd) set in the energy field "$E"
with $ is the FLUKA way of substituting the variables however it doesn't accept expressions
so the E needs to have a negative value for the energy

Go to the Run tab and create/add a new run (giving a unique filename)
Activate the variable 'E' in the define and give what ever value you like
Select your runs and click run.

If you want to scan the variable over a range.
Select the run and click on the loop button
select the variable, the limits and step click ok
and multiple runs will be generated with the variable looping over the range you have entered

Hope that helps

From: Ali Koosha [koosha.ali_at_gmail.com]
Sent: 16 January 2015 13:49
To: fluka-discuss_at_fluka.org; Vasilis Vlachoudis
Subject: Macro for handling multiple runs in FLAIR

Hi everybody,

I have a rather naive question! For a while I was looking for a manual, help file, powerpoint, etc. describing the capabilities embedded into the FLAIR to "define" variables and make "conditional" runs of one input file.

However, I was not successful in dealing with this issue. So, I will define my question below.

Question: I want to define an energy variable to have (for example) 100 different values; and to be substituted into the BEAM card accordingly. Moreover, it is anticipated that FLAIR could handle these modified instances and to have 100 different output scores for later analysis.

PS: I am familiar with BASH scripting, but here I am looking for the solution within the scope of FLAIR.

Best regards,
Ali Koosha
You can manage unsubscription from this mailing list at https://www.fluka.org/fluka.php?id=acc_info
Received on Fri Jan 16 2015 - 19:16:57 CET

This archive was generated by hypermail 2.3.0 : Fri Jan 16 2015 - 19:17:06 CET