Regarding new FLUKA and Flair releases and compatibility with mesh phantom

Dear experts,

With the new FLUKA and Flair releases, will it be possible to incorporate the latest ICRP mesh phantoms into it, since ICRP mesh file contains .ele file? If yes, then is there any guidance regarding this?

Regards,

Riya

Hello @riya,

indeed the latest ICRP mesh phantoms can be used in both tools. We have been doing this already for some time for a number of internal studies and tests as you can see below.

You might want to have a look at the manual:
8.4. Unstructured Mesh Geometry — FLUKA Manual

and the general guide on unstructured mesh geometries that was prepared by some colleagues: Guides | The official CERN FLUKA website

Cheers
Chris

Dear @ctheis ,

Thank you for the response. I tried with .ele file and started creating the material and compound cards. I found that although the compound cards looks fine in FLAIR, but if I open the .inp in text editor there is some negative sign in some of the material name. I have installed .deb versions of new fluka and flair on ubuntu 20.

Regards,

Riya

1

testMeshAdult_Ori.inp (4.6 KB)

Hi @riya
this is due to some mis-behavior/bug in flair and the fact you are using expressions to normalize to 100%.
Which you don’t need at all, since fluka is doing the normalization for you.

A quick way to implement the materials would be to open the Phits input of the ICRP145 in flair and select from the ribbon the drop-down menu to convert it to FLUKA. Then you will get all materials in FLUKA format

1 Like

Dear @vasilis ,

I tried to do the following. I opened FLAIR, then selected phits in the option (see the attached image) and then tried to load the file MRCP-AM_external_input.pin. However, the attached error was generated. Can you please guide regarding this?

Regards,

Riya

Hi @riya,

I am not sure but I suspect that the white-spaces in your path might be problematic. I would in general stay away from blanks in paths.

For further verification, could you maybe send me your .pin file via a private message?

Cheers
Chris

Hi @riya
the Phits “TFILE” (tetra functionality) is not yet implemented in flair.
We’ve made a small patch in flair to bypass the error and load the input. Please (re-install) the latest version of flair (same version number)

On ubuntu it would be

$ sudo apt update
$ sudo apt install --reinstall flair

Then from the command line execute the following:

$ flair --page input -m phits MRCP-AF_external_input.pin

flair should load the phits input
Select from the Ribbon the “Phits” icon and change it to “Fluka”
This will convert the project to Fluka

You should have a FLUKA input with all the MATERIALS and other cards

Save and copy&paste the materials to your FLUKA project

Dear @vasilis and @ctheis ,

Thank you so much for the guidance, it did save me a lot of time to create the input manually. Few things I have noticed after creating the input. It will be immensely helpful, if you kindly address them.

  1. The geometry is visible, but some errors are shown. However, surprisingly, if I click on any card to make it deactive and click that again to make it active, the error is gone. However, it reappears again if I close the input and open it again. Is this due to some bugs?

  1. I could see the geometry in lattice and 3D option, not in media option. Is it normal for mesh phantom?

  1. If I use USRBIN, the regions are listed in a random manner, not the ICRP ID wise i.e. 100, 200 etc. Earlier in voxels, they were listed as 001, 002, 003 in this sequence. Does this mean, the present USRBIN region output with mesh phantom will be in that random sequence as listed in the drop-down menu of the USRBIN card attached here?

  1. Earlier when we used to add new cards, they used to be added in the respective card locations automatically, but now they are placed after title card, although the side panel shows the sequence that I prefer. Will we now have to move the cards manually then if we want to visualise the card in the preferred sequence?

Regards,

Riya

  1. The overlap found error while loading the mesh means that the mesh (probably due to precision) has an overlap at the specified location. flair/fluka tries to correct them, but if too many then one needs to clean up the mesh.
    Since is a quite expensive operation, It appears only during loading the mesh and then is not reported again
  2. Its a feature. The default lattice names, we should probably change them, since they do no longer reflect the latest developments:
    • Media shows on the current world/universe the materials and region boundaries, and it will not show any lattice, voxel or umesh only their cage volume (useful for editing the CSG geometry)
    • Lattice in the “Show” has the checkbutton ticked to render possible lattices, voxels & umesh and nested universes. Show it shows the interior of the lattice, voxel, umesh and nested universes
    • 3D does it by default to show everything
  3. They are shown in the order as the appear inside the umesh file (.ele), in order for someone to use ranges Region from … to … by step
    There is hidden flag in flair to sort them alphabetically (I need to digit up)
  4. flair behavior has changed a bit in that respect (due to the inclusion of Phits support)
    • if a card is selected in the editor then any new card will be inserted after the current one
    • if you select a range of cards then flair will try to put it in an ordered location inside the range. Now if it still fails I would need to debug it

