RE: problem with source.f

From: Vasilis Vlachoudis <Vasilis.Vlachoudis_at_cern.ch>
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)
1.
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.

Cheers
Vasilis
________________________________________
From: owner-fluka-discuss_at_mi.infn.it [owner-fluka-discuss_at_mi.infn.it] on be=
half of Hamideh Jalali [jalali.hb_at_gmail.com]
Sent: 14 March 2011 14:46
To: fluka-discuss_at_fluka.org
Subject: Re: problem with source.f

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

On 3/11/11, Hamideh Jalali <jalali.hb_at_gmail.com> wrote:
> Dear FLUKA Users
>=0A=
> 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?
>=0A=
> 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