Neutron source in water

Dear FLUKA experts,
I am trying to define a simple neutron source in water using the old source routine,
but I get the error “Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation”.
When I switch the surrounding material to Lead or switches off the source routine the error does not appear.
What should I add to the source routine?
Please refer to the attached files.

Thank you in advance,
neutrontry.flair (1.7 KB)
neutrontry.inp (1.1 KB)
source.f (9.0 KB)

Hen Shukrun.

Hi Rachel,

In your source you specify:

*  |  Kinetic energy of the particle (GeV)
         TKEFLK (NPFLKA) = 1.0D-3
*         TKEFLK (NPFLKA) = SQRT ( PBEAM**2 + AM (IONID)**2 )
*     &                   - AM (IONID)
*  |  Particle momentum
         PMOFLK (NPFLKA) = PBEAM

The two instructions are incompatible: in your input file you specify a 2 MeV neutron energy. Therefore, you need to decide where you set the energy. Assuming you want to set it in the source file, you need to write the following:

*  |  Particle momentum
*         PMOFLK (NPFLKA) = PBEAM
         PMOFLK (NPFLKA) = SQRT ( TKEFLK (NPFLKA) * ( TKEFLK (NPFLKA)
     &                          + TWOTWO * AM (IONID) ) )

Cheers,
Daniele