RE: Fwd: Gaussian distribution in beam angle

From: Joachim Vollaire <joachim.vollaire_at_cern.ch>
Date: Mon, 8 Jul 2013 13:12:21 +0000

Dear Rafiq,

Here is what you can implement in the routine. First you have to sample the location where your primary particle will hit your square window. If the window is perpendicular to the z axis, for example, you can sample x between -20 and 20 and y between -20 and 20. With something similar to :

X = -20 + 40* FLRNDM(XDUMMY)
Y = -20 + 40* FLRNDM(XDUMMY)

Once you have defined where your primary hits the window, then you can start the primary at your point source locations (200 cm before the window) by defining (Xflk, Yflk and Zflk) with the right direction to hit the X,Y you sampled on the window by defining Txflk, Tyflk and Tzflk (particle direction coordinates).

Hoping this help

Regards
Joachim


Il 27/06/2013 18:54, Mohammad Islam ha scritto:
> Dear FLUKA users and experts,
>
> I found a similar fluka exercise and adapted in my source routine. I
> think I made some progress in assigning UBEAM, VBEAM and ZBEAM value.
> But still I don't see what I expect. My goal here is to
> reproduce: if protons starting from a point source travel 200 cm, the
> beam diverges in angle so that the cross section at 200 cm is 20X20
> cm2 as I mentioned in my last email. I am looking forward for some
> help.
>
> Attached is my updated input and source routine. Thanks in advance.
>
>
> Sincerely,
> Rafiq
>
> On Wed, Jun 26, 2013 at 5:29 PM, Mohammad Islam
> <rafiqul.islam_at_okstate.edu> wrote:
>> Dear FLUKA users,
>>
>>
>> I tried to compile a source routine for Gaussian beam distribution
>> (in angle). This can be done using BEAM card but I am trying to
>> reproduce using source routine what I see using the BEAM card.
>> However, I am unable to see what I expect. Starting from a point
>> source (0 cm diameter cross section), if a beam travels 200cm where
>> the beam cross section is 20 cm diameter, the divergence can be
>> calculated as 0.1 rad. I am not sure how to use this value (0.1 rad)
>> in UBEAM, VBEAM and WBEAM in FLUKA source routine. If I put this
>> value directly, I get some weird results.I called FLNRRN for Gaussian
>> distribution. XBEAM, YBEAM and ZBEAM (the central spot of the beam)
>> is passed from the input.
>>
>> Also, instead of 20 cm diameter, if the cross section at 200 cm is
>> 20X20 cm2, how can I incorporate this in the source routine. How can
>> I visualize the profile.
>>
>>
>> I attached my input and source routine. I know I am missing something
>> fundamental that I should know but I am unable to detect that. I
>> never worked on source routine and I am not familiar with Fortran. I
>> believe it should be a simple problem for FLUKA expert. I would
>> greatly appreciate any kind of help.
>>
>> Sincerely,
>> Rafiq
Received on Mon Jul 08 2013 - 16:28:30 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 08 2013 - 16:28:34 CEST