Geometry error on the tangent line

Dear FLUKA experts,

I am evaluating the electron beam irradiation on water by inserting 5 dosimeters evenly taped to the surface of the water container surface, as shown in the following figure.

The dosimeters are set to be tangent to the container cover plate, everything is okay except for the surface of that plane, where the error points are shown in the following figure.

Do you have any experience to eliminate the errors? Also attached the input and flair files here. tiwindow.inp (27.4 KB) tiwindow.flair (15.6 KB)
Thank you very much for your time.


Dear @xili
it appears there is an overlap in your geometry (two regions sharing the same portion of space). There are many ways of fixing it. One easy way (not always working but in your case it does) is the automatic “Correct E” function of flair.
Please watch this youtube video that shows how to correct your error.
To visualize your error you need to look in the other viewports

Dear Vasilis,

Thank you very much for your reply.
I think the version you showed in the video is the old one after I checked it for several times. This time I added 5 dosimeters that are like cylinders, which are tangent to the left surface of the cover plate, as shown in my last email.
I didn’t find any error until I check the dividers one by one and I found there are errors on the left plane of the cover plate. I think the errors shouldn’t be there but I couldn’t find the reason and how to correct them. I attached the input files again in case the old one confused anyone. tiwindow.inp (27.4 KB) tiwindow.flair (15.6 KB)
Could you please help check them? Appreciate your help.


Hi Vasilis,

It is very weird, I renamed my input file and flair file, but after uploaded they just showed the old names as my previous posts showed. Hopefully the content has been updated, please let me know if you don’t see the new version, where it should have something like the following (sorry for the many lines)

  • Black body
    SPH blkbody 0.0 0.0 0.0 10000.
  • Vacuum
    SPH vacuum 0.0 0.0 0.0 100.
    RCC window 0.0 0.0 50.675 0.0 0.0 0.0127 3.25
    XYP divide 50.678
    RPP tarout -6.35 6.35 -6.35 6.35 55.16 59.48
    ZCC tarcyl 0.0 0.0 2.43
    XYP coverout 54.51
    XYP tarbak 58.46
    XYP sealup 55.
    ZCC pyrxout 0.0 0.0 3.81
    XYP sealdn 55.16
    XYP pyrxup 54.987
    ZCC coverin 0.0 0.0 4.87
    YCC dosin 54.36 0.0 0.12
    YCC dosin1 54.36 1. 0.12
    YCC dosin2 54.36 2. 0.12
    YCC dosin3 54.36 -1. 0.12
    YCC dosin4 54.36 -2. 0.12
    YCC dosout 54.36 0.0 0.15
    YCC dosout1 54.36 1. 0.15
    YCC dosout2 54.36 2. 0.15
    YCC dosout3 54.36 -1. 0.15
    YCC dosout4 54.36 -2. 0.15
    XZP dstart -2.5
    XZP dend 2.5
    SPH bead1 0.0 2.5 54.36 0.15
    SPH bead3 1. 2.5 54.36 0.15
    SPH bead5 2. 2.5 54.36 0.15
    SPH bead7 -1. 2.5 54.36 0.15
    SPH bead9 -2. 2.5 54.36 0.15
    SPH bead2 0.0 -2.5 54.36 0.15
    SPH bead4 1. -2.5 54.36 0.15
    SPH bead6 2. -2.5 54.36 0.15
    SPH bead8 -1. -2.5 54.36 0.15
    SPH bead10 -2. -2.5 54.36 0.15
  • Black holeq
    BLKBODY 5 +blkbody -vacuum
  • Vacuum around the hall
    VAC 5 +divide +vacuum -window
  • Target
    WINDOW 5 +window
    AIR 5 +vacuum -window -divide +coverout -dosout -dosout1 -dosout2 -dosout3 -dosout4
    | +vacuum -pyrxup -pyrxout -tarout +tarbak
    | +vacuum -tarbak -tarout
    | +vacuum -coverout +pyrxup +tarcyl
    | +vacuum -coverout +pyrxup -coverin
    | +vacuum -dend +dosout -bead1
    | +vacuum +dstart +dosout -bead2
    | +vacuum -dend +dosout1 -bead3
    | +vacuum +dstart +dosout1 -bead4
    | +vacuum -dend +dosout2 -bead5
    | +vacuum +dstart +dosout2 -bead6
    | +vacuum -dend +dosout3 -bead7
    | +vacuum +dstart +dosout3 -bead8
    | +vacuum -dend +dosout4 -bead9
    | +vacuum +dstart +dosout4 -bead10
    H2O 5 +tarcyl -sealup +tarbak
    TARCEL 5 +tarout -tarcyl +tarbak
    COVER 5 -coverout +coverin +pyrxup -tarcyl
    SEAL 5 -sealup +pyrxout +sealdn -tarcyl
    TARWIN 5 -pyrxup +sealup +pyrxout
    TARBAK 5 +tarout -tarbak
    dosshell 5 +dosout -dosin -dstart +dend -bead1 -bead2
    dosshel1 5 +dosout1 -dosin1 -dstart +dend -bead3 -bead4
    dosshel2 5 +dosout2 -dosin2 -dstart +dend -bead5 -bead6
    dosshel3 5 +dosout3 -dosin3 -dstart +dend -bead7 -bead8
    dosshel4 5 +dosout4 -dosin4 -dstart +dend -bead9 -bead10
    dosimete 5 +dosin -dstart +dend -bead1 -bead2
    dosimet1 5 +dosin1 -dstart +dend -bead3 -bead4
    dosimet2 5 +dosin2 -dstart +dend -bead5 -bead6
    dosimet3 5 +dosin3 -dstart +dend -bead7 -bead8
    dosimet4 5 +dosin4 -dstart +dend -bead9 -bead10
    Brbead1 5 +bead1
    Brbead3 5 +bead3
    Brbead5 5 +bead5
    Brbead7 5 +bead7
    Brbead9 5 +bead9
    Brbead2 5 +bead2
    Brbead4 5 +bead4
    Brbead6 5 +bead6
    Brbead8 5 +bead8
    Brbead10 5 +bead10


I see the “errors”, they are generated by the YCC cylinders and the spheres that are touching the COVER region. These are numerical precision errors in flair (despite all the work in flair to be numerical robust you cannot avoid such situations). Most probably they will be handled in a different way in fluka, either resulting in an error or not.

Its always a good practice as it explained in the fluka course geometry lecture to avoid such situations.
Various solutions are:

  1. make the YCC and SPH a bit smaller in radius like a 1μm smaller
  2. make it bigger forcing an overlap with the coverout plane and modify the region expression accordingly

Please note that from flair v3, the whole input is saved inside the .flair file, and it is exported to the .inp.
During loading in case flair detects that the .inp is modified outside .flair it will prefer the .inp and give you a warning message.

Thank you, Vasilis.
I tried to make the YCC and SPH smaller and it works. I am going to try the other solution as a practice.


Thank you @xili for reporting, it help me debug the code and protect it from such situations.