Re: circular beam

From: Santana, Mario <msantana_at_slac.stanford.edu>
Date: Sun, 16 Jan 2011 10:45:48 -0800

Hamideh,

Actually, if you want uniform sampling in 2-D cylindrical coordinates
you need to do the following:

r =3D 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 =3D UBEAM * (FLRNDM(dummy)
> alpha =3D 2 * PI* (FLRNDM(dummy))
>
>
> XFLK (NPFLKA) =3D XBEAM + r * COS(alpha)
> YFLK (NPFLKA) =3D YBEAM + r * SIN(alpha)
> ZFLK (NPFLKA) =3D ZBEAM
>
> I would be grateful for your help.
> Hamideh
>
Received on Sun Jan 16 2011 - 20:39:56 CET

This archive was generated by hypermail 2.2.0 : Sun Jan 16 2011 - 20:39:56 CET