Direction cosine plots from mgdrawBDX output

Dear experts,

In a two step method (first step sampling is done following the discussion Using arrays to customise position sampling in source.f), a mgdrawBDX.f was used to score position, weight, energy and direction cosines. After plotting 1000 points from the output, the vectors are plotted and this looked like this:


cloud.inp (2.2 KB)

In the first step (isotropic photons from a hemispherical source moving towards cylindrical target (immersed in the hemisphere cloud)) the direction sampling was carried out using CALL RACO (TXFLK (NPFLKA), TYFLK (NPFLKA), TZFLK (NPFLKA)). After the first step, mgdrawBDX outputs are collected and plotted. In the plot, it can be seen that the direction vector is largely normal direction, but I hoped there will be more angular divergence since the initial photons are isotropic.

Can you please guide if I am missing something or if there is other way to verify the direction cosines??

mgdrawBDX.f (3.5 KB)

Regards,
Riya

Dear Riya,

I tried to reproduce the issue visible in your plot, but with the source routine from the previous topic it was working correctly for me.

Could you upload the current source routine and the script used for plotting.

To directly access the source directions you can use the SODRAW entry of the mgdraw user routine. Another option is to use the USERDUMP card without the mgdraw user routine. This way you can use USERDUMP plot to create histograms / scatter plots of the parameters of the source primaries.

Cheers,
David

1 Like

Thank you @horvathd ,

using USERDUMP without using mgdraw worked.
As for SODRAW, how to access its parameters? Are these parameters got printed in output automatically or do we have to use write statement between this block

  ENTRY SODRAW
  RETURN 

?

Regards,
Riya

Dear Riya,

you need to use WRITE statements. Have a look at the unmodified mgdraw.f user routine to see how to access the parameters of the primary particle.

Cheers,
David

1 Like