Re: [fluka-discuss]: About multiple spherical source

From: <arghyac_at_barc.gov.in>
Date: Sat, 16 Sep 2017 12:54:50 +0530

On 2017-09-15 20:10, Andrea Fontana wrote:
> Dear Arghya,
>   what about choosing randomly among the 5 sphere centers?
> Let us say with a code like:
>
>       REAL*4 CENTERS(5), X0
>       DATA CENTERS/-10.,-5.,0.,5.,10./
>
>       X0 = CENTERS(FLOOR(6*FLRNDM(XDUMMY)))
>
> where X0 is the center of your current sphere and then:
>
>     CALL RACO(TXX, TYY, TZZ)
>     RADIUS = R*FLRNDM(XDUMMY)
>     XFLK (NPFLKA) = X0 + RADIUS*TXX
>     YFLK (NPFLKA) = RADIUS*TYY
>     ZFLK (NPFLKA) = RADIUS*TZZ
>
> You have to generate 5 times histories, but the result should be
> the one you are looking for. I hope this helps.
>
> Kind regards,
> Andrea
>
> Il 15/09/2017 14:15, arghyac_at_barc.gov.in ha scritto:
>> Dear Experts,
>>
>>    I need to simulate 5 spherical sources with different spatial
>> co-ordinate in a single source.f card.
>>
>>    I model one sphere (centre at (0,0,0) in source.f card as follows
>>
>> *particle corodinate
>>     CALL RACO(TXX, TYY, TZZ)
>>     RADIUS = R*FLRNDM(XDUMMY)
>>     XFLK (NPFLKA) = RADIUS*TXX
>>     YFLK (NPFLKA) = RADIUS*TYY
>>     ZFLK (NPFLKA) = RADIUS*TZZ
>>
>> I guess I need to edit  XFLK (NPFLKA), YFLK (NPFLKA), ZFLK (NPFLKA) to
>> sample 5 spherical sources in single subroutine.
>> Co-ordinate of other 4 sphere's centre are (-10,0,0), (-5,0,0),(5,0,0)
>> and (10,0,0). radius of each = 1.5 cm.
>>
>> Now how to sample other spheres here or how to edit it to accommodate
>> all the 5 sources at the same time.
>>
>> Kindly give some suggestions.
>>
>> Thanking you in advance.
>>
>> With regards,
>> Arghya
>>
>> __________________________________________________________________________
>> You can manage unsubscription from this mailing list at
>> https://www.fluka.org/fluka.php?id=acc_info
>>
Dear Sir/Madam,
   Thank you very much for quick reply.
   I am beginner and not much excellence in Fortran programming. So I
have few doubts. Kindly reply me.

    I need to choose all 5 sources randomly with equal probability i.e as
if detector are exposed by all 5 sources simultaneously.

   Since I am using 64 bit computer,
   can I use REAL*8 instead of REAL*4
   CENTERS(5) and below that declared centers values as DATA
CENTERS/-10.,-5.,0.,5.,10./

  Then use X0 = CENTERS(FLOOR(6*FLRNDM(XDUMMY)))
   here FLOOR(6*FLRNDM(XDUMMY) will produce integer number 0,1,2,3,4,5,6
   I am not getting how it will produce -5 and -10 and 10 co-ordinates ?
and why FLRNDM(XDUMMY) is multiplied by 6 only.

  Thanking you in advance

__________________________________________________________________________
You can manage unsubscription from this mailing list at https://www.fluka.org/fluka.php?id=acc_info
Received on Sat Sep 16 2017 - 10:34:40 CEST

This archive was generated by hypermail 2.3.0 : Sat Sep 16 2017 - 10:34:41 CEST