Hello everyone,
This is a follow-up to my previous post regarding the implementation of a neutron source in FLUKA using source_newgen.f
Angular distribution with source_newgen.f.
I am running simulations with FLUKA to validate a geometry by comparing calculated dose distributions with experimental measurements and MCNP simulations. However, I still observe discrepancies, and I suspect the source implementation might be the reason.
In MCNP the source is defined with the following card:
SDEF par=n erg=d1 rad=d2 pos=-15 0 0 ext=d3 axs=1 0 0 vec=1 0 0 dir=d4
where
- d1 is the energy distribution, which I implemented in FLUKA through an external .txt file
- d2 and d3 describe the spatial distribution of the source (a cylinder, for which radius and height are provided).
My main doubt is about d4, which in MCNP represents the angular distribution (anisotropy) along the x-axis. It has a parabolic shape with negative concavity and its maximum around 90°.
In FLUKA I tried to reproduce this behavior by sampling:
direction_cosx = sample_discrete_file("AngleX.txt")
where AngleX.txt is a two-column file: first column = cos(theta), second column = intensity (not normalized; I assume FLUKA normalizes automatically).
Now my question: If I want to replicate what MCNP does, what should I do for the y and z direction cosines?
So far I have tried two approaches:
-
Spherical coordinates
call SFECFE(SINT,COST)
direction_cosx = sample_discrete_file("AngleX.txt", 1D0)
direction_cosy = SINT * sqrt(1 - direction_cosx*direction_cosx)
direction_cosz = COST * sqrt(1 - direction_cosx*direction_cosx)
-
Isotropic sampling for y and z
call sample_isotropic_direction(direction_cosx, direction_cosy, direction_cosz)
direction_cosx = sample_discrete_file("AngleX.txt", 1D0)
But when I look at neutron fluence with USRBIN, both options seem incorrect:
-
With spherical coordinates I see preferred directions at 0° and 180°.
-
With isotropic sampling, I get peaks at 45° and 135°.
In both cases, the expected maximum at 90° does not appear.
Could anyone clarify the correct way to implement the anisotropic angular distribution from MCNP into FLUKA? Am I misunderstanding how to treat the y and z direction cosines when cosx is sampled from a custom distribution?
Thanks in advance for your help.
Best regards,
Giorgia