Dear Fluka community,
I’m playing with the annular distribution already declared at the source_newgen to randomize my source. The initial beam starts from z = 72 km, x=y=0 with an inner radius rmin ~ 0 and rmax = 10 km (Section source_newgen 5.2.3).
Then, I fix the direction cos_x and direction cos_y leaving the cos_z negative (in the input) to randomize the direction downwards.
The next two figures give an idea of the distribution in xy and xz
I was wondering if it is possible to, instead of randomizing the beam direction (second figure), point each primary to a specific position, let’s say x=y=z=0.
Please find attached the necessary files.
source_newgen.f (19.0 KB)
shower.inp (1.4 KB)
usrdraw.f (7.4 KB)
Thanks in advance,
Thank you for your question.
If I have understood correctly your need, it can be directly implemented by defining the beam angles in the source_newgen.f file, which now will be a function of the sample of initial positions.
First, as you mention correctly, you may activate the annular distribution subroutine. Next, you can activate the variables “direction_cosx” and “direction_cosy” such that, for every initial value both beam angles point to the desired direction. I write down the lines I have used in my example, together with the output plots:
coordinate_z = -5.0D0
call sample_annular_distribution( 0.0D0 , 1.0D0 , coordinate_x , coordinate_y )
direction_cosx = - coordinate_x / sqrt( (coordinate_x )**2.0D0 + (coordinate_z)**2.0D0 )
direction_cosy = - coordinate_y / sqrt( (coordinate_y )**2.0D0 + (coordinate_z)**2.0D0 )
I hope this helps.
Mario Sacristan Barbero
Thank you for your quick and assertive answer.
I realized that the isotropic distribution was activated, overwriting any modifications on the directions cosines.
Now it works as desired as shown in the figure below.
Thanks a lot!