Re: [fluka-discuss]: Divergence Sampling

From: Luigi Salvatore Esposito <luigi.salvatore.esposito_at_cern.ch>
Date: Sat, 15 Aug 2015 18:31:01 +0000

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<mailto: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
Received on Sat Aug 15 2015 - 21:55:48 CEST

This archive was generated by hypermail 2.3.0 : Sat Aug 15 2015 - 21:55:49 CEST