Re: Re: [fluka-discuss]: using source.f and results comparison

From: Fasso, Alberto <fasso_at_slac.stanford.edu>
Date: Wed, 25 Feb 2015 08:02:33 +0000

Dear Bo yang,
since a photon has zero mass, its momentum is equal to its energy.
You say "it's obvious that the two is not equal", but you are wrong. They are equal.
The formula, if AM(IONID) = 0 (AM is the mass of the particle), becomes
PMOFLK (NPFLKA) = SQRT ( TKEFLK (NPFLKA) * TKEFLK (NPFLKA) ) = TKEFLK (NPFLKA)
You can use the formula, but it is better to spare two useless multiplications and one useless
square root. Square roots are expensive in CPU time.

Alberto
________________________________________
From:  <b-yang12_at_mails.tsinghua.edu.cn>
Sent: Tuesday, February 24, 2015 6:39 PM
To: Fasso, Alberto
Cc: fluka-discuss; Hamideh Jalali
Subject: Re: Re: [fluka-discuss]: using source.f and results comparison

Dear Alberto

I cannot understand well about "in the source, you sample the energy but you do not define the momentum accordingly. Instead of PMOFLK (NPFLKA) = PBEAM, you should write PMOFLK (NPFLKA) = TKEFLK (NPFLKA)."
why is PMOFLK (NPFLKA) = TKEFLK (NPFLKA), not PMOFLK (NPFLKA) = SQRT ( TKEFLK (NPFLKA) * ( TKEFLK (NPFLKA)+ TWOTWO * AM (IONID) ) ).

I think the latter is more reasonable. it"s obvious that the two is not equal. I dont know where is going wrong? Thanks a lot!

Bo yang



2015-02-24 17:18:05,<b-yang12_at_mails.tsinghua.edu.cn>д
> Dear Hamideh,
>
> in the source, you sample the energy but you do not define the momentum
> accordingly. Instead of PMOFLK (NPFLKA) = PBEAM, you should write
> PMOFLK (NPFLKA) = TKEFLK (NPFLKA).
>
> In addition your USRBDX scores a spectrum with logarithmic intervals,
> while the input spectrum is linear. This will certainly spoil the comparison.
>
> Alberto
>
>
> On Mon, 23 Feb 2015, Hamideh Jalali wrote:
>
> > Dear FLUKA Users
> >
> > I am trying to modify the source.f user routine to read in a file
> > containing flux data (photon/s in different energy intervals). For this
> > purpose I followed exactly the exercise 8 in 8th FLUKA course.
> >
> > <http://goog_1002269095>
> > http://www.fluka.org/fluka.php?id=course&sub=program&navig=2&which=demokritos2009
> >
> > to check the spectrum at the target entrance, I used an USRBDX detector,
> > then multiplied the results of *_tab.lis by the energy intervals and number
> > of all photons which had been integrated over all energy ranges. I should
> > mention the area of USRBDX detector was blank so it considered 1 cm**2 as a
> > default according to fluka manual.
> > Finally, I plotted the USRBDX results but it is different from my spectrum.
> > I could not find where my wrong is.
> > Is it logical whether I expect to get exactly the same spectrum as the main
> > one by simulation?
> >
> > Best Regards
> > Hamideh
> >
> > PS, the input, source.f and flux.dat are attached.
>
> __________________________________________________________________________
> You can manage unsubscription from this mailing list at https://www.fluka.org/fluka.php?id=acc_info
>




(Ƨځ맲r*'~&x%Zm 0nߖi'iw
Received on Wed Feb 25 2015 - 10:45:05 CET

This archive was generated by hypermail 2.3.0 : Wed Feb 25 2015 - 10:45:10 CET