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

From: <yangt_at_ihep.ac.cn>
Date: Fri, 27 Sep 2019 10:29:18 +0800 (GMT+08:00)

Dear Andrea,
Thanks for your suggestions. I am sorry I forget include the list. The source file you send me works for proton situation, however it causes a core dump for electron like the former error (I only change the parameter NLINES). on the contrary, the former source file, which doesn't make the normalization works. This is also strange. I attach the files, could you point out what happens to cause this error?

Best regards!
Yang


> -----原始邮件-----
> 发件人: "Andrea Fontana" <andrea.fontana_at_pv.infn.it>
> 发送时间: 2019-09-27 00:15:58 (星期五)
> 收件人: yangt_at_ihep.ac.cn
> 抄送: fluka-discuss_at_fluka.org
> 主题: Re: strange problems about reading source file from a data file
>
> 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 Fri Sep 27 2019 - 06:46:01 CEST

This archive was generated by hypermail 2.3.0 : Fri Sep 27 2019 - 06:46:04 CEST