Multiple source positions along z and respective scoring

Dear Experts,

I have a cylindrical drum, dia 60 cm and height 120 cm. My source is on one side (at - 42.5,0,0) and the detector (43.5, 0, 0) is on the other side of the drum. I could score fluence and Dose EQ with USRBIN easily.
In next case, I wish to change the source z and score on the other side at the same z (detector in the same plane as source z).
That is, my source has no. of positions in z direction (along height of the drum) and I wish to score at the respective z (specific) on the other side of the drum.
It is a 120 cm long drum, and if I wish to score in a step of 20 mm (along z), I must run the simulations for 60 times with each source position (z) and respective z for the detector.

Q1.: Is there any way to do this in a single input? I vaguely remember about ‘conditional directives’ (learnt during online course) but I am not sure how to use them. Can you please guide me on this or suggest some alternative?
Q2: Fluence is obtained in no. of particles/cm^2 - how to relate it to the activity of the source? As this is a cartesian binning, how is it calculating in /cm^2 ?

PFA the test input file.
1_testFile.inp (1.6 KB)

Thanking you, with kind regards,
Raksha.

Dear Raksha,

Thanks for your question!

Currently, your beam is pointing parallel to the drum you’ve implemented. Is this intentional? If not, consider adjusting the cosx or cosy values in the BEAMPOS card to properly orient the beam toward the drum.

Regarding Q1: there are several ways to approach the problem, depending on your goals.

  • If you want to analyze all the 60 beam positions separately, you can work with FLUKA preprocessors. Define each beam position and scoring region using the #define directive, and switch between them with #if/#elif/#endif. This allows you to automate the generation of input files for each position. I have linked the Simple Sources & Preprocessor lecture slides of this year’s FLUKA course for further information.
  • If you want to merge the results from all beam positions into a single scoring, then I recommend using the SPECSOUR card together with multiple BEAMSPOT cards. This approach lets you simulate multiple source positions in one run and obtain an overall scoring along the drum. This is also covered in the same slides linked above.

Regarding Q2:

  • Could you please clarify what you mean by “relating the fluence to the activity of the source”?
  • Fluence is the track-length density, meaning the total length of the particle trajectories per unit volume. This results in particles per cm^2 per unit primary weight (see 7.22.89. USRBIN — FLUKA Manual). You can find a more detailed explanation on fluence scoring in the Scoring II lecture slides of this year’s FLUKA course.

Kind regards,
Barbara

Good morning Barbara,

Thank you for your kind reply and apologies for replying late.

For Q1, I tried using the directives to define 4 source positions and respective detector positions. I am able to score separately for each position by running each input with no. of spawns and cycles. The input file and 4 .bb files are attached. My question is, is there a way to get the output written in single USRBIN in single Run. That means, can we get only one .bnn file is created with results scored for all the source positions, successively written one by one ?
Or, this is the correct way which I am doing ? Kindly see if there is any mistake in using the directives and guide. PFA the image of Flair to show how the each input was Run.

For Q2:
i. I meant as follows: as fluence is given in no. of particles/cm^2/ primary weight, and if I wish to calculate counts collected in the detector…how can I relate the two ? As the no. of counts will be related to the activity of the source in the question…hence I wanted to relate fluence and source activity.
ii. I also tried using DETECT card. Can we relate it to the counts collected in the detector? Because using dps (source activity) and efficiency of the detector practically, we can calculate cps. I would like to related the calculated cps and scored cps. Q2 with DETECT card - input file is attached.

Thank you for your time.
Kind regards,
Raksha.
Q1_1_23.bnn.lis (632 Bytes)
Q1_2_23.bnn.lis (632 Bytes)
Q1_3_23.bnn.lis (632 Bytes)
Q1_4_23.bnn.lis (632 Bytes)
Q1_testFile.inp (1.9 KB)

Q2_AirDetect.inp (2.1 KB)
Q2_AirDetect_17_tab.lis (90.2 KB)

Dear Raksha,

No worries about the delay.

Regarding Q1: Your input setup looks correct and is functioning as expected. If your goal is to keep the results for each beam position separate, then your current approach using preprocessor directives and running multiple inputs is the recommended method.

However, if you prefer to combine all source positions into a single run and accumulate the results in one USRBIN, then you should use the SPECSOUR card in combination with multiple BEAMSPOT cards. You also should expand the scoring region to cover the entire area influenced by all beam spots.

This method will merge the fluence contributions from all defined positions into one .bnn file. Just note that this won’t allow you to distinguish between individual source positions anymore.

Regarding Q2: If your interest is in estimating detector counts, then scoring the particle current rather than fluence might be more appropriate. For this, the USRBDX card is ideal as it scores the number of particles crossing a surface, which aligns well with the concept of counts collected by a detector. Fluence, on the other hand, relates to the track-length. (see the Scoring II slides from the FLUKA course)

Alternatively, if you need more flexibility (e.g. to tally counts based on energy, particle type, or geometry), consider using a MGDRAW user routine. This allows you to write a customized file each time a particle crosses a defined boundary.

Best regards,
Barbara

Good evening Barbara,

Thank you very much for the detailed explanation.
Regarding Q1: I need to score separately for each source position and respective detector position. So I will use pre-processors.
Regarding Q2: I will go step by step and come back with doubts if needed.

Thank again, regards,
Raksha.

Dear Raksha,

For your task using pre-processors seems to be the correct solution indeed.
Let me know if you have more questions.

Kind regards,
Barbara