Re: Re: [fluka-discuss]: How to implement annular beam in source.f user routine? [SOLVED]

From: Mikhail Polkovnikov <Михаил Полковников> <pmk_at_ihep.ru>
Date: Fri, 17 Oct 2014 23:58:22 +0400

On 17.10.2014 22:06, Santana, Mario wrote:
> Hi Mikhail,
>
> Your formula for uniform distribution in polar coordinates is not wright,
> as it favors probability closer to the axis.
> Just replace RADIUS by SQRT(RADIUS) both for XFLK and YFLK and you will
> obtain what you seek.
>
> Mario
>
>
> On 10/17/14 3:12 AM, ""Mikhail Polkovnikov <Михаил Полковников>""
> <pmk_at_ihep.ru> wrote:
>
>> Dear FLUKA users,
>>
>>
>> For 70 GeV proton beam with annular form and Rmax = 4.0cm
>>
>> *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....
>> +....
>> BEAM -70.0 0.0 0.0 4.0 0.0 -1.0PROTON
>> BEAMPOS 0.0 0.0 -79.0 0.0 0.0
>>
>> i need to add some spectrum in source.f, but in the user routine the
>> annular beam always changes its profile even if add uniform distribution
>> like
>>
>> CALL SFECFE( SFE, CFE)
>> RADIUS = XSPOT * FLRNDM(XDUMMY)
>> XFLK (NPFLKA) = RADIUS * SFE
>> YFLK (NPFLKA) = RADIUS * CFE
>> ZFLK (NPFLKA) = ZBEAM
>>
>> Is there any way to peek uniform beam profile in user routine?
>>
>> Images of beam profiles along x-axis in attachment
>>
>>
>> Best regards,
>> Mikhail
>>
Thank you for help, Mario! I made a silly mistake.
Final formula looks like:
       CALL SFECFE( SFE, CFE)
       RADIUS = SQRT(XSPOT) * SQRT( XSPOT * FLRNDM(XDUMMY) )
       XFLK (NPFLKA) = RADIUS * SFE
       YFLK (NPFLKA) = RADIUS * CFE
       ZFLK (NPFLKA) = ZBEAM

Best regards,
Received on Fri Oct 17 2014 - 23:33:20 CEST

This archive was generated by hypermail 2.3.0 : Fri Oct 17 2014 - 23:33:21 CEST