How to write isotropic source using fortran code?

i want to write a source.f, neutron and gamma are included, and
two particles emit isotropically, how to write isotropic source using
fortran code?

Dear Lihua,

the FLUKA subroutine RACO returns a random (isotropically sampled) direction in 3 dimensions.

To implement it, you need to replace:

  TXFLK  (NPFLKA) = UBEAM
  TYFLK  (NPFLKA) = VBEAM
  TZFLK  (NPFLKA) = WBEAM

With:

  CALL RACO (TXFLK (NPFLKA), TYFLK (NPFLKA), TZFLK (NPFLKA))

Cheers,
David