[fluka-discuss]: Fortran matrix for dose equivalent

From: Karolina Kokurewicz <karolina.kokurewicz_at_strath.ac.uk>
Date: Mon, 21 Mar 2016 19:01:23 +0000

Dear FLUKA experts,

I have couple of simulations to analyse. The number is not such that I wouldn't do this by opening input file one by one and generating 1D plot from USRBIN, however I would like to learn how to operate fluka entirely in batch mode for the future reasons. After running my simulations I extracted binary files .bnn from the folders and I converted all of them to .txt files so the content looks like:

1
   Cartesian binning n. 1 "EleD-EQ " , generalized particle n. 240
      X coordinate: from -2.5000E+01 to 2.5000E+01 cm, 101 bins ( 4.9505E-01 cm wide)
      Y coordinate: from -2.5000E+01 to 2.5000E+01 cm, 101 bins ( 4.9505E-01 cm wide)
      Z coordinate: from 0.0000E+00 to 5.0000E+01 cm, 201 bins ( 2.4876E-01 cm wide)
      Data follow in a matrix A(ix,iy,iz), format (1(5x,1p,10(1x,e11.4)))

      accurate deposition along the tracks requested
      this is a track-length binning
       0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00
       0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00
       0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00
       0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 8.1026E-03 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00
       0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00
       0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00
       0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00
       0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00

This can be done manually in Files in data by left-click on .bnn. In the next step I wrote fortran script to loop over the table and generate column with equivalent dose (it was scored in USRBIN). The number of bins are given in the copied fragment and this is the code (according to the http://www.fluka.org/web_archive/earchive/new-fluka-discuss/1939.html#options2):

        OPEN(UNIT=10, STATUS='old',FILE=namein)
        OPEN(UNIT=11, STATUS='new',FILE=nameout)

        READ(10, *) (((A(i,j,k), k=1,201), j=1,101), i=1,101)

        DO k = 1, 201
            DO j = 1, 101
                DO i= 1, 101

                    IF(A(i,j,k).GT.0.0) WRITE(11,*) i, j, k, A(i,j,k)

                END DO
            END DO
        END DO

And what I'm getting in the fourth column (just fragment):

8.34E-019
2.37E-018
1.83E-017
1.27E-002
7.44E-003
3.63E-018
2.86E-017
1.81E-017
2.32E-003
1.10E-018
2.27E-017
1.06E-017
3.76E-018
7.83E-003
1.56E-018
3.66E-003
7.78E-019
2.01E-017
2.32E-018
6.73E-018
8.52E-019
3.97E-018
2.01E-018
5.34E-003
9.60E-019
1.62E-003
4.56E-003
1.01E-017
6.92E-019
4.80E-017
3.13E-018
6.38E-018
2.81E-018
2.14E-018
1.98E-018
2.24E-018
9.75E-018
3.54E-018
1.58E-017
2.40E-017
3.59E-018
1.40E-018
8.61E-019
1.83E-018
3.27E-017
2.05E-019
5.40E-018
2.06E-019
7.80E-018
6.24E-018
5.49E-017
4.10E-017
9.04E-019
5.90E-019
2.13E-018
1.62E-002
6.89E-003
9.32E-017
4.39E-018
2.78E-017
2.40E-017
3.78E-018
3.74E-018
2.14E-018
3.01E-017
2.72E-018
3.08E-017
3.99E-018
8.77E-018
1.04E-017
4.60E-018
2.10E-002
5.61E-017
1.70E-002
8.41E-019
7.00E-018
1.28E-018
1.85E-017
3.80E-018
9.76E-003
7.34E-019
4.81E-018
1.42E-007
1.17E-017
2.07E-019
2.26E-017
1.16E-018
4.36E-018
1.23E-017
2.19E-019
7.56E-018
9.21E-019
2.21E-019
3.36E-018
1.05E-017
6.48E-017
4.81E-017
7.79E-018
5.69E-003
1.52E-017
9.60E-018
1.37E-002
2.22E-017
3.00E-017
5.43E-018
1.80E-017
4.16E-018
4.24E-018
3.98E-018
3.81E-018
1.59E-002
3.27E-003
1.31E-003
3.73E-018
4.46E-018
1.53E-002
1.69E-003
8.08E-018
8.88E-019
9.10E-017
7.66E-019
4.99E-002
2.47E-017
2.96E-018
3.49E-017
7.76E-018
4.28E-017
7.01E-003
8.17E-017
3.66E-018
1.70E-017
2.05E-019
2.39E-018

Here is the third column from the 1D plot:

0.12676546
0.127972528
0.129010543
0.129881963
0.130667076
0.131306946
0.131938085
0.132654533
0.133284166
0.133839637
0.134438097
0.134989828
0.135590494
0.135968372
0.136382535
0.136925682
0.137268871
0.137622103
0.138070822
0.138534442
0.138748914
0.139019176
0.139315933
0.139572695
0.139960319
0.140300468
0.140711486
0.140949801
0.141187802
0.141404778

I would like to ask what are the values I'm generating and how can I recalculate them to get the same what Fluka generates through 1D plot in _plot.dat file along with the position on z axis?

Regards,
Karolina







__________________________________________________________________________
You can manage unsubscription from this mailing list at https://www.fluka.org/fluka.php?id¬c_info
Received on Mon Mar 21 2016 - 21:39:21 CET

This archive was generated by hypermail 2.3.0 : Mon Mar 21 2016 - 21:39:31 CET