RE: [fluka-discuss]: ask question(B

From: Stefan Roesler(B <Stefan.Roesler_at_cern.ch>
Date: Wed, 9 Nov 2016 17:14:49 +0000

Dear Xuchao

Yes, the format of the write statement in your mgdraw file creates binary output. Of course, you can change it to ASCII if you want to be able to inspect values with an editor.

Beside this, however, I am afraid that you miss the direction cosines of the particles (what did you define in your source routine?)

Safer and easier than mgdraw is printing this information with the fluscw.f user routine that is called, for example, at boundary crossings, if a boundary crossing estimator is defined and the call of fluscw is activated with a USERWEIG card.

Cheers
Stefan



From: owner-fluka-discuss_at_mi.infn.it [mailto:owner-fluka-discuss_at_mi.infn.it] On Behalf Of XU Chao
Sent: 08 November 2016 09:41
To: fluka-discuss_at_fluka.org
Subject: [fluka-discuss]: ask question

Dear Fluka experts,

I want to split the transport problem into two or more sequential phases.
Frist,I want to use USERDUMP to record all particles crossing a given boundary,so I write the
mgdraw.f like this:

      ENTRY BXDRAW ( ICODE, MREG, NEWREG, XSCO, YSCO, ZSCO )
      CALL GEOR2N(MREG,MRGNAM,IERR1)
      CALL GEOR2N(NEWREG,NRGNAM,IERR2)
      IF(IERR1 .NE. 0 .OR. IERR2 .NE. 0) STOP "Error in name conversion"
      IF(MRGNAM .EQ. "TO" .AND. NRGNAM .EQ. "TW") THEN
         IF ( .NOT. LFCOPE ) THEN
            LFCOPE = .TRUE.
            IF ( KOMPUT .EQ. 2 ) THEN
               FILNAM = '/'//CFDRAW(1:8)//' DUMP A'
            ELSE
               FILNAM = CFDRAW
            END IF
            OPEN ( UNIT = 66, FILE = FILNAM, STATUS = 'NEW', FORM =
     & 'UNFORMATTED' )
         END IF
         IF (ICODE .EQ. 29) THEN
            WRITE (66) 0, ICODE, JTRACK, SNGL (ETRACK), SNGL (WTRACK)
         WRITE (66) SNGL (XSCO), SNGL (YSCO), SNGL (ZSCO)
         END IF
      END IF

and I use USERDUMP in the inp file like this$B!'(B

USERDUMP 200 49.0 0.0 TRAKFILE

I can get the TRAKFILE,but it's a binary file,I don't know whether it true or not.
When I meet this, I think I have two chooses:

1$B!"(BI should read the binary file at next phase
2$B!"(BI should change a way to write a file which is not a binary file

I choose the first one,and I write the source.f like this:

Open(60,File='TRACKFILE',Access='Direct',Form='Unformatted')
READ(60,*) IPART,ICODE,JTRACK,ETRACK,WTRACK,XSCO,YSCO,ZSCO

The source.f is ok, but it can't run ,It always keep running like this:

======================= Running FLUKA for cycle # 1 =======================

I don't know how to deal with it

If I choose the second one,how should I do?

Please help me! Thanks!


Thanks in advance

xuchao

University Chinese Academy of Sciences





__________________________________________________________________________
You can manage unsubscription from this mailing list at https://www.fluka.org/fluka.php?id=acc_info
Received on Wed Nov 09 2016 - 20:10:20 CET

This archive was generated by hypermail 2.3.0 : Wed Nov 09 2016 - 20:10:29 CET