Fluka can implement a 'for loop' ? like C++

Dear managers,
I’m doing an experiment where an electron beam bombards a tungsten target from all angles , and the direction of the electron beam is 5,10,15,20,25,30°,like the figure.
I have to run the program at each Angle.
I wonder if fluka can implement a ‘for’ loop which is similar to C++ to repeat the experiment ,
so that I don’t have to modify and run the flair program many times to get results.

Thanks,
Tian.

Dear Tian,

You can define variables with the #define card and then use the Loop feature on Flair’s Run/Runs tab to set up separate simulations for the different values.

Cheers,
David

1 Like

Thank you for your explanation. I will try it.