What is the maximum number of self-defined materials?

Dear FLUKA and FLAIR experts,

I’m trying to simulate carbon ion beams to a CT file.
I have defined more that 2000 new materials via FLAIR.
For simplicity, I added my own materials in the “material.ini” file, located at usr/loc/flair/db.
Also, I created my own “body.mat” file that contains these materials with a very narrow HU bin (one material for every 5 HU values).
But it seems that when the number of newly defined materials is less than 670, it worked well, while when it is greater than 670, it will run with errors.

So, is there a maximum number of self-defined materials?

I will upload my files if needed.

Dear @kwlibuaa
the present limit of total number of materials in FLUKA is 710
There are 25 predefined and the ICRU that are defined automatically when needed. So your observation that close to 670 runs Ok seems correct.
To increase the number of materials, one needs to recompile the code.

Please try to use the CORRFACT card in order to reduce the number of materials creating groups with the same stoichiometric properties and change the Rho_min,Rho_max as as to ensure a smooth density transition from one group to another