Re: [fluka-discuss]: Divergence Sampling

From: Yuri Simeonov <yuri.simeonov_at_gmail.com>
Date: Mon, 17 Aug 2015 18:46:59 +0200

Dear Luigi,

thank you very much for your answear!

Divbm is exactly WHAT(3) with a negative sign, Beam is along the positive Z
axis.

When I use your code with WHAT(3) = -100 mrad I get almost the same Results
(look at FlukaDiv_vs_MyDiv.jpg, 1E7 Particles)

But with WHAT(3) = -1 mrad I get a strange Peak (look at 1mrad.jpg), which
i cannot understand.
I plot the lateral Profile at z = 30cm.

I have attached my .inp file, Source file and .flair.

Regards
Yuri




2015-08-15 20:31 GMT+02:00 Luigi Salvatore Esposito <
luigi.salvatore.esposito_at_cern.ch>:

> Yuri,
> for your email, it’s not clear how big is the difference between the two
> cases…
>
> In any case, I assume that Divbm in your piece of code is the value you
> have set in WHAT(3) (with a negative sign)
> when you run FLUKA without a customised source routine.
>
> Then, if the Divbm is small and the beam is along the positive z axis (see
> note 4 of the BEAM card entry
> in the manual), the results should be almost the same.
>
> - If the divergence is not small, the code should be (TXFLK, TYFLK, TZFLX
> are cosine directions):
> …
> …
> TXHLP = TAN( DIV_VECTORX )
> TYHLP = TAN( DIV_VECTORY )
> THELP = SQRT( TXHLP*TXHLP + TYHLP*TYHLP + ONEONE )
> TXFLK (NPFLKA) = TXHLP / THELP
> TYFLK (NPFLKA) = TYHLP / THELP
> TZFLK (NPFLKA) = SQRT ( ONEONE - LTXFLK (NPFLKA)**2 - TYFLK (NPFLKA)**2 )
>
> In the limit of small Divbm, the two pieces of code should give the same
> results.
>
> - If the beam is not along the z-axis, than you have also to take into
> account an additional rotation of TXFLK (Y,Z)
> with the matrix BMAXIS contained in the common (BEAMCM).
>
> Best regards, luigi
>
> On 14 Aug 2015, at 17:07, Yuri Simeonov <yuri.simeonov_at_gmail.com> wrote:
>
> Dear Fluka Experts,
>
> I am using the source.f Routine and trying to sample my own Gaussian
> angular divergence. But somehow the results I get (1D X Profile) are
> different from the one I get when I use the original Fluka without Source.f
> .
>
> I use the following code:
>
> Divbm_Sigma = Divbm*0.4246609D+00 *Convert from FWHM to sigma
>
> CALL FLNRR2 (RGAUSSDIVX,RGAUSSDIVY)
> DIV_VECTORX = RGAUSSDIVX*Divbm_Sigma
> DIV_VECTORY = RGAUSSDIVY*Divbm_Sigma
>
> TXFLK (NPFLKA) = DIV_VECTORX
> TYFLK (NPFLKA) = DIV_VECTORY
> TZFLK (NPFLKA) = SQRT ( ONEONE - TXFLK (NPFLKA)**2
> & - TYFLK (NPFLKA)**2 )
>
> What am I missing?
>
> Regards
> Yuri
>
>
>



__________________________________________________________________________
You can manage unsubscription from this mailing list at https://www.fluka.org/fluka.php?id=acc_info

FlukaDiv_vs_MyDiv.jpg
(image/jpeg attachment: FlukaDiv_vs_MyDiv.jpg)

1mrad.jpg
(image/jpeg attachment: 1mrad.jpg)

Received on Mon Aug 17 2015 - 20:25:47 CEST

This archive was generated by hypermail 2.3.0 : Mon Aug 17 2015 - 20:25:48 CEST