Geometry viewer performance

Dear experts,
I m currently running fluka on a fedora sysytem ,i m wondering if there is something i can do to make my geometry viewer works better, i mean when i try to rotate the mode i build ,it always takes a lot of time before i can get a clear viewpoint. Can i somehow make the geo viewer work faster?

Could you share your model so we can check?

hf AR DECRESS ENERGY.flair (39.1 KB)
hf AR DECRESS ENERGY.inp (40.5 KB)
here is my model
thanks for the attention and time
also it took me 3h to run a dose rate compution with a history of 10 million (ie 10000000)
is this normal time ? the cpu is amd R9 5900HX and i m running on fedora32

You can immensely speedup your model by simplifying geometry, in particular your FLOOR1, OUTWALL1 and first of all the AIR region.
Split them by several simple regions.

On each step the geometry tracker needs to understand in which region the particle is located and complexity (=speed) of this calculation depends on complexity of the zone expression. Now imagine the challenge you give to geometry tracker in the AIR region, and don’t forget that it needs to calculate this for all particles on each step!

As far as I understand, in FLUKA the geometry tracker calculates disjunctive normal form from the zone definition and of course if a zone is complex the DNF form will contain lots of literals which can take very long time to resolve. For example, the codes line MCNP and PHITS do not rely on the DNF form and therefore their tracking performance through the complex zones is significantly better, but even for these codes your AIR region is extremely complex.

Basically, the rule of thumb is to use as simple zones as possible and as @amario suggests below think twice before you define a region with parentheses.

1 Like

Dear @Sean_Winters,

@kbat is right, you should avoid to use parentheses in the definition of regions. Parentheses slow down both the simulation and the geometry viewer. Their use is deprecated, have a look at slide 26 of the geometry lecture from the last Fluka course.
Also, despite unrelated, Fedora 32 has already reached its End of Life.

2 Likes

Hi @Sean_Winters
in line of the suggestions of @kbat and @amario you can do the following:

  1. In the geometry editor select ALL regions. (Only the regions no other object)
  2. The region context tab in the ribbon should appear (top-right).
    Click the
    i. Expand parenthesis button, wait for a while
    ii. and then followed by the Optimize button
    The expand will try to expand parenthesis, and the optimize will try to remove logical operations from the region description so as the result to be the same with smaller expression.
    It will not cure completely the Air region, but it can help a lot

Other things

  • As it concerns the flair geometry speed, avoid to use 3D display on many viewports. The 3D is quite expensive in CPU and it uses as many threads as your CPU cores PER viewport. I would suggest having 3 viewports in 2D mode e.g. displaying media and one with the 3D. You will see a great improvement in performance
  • Having also the 2D display it helps to spot geometry errors, like the overlap you have on the concrete floor, seen in red in the above image

But none of the above automatic methods cannot beat the manual optimization you can do.
Check our lectures on how to create and edit the zones graphically with the geometry editor, it can make your life very very easy

2 Likes

Thanks a lot for the advice! Just gonna go through the lecture to improve my skills in simplifying the model!

Thank you for the detailed solution, really appreciate that!