Scoring within lattice units

Dear FLUKA experts,

I am trying to model a simple problem using lattice cards for repeated structures. I have taken help from the following topic to prepare my input using the LATTICE feature of FLUKA:

https://fluka-forum.web.cern.ch/t/replication-geometry-with-lattice-card/592?u=anupam_igcar

My model consists of 9 cubes of iron containing smaller cylinders made of carbon. These cubes have been replicated using LATTICE card. Following is how the geometry looks like:

A planar photon beam of 1 MeV is incident on the assembly along one direction.

My objective here is to score photon flux within each small cylindrical regions (filled with Carbon). I am trying to use USRTRACK scorer for this purpose.

However, I am not sure how to score in all the smaller cylinders using USRTRACK card (both individually in each cylinder and also as an average over all cylinders) as it asks for one region where flux will be estimated. I thought about putting multiple USRTRACK cards. But in that case, I am not sure how to specify regions corresponding to each smaller cylinder. That is because in the region definitions, I have defined lattice unit regions using only the outermost solid. So, as such there is no separate region defined for the containing cylinders.

Please let me know about possible solutions to this issue. Following are my input files:

latt_scor.flair (4.7 KB)
latt_scor.inp (3.5 KB)

With regards,
Anupam

Dear Anupam,

The EVENTBIN or USRBIN scoring can be replicated with LATTICE command, if for those scoring cards one enables the ‚Äúspecial binning‚ÄĚ option What(1)=8.

Best wishes,
Alex

Thank you @agerbers for your reply.

I am now trying to use USRBIN scorer with special binning option. However, the results obtained are all zeroes for each of the lattice cells. I have attached the input files and the associated USRBIN output.

latt_scor.flair (4.7 KB)
latt_scor.inp (3.6 KB)
latt_scor_21.bnn.lis (2.2 KB)

I compiled and linked the provided routines musrbr.f, lusrbl.f and fusrbv.f for the current results without any modifications. Do they need to be modified as well?

Actually, I could not fully understand about how to use this scoring option. Thus, I would greatly appreciate you pointing me to any FLUKA tutorials which might help me better understand such scoring techniques.

With regards,
Anupam

Dear Anupam,

to score with a region / boundary crossing type estimator in a lattice geometry, you need to keep in mind, that you must use the ‚Äúprototype‚ÄĚ region (number) in the scorings and than you must filter based on the lattice number (based on the order they are defined in the input).

The the filtering is not present, all lattices will be scored together with the ‚Äúprototype‚ÄĚ.


1. USRBIN - Type: Special

If you are only interested in the total fluence in a region the USRBIN type: Special scoring is a good choice, because it contains the filtering by the lattice number automatically.

It has 3 axes:

  • Range of region number (in the ‚Äúprototype‚ÄĚ)
  • Range of lattice number
  • A binned floating point number, which is always zero by default.

These axes can be changed with the musrbr.f, lusrbl.f and fusrbv.f user routines if necessary.

Reading the results could tricky, since the numbers are printed in a sequence. The following pseudo code might explain the order of the numbers:

for f in floating_point_bins:
   for l in lattice_numbers:
      for r in region_numbers:
         read_number(r, l, f)

In your case if you want to score in the cylinders ‚Äúreg2‚ÄĚ, you need to set the:

  • first axis from 5 to 5 in steps of 1
  • second axis from 0 (no lattice transformation = ‚Äúprototype‚ÄĚ) to 8 (the last lattice) in steps of 1
  • since the third axis is always zero, you can set it to -0.5 to 0.5 with 1 bin.

2. USRTRACK

However if you are interested in the particle spectrums in a lattice as well, you need to use the USRTRACK scoring, and implement the lattice filtering manually.

It can be done in track length like scorings in the user routine fluscw.f, and for energy deposition type like in comscw.f

You can find an example below.

This filtering routine will look for USRTRACK scorings with a name staring with the characters LT, and then it will try to convert the 3rd and 4th characters of the name into an integer representing a lattice number.

For example: the USRTRACK scoring with the name LT00flu will be limited only for fluence scoring in the ‚Äúprototype‚ÄĚ region, and LT01flu will score only lattice number 1.

If the name of the USRTRACK doesn’t start with LT or there is an error converting the 3rd and 4th character of the name into an integer, then no filtering is applied.

To activate the fluscw.f user routine an USERWEIG card must be used.


Example:
latt_scor.flair (4.4 KB)
fluscw_lattice.f (2.1 KB)

I hope this explains, how to score in lattice geometries.

Cheers,
David

1 Like

Thank you @horvathd for the clear explanation. This has definitely clarified my doubts related to scoring in lattice geometries.

With Regards,
Anupam