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

From: Stefan Roesler <Stefan.Roesler_at_cern.ch>
Date: Fri, 11 Nov 2016 21:34:43 +0000

Dear Xuchao

As a general recommendation, perhaps always check that the values stored in the first step are indeed correctly read in the second step. For example, produce formatted output for debugging your simulation that you can always inspect with an editor. Once you are convinced that everything is correct you can always go back to binary format. It’s hard to give more detailed advice unless you post your input an user-routines.

Regarding fluscw, I suggest to use a USRBDX boundary crossing estimator. Moreover, it requires some programming inside fluscw (it’s not a standard use of it), including opening of output unit and writing particle information into it (similar to what you see in mgdraw).

In case you post your input files please also add a short explanation why you need a two-step calculation. Maybe there is a solution to avoid it.

Cheers
Stefan

From: XU Chao [mailto:xuchao_at_ihep.ac.cn]
Sent: 11 November 2016 02:48
To: Stefan Roesler <Stefan.Roesler_at_cern.ch>
Subject: Re: RE: [fluka-discuss]: ask question

Dear Roesler,

       I found I miss the direction cosines of the particles , So I changed my mgdraw.f like this:

         WRITE (66) 0, ICODE, JTRACK, SNGL (ETRACK), SNGL (WTRACK)
         WRITE (66) SNGL(XSCO),SNGL(YSCO),SNGL(ZSCO)
         WRITE (66) SNGL(TXFLK(I)),SNGL(TYFLK(I)),SNGL(TZFLK(I)) --------the direction cosines of the particles

      and the source.f like this:

[cid:image001.jpg_at_01D23C6A.B6005240]

      but It always keep running like this,don't move:
     ======================= Running FLUKA for cycle # 1 =======================


                Beside this, I try to use flusw.f but also meet a problem :

               I change the flusw.f only like this :

            ISCRNG = 5

    and my inp file like this :

      USRYIELD 109.0 3.0 50.0 TO TW 1.0ETRAK
     USRYIELD 5.0 0.000001 100.0 3.14159265 0.0 3.0 &
     USERWEIG 0.0 0.0 4 0 0.0 0.0

    I can get the se001_fort.50 file ,but when I use usysuw.f to read the se001_fort.50 ,it meet a problem like this:

    At line 407 of file usysuw.f (unit = 1, file = 'se001_fort.50')
    Fortran runtime error: End of file

    Is the usysuw.f version problem ? or the unit problem ?

    Please help me!



    Thanks in advance

    xuchao

 University Chinese Academy of Sciences


-----原始邮件-----
发件人: "Stefan Roesler" <Stefan.Roesler_at_cern.ch<mailto:Stefan.Roesler_at_cern.ch>>
发送时间: 2016年11月10日 星期四
收件人: "XU Chao" <xuchao_at_ihep.ac.cn<mailto:xuchao_at_ihep.ac.cn>>, "fluka-discuss_at_fluka.org<mailto:fluka-discuss_at_fluka.org>" <fluka-discuss_at_fluka.org<mailto:fluka-discuss_at_fluka.org>>
抄送:
主题: RE: [fluka-discuss]: ask question
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> [mailto: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<mailto: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:

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、I should read the binary file at next phase
2、I 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

image001.jpg
(image/jpeg attachment: image001.jpg)

Received on Sat Nov 12 2016 - 00:17:20 CET

This archive was generated by hypermail 2.3.0 : Sat Nov 12 2016 - 00:17:25 CET