Cylindrical neutron source sampling

Dear David,

With reference to above discussion I am trying to sample the same neutron spectrum but in a cylindrical shape of Radius = 5 cm and Height = 10 cm.
I am able to compile the source file, but upon scoring the neutron flux using USRTRACK I get the following error.
“Abort called from DEDX reason Exceeded upper dp/dx abscissa. Run stopped!
STOP Exceeded upper dp/dx abscissa.”
Kindly guide me whether I have written the right code for cylindrical sampling in source_newgen.f or am I making mistake in scoring using USRTRACK.

PS: I am using the latest release of FLUKA-4.3

source_newgen.f (19.1 KB)
neutron_spectrum.txt (2.9 KB)
ActivationAr_calc.inp (1.1 KB)

1 Like

Dear @mayank.rse,

Your neutron spectrum file has only two columns and you are using histogram sampling in your source.

  !    Histogram file has to have 3 columns:
  !       - Emin (of the bin)
  !       - Emax (of the bin)
  !       - dN/dE (bin height; NOTE: doesn't need to be normalized)

I suggest using spectrum sampling

  momentum_energy = sample_spectrum_momentum_energy("neutron_spectrum.txt", "eV")

Have a nice day,

1 Like

Dear Mihaela,

Thank you so much for your kind reply and identifying my goof up. I was able to run the file. However the results from USRTRACK does not match the spectrum definition in the text file(kindly see the attached image). The spectrum definition in the text file is of the order of 1e14, while the results of USRTRACK scoring are in the order of 1E10.

ActivationAr_calc.flair (1.8 KB)
neutron_spectrum.txt (2.9 KB)
source_newgen.f (19.3 KB)
Also can you kindly proof-check the algorithm used for cylindrical sampling, I have modified it a little seeing the annular sampling algorithm:
after defining all necessary variables

  rmax = 5.0D0
  h = 10.0D0
  rmax_squared = rmax*rmax
  theta = FLRNDM(xdummy)*TWOPIP
  constant = TWOTWO/rmax_squared
  r = sqrt(TWOTWO * FLRNDM(xdummy) / constant)
  coordinate_x = r*cos(theta)
  coordinate_y = r*sin(theta)
  coordinate_z = h*FLRNDM(xdummy) 

Thanks in advance.


Dear Mayank,

the FLUKA results are normalized to one primary particle. If your input spectrum assumes an actual neutron rate, then you you need to manually multiply the FLUKA results with it.

Your sampling algorithm looks fine. To check it you can use the debug function of the source_newgen user routine, or use an additional fluence scoring in the FLUKA simulation.

One more think, on your beam card you request an isotropic source, but this is not taken into account by the source routine automatically. You need to specify it in the routines explicitly.


1 Like

Thank you David for the clarity. I was able to run the source file cleanly and score neutron fluence in cylindrical binning using USRBIN. Thank you so much.


1 Like

A post was split to a new topic: Activation study using a source routine