Dear FLUKA experts and users,
Following the similar posts Angular distribution with source newgen and Implementation of an anisotropic source from mcnp in source_newgen.f I am trying to implement a neutron source with a predefined polar angle cos(\theta_{n}) distribution and a uniformly distributed azimuthal angle \phi_{n}.
This is assumed that these neutron are the secondary particles (not in the context of the simulation) produced in inelastic interactions of the primary (not the model-wise as well) 18 MeV protons with a target. The proton beam has a specific direction in \mathbb{R^{3}} which does not align with the default FLUKA beam direction along z-axis. Therefore I set a BEAMAXES card with a new beam’s coordinate system rotated to match the actual protons’ direction:

Since I am creating the neutron source the BEAM card is specified for neutron particle with the E what value defined noticeable higher than the maximum spectra value (the neutron energy is sampled from an external file using sample_histogram_momentum_energy function in the source_newgen.f user routine) and isotropic beam divergence:

The both \theta_{n} and \phi_{n} angles are defined with respect to the proton beam direction:
-
The polar angle should have the following distribution
with respect the newz'axis. -
The azimuthal angle is lying in the
x'y'-plane perpendicular to thez'-axis and should have the uniform distribution in the range of [0, 2\pi] radian.
To reproduce these angles distributions I used sample_isotropic_direction subroutine and did overwrite direction_cosz variable to be assigned to a value sampled from a file which contains the histrogram shown above:
call sample_isotropic_direction(direction_cosx, direction_cosy, direction_cosz)
direction_cosz = sample_histogram_file("theta.txt", 1D0)
I used USRBIN card to score the neutron radiation field and try to visually ensure correctness of that approach:
I expected that the radiation field should’ve taken advantage for the directions close to normal to the z'-axis, where \theta_{n} is close to 90 deg and cos(\theta_{n}) becomes equal to zero. But giving the images above (e.g. XZ, ZY, XY projections) it looks like the radiation field is distributed isotropically.
So, I would like to clarify do I use the correct approach to sample the angles?
Cheers,
Ihor
source_newgen.f (22.4 KB)
FLUKA: 4-5.2
Flair: 3.4-5.4





