[fluka-discuss]: Re: strange problems about reading source file from a data file

From: Andrea Fontana <andrea.fontana_at_pv.infn.it>
Date: Thu, 26 Sep 2019 18:15:58 +0200 (CEST)

Dear Yang,
   please do not send me private messages, but always include the list:
other users might be interested in your problem or willing to help.

I have found the reason of your crash and it is much more subtle and
also simpler than the cases you have investigated: all is due to the
roundoff errors in the numbers that your were reading from your
external spectrum data. Namely:

- cosine directors were not normalized to 1.D0, as required by FLUKA.
  I have corrected this by taking your COSX and COSY directions and
  by calculating COSZ with the instruction:

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

- energy/momentum relationship not correctly satisfied.
  You can deduce particle momentum with:

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

I attach a modified protonsource.f file that should now work!
Let us know...

As a suggestion to debug these (and other) problems, please have
a read at:

http://www.fluka.org/content/manuals/online/9.4.html


Kind regards,
Andrea


> Dear Andrea,
>
> The former ask and answer is listed on:
> http://www.fluka.org/web_archive/earchive/new-fluka-discuss/15836.html.
> However, this problem haven't been solved finally.
>
> I check the your suggestion, which cannot solve the problem.
>
> I give two source data files, they are respectively proton and electron.
> And I use two methods, I call one method as Open-card method(using OPEN
> card in the *.inp file),and the other one is OAUXFI method which uses the
> OAUXFI routine and removes the open-card in *.inp file as be suggested by
> you. The respective source.f has small difference as follows:
>
>
>
>
> open-card method:
>
> *the particle weight
>
> WTFLK (NPFLKA) = WT (ISAMPL)
> WEIPRI = WEIPRI + WTFLK (NPFLKA)
>
>
> OAUXFI method:
>
>
> * Wt is the weight of the particle
> WEIPRI = WEIPRI + WT (ISAMPL)
>
>
>
> To be honest, I don't very clearly understand the above fortran code.
>
>
>
>
> (a)At the first, we use proton source.
>
> Now the strange problems come:
>
> a1). open-card method(unzip the attachment,they are in
> 2stepsProblem/proton/openCardMethod/proton.inp,
> protonsource.f,proton.dat,proton001.out,proton001.log,proton001.err ):
>
> once the program running, about one minute later, I get a error message:
>
> and in the calculation folder, we will see a huge size file about 800MB:
>
> In other word, OPEN card method for proton is invalid.
>
> (a2) Then I use the OAUXFI method
>
> (attachments:2stepsProblem/proton/OAUXFImethod/proton2.inp,protonsource2.f,proton.dat,
> and the result file proton2.txt)
>
> The program doesn't report any error in the running process, but the
> result is only a ZERO result, the energy deposition is 0, I guess
> something may be wrong because there are some middle-energy
> protons(tens of MeV, see file proton.dat) striking the detector
> region,the energy deposition won't be zero.
>
>
>
>
> To check above guess, I use a electron source and repeat the above two
> methods.
>
>
>
>
> b1) open-card
> method(attachments:2stepsProblem/electron/openCardMethod/electron.inp,
> electronsource.f,electron.dat, e-.txt ):
>
> this time, the open-card method works and the energy deposition is
> 3.0810E-05 GeV. I don't know why this method for electron can work, but
> not for proton.
>
>
>
>
> b2) OAUXFI method
>
> (attachments:2stepsProblem/electron/OAUXFImethod/electron2.inp,electronsource2.f,electron.dat,
> and the result file e.txt):
>
> Now this method also gives a ZERO method which is inconsistent with the
> former method.
>
> In other words, OAUXFI method only get a ZERO result not only for proton
> but also electron.
>
>
>
>
> I think there may be some problems in the source file of OAUXFI method(I
> guess the partice weight or WEIPRI may be wrong). For electron source, we
> can use the open-card method to obtain a non-zero result, but open-card
> method only get a crash for proton source, which is very puzzled, what's
> the difference of proton and electron?
>
> using OAUXFI method brings a worse problem, which only get a ZERO result.
>
> I conclude the problem in a figure as follows, which may be clearer:
>
>
>
>
>
>
>
> I think the problem may be caused by the source.f file in the two methods,
> however, I cannot point out where it is. So I need your help to solve this
> difficult problem.
>
> I am sorry to bother you and I look forward to your reply.
>
>
>
>
> Best regards!
>
>
>
>
> Yang.


-- 
========================================================================
Dr. Andrea Fontana                    tel: +39 0382 987991
Istituto Nazionale                    fax: +39 0382 423241
di Fisica Nucleare
Sezione di Pavia                      e-mail: andrea.fontana_at_pv.infn.it
Via Bassi 6                           web   : www.pv.infn.it/~fontana
27100 PAVIA, Italy
========================================================================



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

Received on Thu Sep 26 2019 - 19:36:41 CEST

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2019 - 19:36:43 CEST