RE: [fluka-discuss]: Re: Fluka custom source

From: Thomas Grandsaert <Thomas.Grandsaert_at_esss.se>
Date: Mon, 23 Jul 2018 13:34:51 +0000

Thank you Mikhail,

You were correct, the normalization of the cosines was causing problems!

I got my MB 1st WS.dat file to perform correctly (see plots), however, another data file with a different energy range (MEBT BUNCHER STUDY.dat) causes a floating point exception, and this I need help with.

I am sure that the problem is indeed the energy range. For a number like 0.231 (Gev), it works fine, 0.231e-3, 0.231e-2, 0.231e-1 will throw a floating point exception, and 2.31e-4 or lower actually works. Any ideas would be very helpful. (I am running latest fluka version on flupix)
Thanks again in advance.

Cheers,
T

[cid:image001.png_at_01D4227F.308CC5B0]
[cid:image002.png_at_01D4227F.308CC5B0]


From: Mikhail Polkovnikov <Михаил Полковников> <pmk_at_ihep.ru>
Sent: den 10 juli 2018 16:01
To: Thomas Grandsaert <Thomas.Grandsaert_at_esss.se>; fluka-discuss_at_fluka.org
Subject: Re: [fluka-discuss]: Re: Fluka custom source

On 10.07.2018 02:11, Thomas Grandsaert wrote:
I have managed to progress on this problem, despite my limited fortran knowledge…

I believe that the routine is now reading my dat file, however the the program aborts, and looking at units in the output file show very large and confusing position vectors. (E+30)

0 !!! Exit being called from Flklfx !!!
    **** KLOOP : 203 ****
 Ir= -1 Xb=-4.18552924768640E+31-5.50381630413239E+31-6.23871370810403E+31

            Wb= 4.18591057360087E+30 5.50431773361980E+30 6.23928209099399E+30 Dist= 1.00000000000000E+01

 Particle discarded because inside no known region.


According to my dat file the units are very much different.

1
0.452 0.333
-1 0.231
1.0 1.0
1
1
0.211 0.168
-1 0.231
1.0 1.0
1
1
0.742 -0.0918
-1 0.231
1.0 1.0
1
1
-0.0376 0.149
-1 0.231
1.0 1.0
1

Again, any help on this problem would be appreciated!

Thank you,
T




On 04 Jul 2018, at 21:20, Thomas Grandsaert <Thomas.Grandsaert_at_esss.se<mailto:Thomas.Grandsaert_at_esss.se>> wrote:

Thank you Joachim,

I was able to follow your steps. The scripts compile and run the input file, however the fluka run is aborted with the following error:


1NUMBER OF BEAM NUMBER OF BEAM APPROXIMATE NUMBER AVERAGE TIME USED TIME LEFT (RESERVED NUMBER OF STARS
 PARTICLES HANDLED PARTICLES LEFT OF BEAM PARTICLES BY A BEAM PARTICLE 10000.0 SECONDS CREATED
                                            THAT CAN STILL BE FOR PRINTOUT)
                                            HANDLED

 NEXT SEEDS: 0 0 0 0 0 0 3955 3039 0 0


I spent some time refining the source.f file, with respect to input I found in other threads, but to no avail.

My guess is that my dat file is somehow formatted incorrectly? Again the input file compiles and runs on its own.

Thanks in advance for any input!

Cheers,
T

On 04 Jul 2018, at 15:33, Joachim Vollaire <joachim.vollaire_at_cern.ch<mailto:joachim.vollaire_at_cern.ch>> wrote:

Hi
To use a user routine and create your own executable the following commands from a terminal should work (FLAIR is an alternative):

$FLUPRO/flutil/fff source.f
Which will create an object file

Create a new executable with a name relevant for you


$FLUPRO/flutil/lfluka -m fluka -o YOURFLUKA source.o

Run FLUKA with the executable you created (the path to the data file in your source routine should be coherent with the location from where you are running the code)

$FLUPRO/flutil/rfluka –e YOURFLUKA –M1 scint.par.inp

Greetings
Joachim

From: owner-fluka-discuss_at_mi.infn.it<mailto:owner-fluka-discuss_at_mi.infn.it> <owner-fluka-discuss_at_mi.infn.it<mailto:owner-fluka-discuss_at_mi.infn.it>> On Behalf Of Thomas Grandsaert
Sent: 04 July 2018 14:36
To: fluka-discuss_at_fluka.org<mailto:fluka-discuss_at_fluka.org>
Subject: [fluka-discuss]: Fluka custom source

Dear fluka experts,

I am attempting to use the following source.f subroutine as well as attached particle data file to use as a custom source for the attached input file. (I have added a source card to the input file)

The command I used:
$FLUPRO/flutil/rfluka –e source.f –M1 scint.par.inp

When running the input file it compiles and runs, but when using the subroutine, the simulation starts then ends very quickly, produces no output files, and leading me to believe that something is wrong with my source.f subroutine.

If someone could take a look when you have a chance that would be very much appreciated.

Cheers,
T

<customS.inp><particles_new.dat><source.f>


Dear Thomas,

It doesn't work because of cosines normalization! Variables UU and VV both have the same value in your input file (1.0). That is invalid in case of direction of the particle.



Best regards,

Mikhail





__________________________________________________________________________
You can manage unsubscription from this mailing list at https://www.fluka.org/fluka.php?id=acc_info

image001.png
(image/png attachment: image001.png)

image002.png
(image/png attachment: image002.png)

Received on Mon Jul 23 2018 - 17:31:24 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 23 2018 - 17:31:26 CEST