I want to simulate the defects produced by ambient neutrons on a quartz sample. First, I created a cubic quartz sample centered into the origin and defined a thin cartesian volume around the boundary of the sample. The angular distribution of the neutrons generated are isotropic. When I tried to sample the energy from a histogram using the source_newgen.f and the slides of the 2022 FLUKA course as reference the code ignored the defined geometry. I’m looking for help and reference material for setting a volumetric particle source as well with an energy spectrum defined by a histogram.
The problem is that using source routine overwrites the beam specifications given with standard cards.
In your case, this means that you CART-VOL is not taken into account. You need to specify in the source routine the coordinates of your primaries such that they give the specific distribution you want.
in order to directly take into account volumetric source definitions, divergence etc. provided by FLUKA input cards, you can also call the FLUKA internal routines yourself.
Look at the call in the section with the comment “PRIMARY PARTICLE: STARTING POSITION”. If the spatial distributions that are provided out of the box are not sufficient then you need to sample the positions yourself but from your post I understand that the cylindrical distribution should work.