Re: [fluka-discuss]: Question about three different sources?

From: Leonel Morejon <leonel.morejon_at_eli-beams.eu>
Date: Mon, 13 Jun 2016 12:11:57 +0200

Dear Zhefu,

     It is not very clear to me what you are asking. Recompiling the
source file without modifying it to take care of the differences of the
sources will not solve your issue. You need to change the code to assign
a proper particle id (proton or heavyion) depending on the source,
otherwise there is no way the code is aware what particle is
transporting. Only then, recompiling the modified source code will give
you the desired simulation.

Regards,

Leonel

On 13.6.2016 10:23, lzfneu wrote:
> Dear Leonel, Anton and all,
>
> Thanks for your reply, the previous problem has been solved.
> Now I encounter another problem.
>
> As we know, if Fluka run heavyion problem should be recompiled.
> I want to consult you that if one source is heavyion and the others
> two sources are proton, could the recompiled Fluka run the problem ?
>
> Thanks in advance.
>
> Zhefu
> ------------------------------------------------------------------------
> Subject: Re: [fluka-discuss]: Question about three different sources?
> To: Anton.Lechner_at_cern.ch; lzfneu_at_live.com
> CC: fluka-discuss_at_fluka.org
> From: leonel.morejon_at_eli-beams.eu
> Date: Fri, 3 Jun 2016 11:58:29 +0200
>
> Dear Zhefu,
>
> Adding to Anton's answer, the sampling of the sources is done
> sequentially, but this is in terms of computing: a particle from
> source1 is placed on the stack and then transported, then a particle
> from source2 is placed and transported and so on.
>
> However this has no effect on the results for a large number of
> particles; bare in mind this is how Monte Carlo codes work: on the
> assumption there is independence between all histories, the outcomes
> of physical processes are calculated disregarding their order in "real
> time", thus the Bremsstrahlung photons from a charged particle
> traveling inside matter will be transported after the latter's
> transport is done. So this has nothing to do with time ordering of the
> sources emissions, but in the end, the particles from source1
> transported will have contributed twice as those from source2 if the
> former was twice as intense as the latter, since they were sampled
> twice as much.
>
> As for which normalization to use, the final result should be
> normalized to the sum of the rates of the sources, i.e. total number
> of particles emitted by all of them per unit time.
>
> Leonel
>
> On 2.6.2016 16:52, Anton Lechner wrote:
>
> Dear Zhefu,
>
> Indeed, the solution I described below sets up a single particle
> per primary event. Is there a specific reason why do you want to
> simulate particles of each beam in the same primary event? Since
> Monte Carlo simulations require anyway a large number of events to
> achieve statistical convergence, it is not at all necessary to
> implement intensity ratios on single event basis. If you implement
> the sampling procedure I mentioned below, then - with sufficient
> statistics - you will get the correct intensity ratios of the
> beams. As a logical consequence, you need to multiply the results
> with the sum of beam intensities since your results will be per
> particle.
>
> Cheers, Anton
>
>
>
> ------------------------------------------------------------------------
> *From:* lzfneu [lzfneu_at_live.com <mailto:lzfneu_at_live.com>]
> *Sent:* 02 June 2016 16:11
> *To:* Anton Lechner
> *Cc:* fluka-discuss_at_fluka.org <mailto:fluka-discuss_at_fluka.org>;
> neu lzf
> *Subject:* RE: [fluka-discuss]: Question about three different
> sources?
>
> Dear Anton,
>
> Thanks for your reply.
>
> I have one more question to consult you:
>
> in the step 1), "IF ELSE IF" command can determin which ONE source
> works in source.f file, but in my opinion the others two sources
> do not work at this time.
> That is to say the three sources don't emit at the same time. In
> addition to multiply with the total intensity of all three beams,
> whether the absolute results need to multiply 3 to plot the total
> dose equivalent distribution by using USRBIN card? I am quite
> confused about this issue.
>
> Thanks in advance.
>
> Zhefu
>
> ------------------------------------------------------------------------
> From: Anton.Lechner_at_cern.ch <mailto:Anton.Lechner_at_cern.ch>
> To: lzfneu_at_live.com <mailto:lzfneu_at_live.com>;
> fluka-discuss_at_fluka.org <mailto:fluka-discuss_at_fluka.org>
> Subject: RE: [fluka-discuss]: Question about three different sources?
> Date: Thu, 2 Jun 2016 10:35:44 +0000
>
> Dear Zhefu,
>
> Yes, this can be done with the source routine.
>
> The relevant variables to define the phase space of a beam in the
> source routine are:
> A) XFLK(NPFLKA)/YFLK(NPFLKA)/ZFLK(NPFLKA) (=cartesian coordinates)
> B) TXFLK(NPFLKA)/TYFLK(NPFLKA)/TZFLK(NPFLKA) (=direction cosines)
>
> To define three beams one could do the following:
> 1) randomly sample one of the three beams depending on their
> relative intensity, i.e. beam 1 is selected with a probability
> I1/(I1+I2+I3), beam 2 with a probability I2/(I1+I2+I3), and beam 3
> with a probability I3/(I1+I2+I3), where I1/I2/I3 are the
> intensities of the three beams
> 2) for the beam selected in step 1), randomly sample from the
> phase space distribution of this beam (e.g. Gaussian shape) and
> fill the above mentioned phase space variables
>
> If the different beams have different energies, you can also
> select this in the second step (either by defining the kinetic
> energy TKEFLK(NPFLKA) or the momentum PMOFLK(NPFLKA), of course
> making sure that they are consistently defined in the source routine).
>
> Note that the results of scorings like USRBIN will then be per
> particle. In order to get absolute results you need to multiply
> with the total intensity of all three beams, i.e. I=I1+I2+I3
>
> You can also find many more details on how to program source
> routines in the following course slides:
> https://indico.cern.ch/event/334606/contributions/779780/attachments/653355/898394/AdvancedUserRoutines2014.pdf
> (routines in general)
> https://indico.cern.ch/event/334606/contributions/779788/attachments/653364/898409/AdvancedSources2014.pdf
> (source routine)
>
> Cheers, Anton
>
>
>
>
> ------------------------------------------------------------------------
> *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 lzfneu
> [lzfneu_at_live.com <mailto:lzfneu_at_live.com>]
> *Sent:* 02 June 2016 01:44
> *To:* fluka-discuss_at_fluka.org <mailto:fluka-discuss_at_fluka.org>
> *Cc:* lzfneu_at_live.com <mailto:lzfneu_at_live.com>
> *Subject:* [fluka-discuss]: Question about three different sources?
>
> Dear all,
>
> My problem is concerned with three different sources with
> different beam intensities hit one same target at the same time.
>
> Maybe the problem could be solved in source.f file, but I am not
> quite sure.
>
> I have two questions to consult you:
> 1)how to define three different beam intensities in source.f file.
>
> 2)how to define three different sources hit the same target at the
> same time.
>
> Any help will be appreciated and thanks in advance!
>
> Zhefu
>
>
> --
> Leonel Morejon --------------------------------------
> *ELI Beamlines* Address: \n Za Radnicí 835 25241 Dolní Břeľany Czech
> Republic
> Office: +420 266 051 406
> Mobile: +420 773 666 453
> --------------------------------------

-- 
Leonel Morejon
--------------------------------------
*ELI Beamlines*
Address: \n Za Radnicí 835 25241 Dolní Břeľany Czech Republic
Office: +420 266 051 406
Mobile: +420 773 666 453
--------------------------------------
__________________________________________________________________________
You can manage unsubscription from this mailing list at https://www.fluka.org/fluka.php?id=acc_info
Received on Mon Jun 13 2016 - 14:02:08 CEST

This archive was generated by hypermail 2.3.0 : Mon Jun 13 2016 - 14:02:19 CEST