Re: [fluka-discuss]: Need guidance about source.f

From: Mikhail Polkovnikov <pmk_at_ihep.ru>
Date: Thu, 3 Dec 2015 12:57:25 +0300

On 03.12.2015 05:25, 2013200577 wrote:
> Hi,everyone! I want to define a source that has a approximately
> gaussian-distributed energy spectrum,so I use the source.f file. But
> when I compiled ,linked and ran it ,there was some trouble---FLUKA
> broke down and stopped working.Who can help me check the source.f
> ?Thank you very much.
> The below part is what I inserted in the source.f.
> * The following is modified by cxl on 2015.4.23
> /* Sample directly from a Gaussian distribution(manual p355)/
> / CALL FLNRRN (RGAUSS)/
> /* Pass WHAT(1) Of SOURCE to ESIGMA and pass WHAT(2) of SOURCE to ECENTR/
> / ESIGMA=WHASOU(1)/
> / ECENTR=WHASOU(2)/
> / ENSAMP=RGAUSS*ESIGMA+ECENTR/
> /* Kinetic energy of the particle (GeV) (manual p358)./
> / TKEFLK (NPFLKA) = ENSAMP/
> /* Particle momentum/
> /* PMOFLK (NPFLKA) = SQRT (ENSAMP * (ENSAMP + TWOTWO * AM(IJBEAM)))/
1. What are the units of ESIGMA (GeV, MeV,keV,eV)? There is a huge
possibility, that you will get negative value for kinetic energy.

2. Error during initiation (3 mandatory cards), it must be:

       LOGICAL LFIRST
*
       SAVE LFIRST, ESIGMA, ECENTR
       DATA LFIRST / .TRUE. /

       IF ( LFIRST ) THEN
* | *** The following 3 cards are mandatory ***
          TKESUM = ZERZER
          LFIRST = .FALSE.
          LUSSRC = .TRUE.
          ESIGMA = WHASOU(1)
          ECENTR = WHASOU(2)
          WRITE( LUNOUT, *) 'Version cxl of Routine source called'
* | *** User initialization ***
       END IF

3. You commented the particle momentum calculation



__________________________________________________________________________
You can manage unsubscription from this mailing list at https://www.fluka.org/fluka.php?id=acc_info
Received on Thu Dec 03 2015 - 12:34:28 CET

This archive was generated by hypermail 2.3.0 : Thu Dec 03 2015 - 12:34:33 CET