# Re: [fluka-discuss]: Question about three different sources?

From: Drsalahuddin Khan <drskhan_at_ksu.edu.sa>
Date: Tue, 7 Jun 2016 10:47:22 +0000

Dear FLUKA team,

While installing FLUKA i am having problem with gcc or g-fortran error comes out, can you please tell me how to deal with it? should i need to install fortran in linux system and then installing FLUKA?

I highly appreciated if you could guide me step by step.

Regards,

Dr.Khan

________________________________
From: owner-fluka-discuss_at_mi.infn.it <owner-fluka-discuss_at_mi.infn.it> on behalf of Leonel Morejon <leonel.morejon_at_eli-beams.eu>
Sent: Monday, June 6, 2016 11:18 AM
To: arghyac_at_barc.gov.in
Cc: fluka-discuss_at_fluka.org
Subject: Re: [fluka-discuss]: Question about three different sources?

Hi arghyac,

The way I would do this is sample randomly the direction of the particle. Then you can use the script as it is, except the directions will change for every particle sent to the stack. Please, take a careful look at this lecture<https://indico.cern.ch/event/489973/contributions/2000440/attachments/1272042/1885396/11_AdvancedSources2016.pdf> from the latest Fluka Advanced Course.
Bur for short, every time you generate a particle, you need to generate two different random numbers $r_1$, $r_2$ and then their relations to $\theta$ and $\phi$ will be:

$$\phi = 2 \pi r_1$$

$$\cos{ \theta} = 2 r_2 - 1$$

then you just assign the directions using on those values:

TXFLK (NPFLKA) = COS(THETA)*COS(PHI)
TYFLK (NPFLKA) = COS(THETA)*SIN(PHI)
TZFLK (NPFLKA) = SIN(THETA)

The effect now is that particles will be sampled from different positions (each different source) and will have different directions every time, but uniform in direction (isotropic).

Cheers,

Leonel

On 6.6.2016 07:14, arghyac_at_barc.gov.in<mailto:arghyac_at_barc.gov.in> wrote:
Dear Fluka experts,
The attached sample source.f file I have seen. Three point sources are there directed along X, Y and Z directions. Now suppose all the three sources are isotropic and cylindrical. In that case how to sample using source.f. Any suggestion will be welcome.

On 2016-06-02 17:37, Leonel Morejon wrote:
Dear Zhefu,

Yes you need to use source.f routine to simulate this. You have to
modify it to sample particles coming from each source, and using the
corresponding source's parameters (energy, position, particle type,
etc).
As for the different intensities, you can simply sample from each
source with different frequencies, according to their intensities; for
example if source X is twice as intense as source Y then make sure to
sample twice from X as many samples you do for Y.

Here attached you can find a modified source.f where I set three
sources and sample from each of them. It assumes all the sources emit
the same particle (defined in the input with the BEAM card) and a
monoenergetic beam. But you can easily extend from there to a more
general case.

Leonel

On 2.6.2016 01:44, lzfneu wrote:

Dear all,

My problem is concerned with three different sources with different
beam intensities hit one same target at the same time.

Maybe the problem could be solved in source.f file, but I am not
quite sure.

I have two questions to consult you:
1)how to define three different beam intensities in source.f file.

2)how to define three different sources hit the same target at the
same time.

Any help will be appreciated and thanks in advance!

Zhefu

--
Leonel Morejon
-------------------------------------- ELI BEAMLINES
Office: +420 266 051 406
Mobile: +420 773 666 453
--------------------------------------
________________________________
Disclaimer:
This communication is intended for the above named person and is confidential and / or legally privileged. Any opinion(s) expressed in this communication are not necessarily those of KSU (King Saud University). If it has come to you in error you must take no action based upon it, nor must you print it, copy it, forward it, or show it to anyone. Please delete and destroy the e-mail and any attachments and inform the sender immediately. Thank you.
KSU is not responsible for the political, religious, racial or partisan opinion in any correspondence conducted by its domain users. Therefore, any such opinion expressed, whether explicitly or implicitly, in any said correspondence is not to be interpreted as that of KSU.
KSU may monitor all incoming and outgoing e-mails in line with KSU business practice. Although KSU has taken steps to ensure that e-mails and attachments are free from any virus, we advise that, in keeping with best business practice, the recipient must ensure they are actually virus free.
__________________________________________________________________________
You can manage unsubscription from this mailing list at https://www.fluka.org/fluka.php?id=acc_info

Received on Tue Jun 07 2016 - 14:42:53 CEST

This archive was generated by hypermail 2.3.0 : Tue Jun 07 2016 - 14:42:54 CEST