Use of parentheses

Good morning Experts,
I have tried making the input using parentheses, found no errors in Flair…
But after running 1 cycle, got " Too many terms in parenthesis expansion", “Execution terminated”.
I have seen the other posts on this. The “Correct” option under “Geometry” Tab in Flair did not work for me…or I am not able to use it correctly.
Please suggest how to correct this “parenthesis” error ?
Please find attached the input and other files generated.
Thank you.singlebody1211.inp (3.9 KB) singlebody1211.flair (4.0 KB) singlebody1211001.err (79 Bytes) singlebody1211001.out (8.4 KB)

Dear @raksha,

The termination error is due to the fact Fluka tries to expand the parenthesis runtime but fails. This regardless of the correctness of the geometry definition, i.e. there might not be error in the definition, but the runtime expansions of the parenthesis gets too many terms and Fluka cannot handle it.
You can try to expand the parenthesis in Flair before running, in the “Geometry” tab, in the “Region” section of the ribbon, with the option “Expand”, I’m not sure what you are referring too with the option “Correct”.
Unfortunately for you, Flair fails the expansion. I cannot tell you why, but your SHIELD2 region seems quite complicated.
I suggest you to rewrite by hand its definition removing the parenthesis or at least as many as you can. Then you might even try again with the “Expand” option.
Good luck

Dear @raksha
With fluka4 when the parenthesis expansion generates a divergent number of terms, and fluka might fails to expand it. In this case, you can force it to run with the “online evaluation” by setting the variable “Paren:” to some small integer number bigger than zero, eg. 1 (force the online for everything, 10-20 allow expansion up to 10 or 20 times longer length of expression)

then the simulation will be carried out correctly.

The Parenthesis term is a multiplicative factor of the number of terms

Please note that using the “online parenthesis expansion” it will run slower in the respective region.

1 Like

Thank you. I will try doing that.

Thank you again. It worked.

1 Like

BTW you can even expand manually the SHIELD2 region that generates the problem. With the help of the geometry editor is easy

SHIELD2      5 +shield2 +plane1-plane2 -edge -ss1
               | +shield2 -edge -plane1+plane2 -ss2
               | +edge +stube3d -ss2
               | +edge +stube2d -ss1
               | +edge -ss1 -stube2a -stube3a -ss2
               | +edge +plane1 +stube3a -stube2a -stube3d
               | +edge +stube2a -plane1 -stube2d -stube3a
               | +edge +stube3a -plane5 -stube3d -ss2
               | +edge +plane3 +stube2a -ss1 -stube2d
               | +edge +stube3a -plane1 -plane6 -stube3d
               | +edge +plane1 +plane4 +stube2a -stube2d
               | +plane1 +plane2 +stube2a -plane3 -plane4 -stube2b
               | +plane5 +plane6 +stube3a -plane1 -plane2 -stube3b

expanding like that you will gain in speed while tracking inside the SHIELD2 region. Overall the gain in your simulation I saw is about 30%