Re: [fluka-discuss]: Divergence Sampling

From: Yuri Simeonov <yuri.simeonov_at_gmail.com>
Date: Tue, 18 Aug 2015 08:29:49 +0000

Hi Luigi,

thank you for your effort.
The source routine I am going to use for simulating intensity modulated
raster scanning from a particle accelarator, this is just the divergence
part.

Regards
Yuri

Luigi Salvatore Esposito <luigi.salvatore.esposito_at_cern.ch> schrieb am Di.,
18.08.2015, 10:22:

> Sorry, Yuri, but I was too impulsive in my last email.
> The conversion is actually taken in charge by FLUKA itself when it reads
> the BEAM card.
> I need more time to understand what’s wrong.
>
> On 18 Aug 2015, at 10:02, Luigi Salvatore Esposito <luillo_at_cern.ch> wrote:
>
> Dear Yuri,
> in your code, you should convert the beam divergence from mrad (as it is
> expected in WHAT(3) of the BEAM card) to radiant.
>
> Btw, I see that your source routine re-implements only the beam
> divergence, otherwise everything is like the default FLUKA executable.
> It is strongly recommended not to use customised user routines especially
> in case one can use what is already
> available in FLUKA. This would be less error prone.
>
> Best regards, luigi
>
> On 17 Aug 2015, at 18:46, Yuri Simeonov <yuri.simeonov_at_gmail.com> wrote:
>
> 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
>>
>>
>>
> <FlukaDiv_vs_MyDiv.jpg><1mrad.jpg>
> <Source_Sampling_Sph_400MeV_D0.008_5cm_20MP_Nucl_Edge.flair>
> <Source_Sampling_Sph_400MeV_D0.008_5cm_20MP_Nucl_Edge.inp><SourceFluka.f>
>
>
>
>


__________________________________________________________________________
You can manage unsubscription from this mailing list at https://www.fluka.org/fluka.php?id=acc_info
Received on Tue Aug 18 2015 - 12:39:34 CEST

This archive was generated by hypermail 2.3.0 : Tue Aug 18 2015 - 12:39:37 CEST