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:

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.

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.

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.

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.

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.

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!

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.

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:

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.

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.

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.