RE: problem with source.f

From: Vasilis Vlachoudis <>
Date: Mon, 14 Mar 2011 17:46:18 +0000

Hi Hamideh,
in your source routine you are wrongly using a variable PI,
which doesn't exist therefore equal to 0.

fortran is not case sensitive, therefore your code:
      R= 8750=0A=
      r = R * SQRT (FLRNDM(dummy))
      ZBEAM = 100
      alpha = 2 * PI * (FLRNDM(dummy))

Shoudl be converted to
      R = 8750.0D0 * SQRT (FLRNDM(dummy))
* ZBEAM = 100.0
      alpha = TWOTWO * PIPIPI * FLRNDM(dummy)
The ZBEAM variable the code is setting it from the BEAMPOS, so it is
better to change it there.
2. I would strongly suggest the use of double precision numbers when you w=
ant to type a real number

Other problems in your input:=0A=
- The MATERIAL AIR had an index of 28. Is strongly recommended not to use
any index, but if you use it has to be sequential, therefore the next free
will be 26.
- You have the two RCC with touching surfaces, it could potentially lead
to numerical precission problems. It would be better to use two ZCC and
two planes.

From: [] on be=
half of Hamideh Jalali []
Sent: 14 March 2011 14:46
Subject: Re: problem with source.f

 It seems there is a problem with my attachment so I send them again.

On 3/11/11, Hamideh Jalali <> wrote:
> Dear FLUKA Users
> In my problem I modified subroutine source to get a circular electron
> beam which travels in a ring of air in x-y plane and height of 100cm
> (z=3D100).
> I expected to get uniform fluence of photons and electrons and dose
> around the ring but USRBIN results show something just in the small
> area of ring.
> Please guide me where is I am wrong. Is there any way to score the
> trace of beam?
> Kind Regards
> Hamideh
> ps the input and source.f is attached.=0A=
Received on Tue Mar 15 2011 - 17:29:37 CET

This archive was generated by hypermail 2.2.0 : Tue Mar 15 2011 - 17:29:37 CET