# RE: RE: [fluka-discuss]: about source.f

From: Anton Lechner <Anton.Lechner_at_cern.ch>
Date: Thu, 7 May 2015 12:58:37 +0000

Dear Simon,

If I understand correctly, you would like
A) a line source (delta-like, i.e. no lateral spatial extension) along an arbitrary direction. I assume positions are homogeneously distributed along this line?
B) particles should be emitted with a *polar* angle of 5 deg wrt the line source, while the *azimuthal* angle is isotropic? (I am not sure if this is what you mean with "a cone-shaped tube" ...)

I any case I am afraid such a source can only be realized by means of a source routine. I would recommend to look in the the FLUKA course material about source routine programming (https://indico.cern.ch/event/334606/contribution/35/material/slides/0.pdf, starting from page 24).

The only variables you need to touch are the positions (X/Y/ZFLK(NPFLKA) = ...) and direction cosines (TXFLK(NPFLKA) = ...). The easiest is probably to implement your source along the z-axis and then perform a transformation of positions and direction cosines. For example in the following way (for simplicity I just use dummy coordinates, which can then be assigned to the designated variables):

* Position sampling along the z-axis
X = 0
Y = 0
Z = homogeneous or whatever sampling

* Direction cosine sampling around the z-axis
TX = ...
TY = ...
TZ = ...

* Transforming from z-axis to arbitrary axis via ROT-DEFI cards defined in the input file (with rotation index NROT)
CALL UNDOTR ( 1, X, Y, Z, NROT )
CALL UNDRTO ( 1, TX, TY, TZ, NROT )

You can pass the rotation index via one of the WHATs of the source card, e.g.:
NROT = INT(WHASOU(1))

Hope this helps!
Cheers, Anton

________________________________
From: pangchg13_at_lzu.edu.cn [pangchg13_at_lzu.edu.cn]
Sent: 07 May 2015 05:23
To: Anton Lechner
Subject: Re: RE: [fluka-discuss]: about source.f

Dear Anton,

The source line should be arbitrary, not along the z-aixs(or x/y). the emission angle of 5 degree is relative to the line , therefore, the source should be a cone-shaped tube but ont a certain direction.

regards

________________________________
simon

From: Anton Lechner<mailto:Anton.Lechner_at_cern.ch>
Date: 2015-05-05 20:32
To: pangchg13_at_lzu.edu.cn<mailto:pangchg13_at_lzu.edu.cn>; fluka-discuss<mailto:fluka-discuss_at_fluka.org>
Dear Simon,

Please be more precise what kind of source you want. I understand that you want a source along a line, but:
* Should this be along an arbitrary direction?
* What about the emission angle wrt the line source?
(in your first email you mention an angle of 5 degrees: is this the emission angle wrt the line or the angle between line and z-axis?)

Cheers, Anton

________________________________
From: owner-fluka-discuss_at_mi.infn.it [owner-fluka-discuss_at_mi.infn.it] on behalf of pangchg13_at_lzu.edu.cn [pangchg13_at_lzu.edu.cn]
Sent: 05 May 2015 04:13
To: fluka-discuss

Hi, everyone!

I'm wondering how can I use the SOURCE.f to set a linear source? could someone give me an example to help me out of there?

Regards
________________________________
simon

__________________________________________________________________________
You can manage unsubscription from this mailing list at https://www.fluka.org/fluka.php?id=acc_info
Received on Thu May 07 2015 - 16:34:38 CEST

This archive was generated by hypermail 2.3.0 : Thu May 07 2015 - 16:34:42 CEST