Too many compound cards?

Dear Fluka experts,
Recently I am design a detail CT material model so I rewrite the .mat file to build a more detailed CT material voxel. In the new file I defined over 8000 new material named as HU0,HU1…HU8000.

However, when i use this .mat file to conver dicom CT to new material, it report an error as followed picture said toomuch compound cards.
I then decrease the total amount of comound cards, when the compounds number less than 650, the fluka code runs well, however, when the compounds number over 650 it will report the ‘too much compounds cards’ error. Are there any solution to fix this problem?
Thank you so much for your help!
Richard Lee

Hi @liweiguang you have reached the upper limit in the code for compound cards.
There is no user parameter to increase that apart from re-compiling the code.

However I am wondering if you really need that.
The purpose of the Crho_min, max is exactly for this reason.
You don’t need to create one material per Hounsfield unit, but rather group a range of Hounsfield units with the same material.
To ensure a smooth density gradient between the groups you need to apply the Crho_min, max correction as as the
_i = hounsfield group
densitty_i * Crho_max_i ~= density_[i+1] * Crho_min_[i+1]
~= almost the same slightly smaller ensuring a smooth gradient

Thank you for your message, my purpose is to define more than 8000 new compunds and loading it in a mat convertion model.However, it seems unattainable in FLUKA according to your answer. So now the only solution for my work is design proper C_rho_min and max pair to simulate those compounds material. Thank you for your help!