How to define a source using Twiss or Bi-Gaussian parameters?

Versions

Please provide the used software versions.

FLUKA:
Flair:

Description

Dear FLUKA experts,

I am working with a source that needs to be described either by a Bi-Gaussian distribution or by Twiss parameters. The values are as follows:

Bi-Gaussian Parameters:
SigmaX = 2.27276159134443 mm
SigmaXPrime = 0.00433640501356796
CorrelationX = -0.6649131830607956
SigmaY = 1.5815432358553507 mm
SigmaYPrime = 0.004153127269202797
CorrelationY = -0.50412206033723

Twiss Gaussian Parameters:
BetaX = 700.3569066803207 mm
AlphaX = 0.8898244357463342
EmittanceX = 0.007382219248110904 mm
ParticleFractionX = 0.3935 (39.35% of particles inside 2D Gaussian rms ellipse)
BetaY = 440.8127669422542 mm
AlphaY = 0.5848971132930585
EmittanceY = 0.005691449534732119 mm
ParticleFractionY = 0.3935

Could anyone advise me on the best way to define this source configuration in FLUKA?

Thank you in advance for your attention and support.

Best regards,
Júlio Pereira
PhD student in Nuclear Technology
University of São Paulo

Input files

Please upload all relevant files. (FLUKA input file, Flair project file, user routines, and data files)

Dear Júlio,

The most convenient way to define the source parameters you describe is through the source_gausslinopt.f source routine, which I am attaching to this reply.

This routine was created precisely to sample from a gaussian beam defined from the linear optical parameters. For each plane, it generates a pair of independent random numbers sampled from a normalised gaussian distribution, and uses them to calculate physical transverse phase-space coordinates based on the defined optical parameters. Finally, it transforms the phase-space coordinates into the FLUKA geometry coordinates.

You can find a detailed description of how to use the routine in its header. In your case, since no dispersion is defined, the FLUKA cards should simply look something like this (for a 1GeV proton beam starting at an arbitrary position, assuming the emittance value is the geometric and not the normalised one):

Be aware that the routine expects the beta and emittance parameters to be expressed in meters. There is no need to define ParticleFractionX/ParticleFractionY, as these values arise naturally from a Bi-Gaussian distribution.

You can profit from the FREE/FIXED cards combo to increase the precision of your input values. Keep in mind that `BEAM` and BEAMPOS cards still need to be defined. Additionally, if present, the routine takes into account the BEAMAXES card to rotate the beam as specified.

A feature which may be useful is the possibility to dump the particle phase-space / FLUKA coordinates at the end of each of the 3 initially described steps. This can be achieved by setting WHAT(18)>0.

I hope this fulfils your request. Let me know if you encounter any issues with the routine.

Best regards,

Nuno Duarte

source_gausslinopt.f (23.1 KB)