# Re: Fwd: SOURCE : user-written source

From: Alberto Fasso' <fasso_at_slac.stanford.edu>
Date: Mon, 25 Jul 2011 07:38:55 -0700 (PDT)

Dear Bob,

I am not sure that I fully understand what you are doing. You said that
you want "to simulate the spontaneous decay of 238Pu which can emit photon and
alpha particles", but your source puts on stack a 10 MeV photon and a
5 MeV electron (not at all what one can get from 238Pu). In addition, why
weight 1 for the photon and weight 0.5 for the electron?

Anyway, independent of what your goal is, the answer to your question is
easy. FLUKA results are normalized per unit primary weight, so the sum
of the scored weights must be 1.0. And the photon weights must be twice the
electron weights. The results are exactly that:
0.6666667 + 0.3333333 = 1.0
0.6666667 / 0.3333333 = 2.0
Why are you surprised by that?

You say:
"In my opinion,it can detect 1 (particle) for photon,and 0.5 (particle) for
electron"
and you do! But the results are divided by the total primary weight:
1.0 / 1.5 = 0.6666667
0.5 / 1.5 = 0.3333333

Alberto

On Thu, 21 Jul 2011, ??? wrote:

> Dear Alberto,
>
> Thank you!
> Problem solved!
>
> The reason i try to do this is that,i want to simulate the spontaneous decay
> of 238Pu which can emit photon and alpha particles. Thanks for your answer
> again.Now i know how to load onto the FLKSTK stack two source particles at
> each call. But i have a doubt about the result.For example(please read my .inp
> and source.f),i loaded two particles at each call,set the weight of the
> photon=1,set the weight of the electron=0.5.In my opinion,it can detect 1
> (particle) for photon,and 0.5 (particle) for electron,while the results show
> 0.6666667 and 0.3333333.Why? How can i get the results that i need?
>
> PS:My english is too poor to express my views.i am so sorry for that.:(
> Best regards!
> Bob
> ----- ???? -----
> ???: "Alberto Fasso'" <fasso_at_mail.cern.ch>
> ???: "fluka-discuss" <fluka-discuss_at_fluka.org>
> ??: zhbail_at_student.sysu.edu.cn
> ????: ???, 2011? 7 ? 22? ?? 3:17:16
> ??: Re: SOURCE : user-written source
>
> Bob,
>
> in your source, the statement
>
> DO 10 I=1,2
>
> starts in column 1. In fortran 77 (the language FLUKA is written in) all
> statements must start in column 7. So you should have:
> DO 10 I=1,2
>
> In the same way, the statement
> 10 CONTINUE
> should be written
> 10 CONTINUE
> (CONTINUE must start in column 7).
>
> But why do you want to load two particles at the time? I don't see the
>
> Alberto
>
> On Thu, 21 Jul 2011, zhbail_at_student.sysu.edu.cn wrote:
>
>> Hi all,
>>
>> In "SOURCE : user-written source",it says:
>> "The user can load onto the FLKSTK stack one or more source particles at each call: for each particle loaded
>> the pointer must be increased by 1. The template version of SOURCE loads only one particle: if several are
>> loaded the following sequence, until the statement CALL SOEVSV not included, must be repeated once for
>> each particle, possibly inside a DO loop:"
>>
>> I have wrote a source.f to load two particles at each call but it complied failed.I guess my DO loop is worry.
>> Could someone help me to modify my source.f, and tell me exactly which part must be repeated?
>>
>> Thanks,
>> Bob
>
>

--
Alberto Fasso`
SLAC-RP, MS 48, 2575 Sand Hill Road, Menlo Park CA 94025
Phone: (1 650) 926 4762   Fax: (1 650) 926 3569
fasso_at_slac.stanford.edu
Received on Mon Jul 25 2011 - 23:42:23 CEST

This archive was generated by hypermail 2.2.0 : Mon Jul 25 2011 - 23:42:24 CEST