Re: [fluka-discuss]: sample discrete energies using SOURCE routine and surface source

From: Mikhail Polkovnikov <pmk_at_ihep.ru>
Date: Mon, 12 Dec 2016 11:50:05 +0300

On 09.12.2016 19:12, Chiriotti Alvarez Sabina wrote:
>
> Dear Mikjail,
>
> Thank you for the two routines.
>
> I still have a question, with RACO function will it only generate
> particles outside the shell or it will sample the direction randomly?
>
> Kind regards,
>
> Sabina
>
> *From:*Mikhail Polkovnikov <Михаил Полковников> [mailto:pmk_at_ihep.ru]
> *Sent:* donderdag 8 december 2016 12:59
> *To:* Chiriotti Alvarez Sabina; fluka-discuss_at_fluka.org
> *Subject:* Re: [fluka-discuss]: sample discrete energies using SOURCE
> routine and surface source
>
> On 08.12.2016 12:17, Chiriotti Alvarez Sabina wrote:
>
> Dear Mikhail,
>
> I would need a surface source sphere. The source should be like a
> shell around the target geometry of 5 um. Even if in the input it
> is written FLOOD it will not take into account no? At least this
> is what is written in FAQ.
>
> How can I define this surface source?
>
> Yes I have put the EMFCUT card higher than the maximum energy of
> the source because I would like to absorb all the electrons them
> at the point where are have been created.
>
> Thank you for your help!
>
> Kind regards,
>
> Sabina
>
> *From:*Mikhail Polkovnikov <Михаил Полковников> [mailto:pmk_at_ihep.ru]
> *Sent:* donderdag 8 december 2016 7:51
> *To:* Chiriotti Alvarez Sabina; fluka-discuss_at_fluka.org
> <mailto:fluka-discuss_at_fluka.org>
> *Subject:* Re: [fluka-discuss]: sample discrete energies using
> SOURCE routine and surface source
>
> On 07.12.2016 18:39, Chiriotti Alvarez Sabina wrote:
>
> Dear FLUKA experts,
>
> I have managed to sample the electron spectrum using the
> SOURCE routine.
>
> Now I would like to have a surface source instead of the point
> source.
>
> I read from the FAQ
> (http://www.fluka.org/fluka.php?id=faq&sub=4) that all
> settings defined with the beam card are ignored when using
> source routine. Therefore I have tried to use RACO routine as
> it is written in this message
> http://www.fluka.org/web_archive/earchive/prova/0954.html
>
> Therefore I have added this part in the source routine:
>
> * Particle coordinates
>
> CALL RACO(TXX,TYY,TZZ)
>
> RADIUS = 0.0005
>
> XBEAM = RADIUS*TXX
>
> YBEAM = RADIUS*TYY
>
> ZBEAM = RADIUS*TZZ
>
> XFLK (NPFLUKA) = XBEAM
>
> YFLK (NPFLUKA) = YBEAM
>
> ZFLK (NPFLUKA) = ZBEAM
>
> However when I try run my simulation I got an error :
>
> Region of particle in position -1.000000000E+30
> -1.000000000E+30 -1.000000000E+30
>
> cannot be determined, error count: 1
>
> try again to establish the current region moving the particle
> of a 6.000000000E+18 long step
>
> **** Particle in position X = -1.00000000E+30, Y =
> -1.00000000E+30, Z = -1.00000000E+30
>
> **** with energy 0.000000E+00 GeV, discarded ****
>
> If I remove CALL RACO(TXX,TYY,TZZ) the simulation works
> but it samples a point source.
>
> Do I need to add something else when I call RACO routine? What
> I am doing wrong?
>
> Thank you for your help.
>
> Kind regards,
>
> Sabina
>
> *From:*Chiriotti Alvarez Sabina
> *Sent:* vrijdag 25 november 2016 8:50
> *To:* 'Vittorio Boccone'; fluka-discuss_at_fluka.org
> <mailto:fluka-discuss_at_fluka.org>
> *Subject:* RE: [fluka-discuss]: sample discrete energies using
> SOURCE routine
>
> Dear Vittorio,
>
> thank you for your remarks. Yes the energies are spanned in 5
> orders of magnitude and it corresponds to the Auger and IC
> electrons of I-125 Isotope (according to Howell 1992 Med Phys
> 19 (6). Then in order to simulate a decay I need to sample 26
> electrons from this electron spectrum.
>
> Therefore I am actually fine for your point 2 because I am
> using FLUKA for microdosimetry where I need to know how much
> energy is deposited locally for each decay.
>
> How can I actually generate a source sample changing the
> weight of the primary particle (WTFLK) according to the
> probability associated to the energy?
>
> thank you in advance.
>
> kind regards,
>
> Sabina
>
> *From:*Vittorio Boccone [mailto:dr.vittorio.boccone_at_ieee.org]
> *Sent:* donderdag 24 november 2016 20:41
> *To:* Chiriotti Alvarez Sabina
> *Cc:* fluka-discuss_at_fluka.org <mailto:fluka-discuss_at_fluka.org>
> *Subject:* Re: [fluka-discuss]: sample discrete energies using
> SOURCE routine
>
> Dear Sabina,
>
> First. The spectrum you sent is not a histogram but a X/Y
> scattered plot with absolute probabilities (I attach the plot
> with your data). For this reason the cumulative sum will never
> work (statistically I mean). This has nothing to do with
> FLUKA. Clearly this is the cause of the discrepancy you
> mention between the 15 independent runs and the simulation
> with the “spectrum”.
>
> Second. The transport for electrons in FLUKA starts at 1 keV
> -> 10e-6 GeV. Meaning a good fraction of the simulation will
> do essentially nothing else then depositing all the energy of
> the electron at the first interaction.
>
> This will leave essentially a few meaningful points for your
> simulation, and would make me question whether you could
> really solve your problem this way.
>
> Third. Supposed that you feel fine with what written in point2
> 2, you still have probabilities which span across 4 orders of
> magnitudes, therefore I could object if it would be better for
> you to generate a source sample changing the weight of the
> primary particle (WTFLK) according to the probability
> associated to the energy. Eventually you could separate the
> problem of determining the particle sample from the FLUKA
> simulation such you could verify it before running the
> simulation. In this case you could generate an external file
> from which the simulation would fetch energy and weight of the
> primary.
>
> Best,
>
> Vittorio
>
> imap://pmk_at_imap.ihep.ru:993/fetch%3EUID%3E/FLUKA%3E2748?header=quotebody&part=1.1.2&filename=image001.png
>
> On 24 Nov 2016, at 13:59, Chiriotti Alvarez Sabina
> <sabina.chiriotti.alvarez_at_sckcen.be
> <mailto:sabina.chiriotti.alvarez_at_sckcen.be>> wrote:
>
> Dear FLUKA experts,
>
> I would like to define an electron source which has a
> discrete energy spectrum (each bin of energy has a certain
> probability).
>
> The sampling is done using a cumulative spectrum and
> interpolating between the discrete energies but
>
> I have tried to do the sampling following the examples
> from FLUKA discussion list but I still do not get the same
> results if I do 15 independent simulations (the number for
> energies) and I combine the output with each electron
> probability. What I get is that the sampling is done with
> an interpolation between the discrete energies and I would
> like to simulate only the energies of the electron spectrum.
>
> How can I remove the interpolation between discrete
> energies and sample the energies of the spectrum with
> their respective probability?
>
> Please find in attachment the routine source, the spectrum
> and the input file.
>
> Thank you in advance for your help.
>
> Kind regards,
>
> Sabina
>
> -------------
>
> Belgian Nuclear Research Centre, SCK-CEN
>
> Environment, Health and Safety
>
> Radiation protection, Dosimetry and Calibration
>
> Boeretang 200,
>
> 2400, Mol, Belgium
>
> tel: + 32 014 33 28 89
>
>
>
> SCK•CEN
> Disclaimer:http://www.sckcen.be/en/e-mail_disclaimer<hsource.f><example.inp><Electron_spectrum.txt>
>
> Dear Sabina,
>
> You must set cosines as well. But in your input BEAMPOS card
> defines FLOOD (uniform and isotropic fluence within the sphere),
> while RACO is an isotropic distribution from the point source.
> What kind of distribution do you really need?
>
> CALL RACO( TXX, TYY, TZZ)
> * Cosines (tx,ty,tz)
> TXFLK (NPFLKA) = TXX
> TYFLK (NPFLKA) = TYY
> TZFLK (NPFLKA) = TZZ
> * Particle coordinates
> XFLK (NPFLKA) = RADIUS * TXX
> YFLK (NPFLKA) = RADIUS * TYY
> ZFLK (NPFLKA) = RADIUS * TZZ
>
> 2. Transport and production thresholds (EMFCUT card) are higher
> than the maximum energy of your source!
>
> Best regards,
>
> Mikhail
>
> Dear Sabina,
>
> If you need a spherical shell source and your target will be exposed
> inside that shell, then you can use SFLOOD function. If you need
> isotropic distribution outside the spherical shell, then RACO function.
>
> You can use any of these functions if you need just position
> coordinates X,Y,Z on the sphere for your "testsource" dump file.
>
> When you use BEAMPOS card with FLOOD distribution, the RFLOOD variable
> from (BEAMCM) header contains the radius of the sphere and it can be
> used in the SOURCE user routine. There is no need to define RADIUS
> value once again.
>
> There are two files in attachment with FLOOD and RACO functions for tests.
>
Dear Sabina,

RACO is an isotropic distribution, in your case it generates particles
on the sphere surface with direction only outside the surface.


Best regards,

Mikhail



__________________________________________________________________________
You can manage unsubscription from this mailing list at https://www.fluka.org/fluka.php?id=acc_info
Received on Mon Dec 12 2016 - 12:27:26 CET

This archive was generated by hypermail 2.3.0 : Mon Dec 12 2016 - 12:27:36 CET