Re: Synchrotron radiation

From: Alberto Fasso' <fasso_at_SLAC.Stanford.EDU>
Date: Mon, 31 May 2010 06:36:18 -0700 (PDT)

Dear Emre,

you have not specified what "some errors" are. But your BEAM card and your
source file are assuming that your maximum photon energy is 2 MeV (0.002 GeV).
The spectrum in the sr.spectrum file is in MeV, which are translated to GeV
inside the source routine:
          DO 2 I = 1, 630
             READ(81,*,END=999) EN(I), SPEC(I)
             EN(I) = EN(I)*1.D-3 <----
  2 CONTINUE
On the other hand, the spectrum in the sr.spectrum file has a maximum of 1995
MeV (1.995 GeV), which is very unlikely. And the sampling is done between
1.D-6 (1 keV, corresponding to the first line of the spectrum) and 1.99526D-4
(about 200 keV):
       ENERGY = 1.D-6 + ( 1.99526D-4 - 1.D-6) * RAN01

To conclude:
1) check your spectrum file: I guess it should go from 1 keV to 200 keV, and
    not from 1 keV to 2 GeV.
2) Your BEAM card is not wrong, but if the maximum is really 200 keV, setting
    it to 2 MeV would make your cross section tabulations less precise
    without need

Kind regards,

Alberto

On Mon, 31 May 2010, Emre EROGLU wrote:

