Dear Sanjay,
your problem is in the way you sample the direction cosines in the source file. Due to numerical
precision errors (with a PHI very small close to 1e-9) you end up with a SQRT() of a negative number
on the TYFLK() calculation
Your code is:
TZFLK (NPFLKA) = COSTHE
TXFLK (NPFLKA) = SINTHE * COSPHI
TYFLK (NPFLKA) = SQRT( ONEONE - TXFLK (NPFLKA)**2
& - TZFLK (NPFLKA)**2 )
IF (FLRNDM(COSPHI) .LE. HLFHLF) TYFLK (NPFLKA)= -TYFLK (NPFLKA)
By changing it to:
* Cosines (tx,ty,tz)
TXFLK (NPFLKA) = SINTHE * COS(PHI)
TYFLK (NPFLKA) = SINTHE * SIN(PHI)
TZFLK (NPFLKA) = COSTHE
TLEN = SQRT(TXFLK(NPFLKA)**2+TYFLK(NPFLKA)**2+TZFLK(NPFLKA)**2)
TXFLK (NPFLKA) = TXFLK(NPFLKA)/TLEN
TYFLK (NPFLKA) = TYFLK(NPFLKA)/TLEN
TZFLK (NPFLKA) = TZFLK(NPFLKA)/TLEN
Everything works ok.
BTW. Using DEFAULTS NEUTRONS is very dangerous. It makes the transport only of LOW energy neutrons
and nothing else. Please use PRECISION.
Vasilis
________________________________
From: sanjay andola [andolas.007_at_gmail.com]
Sent: 12 June 2014 13:40
To: Vasilis Vlachoudis
Cc: fluka-discuss_at_fluka.org
Subject: Re: [fluka-discuss]: Fwd: Source subroutine of Pu-Be
Here Is the input file. please find the attachment.
On Thu, Jun 12, 2014 at 3:22 PM, Vasilis Vlachoudis <Vasilis.Vlachoudis_at_cern.ch<mailto:Vasilis.Vlachoudis_at_cern.ch>> wrote:
Hi Sanjay,
could you send us also the input file
Vasilis
________________________________
From: owner-fluka-discuss_at_mi.infn.it<mailto:owner-fluka-discuss_at_mi.infn.it> [owner-fluka-discuss_at_mi.infn.it<mailto:owner-fluka-discuss_at_mi.infn.it>] on behalf of sanjay andola [andolas.007_at_gmail.com<mailto:andolas.007_at_gmail.com>]
Sent: 12 June 2014 10:45
To: fluka-discuss_at_fluka.org<mailto:fluka-discuss_at_fluka.org>
Subject: [fluka-discuss]: Fwd: Source subroutine of Pu-Be
Dear Fluka Experts
I have encounter in a problem in simulating a detector in which i have used Pu-Be as a source. while i m using mono energetic neutron source it works fine.
With Pu-Be source I m using 5E+07 number of histories with 5 cycles. it is stopping after 2 cycle and showing "Finished with errors". when i use 1E+07 number of histories it is stopping at 11th cycle. In output file there is no error massage.
please guide me regarding this problem. here I m attaching the source subroutine.
Thank & Regards
Sanjay C Andola
Scientific Officer C
Applied Physics Division
BARC Trombay
Mumbai 400085
--
Thank & Regards
Sanjay C Andola
Scientific Officer C
Applied Physics Division
BARC Trombay
Mumbai 400085
Received on Fri Jun 13 2014 - 15:35:50 CEST