RE: [fluka-discuss]: Removing particles across two regions

From: Anton Lechner <Anton.Lechner_at_cern.ch>
Date: Wed, 23 Apr 2014 08:06:52 +0000

Dear Victor,

One possibility is to set the weight of particles to zero if a particle enters from region A to B. This can be done in the USRMED user routine. In this routine you have the region numbers of the previous region (MREG) and of the new region (NEWREG) available, and you can set
WEE = ZERZER
if MREG and NEWREG correspond to your regions A and B.

To make the routine more flexible, you could automatically retrieve the region number corresponding to a certain region name in the initialization of the routine (see also the manual for more details):

CHARACTER*8 REGNAM
LOGICAL LFIRST
SAVE LFIRST
DATA LFIRST / .TRUE. /

IF ( LFIRST )
    REGNAM = 'MyRegA'
    CALL GEON2R ( REGNAM, MYREGA, IERR )
    REGNAM = 'MyRegB'
    CALL GEON2R ( REGNAM, MYREGB, IERR )
    LFIRST = .FALSE.
END IF

Now you can use MYREGA and MYREGB to match against MREG and NEWREG.

Don 't forget to activate the calls to USRMED by MAT-PROP with SDUM = USERDIRE (for the materials concerned).

If the solution with the USRMED routine is not what you are aiming for, another possibility could be to simply set region B to BLCKHOLE (in this case all particles will be terminated when entering region B).

Cheers, Anton



________________________________
From: owner-fluka-discuss_at_mi.infn.it [owner-fluka-discuss_at_mi.infn.it] on behalf of Victor Cheung [victorcw_at_hku.hk]
Sent: 23 April 2014 09:06
To: fluka-discuss_at_fluka.org
Subject: [fluka-discuss]: Removing particles across two regions

Dear Fluka experts,

I would like to remove all the particles entering region B from region A. How to do that?

Thanks,
Victor
Received on Wed Apr 23 2014 - 11:12:34 CEST

This archive was generated by hypermail 2.3.0 : Wed Apr 23 2014 - 11:12:35 CEST