# Re: circular beam

From: Santana, Mario <msantana_at_SLAC.Stanford.EDU>
Date: Sun, 16 Jan 2011 23:57:47 -0800

I agree with Anna, don't use UBEAM.

just define the maximum radius (R) inside source.f or in one of the parameters
of the SOURCE card, and then sample the radius with R*SQRT(FLRNDM(dummy))

On Jan 16, 2011, at 11:26 PM, Hamideh Jalali wrote:

> Hi
>
> Thanks for your reply. As I mentioned I want to define an uniform
> beam which travels in a ring of aluminum in x-y plane.
>
> Mario,
> I realized the necessity of using SQRT but what is 3D and 3D 2 that
> you have added to the commands?
>
> Best Regards
> Hamideh
>
> On 1/16/11, Santana, Mario<msantana_at_slac.stanford.edu> wrote:
>> Hamideh,
>>
>> Actually, if you want uniform sampling in 2-D cylindrical coordinates
>> you need to do the following:
>>
>> r = UBEAM * SQRT(FLRNDM(dummy))
>>
>> without the SQRT you would be giving more weight to the positions closer
>> to the beam axis.
>>
>> Mario
>>
>>
>> On Jan 16, 2011, at 1:28 AM, Hamideh Jalali wrote:
>>
>>> Dear FLUKA experts
>>>
>>> I'm going to define a circular beam in x-y plane ( a beam which
>>> travels around a circle of radius r and center (0,0,0)). Is it correct
>>> if I follow these steps:
>>>
>>> In BEAMPOS card:
>>> WHAT(1)-WHAT(3):x,y,z coordinates of the center of the
>>> circle(XBEAM-YBEAM-ZBEAM)
>>> WHAT(4): radius of the circle (UBEAM)
>>>
>>> Then I modify source.f by adding these command:
>>>
>>> r = UBEAM * (FLRNDM(dummy)
>>> alpha = 2 * PI* (FLRNDM(dummy))
>>>
>>>
>>> XFLK (NPFLKA) =3D3D XBEAM + r * COS(alpha)
>>> YFLK (NPFLKA) =3D3D YBEAM + r * SIN(alpha)
>>> ZFLK (NPFLKA) =3D3D ZBEAM
>>>
>>> I would be grateful for your help.
>>> Hamideh
>>>
>>
>>
Received on Mon Jan 17 2011 - 16:49:39 CET

This archive was generated by hypermail 2.2.0 : Mon Jan 17 2011 - 16:49:47 CET