Re: [fluka-discuss]: Direction of photons inside sphere

From: Santana, Mario <msantana_at_slac.stanford.edu>
Date: Tue, 30 Jan 2018 08:22:14 +0000

Hi Riya,


> On Jan 29, 2018, at 9:29 PM, riyadey_at_barc.gov.in wrote:
>
> Dear FLUKA Experts,
>
> How to define in source.f file the direction of photons emitting from a spherical surface such that the directions of propagation of photons are only inside the sphere?

It depends how you want the distribution for the direction of the photons to be, besides pointing towards the inside.

For example, subroutine SFLOOD will meet your description, and it will create a uniform fluence inside of the sphere of radius 1.
If you need the sphere to be of a radius R different than 1, just multiply the sampled birth coordinates by sqrt(R)

If you want some other probability function for the direction of your photons, you can always sample that direction according to whatever law you want, e.g. isotropic distribution (by the way, for that you could have used RACO subroutine), and then impose that the scalar product of the photon direction and the gradient at surface is < 0. (If the product does not mean that condition you reject that direction and try another one with a GOTO statement)

(As you know, the gradient (non unitary) at any point XXX, YYY, ZZZ of a sphere is g={XXX,YYY,ZZZ})

> Is there any way to define directions without direction cosines with respect to the geometry axes?
The direction cosines are expressed in terms of the reference frame axis of your geometry.

Do you maybe mean you want to express the direction of the photons relative to some specific vector in your geometry such as the gradient on the surface of a sphere? Then I believe that the answer is NO, there isnтАЩt such built-in subroutine available to the user. But you could always program it by doing the right transformations.

>
> With regards,
> Riya Dey
>
> __________________________________________________________________________
> You can manage unsubscription from this mailing list at https://www.fluka.org/fluka.php?id=acc_info
>


I am not aware of an implemented function available to the user, like the one you describe, if by geometry axes you mean the

But you can write it by yourself.

For example, you can use routine SFLOOD to randomly sample points XXX, YYY, ZZZ, within a sphere of radius 1.
The                                                        Ў(╣╞зЩй┌Быз▓цьr╕й╢*'~║&╢мЩиеКx%К╦Z╢mж╧   0¤∙nСпшо▀Цщ■Шi■'i╟ Кwш
Received on Tue Jan 30 2018 - 10:41:11 CET

This archive was generated by hypermail 2.3.0 : Tue Jan 30 2018 - 11:57:16 CET