How to change layer thickness easily

Dear Francesco,

I have additional question regarding the geometry setup. In my configuration, I have the first absorber layer (Layer1), followed by six additional layers, then the second absorber layer (Layer2), and another six layers (IP), and so on. Currently, whenever I need to change the thickness of the absorbers, I have to manually adjust the thickness of each layer in the geometry, which is quite time-consuming.

Is there a way to adjust only the thickness of the absorber layers, with the other layers automatically updating accordingly?

Dear @talktoshubhama,

Thank you for your question. You can easily define a variable thickness by means of the directive “#define” of the preprocessor. After this, you can refer to that value on any other card by typing $variable_name. For further information please see: #define

Please let me know if this is helpful.
Best regards

Mario Sacristan

Dear Mario,

Thank you for your response. It seems I may not fully understand how to use this card correctly in geometry. For example, I want to define the thickness of Layer 2 using the variable L2. Currently, I have defined it as 0.0025, but I am encountering errors after this point. If there were no errors, I would like to change the thickness of Layer 2 (for instance, to 0.05), and then have the all subsequent layers adjust accordingly. I have attached the screenshot and files for your reference.
b_canon_all_geometry.flair (11.2 KB)


Screenshot 2024-11-12 121219
b_canon_all_geometry.inp (11.9 KB)

Thank you
Regards
SHubham

You will have to use “=” instead of “$”.
For subsequent layers you can use whole expressions like =2*L2 + 0.5

edit: you can read up some more on Flair’s expression capabilities here, p. 16f

1 Like