Assign a new material to the exist region

Dear FLUKA experts,

Is there any method to assign a new material to the existing region? For example, I checked the material number of region by using MEDFLK(n, iprodc). And then I want to replace a new material number to this region n.

Any suggestion to achieve this purpose?

Thanks in advance for your help.

Best regards,

Jingfang Zhao

Can you please explain better what you would like to do? Do you want to change the material while executing a user routine?

Yes. I want to change the material when I call the initialization in the source.f file.
For example, I use routine GEOR2N to get the number of the region. Is there any routine that can help to assign a different material to this region?




Dear @zhaojf99,
I really don’t think this can be done. Definitely, it shouldn’t be done as you’d be messing up with the simulation initialization.
Additionally, I don’t understand what is the purpose of changing the material at the initialization of the source routine. It would be simple to change the material directly in the inputfile. If you want to test different material and keep a single inputfile, it can be done by means of preprocessor instructions that can be activated and deactivated in the Flair Run tab.
In case instead you were interested in changing material because of different set ups between the irradiation and the following cooling (induced activation) this can already be done inside Fluka.

Dear @amario,
Thanks for your reply.
There is complex geometry that has a different percentage for two kinds of material.
I try to simulate in the source.f instead of drawing in flair Geometry.
The first choice is that i can use water equivalent length for these two different materials. But it would be better if I can directly assign different materials to them.

You could define different compounds and assign these to the different regions in your geometry.