How to recording the activation source distribution?

Dear experts:

I’m working on the activation simulation recently. I want to recording the de-excite gamma from activation atom in a moving model. Absolutely, Monte Carlo simulation couldn’t complete this task. So I need a equivalent transformation. In first step, I recording the spacial distribution of activation atom(or de-excite gamma?) using USRBIN card in the first simulation. Secondly, convolution of USRBIN result and space. At last, using the convolution result as the source of second simulation.

There are some question confuse me:

  1. In the first simulation, dose the result of USRBIN(gamma-recording) contain energy signature? Or is it just the total gamma flux? For example, the material contains O-16, Ca-20, Si-28, so the energies of the de-excited gamma rays are different.
  2. How should I open and process the .bnn file?

Thanks in advance!
LUYU ZHONG

I’ve solved the second problem.
And a new question: How to record the spatial distribution of all activated atoms with a USRBIN card?

Dear @ZhongLy,

Sorry for the late reply.

In the first simulation, dose the result of USRBIN(gamma-recording) contain energy signature?

No.

Or is it just the total gamma flux?

Indeed fluence per primary particle.

I would do it in a slightly different way, using a phase-space file instead of an USRBIN. I will carry out a test to verify something and come back to you asap.

Cheers,
Fran

Hi again @ZhongLy

Indeed, as mentioned above, I would create a phase-space file in which to save the position and identity of all the radionuclides generated in the 1st step of your simulation. You can do that using the USRRNC user routine. Note that for this part, the RADDECAY card is not necessary.

Then you can apply your convolution and, in the second step of your simulation, you can use the SOURCE user routine to pass the newly placed radionuclides back to FLUKA as your source. In this step is when you actually carry out the activation calculation (RADDECAY, IRRPROFI, DCYTIMES and DCYSCORE cards). The provided radionuclides will be forced to decay, emitting their products appropriately.

Be careful with the normalization of the final results (!). If you run 1000 primaries in your first step, then you have to tell FLUKA in the 2nd step that all radionuclides you provided correspond to (only) 1000 primaries. This you can do in the source routine using the WEIPRI variable.

Not sure what you are trying to do with your moving model but take into account that, depending on your temporal resolution, you may need to run many simulations (modifying your geometry) in order to get an accurate ‘picture’ of your results for each timestamp.

Let us know in case you need further assistance.

Cheers,
Fran

Dear Francisco Ogallar Ruiz

Thank you for your attention!
I’m a little confused about the USRRNC, based on what I’ve seen on the forum and in the manual. How do I record multiple elements? For example, O-16 and Si-28 are needed.

Regards
Luyu Zhong

Dear @ZhongLy,

Every time a radionuclide is created and eventually stopped in the simulation, the USRRNC routine will be called by FLUKA (USERWEIG being appropriately set). In every call to the routine, all the information related to the stopped radionuclide is exposed, in particular its ID via the IZ, IA, IS variables: atomic number, mass number and isomeric state respectively. For your purposes, you also need the position at which the radionuclide is stopped, and it is exposed via the X, Y, Z variables.

What you would need to do is to program your logic into the USRRNC user routine to export to a file all the necessary information for each radionuclide, in order to generate a phase-space file with the identity and position of all your radionuclides so you can apply your spatial transformation to them as you see fit.

Hope this helps. Do not hesitate to reach back if you have further questions.

Cheers,
Fran

Dear @fogallar

Thank you for your generosity!

Following your advice, it seems to have solved the first step and got the spatial distribution of activation nucleus. But I am not sure it’s right, and the file attached at the end.

And there are some troubles in the second step. It’s not clear to me that how to apply the spatial distribution of activation nucleus(N-16) in the second simulation? I’d be grateful for any examples!

ResidualNuclei.flair (7.8 KB)
ResidualNuclei.inp (4.6 KB)
ResidualNuclei_22_sum.lis (1.1 KB)
ResidualNuclei_24.bnn.lis (1.9 MB)
usrrnc.f (1.2 KB)

Thanks in advance!
LUYU ZHONG

In my second simulation I need to rebuild the source spatial distribution based on the result of step 1. I referenced this post (Defining a beam through a USRBIN output) but failed.

1.I need to process the USRBIN results and convert .bnn file to ascii form(bnn.lis file). But bnn.lis file is unreadable for Fluka. So how can I convert from bnn.lis to .bnn?
2.The energy of the photon source is 6.14MeV. In general, there is a significant peak (6.14 MeV) in the energy spectrum, but the result is the opposite. Is there something wrong in the input file?

The attachment is a test result of the spatial distribution source based on the .bnn file. And bin axes have been converted to a Cartesian coordinate system. ResidualNuclei_22.bnn is USRBIN result of step 1, and ResidualNuclei_22.bnn.lis is ascii format, and ResidualNuclei_21_tab.lis is the energy spectrum of step 2.

SpatiaDistribution.zip (1.7 MB)

Thanks in advance!

Dear @ZhongLy

I believe you may have misunderstood my point. Forget about the USRBIN approach—it’s not useful for what you’re trying to achieve. As explained earlier, the better approach is to generate a phase-space file instead of using a USRBIN.

To summarize, you should:

  1. Use the USRRNC user routine to record the position and identity (via X, Y, Z, IZ, IA, and IS variables) of all radionuclides generated during the first step of your simulation. This involves writing each radionuclide’s details (position and identity) to a text file, potentially with one line per radionuclide. This text file will serve as your phase-space file, containing the necessary data for your next steps.

  2. After generating the phase-space file, you should apply your spatial transformation to the radionuclide data to modify positions or other properties according to your needs.

  3. Once the transformation is complete, use the SOURCE user routine to read the modified radionuclides from the updated phase-space file and pass them back into FLUKA as your source. At this point, make sure to include the appropriate FLUKA cards for the activation calculation, such as RADDECAY, IRRPROFI, DCYTIMES, and DCYSCORE.

Additionally, remember to normalize your results based on the number of primaries from the first step. You can control this normalization using the WEIPRI variable in the source routine.

Keep in mind that depending on the specifics of your study, the FLUKA geometry in the second step may or may not be identical to the one used in the first step. You might need to modify it to suit the new conditions after applying the spatial transformation.

I hope this clarifies the procedure. Please revisit our discussion for more details, and feel free to reach out if you have any further questions.

Cheers,
Fran