Re: source subroutine

From: Paola Sala <paola.sala_at_mi.infn.it>
Date: Wed, 11 May 2011 14:32:01 +0200 (CEST)

Hello
The sampling from a tabulated file will be easier than the sampling from a
polynomial, so I suggest to use the tabulation
For the angular distribution: you can set the direction of each neutron in
the source file, by setting its cosines : TXFLK, TYFLK, TZFLK . It is up
to the user to sample this direction in order to reproduce the correct
angular distribution. If a uniform angular distribution is enough, you can
get uniformly distributed cosines with CALL RACO (COSX ,COSY, COSZ)

In Alberto's exampls: the first part is executed only at the first call,
  according to the setting of the variamble LFIRST. Here you can read in
your tabulation ( In the example the tabulation is in a DATA statement)
The SOURCE card in the input accept also parameters, that are passed to
the source.f in the WHASOU array. In the example, WHASOU(1) is used to
choose the source type. Some information is printed for convenience.

The lines with "kount" are commented out. They were used to stop the run
after 100 primaries ( nomore =1 stops the run)

Hope this helps
Paola

> Dear Fluka Experts
> I am a beginer in Fluka and i need to create a source subroutine.the
> details are as under
> 28 Mev protons are incident on carbon target. the neutrons are created and
> the neutrons are detected(number of neutrons per steradian per Mev per
> projectile) at 0 ,5 ,10 and 20 degree at a distance of say about 1cm, the
> energy range of detected neutrons is from 5 Mev to 28 Mev with height of
> the
> neutron distribution peak(as function of energy) decreasing with
> increasing
> angle.I am doing an external fitting to this data with a polynomial of
> degree 6.however i also have the data in tabulated form in a text file.
> can you provide some guidance in setting up the source subroutine.like
> 1.whether i should input the polynomial equation in the fluka and make it
> reconstruct the polynomial or i should use the tabulated data as input
> without the need of inputting the polynomial.in any case what is the
> detailed procedure to be followed.(i went through some examples available
> on
> the web however i had some problems in understanding the meaning of some
> statements which i am including at the end of this mail)
> 2.how will i invoke the angular dependence of this spectrum in the
> code.(the
> neutron source is not a siple beam.indeed the neutrons will come out of
> target in any direction with some preference to forward direction as seen
> from the spectrum).
> the following are the key points that i was not able to understabd in an
> example provided by Mr. Alberto in respeonce to a question by Zhang Weihua
> on Sat, 14 Nov 2009
>
> * | First call initializations:
> IF ( LFIRST ) THEN
> * | *** The following 3 cards are mandatory ***
> TKESUM = ZERZER
> LFIRST = .FALSE.
> LUSSRC = .TRUE.
> * | *** User initialization ***
> WRITE(LUNOUT,*)
> WRITE(LUNOUT,'(A,132A)') ("*",I=1,132)
> WRITE(LUNOUT,*)
> WRITE(LUNOUT,*)
> IF(NINT(WHASOU(1)) .EQ. 1) THEN
> WRITE(LUNOUT,'(A)') "@ Source: Cf-252"
> ELSE IF(NINT(WHASOU(1)) .EQ. 2) THEN
> WRITE(LUNOUT,'(A)') "@ Source: Am-Be"
> ELSE
> STOP "Incorrect WHASOU(1)"
> END IF
> WRITE(LUNOUT,*)
> WRITE(LUNOUT,*)
> WRITE(LUNOUT,'(A,132A)') ("*",I=1,132)
> WRITE(LUNOUT,*)
>
> then later in the same example there is
> if(kount .gt. 100) nomore = 1
>
> Thank you
>
>
> --
> MIR INAMUL HAQ JERI
> INSTN SACLAY.
> UNIVERSITY OF PARIS SUD 11.
>
>
>

Paola Sala
INFN Milano
tel. Milano +39-0250317374
tel. CERN +41-227679148
Received on Wed May 11 2011 - 15:31:05 CEST

This archive was generated by hypermail 2.2.0 : Wed May 11 2011 - 15:31:14 CEST