RE: RE: Can FLUKA (or flair ) be used to caculate region volumes?

From: Chris Theis <>
Date: Mon, 16 Apr 2012 13:45:17 +0000

Dear Walker,
I quickly looked into this and I found the problem. Let me give you some background info so that you can understand how it works and how one can solve this. The QMC approach works somewhat similar to the method proposed by Anna and Alberto. However, it uses a cleverer way of sampling which yields significantly faster convergence and it uses the so called bounding box as the enclosing volume. This is a hypothetical object which one always needs in computer graphics to calculate the camera parameters. As long as the bounding box can be calculated correctly the QMC algorithm will work even in the presence of numerical rendering artefacts like missing faces or ¡°open¡± bodies. However, if you have ¡°infinite faces¡± then the bounding box cannot be calculated correctly and thus, the normalization with respect to the enclosing volume will fail. That¡¯s exactly what you see in your example because there is an infinite cylinder which causes this numerical problem during the discretization of the infinite extension.
There are actually several ways to solve this issue and you can find more details in the FAQ section of SimpleGeo¡¯s manual ( section 2.3 & 2.4
I changed the order of the bodies and this solves the numerical problem of the bounding box as well as the rendering artefact. In the attachment you can find the associated file.
Best regards
Chris Theis
CERN/DGS-RP - European Organization for Nuclear Research
1211 Geneva 23, Switzerland
Phone: +41 22 767 8069 Office: 892-2A-015
e-mail:<> www:

From: walker []
Sent: 16 April 2012 14:50
To: Chris Theis
Cc: fluka-discuss
Subject: RE: RE: Can FLUKA (or flair ) be used to caculate region volumes?

Thanks, Chris!
I found the 'Quasi-Monte Carlo' option and it even got a more accurate result than the 'Geometric' option sometimes. However, it still fails to get the right volume of a
rendering-artefacts model I've got. Part of the FLUKA input of the model is as following:

*Titile card
    0 0 A small test

*description of fluka bodies
ZCC B1 0.0000000 0.0000000 10.0000000
YZP B2 10.0000000
XYP B3 0.0000000
XZP B4 10.0000000
XYP B5 10.0000000
XZP B6 0.0000000
YZP B7 0.0000000

*description of fluka regions
R1 5 -B1 +B2 -B3 +B4 +B5 -B6 -B7

The Region R1 is the boolean result of a a RPP ( which is formed by six planes instead) subtracting ZCC.

Case1: When R1 is descriped by a RPP subtracting a ZCC, the rendering and volume caculation is OK, as following cut:

Case2: When R1 is described by boolean operations of the 6 planes(of the RPP) and the ZCC like the input showed above,there are rendering and caculation problems :

So in this simple example, the problem can be avoided by using RPP instead of containing planes. Yet, there are other situations in which lots of planes or other bodies
(which can't be replaced with RPPs or so) exist with the rendering and caculation problem showed above.

Then, is there any way to avoid the problem?

Best regards



From: Chris Theis<>
Date: 2012-04-13 15:31
To: wdx456<>
CC: Sion Koren<>; fluka-discuss<>
Subject: RE: Re: Can FLUKA (or flair ) be used to caculate region volumes?
Dear Walker,
SimpleGeo offers two kinds of volume calcultions. The one is called
"geometric" and uses the visualized and as such
discretized geometry. As a consequence it is very fast but might fail in case of
rendering artefacts. There is another one which is called "Quasi
Monte Carlo" which calculates the volume integral by using stratified
numerical sequences which act on the analytic description of the geometry.
Therefore, this method also works in the presence of rendering artefacts.
If you are looking for the functionality to calculate volumes of arbitrary
regions directly in your input, like it is provided for example in MCNP(X),
then I'm afraid that FLUKA itself does not provide such a feature
- at least not to my present knowledge. Eventually you can do it but you
will need to do a bit of programming or set up a specific geometry, input
and post-processing to achieve this.
Hope that helps
Chris Theis
CERN/DGS-RP - European Organization for Nuclear Research
1211 Geneva 23, Switzerland
Phone: +41 22 767 8069 Office: 892-2A-015
e-mail:<<>> www:

Received on Tue Apr 17 2012 - 14:00:22 CEST

This archive was generated by hypermail 2.2.0 : Tue Apr 17 2012 - 14:00:22 CEST