> Dear Alberto,
>
> Many thanks for your mail. But still i have some errors. I didn't find where is it. I'm
> sending my .inp file, sr_source.f (modified from bl1source.f) and sr.spectrum (generated
> from srplot.f). And also are there any mistakes in my BEAM card?
> Thanks.
>
> Best Regards,
> Emre
>
>
>
> On Thu, 27 May 2010 06:35:42 -0700 (PDT), Alberto Fasso' wrote
>> I apologize. On April 28, answering a question by Emre Eroglu, I sent
>> an example of source routine sampling from a synchrotron radiation spectrum
>> provided as an external file. See:
>> http://www.fluka.org/web_archive/earchive/new-fluka-discuss/2879.html
>>
>> I did not realize at that time that it was an old routine, incompatible with
>> the latest FLUKA versions. I send here in attachment a corrected version.
>>
>> Sorry!
>>
>> Alberto
>>
>> On Wed, 26 May 2010, Emre EROGLU wrote:
>>
>>> Dear Alberto,
>>>
>>> I try to compile bl1source.f but i have some errors. what can i do for that?
>>>
>>> Regards,
>>> Emre
>>>
>>>
>>> -e g77 -o bl1source.o -c -O3 -g -mcpu=pentiumpro -fexpensive-optimizations
>>> -funroll-loops -fstrength-reduce -Wall -fno-automatic -fno-silent -m32
>>> -ffortran-bounds-check -I/home/eeroglu/fluka/flukapro bl1source.f
>>> `-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
>>> source:
>>> bl1source.f: In subroutine `source':
>>> bl1source.f:11:
>>> INCLUDE '(AACOLL)'
>>> ^
>>> Unable to open INCLUDE file `(AACOLL)' at (^)
>>> bl1source.f:12:
>>> INCLUDE '(BEAM)'
>>> ^
>>> Unable to open INCLUDE file `(BEAM)' at (^)
>>> bl1source.f:13:
>>> INCLUDE '(EPISOR)'
>>> ^
>>> Unable to open INCLUDE file `(EPISOR)' at (^)
>>> bl1source.f:17:
>>> INCLUDE '(STACK)'
>>> ^
>>> Unable to open INCLUDE file `(STACK)' at (^)
>>> bl1source.f:18:
>>> INCLUDE '(STARS)'
>>> ^
>>> Unable to open INCLUDE file `(STARS)' at (^)
>>> bl1source.f:39:
>>> LUSSRC = .TRUE.
>>> 1 2
>>> Type disagreement between expressions at (1) and (2)
>>> bl1source.f:78:
>>> WT (LSTACK) = WEIGHT
>>> ^
>>> Invalid declaration of or reference to symbol `wt' at (^) [initially seen at (^)]
>>> bl1source.f:90:
>>> ILO (LSTACK) = IJHION
>>> ^
>>> Invalid declaration of or reference to symbol `ilo' at (^) [initially seen at (^)]
>>> bl1source.f:102:
>>> LO (LSTACK) = 1
>>> ^
>>> Invalid declaration of or reference to symbol `lo' at (^) [initially seen at (^)]
>>> bl1source.f:104:
>>> LOUSE (LSTACK) = 0
>>> ^
>>> Invalid declaration of or reference to symbol `louse' at (^) [initially seen at
>>> (^)]
>>> bl1source.f:107:
>>> SPAREK (ISPR,LSTACK) = ZERZER
>>> ^
>>> Invalid declaration of or reference to symbol `sparek' at (^) [initially seen at (^)]
>>> bl1source.f:111:
>>> ISPARK (ISPR,LSTACK) = 0
>>> ^
>>> Invalid declaration of or reference to symbol `ispark' at (^) [initially seen at (^)]
>>> bl1source.f:116:
>>> NUMPAR (LSTACK) = NPARMA
>>> ^
>>> Invalid declaration of or reference to symbol `numpar' at (^) [initially seen at (^)]
>>> bl1source.f:117:
>>> NEVENT (LSTACK) = 0
>>> ^
>>> Invalid declaration of or reference to symbol `nevent' at (^) [initially seen at (^)]
>>> bl1source.f:118:
>>> DFNEAR (LSTACK) = +ZERZER
>>> ^
>>> Invalid declaration of or reference to symbol `dfnear' at (^) [initially seen at (^)]
>>> bl1source.f:121:
>>> AGESTK (LSTACK) = +ZERZER
>>> ^
>>> Invalid declaration of or reference to symbol `agestk' at (^) [initially seen at (^)]
>>> bl1source.f:122:
>>> AKNSHR (LSTACK) = -TWOTWO
>>> ^
>>> Invalid declaration of or reference to symbol `aknshr' at (^) [initially seen at (^)]
>>> bl1source.f:124:
>>> IGROUP (LSTACK) = 0
>>> ^
>>> Invalid declaration of or reference to symbol `igroup' at (^) [initially seen at (^)]
>>> bl1source.f:126:
>>> TKE(LSTACK) = ENERGY
>>> ^
>>> Invalid declaration of or reference to symbol `tke' at (^) [initially seen at (^)]
>>> bl1source.f:128:
>>> PMOM (LSTACK) = ENERGY
>>> ^
>>> Invalid declaration of or reference to symbol `pmom' at (^) [initially seen at (^)]
>>> bl1source.f:132:
>>> TX (LSTACK) = TINX
>>> ^
>>> Invalid declaration of or reference to symbol `tx' at (^) [initially seen at (^)
>>> ]
>>> bl1source.f:133:
>>> TY (LSTACK) = TINY
>>> ^
>>> Invalid declaration of or reference to symbol `ty' at (^) [initially seen at (^)]
>>> bl1source.f:134:
>>> TZ (LSTACK) = TINZ
>>> ^
>>> Invalid declaration of or reference to symbol `tz' at (^) [initially seen at (^)]
>>> bl1source.f:137:
>>> TXPOL (LSTACK) = -TWOTWO
>>> ^
>>> Invalid declaration of or reference to symbol `txpol' at (^) [initially seen at (^)]
>>> bl1source.f:138:
>>> TYPOL (LSTACK) = +ZERZER
>>> ^
>>> Invalid declaration of or reference to symbol `typol' at (^) [initially seen at (^)]
>>> bl1source.f:139:
>>> TZPOL (LSTACK) = +ZERZER
>>> ^
>>> Invalid declaration of or reference to symbol `tzpol' at (^) [initially seen at (^)]
>>> bl1source.f:141:
>>> XA (LSTACK) = XINA
>>> ^
>>> Invalid declaration of or reference to symbol `xa' at (^) [initially seen at (^)]
>>> bl1source.f:142:
>>> YA (LSTACK) = YINA
>>> ^
>>> Invalid declaration of or reference to symbol `ya' at (^) [initially seen at (^)]
>>> bl1source.f:143:
>>> ZA (LSTACK) = ZINA
>>> ^
>>> Invalid declaration of or reference to symbol `za' at (^) [initially seen at (^)]
>>> bl1source.f:163:
>>> NLATTC (LSTACK) = MLATTC
>>> ^
>>> Invalid declaration of or reference to symbol `nlattc' at (^) [initially seen at (^)]
>>> In file included from bl1source.f:11:
>>> In file included from bl1source.f:17:
>>> bl1source.f:160: warning: unused variable 'idisc'
>>> bl1source.f:143: warning: unused variable 'zina'
>>> bl1source.f:142: warning: unused variable 'yina'
>>> bl1source.f:141: warning: unused variable 'xina'
>>> bl1source.f:134: warning: unused variable 'tinz'
>>> bl1source.f:133: warning: unused variable 'tiny'
>>> bl1source.f:132: warning: unused variable 'tinx'
>>> bl1source.f:79: warning: unused variable 'weipri'
>>> bl1source.f:39: warning: unused variable 'lussrc'
>>> bl1source.f:21: warning: unused variable 'line'
>>>
>>>
>>>
>>>
>>>
>>> On Wed, 28 Apr 2010 01:42:18 -0700 (PDT), Alberto Fasso' wrote
>>>> Dear Emre,
>>>>
>>>> as you know, FLUKA for the time being cannot simulate the production of
>>>> synchrotron radiation. A source routine, therefore, must sample from a
>>>> spectrum produced by a separate program (see
>>>> http://www.fluka.org/web_archive/earchive/new-fluka-discuss/1183.html )
>>>> I attach here an example, where the spectrum is provided as an
>>>> external file
>>>>
>>>> Alberto
>>>>
>>>> On Tue, 27 Apr 2010, emreeroglu_at_uludag.edu.tr wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>> Does anyone have source.f which is modified for synchrotron radiation?
>>>>>
>>>>> Thanks in advance.
>>>>>
>>>>> Regards,
>>>>> Emre EROGLU
>>>
>>>
>>> Emre EROGLU
>>> Uludag University
>>> High Energy Physcics
>>>
>>>
>>>
>>
>> --
>> Alberto Fasso`
>> SLAC-RP, MS 48, 2575 Sand Hill Road, Menlo Park CA 94025
>> Phone: (1 650) 926 4762 Fax: (1 650) 926 3569
>> fasso_at_slac.stanford.edu
>
>
> Emre EROGLU
> Uludag University
> High Energy Physcics
>
>

-- 
Alberto Fasso`
SLAC-RP, MS 48, 2575 Sand Hill Road, Menlo Park CA 94025
Phone: (1 650) 926 4762   Fax: (1 650) 926 3569
fasso_at_slac.stanford.edu
Received on Mon May 31 2010 - 16:33:04 CEST

This archive was generated by hypermail 2.2.0 : Mon May 31 2010 - 16:33:10 CEST