# How to define variable parameters in Flair

**URL:** <https://fluka-forum.web.cern.ch/t/how-to-define-variable-parameters-in-flair/7018>\
**Category:** Flair\
**Created:** [11 February 2025 09:48 UTC](https://fluka-forum.web.cern.ch/t/how-to-define-variable-parameters-in-flair/7018 "2025-02-11T09:48:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mbathamlp35](https://fluka-forum.web.cern.ch/letter_avatar_proxy/v4/letter/m/ce7236/32.png) [@mbathamlp35](https://fluka-forum.web.cern.ch/u/mbathamlp35)\
**Post date:** [11 February 2025 09:48 UTC](https://fluka-forum.web.cern.ch/t/how-to-define-variable-parameters-in-flair/7018/1 "2025-02-11T09:48:21Z")

</div>

Hi. I’m new to FLUKA and i’m trying to define an input file to calculate linear attenuation coefficient of lead over a range of thicknesses (1 cm up to 10 cm with a step of 1 cm) for a 1 MeV photon beam. However, I have noticed that in Flair the thickness is defined by min and max values (ymin and ymax in my case). How can I modify this to run simulations over the specified thickness range?

---

<div class="post-metadata">

**Author:** ![horvathd](https://fluka-forum.web.cern.ch/user_avatar/fluka-forum.web.cern.ch/horvathd/32/10584_2.png) [@horvathd](https://fluka-forum.web.cern.ch/u/horvathd)\
**Post date:** [14 February 2025 07:22 UTC](https://fluka-forum.web.cern.ch/t/how-to-define-variable-parameters-in-flair/7018/2 "2025-02-14T07:22:29Z")

</div>

Dear Mbatha,

please have a look at

> [@Fluka can implement a 'for loop' ? like C++](https://fluka-forum.web.cern.ch/t/fluka-can-implement-a-for-loop-like-c/6642/2):
>
> 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

Cheers,  
David

---

<div class="post-metadata">

**Author:** ![horvathd](https://fluka-forum.web.cern.ch/user_avatar/fluka-forum.web.cern.ch/horvathd/32/10584_2.png) [@horvathd](https://fluka-forum.web.cern.ch/u/horvathd)\
**Post date:** [27 February 2025 07:35 UTC](https://fluka-forum.web.cern.ch/t/how-to-define-variable-parameters-in-flair/7018/3 "2025-02-27T07:35:05Z")

</div>


