Re: SOURCE routine in material

From: Stefan Roesler <sroesler@mail.cern.ch>
Date: Sun Apr 06 2008 - 16:55:34 CEST

Hi David

It is almost imposible to read your files. However, I have the impression
that you are trying to simulate a 1keV photon source. Please note that the
lower transport limit in FLUKA for photons is 1keV. This may explain why
it gets killed right away in any material of non-zero density.

If this is not the reason please post your files again, but really as
attachements.

Greetings
Stefan

On Fri, 4 Apr 2008 horvath.david@t-online.hu wrote:

> ) Gecko/20080311 Firefox/2.0.0.13
> MIME-Version: 1.0
> Content-Type: MULTIPART/MIXED; BOUNDARY=3D"0-1804289383-1207313988=3D:39296=
> "
> Sender: owner-fluka-discuss@mi.infn.it
>
> --0-1804289383-1207313988=3D:39296
> Content-Type: TEXT/PLAIN; CHARSET=3DISO-8859-2
>
> Dear Fluka Users,
>
> I would like to make a volume source (for example a cube)
> with source.f. The attached routie works well (I think) when
> it is placed in vacuum, it gives numerical results, and the
> plot of fluences shows a square.
> My problem is when I put this source in material. Fluka runs
> without an error, but the all the numerical result are zeros.
> What should I change to get this work?
>
> Best Regards,
> David HORVATH
> engineering physicist student
> Budapest University of Technology and Economics
> --0-1804289383-1207313988=3D:39296
> Content-Type: APPLICATION/octet-stream; name=3D"source.f"
> Content-Disposition: attachment; filename=3D"source.f"
>
> *$ CREATE SOURCE.FOR
> *COPY SOURCE
> *
> *=3D=3D=3D source =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D*
> *
> SUBROUTINE SOURCE ( NOMORE )
>
> INCLUDE '(DBLPRC)'
> INCLUDE '(DIMPAR)'
> INCLUDE '(IOUNIT)'
> *
> *----------------------------------------------------------------------*
> * *
> * Copyright (C) 1990-2006 by Alfredo Ferrari & Paola Sala *
> * All Rights Reserved. *
> * *
> * *
> * New source for FLUKA9x-FLUKA200x: *
> * *
> * Created on 07 january 1990 by Alfredo Ferrari & Paola Sala *
> * Infn - Milan *
> * *
> * Last change on 03-mar-06 by Alfredo Ferrari *
> * *
> * This is just an example of a possible user written source routine. *
> * note that the beam card still has some meaning - in the scoring the *
> * maximum momentum used in deciding the binning is taken from the *
> * beam momentum. Other beam card parameters are obsolete. *
> * *
> *----------------------------------------------------------------------*
> *
> INCLUDE '(BEAMCM)'
> INCLUDE '(FHEAVY)'
> INCLUDE '(FLKSTK)'
> INCLUDE '(IOIOCM)'
> INCLUDE '(LTCLCM)'
> INCLUDE '(PAPROP)'
> INCLUDE '(SOURCM)'
> INCLUDE '(SUMCOU)'
> *
> LOGICAL LFIRST
> *
> SAVE LFIRST
> DATA LFIRST / .TRUE. /
> *=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D*
> * *
> * BASIC VERSION *
> * *
> *=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D*
> NOMORE =3D 0
> * +-------------------------------------------------------------------*
> * | First call initializations:
> IF ( LFIRST ) THEN
> * | *** The following 3 cards are mandatory ***
> TKESUM =3D ZERZER
> LFIRST =3D .FALSE.
> LUSSRC =3D .TRUE.
> * | *** User initialization ***
> END IF
> * |
> * +-------------------------------------------------------------------*
> * Push one source particle to the stack. Note that you could as well
> * push many but this way we reserve a maximum amount of space in the
> * stack for the secondaries to be generated
> * Npflka is the stack counter: of course any time source is called it
> * must be =3D0
> NPFLKA =3D NPFLKA + 1
> * Wt is the weight of the particle
> WTFLK (NPFLKA) =3D ONEONE
> WEIPRI =3D WEIPRI + WTFLK (NPFLKA)
> * Particle type (1=3Dproton.....). Ijbeam is the type set by the BEAM
> * card
> IONID =3D IJBEAM
> ILOFLK (NPFLKA) =3D IJBEAM
> * From this point .....
> * Particle generation (1 for primaries)
> LOFLK (NPFLKA) =3D 1
> * User dependent flag:
> LOUSE (NPFLKA) =3D 0
> * User dependent spare variables:
> DO 100 ISPR =3D 1, MKBMX1
> SPAREK (ISPR,NPFLKA) =3D ZERZER
> 100 CONTINUE
> * User dependent spare flags:
> DO 200 ISPR =3D 1, MKBMX2
> ISPARK (ISPR,NPFLKA) =3D 0
> 200 CONTINUE
> * Save the track number of the stack particle:
> ISPARK (MKBMX2,NPFLKA) =3D NPFLKA
> NPARMA =3D NPARMA + 1
> NUMPAR (NPFLKA) =3D NPARMA
> NEVENT (NPFLKA) =3D 0
> DFNEAR (NPFLKA) =3D +ZERZER
> * ... to this point: don't change anything
> * Particle age (s)
> AGESTK (NPFLKA) =3D +ZERZER
> AKNSHR (NPFLKA) =3D -TWOTWO
> * Group number for "low" energy neutrons, set to 0 anyway
> IGROUP (NPFLKA) =3D 0
> * Kinetic energy of the particle (GeV)
> TKEFLK (NPFLKA) =3D 1E-6
> * Particle momentum
> PMOFLK (NPFLKA) =3D SQRT ( TKEFLK (NPFLKA) * ( TKEFLK (NPFLKA)
> & + TWOTWO * AM (IONID) ) )
> * Cosines (tx,ty,tz)
> CALL RACO(TXX,TYY,TZZ)
> TXFLK (NPFLKA) =3D TXX
> TYFLK (NPFLKA) =3D TYY
> TZFLK (NPFLKA) =3D TZZ
> * Polarization cosines:
> TXPOL (NPFLKA) =3D -TWOTWO
> TYPOL (NPFLKA) =3D +ZERZER
> TZPOL (NPFLKA) =3D +ZERZER
> * Particle coordinates
> E1 =3D -2
> E2 =3D 2
> XFLK (NPFLKA) =3D E1 + FLRNDM(DUMMY) * (E2 - E1)
> YFLK (NPFLKA) =3D E1 + FLRNDM(DUMMY) * (E2 - E1)
> ZFLK (NPFLKA) =3D E1 + FLRNDM(DUMMY) * (E2 - E1)
> * Calculate the total kinetic energy of the primaries: don't change
> IF ( ILOFLK (NPFLKA) .EQ. -2 .OR. ILOFLK (NPFLKA) .GT. 100000 )
> & THEN
> TKESUM =3D TKESUM + TKEFLK (NPFLKA) * WTFLK (NPFLKA)
> ELSE IF ( ILOFLK (NPFLKA) .NE. 0 ) THEN
> TKESUM =3D TKESUM + ( TKEFLK (NPFLKA) + AMDISC (ILOFLK(NPFLKA)) )
> & * WTFLK (NPFLKA)
> ELSE
> TKESUM =3D TKESUM + TKEFLK (NPFLKA) * WTFLK (NPFLKA)
> END IF
> RADDLY (NPFLKA) =3D ZERZER
> * Here we ask for the region number of the hitting point.
> * NREG (NPFLKA) =3D ...
> * The following line makes the starting region search much more
> * robust if particles are starting very close to a boundary:
> CALL GEOCRS ( TXFLK (NPFLKA), TYFLK (NPFLKA), TZFLK (NPFLKA) )
> CALL GEOREG ( XFLK (NPFLKA), YFLK (NPFLKA), ZFLK (NPFLKA),
> & NRGFLK(NPFLKA), IDISC )
> * Do not change these cards:
> CALL GEOHSM ( NHSPNT (NPFLKA), 1, -11, MLATTC )
> NLATTC (NPFLKA) =3D MLATTC
> CMPATH (NPFLKA) =3D ZERZER
> CALL SOEVSV
> RETURN
> *=3D=3D=3D End of subroutine Source =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D*
> END
>
>
> --0-1804289383-1207313988=3D:39296
> Content-Type: APPLICATION/octet-stream; name=3D"source.inp"
> Content-Disposition: attachment; filename=3D"source.inp"
>
> TITLE
> Source
> GLOBAL 1.0 1.0
> DEFAULTS NEW-D=
> EFA
> BEAM -2D-06 PHOTO=
> N
> SOURCE
> GEOBEGIN COMBN=
> AME
> 0 0 Source
> SPH blkbody 0.0 0.0 0.0 2500.0
> SPH vacuum 0.0 0.0 0.0 20.0
> RPP source -10.0 10.0 -10.0 10.0 -10.0 10.0
> END
> BLKBODY 5 +blkbody -vacuum
> VACUUM 5 +vacuum -source
> SOURCE 5 +source
> END
> GEOEND
> ASSIGNMA BLCKHOLE BLKBODY
> ASSIGNMA VACUUM VACUUM
> ASSIGNMA VACUUM SOURCE
> USRBIN 10.0 ALL-PART -21.0 15.0 15.0 15.0phofl=
> u
> USRBIN -15.0 -15.0 -15.0 60.0 60.0 60.0&
> USRTRACK -1.0 ALL-PART -22.0 SOURCE 50.0photr=
> k
> USRTRACK 1.2D-06 1D-12 &
> RANDOMIZ 1.0
> START 100000.0
> STOP
> =92Fl=18=B5=A5*=D7=E5]=DD=F5=83=0C=84=82=15f1.=96=16X=D2'y=F5=C5R61=A3=05=
> =F3\rT
> =A4=0FO=B6`x=DA=EC=D8x~=C4ga=BF=CC
> --0-1804289383-1207313988=3D:39296--
>
>

-- 
___________________________________
Stefan Roesler
CERN, SC/RP
CH-1211 Geneva 23
Switzerland
Phone:  +41-22-7679891
Fax:    +41-22-7669639
E-mail: Stefan.Roesler@cern.ch
Received on Sun Apr 6 17:12:14 2008

This archive was generated by hypermail 2.1.8 : Sun Apr 06 2008 - 17:12:14 CEST