Re: [fluka-discuss]: Question about writting source file for different types and energies of beam

From: Stefan E. Mueller <stefan.mueller_at_hzdr.de>
Date: Sun, 1 May 2022 14:41:59 +0200 (CEST)

Dear FLUKA user,

I have modified your SOURCE user routine (see attachment).

These are the modifications I did:

IF (CCC .LE. 1.D0/6.D0) THEN

selects the case for the proton beam.

Kinetic energy of a primary is set via the

TKEFLK (NPFLKA)

variable, and after setting this, the momentum needs to be recalculated:

          PMOFLK (NPFLKA) = SQRT ( TKEFLK (NPFLKA) * ( TKEFLK (NPFLKA)
      & + TWOTWO * AM (IONID) ) )

The beam direction cosines need to be normalized to "1.D0", to ensure
this, it is useful to calculate z-component like this:

          TZFLK (NPFLKA) = SQRT ( ONEONE - TXFLK (NPFLKA)**2
      & - TYFLK (NPFLKA)**2 )

In general, it is always useful to define numbers in the Double Precision
format ("D0"), "ONEONE" and "ZERZER" are FLUKA's predefined Double
Precision versions of "1.D0" and "0.D0", see the '(CNSTFL)'-COMMON in
$FLUPRO/flukapro/(CNSTFL).

I checked that the attached modified source file compiles and runs,
hopefully it does now what you need.

Cheers,

         Stefan

--
Stefan E. Mueller
Department of Information Services and Computing - Computational Science
and Institute of Radiation Physics
Helmholtz-Zentrum Dresden-Rossendorf
Tel: +49 (0351) 260 3847
Stefan.Mueller_at_hzdr.de
http://www.hzdr.de
Vorstand: Prof. Dr. Sebastian M. Schmidt, Dr. Diana Stiller
Vereinsregister: VR 1693 beim Amtsgericht Dresden
On Fri, 29 Apr 2022, lzfneu_at_live.com wrote:
> Dear all,
> 
> I want to consult you If the beam of different x-y-z positions with more
> than one energies and types , how to write the source file.
> 
> For example there are two sources: 500MeV electron 0.5nA and 60MeV proton
> 0.1nA in different positions. I intend to run two sources together to
> calculate the total dose rate.
> 
> I have tried to define the energy and beam types for different positions
> directly with:
> 
> CCC=FLRNDM(ZZ)
> IF(CCC<=1.0/6) THEN
>    PBEAM=0.06
>    IJBEAM=1
>    。。。
> ELSE
>    PBEAM=0.5
>    IJBEAM=3
>    。。。
> ENDIF
> 
> in source file to instead of BEAM and BEAMPOS card for FLUKA input. I have
> no idea if I am right.
> I have attached the source file in the attachement. Any help will be
> appreciated and thanks in advance.
> 
> 
>





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

Received on Sun May 01 2022 - 16:20:07 CEST

This archive was generated by hypermail 2.3.0 : Sun May 01 2022 - 16:20:10 CEST