njoy / NJOY21

NJOY for the 21st Century
https://www.njoy21.io/NJOY21
Other
71 stars 38 forks source link

Comparing two TSL #170

Open Mahdi-20 opened 1 year ago

Mahdi-20 commented 1 year ago

Dear experts, I have two TSL data for H in CH2 (polyethylene) in both ENDF and ACE format. One of them is generated at 87 K (based on JEF-3) and another one at 77 K (based on ENDF/B-VIII.0) using NJOY99 and NJOY2012, respectively. When I use these TSL data in PHITS code, the cold neutron flux (E=5 meV) from 87 K is higher than that of 77 K, which is against what I expected. For such reason, I would like to extract the S(a,b) from each TSL and compare them. Hopefully, I can find a reason for this difference. My question is: Is it possible to extract S(alpha,beta) from ENDF or ACE formatted TSL for each e.g. beta, and plot them using NJOY? I need to plot something like the figure below (taken from https://www-nds.iaea.org/publications/indc/indc-nds-0475.pdf for graphite. image

Thank you. Mahdi

whaeck commented 1 year ago

You can run the thermal scattering ACE files through a second ACER run (look in the manual for the iopt = 7 option). That second ACER run will produce input for viewr to plot the cross section data and the average cosine as a function of incident energy. The following is an input that you can use for that (in this input I suppose that tape30 is the thermal scattering ACE file, tape56 will be a postscript file with the plots):

acer
 0 30 55 31 32 /
 7 1 1 -1/
 'plot and check tape'
viewr
 55 56
stop

You can also use our ENDFtk and ACEtk tools to extract the data you need from both the ENDF and ACE file. The ENDF file will give you the raw S(a,b) data but the ACE file will just give you cross section data and energy-angle distributions derived from the S(a,b) data. ENDFtk and ACEtk have python bindings that you will need to compile. After that, you can use these tools in python together with a plotting package like matplotlib. You can find installation notes here: https://github.com/njoy/ENDFtk https://github.com/njoy/ACEtk

For ACEtk, you should use the latest available branch (feature/dn-number). For ENDFtk, you should use either the master branch or the develop branch.

Mahdi-20 commented 1 year ago

Thank you @whaeck for your comments. I used ENDFtk to extract the S(a,b,T) from ENDF formatted data. Just need to confirm if I have understood the ENDFtk procedure correctly, I have attached the Python code that I used to extract the S(a,b,T) with the extension changed to txt. test2.txt

I extracted the TSL data from different libraries namely: ENDF/V-III.0, JENDL-4.0 and IKE two of which are attached:

ENDF/B-VIII.0 data: HinCH2.txt JENDl-4.0 data: HinCH2.txt

However, as shown below, the data from ENDF/V-III.0 are quite different from what is expected for T=350 K and T = 77 K. I am wondering if I have a mistake in my Python code and/or understanding of the ENDFtk functionality.

image

image

Thanks for any comments in advance. Mahdi

Mahdi-20 commented 1 year ago

I found a mistake in my Python script and corrected it. It seems that ENDF/B-VIII.0 is higher than other data.

image

Bests. Mahdi