Hi @riya,

I had a closer look at the reported error and it seems to be a meshing glitch in the phantom that you can ignore. It’s an isolated vertex that seems to be in the data file but not used in the definition of the final tetrahedral elements. Thus, it is not a real overlap. I will have a look what we can do to improve the diagnostics for such cases.

Cheers
Chris

1 Like

Thank you @vasilis and @ctheis for the detailed response. I am thankful to the FLUKA team for this new update, was eagerly waiting for this feature to be available on FLUKA. I will try to generate AP, PA etc results with the mesh phantom to gain the complete understanding of the new utilities.

If you do find out the hidden flag in flair to sort them alphabetically, it will be nice.

And regarding the flair behavior, I am unable to place the new card automatically in the ordered manner (not only for this particular case, but in general as well), even if I select a range of cards (let’s say selecting all the cards), the flair is not putting it in an ordered location.

Regards,

Riya

Dear @vasilis ,

I observed that to load this phits file, every time I have to reinstall flair, other wise I am not able to open the phits file using the command line
flair --page input -m phits MRCP-AF_external_input.pin

Is it the way out? The following error is getting generated:


riya@riya-VirtualBox:~/Desktop/MRCP_PHITS/External$ flair --page input -m phits MRCP-AF_external_input.pin
Traceback (most recent call last):
  File "/usr/local/flair/flair.py", line 3573, in <module>
    main()
  File "/usr/local/flair/flair.py", line 3531, in main
    project,_ = parseArgs(sys.argv[1:])
  File "/usr/local/flair/flair.py", line 3297, in parseArgs
    project.loadInput(filename, mode=forceMode, onlyinput=True)
  File "/usr/local/flair/Project.py", line 4749, in loadInput
    project = self._loadInputOrProject(filename, master, mode, onlyinput)
  File "/usr/local/flair/Project.py", line 4888, in _loadInputOrProject
    project.input.load(filename)
  File "/usr/local/flair/deck/input.py", line 1287, in load
    self.preprocess()
  File "/usr/local/flair/deck/input.py", line 1031, in preprocess
    self.refresh()
  File "/usr/local/flair/phits/input.py", line 192, in refresh
    card.refresh()
  File "/usr/local/flair/phits/card.py", line 612, in refresh
    self.loadUMesh()
  File "/usr/local/flair/phits/card.py", line 619, in loadUMesh
    self.loadExFile(fn+".ele", PhitsUMesh)
  File "/usr/local/flair/deck/card.py", line 2720, in loadExFile
    inp.load(filename)
  File "/usr/local/flair/phits/card.py", line 629, in load
    self.universes = set(super().load(filename))
TypeError: 'NoneType' object is not iterable

Dear @vasilis ,

I also noticed that in this new flair, in the material list, there is element Carbon instead of CARBON (this capital letter one was there in older flair version).

When I copied materials and compounds from phits, the material name in all the compound card is CARBON. Do I need to change it to Carbon? Or FLUKA is not sensitive to this?

Regards,

Riya

That is bizarre, why to re-install? Are you sure you don’t have two flair installations in different directories. I would suggest to uninstall flair (and any other potentially in any other directory) and re-install it.

FLUKA is case sensitive to material, regions and bodies

Carbon do not exist in the pre-defined materials. It should be defined inside your input. unless if the conversion Phits->Fluka created that, however cannot find out where

Dear @vasilis ,

Please see the attached images for Carbon material. I have opened a fresh input with blank cards.

Regards,

Riya

That material was there since long time, its not from Fluka but from the material database

Thank you @vasilis for clarifying.

Regards,

Riya