Re: problem with USRBIN & USRBDX results

From: Florian (florian.sommerer@cern.ch)
Date: Fri Jan 26 2007 - 14:50:20 CET

  • Next message: Lindley Winslow: "Re: Understanding RESNUC scoring"

    Dear Hamide Jalali!

    In your source.f you set the beam position for the first particle to the
    defaults i.e. (0.,0.,0.) and for the remaining particles to
           XBEAM = 4.D05
           YBEAM = 4.D05
           ZBEAM = 4.D05

    Then you set the direction cosines to:

    (UBEAM, VBEAM, WBEAM)= (0., 0. , 1.)

    With this settings you may hit the volume defined by your USRBIN with
    the first particle but never with the others and therefor the output
    contains only zeros.

    For testing it may be easier if you choose a binning with the same
    symmetry than the geometry (spherical symmetry) instead of a R-PHI-Z
    binning like you do.

    Best regards, Florian

    PS: You are still missing a HI-PROPE in the input file (as Alberto Fasso
    already mentioned in his last mail).

    hamide jalali wrote:
    > Dear FLUKA users
    >
    > I would like to score energy deposition and star in the Al shell form a
    > carbon source with distribution of energy (10Mev-100Gev).I've used a
    > source.f to define my source.All results from USRBIN and URSBDX output
    > are zero and also total number and weight of star get zero.
    > I don't know what the problem is. I corrected my source.f according to
    > Fasso's recommendations but nothing changed.
    > I give these commands to run my input:
    > $FLUPRO/flutil/fff source.f
    > $FLUPRO/flutil/ldpm3qmd -o myfluka -m fluka source.o
    > $FLUPRO/flutil/rfluka -e myfluka -N0 -M1 carbon &
    > carbon is my input.
    > my source.f and input are in attachment.
    >
    > Any help would be appreciated.
    >
    > Best regards
    > Hamide
    >
    >
    > ------------------------------------------------------------------------
    >
    > *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
    > TITLE
    > Dose and shielding calculation of spacecraft in cosmic ray
    > *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
    > BEAM -120.E+00 1.E4 HEAVYION
    > SOURCE
    > *
    > GEOBEGIN COMBINAT
    > A spherical sell AL target inside vacuum
    > *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+...
    > SPH 1 0.0 0.0 0.0 1.E6
    > SPH 2 0.0 0.0 0.0 8.E5
    > SPH 3 0.0 0.0 0.0 1.E3
    > SPH 4 0.0 0.0 4.0 980.0
    > END
    > * black hole
    > BH1 5 +1 -2
    > * vacuum around
    > VA2 5 +2 -3
    > * Al target(Shell)
    > AL3 5 +3 -4
    > * Al target(inside of shell)
    > AL4 5 +4
    > END
    > GEOEND
    > *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
    > MATERIAL 13.0 26.981 2.699 10.0 ALUMINUM
    > *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
    > * Al target, Shell
    > ASSIGNMAT 10.0 3.0
    > * Inside of shell
    > ASSIGNMAT 2.0 4.0
    > * External Black Hole
    > ASSIGNMAT 1.0 1.0
    > * Vacuum
    > ASSIGNMAT 2.0 2.0
    > *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
    > * score in each region energy deposition by primaries
    > SCORE 208.0 210.0
    > *
    > USRBDX 99.0 201.0 -47.0 3 4 1.256E7 FluenUD
    > USRBDX 100.0 +50.0 10.0 &
    > * R-PHI-Z binning of the fluence inside and around the target
    > USRBIN 17.0 208.0 -48.0 1000.0 577.0 Edeposit
    > USRBIN 980.0 565.0 40.0 10.0 80.0 &
    > *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
    > RANDOMIZE 1.0
    > *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
    > START 100000.0
    > STOP
    >
    >
    > ------------------------------------------------------------------------
    >
    > *$ CREATE SOURCE.FOR
    > *COPY SOURCE
    > *
    > *=== source ===========================================================*
    > *
    > 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. *
    > * *
    > *----------------------------------------------------------------------*
    > * Version for isotropic Heavy ion source
    > *
    > DIMENSION CUMENE(0:13), ENELOW(13), ENEUP(13)
    > *----------------------------------------------------------------------*
    > INCLUDE '(BEAMCM)'
    > INCLUDE '(FHEAVY)'
    > INCLUDE '(FLKSTK)'
    > INCLUDE '(IOIOCM)'
    > INCLUDE '(LTCLCM)'
    > INCLUDE '(PAPROP)'
    > INCLUDE '(SOURCM)'
    > INCLUDE '(SUMCOU)'
    > *
    > LOGICAL LFIRST
    > *
    > SAVE LFIRST
    > DATA LFIRST / .TRUE. /
    > *======================================================================*
    > * *
    > * BASIC VERSION *
    > * *
    > *======================================================================*
    > * Heavy ion energy group
    > DATA ENELOW /
    > & 0.10162D-02, 0.11349D-02, 0.44499D-02, 0.96386D-02, 0.31153D-01,
    > & 0.10069D+00, 0.30375D+00, 0.98177D+00, 0.31732D+01, 0.95724D+01,
    > & 0.30939D+02, 0.70819D+02, 0.98629D+03/
    > DATA ENEUP /
    > & 0.10304D-02, 0.11506D-02, 0.45118D-02, 0.97726D-02, 0.31586D-01,
    > & 0.10209D+00, 0.30797D+00, 0.99541D+00, 0.32137D+01, 0.97054D+01,
    > & 0.33610D+02, 0.71803D+02, 0.10000D+03/
    > * Normalized spectrum
    > DATA CUMENE / 0.D0,
    > & 0.14766D-02, 0.35102D-02, 0.23169D-01, 0.26918D-01, 0.35186D-01,
    > & 0.78632D-01, 0.25713D+00, 0.57673D+00, 0.86827D+00, 0.97527D+00,
    > & 0.99680D+00, 0.99952D+00, 0.10000D+01/
    > * +-------------------------------------------------------------------*
    > NOMORE = 0
    > * +-------------------------------------------------------------------*
    > * | First call initializations:
    > IF ( LFIRST ) THEN
    > * | *** The following 3 cards are mandatory ***
    > TKESUM = ZERZER
    > LFIRST = .FALSE.
    > LUSSRC = .TRUE.
    > * | *** User initialization ***
    > write(lunout,*)
    > write(lunout,*) '--->modified source.f for Carbon heavy ion'
    > 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 =0
    > * NPFLKA = NPFLKA + 1
    > * Wt is the weight of the particle
    > * WTFLK (NPFLKA) = ONEONE
    > * WEIPRI = WEIPRI + WTFLK (NPFLKA)
    > * Particle type (1=proton.....). Ijbeam is the type set by the BEAM
    > * card
    > * +-------------------------------------------------------------------*
    > * Sample the energy group
    > XI = FLRNDM(DUMMY)
    > DO 500 K = 1 ,13
    > IF (XI .LE. CUMENE(K)) THEN
    > ENERGY = (ENEUP(K) - ENELOW(K))/2
    > GO TO 600
    > END IF
    > 500 CONTINUE
    > STOP ' Failed to sample the energy group '
    > 600 CONTINUE
    > count=count+1
    > NPFLKA = NPFLKA + 1
    > WTFLK (NPFLKA) = ONEONE
    > WEIPRI = WEIPRI + WTFLK (NPFLKA)
    > * +--------------------------------------------------------------------*
    > * | (Radioactive) isotope:
    > IF ( IJBEAM .EQ. -2 .AND. LRDBEA ) THEN
    > IARES = IPROA
    > IZRES = IPROZ
    > IISRES = IPROM
    > CALL STISBM ( IARES, IZRES, IISRES )
    > IJHION = IPROZ * 1000 + IPROA
    > IJHION = IJHION * 100 + KXHEAV
    > IONID = IJHION
    > CALL DCDION ( IONID )
    > CALL SETION ( IONID )
    > * |
    > * +-------------------------------------------------------------------*
    > * | Heavy ion:
    > ELSE IF ( IJBEAM .EQ. -2 ) THEN
    > IJHION = IPROZ * 1000 + IPROA
    > IJHION = IJHION * 100 + KXHEAV
    > IONID = IJHION
    > CALL DCDION ( IONID )
    > CALL SETION ( IONID )
    > ILOFLK (NPFLKA) = IJHION
    > * | Flag this is prompt radiation
    > LRADDC (NPFLKA) = .FALSE.
    > * |
    > * +-------------------------------------------------------------------*
    > * | Normal hadron:
    > ELSE
    > IONID = IJBEAM
    > ILOFLK (NPFLKA) = IJBEAM
    > * | Flag this is prompt radiation
    > * LRADDC (NPFLKA) = .FALSE.
    > END IF
    > * |
    > * +-------------------------------------------------------------------*
    > * From this point .....
    > * Particle generation (1 for primaries)
    > LOFLK (NPFLKA) = 1
    > * User dependent flag:
    > LOUSE (NPFLKA) = 0
    > * User dependent spare variables:
    > DO 100 ISPR = 1, MKBMX1
    > SPAREK (ISPR,NPFLKA) = ZERZER
    > 100 CONTINUE
    > * User dependent spare flags:
    > DO 200 ISPR = 1, MKBMX2
    > ISPARK (ISPR,NPFLKA) = 0
    > 200 CONTINUE
    > * Save the track number of the stack particle:
    > ISPARK (MKBMX2,NPFLKA) = NPFLKA
    > NPARMA = NPARMA + 1
    > NUMPAR (NPFLKA) = NPARMA
    > NEVENT (NPFLKA) = 0
    > DFNEAR (NPFLKA) = +ZERZER
    > * ... to this point: don't change anything
    > * Particle age (s)
    > AGESTK (NPFLKA) = +ZERZER
    > AKNSHR (NPFLKA) = -TWOTWO
    > * Group number for "low" energy neutrons, set to 0 anyway
    > IGROUP (NPFLKA) = 0
    > * Kinetic energy of the particle (GeV)
    > TKEFLK (NPFLKA) = ENERGY
    > * TKEFLK (NPFLKA) = SQRT ( PBEAM**2 + AM (IONID)**2 ) - AM (IONID)
    > * Particle momentum
    > * PMOFLK (NPFLKA) = PBEAM
    > PMOFLK (NPFLKA) = SQRT ( TKEFLK (NPFLKA) * ( TKEFLK (NPFLKA)
    > * + TWOTWO * AM (IONID) ) )
    > * +------------------------------------------------------------------------*
    > * Isotropic angular distribution has been cosidered by BEAM card
    > * Cosines (tx,ty,tz)
    > TXFLK (NPFLKA) = UBEAM
    > TYFLK (NPFLKA) = VBEAM
    > TZFLK (NPFLKA) = WBEAM
    > * TZFLK (NPFLKA) = SQRT ( ONEONE - TXFLK (NPFLKA)**2
    > * & - TYFLK (NPFLKA)**2 )
    > * Polarization cosines:
    > TXPOL (NPFLKA) = -TWOTWO
    > TYPOL (NPFLKA) = +ZERZER
    > TZPOL (NPFLKA) = +ZERZER
    > * Particle coordinates
    > XFLK (NPFLKA) = XBEAM
    > YFLK (NPFLKA) = YBEAM
    > ZFLK (NPFLKA) = ZBEAM
    > XBEAM = 4.D05
    > YBEAM = 4.D05
    > ZBEAM = 4.D05
    > * Calculate the total kinetic energy of the primaries: don't change
    > IF ( ILOFLK (NPFLKA) .EQ. -2 .OR. ILOFLK (NPFLKA) .GT. 100000 )
    > & THEN
    > TKESUM = TKESUM + TKEFLK (NPFLKA) * WTFLK (NPFLKA)
    > ELSE IF ( ILOFLK (NPFLKA) .NE. 0 ) THEN
    > TKESUM = TKESUM + ( TKEFLK (NPFLKA) + AMDISC (ILOFLK(NPFLKA)) )
    > & * WTFLK (NPFLKA)
    > ELSE
    > TKESUM = TKESUM + TKEFLK (NPFLKA) * WTFLK (NPFLKA)
    > END IF
    > RADDLY (NPFLKA) = ZERZER
    > * Here we ask for the region number of the hitting point.
    > * NREG (NPFLKA) = ...
    > * 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) = MLATTC
    > CMPATH (NPFLKA) = ZERZER
    > CALL SOEVSV
    > RETURN
    > *=== End of subroutine Source =========================================*
    > END
    >

    -- 
    ###########################################
    Florian Sommerer
    European Organization for Nuclear Research
    CERN DSU/TT
    Mailbox Z08700
    Geneve 23
    CH-1211 Switzerland
    Tel : +41 2276 75582
    ###########################################
    

  • Next message: Lindley Winslow: "Re: Understanding RESNUC scoring"

    This archive was generated by hypermail 2.1.6 : Fri Jan 26 2007 - 14:58:10 CET