Photonuclear data

Questions and discussion about applications, input, output and general user topics
colvinem
Posts: 10
Joined: Wed Jul 15, 2020 8:15 pm
Security question 1: No
Security question 2: 7

Photonuclear data

Post by colvinem » Fri Jul 17, 2020 8:38 pm

I know this should be simple, but I've been running into a wall - how do I add the photon data listed in the manual (http://serpent.vtt.fi/mediawiki/index.p ... t_pdatadir)? I do not have access to the directory with the regular data libraries, but I included the entire path for the folder where I put them. But when I try to run my input, I just get "Input error: No photon data in photon transport problem."

I will also need to include other data, I know, for some of what I'm looking at - I have a TENDL file and plan to process it into an ACE file with NJOY and include it in "set acelib". Is that the right/best approach?

My problem is looking at a burnup calc where there's a (gamma,n) reaction of importance to the end product. Thanks so much for any help folks can give.

Ana Jambrina
Posts: 685
Joined: Tue May 26, 2020 5:32 pm
Security question 1: No
Security question 2: 7

Re: Photonuclear data

Post by Ana Jambrina » Fri Jul 17, 2020 10:10 pm

Not only photon_data through set pdatadir is needed. Also ACE data libraries for photon cross sections are requested - that is why you get that error. Serpent does not provide photon data libraries, but you can used the data distributed with MCNP.

Post: viewtopic.php?f=26&t=1838&p=10812&hilit ... data#p5878, provides the link of photon_data and additional photon data libraries from MCNP (mcnplib84 and mcnplib63) - as well as xsdir file (data is found under date 2012-01-06).

You will need to generate .xsdata corresponding to the photon data libraries (mcnplib84 and mcnplib63).
  • Add the absolute path of the directory that contains the xsdir file (i.e. xsdir-mcpi-1.51-new.txt): 1st line: datapath=/absolute/path/directory_xsdir
  • Copy in the same directory that contains the xsdir file the photon data libraries: mcnplib84 and mcnplib63.
  • Make use of xsdirconvert.pl perl script, to convert the xsdir (MCNP format) file into xsdata (Serpent format) file. xsdirconvert.pl can be downloaded at: http://montecarlo.vtt.fi/links.htm.
    Run the script ./xsdirconvert.pl xsdir_file >> xsdata_file (execute the script in the same directory that contains the libraries and the xsdir file).
    For additional information, see: http://montecarlo.vtt.fi/download/Serpent_manual.pdf, section 1.4.2.
To set up the cross section data path in the input file:
  • set pdatadir “/absolute/path/photon_data”
  • set acelib “/absolute/path/xsdata_neutron” “/absolute/path/xsdata_photon”
Alternatively, a default directory path can be set by defining environment variable SERPENT_DATA.
(Further info at: http://serpent.vtt.fi/mediawiki/index.p ... _libraries).

Regarding cross section data:
Serpent 1.1.7 is distributed with cross section data (SERPENT117-ACELIB): ENDFB/VII.0 ENDFB/VI.8, JEF-2.2, JEFF-3.1 and JEFF-3.11.

Evaluated nuclear data can be obtained at https://www.nndc.bnl.gov/exfor/endf00.jsp. Also, nuclear data can be found under ENDF project https://www.nndc.bnl.gov/endf/project.html or JEFF project https://www.oecd-nea.org/dbdata/jeff/.
Besides evaluated nuclear data, available to be processed with NJOY, under the libraries releases, ACE data libraries are available (with .xsdir file) already processed with NJOY. (The process described above to generate the .xsdata file also applies here).

Keep in mind that you might need to add decay data (set declib) and neutron fission yield data (set nfylib) for your calculation.
Last edited by Ana Jambrina on Sat Feb 20, 2021 11:56 am, edited 1 time in total.
- Ana

colvinem
Posts: 10
Joined: Wed Jul 15, 2020 8:15 pm
Security question 1: No
Security question 2: 7

Re: Photonuclear data

Post by colvinem » Tue Jul 21, 2020 7:59 pm

Thanks so much - this has definitely been helpful. I need a bit of clarification on using xsdirconvert.pl, though.
1. When I add the absolute path of the directory, is that to the first line of the perl file? (i.e. after the #!/usr/bin/perl line)

2. Am I running it on both mcnplib84 and mcnplib63, which then leaves me with those two xsdata files plus the xsdir file? Do I also run it on that xsdir file, which then leaves me with 3 xsdata files to add? When I tell it the output file, should they all be going into a single output file? Will it just append to it?

3. With the ACE file I'm generating through NJOY (unfortunately, none of the already processed data sets have Np-237 - as far as I can tell, TENDL2019's raw ENDF set is the only place it's included), I do the same thing as with the two mcnplib's, right? I know I need to define the pdatadir, but then also include all of the xsdata files explicitly called under acelib?

I appreciate it so much. I've never had to deal much with nuclear data (I've always used Serpent through a cluster where the nuclear data has already been processed and I've not had anything unusual where I needed to add anything) so it's been very much a steep learning curve. I have the declib and nfylib already, it's just the photon data that's been such a pain.

Ana Jambrina
Posts: 685
Joined: Tue May 26, 2020 5:32 pm
Security question 1: No
Security question 2: 7

Re: Photonuclear data

Post by Ana Jambrina » Tue Jul 21, 2020 11:58 pm

Do not modify the xsdirconvert.pl perl script. The absolute path is added (1st line) to the .xsdir file.

The .xsdir file compiles the paths (among other information) to the ACE nuclear data files included in the libraries.
The .xsdir file that you can download with the mcplib84 and mcplib63, corresponds to the .xsdir released with mcnp5-1.60, with ENDF/B-VII.0 data and corrected data libraries mcnlib84 and mcplib63.
When running the xsdirconvert.pl script to convert that .xsdir file (executing the script in the same directory that contains the .xsdir file, and the mcplib84/mcplib63 libraries), it will generate one .xsdata corresponding only to the mcplib84 and mcplib63 photon data (since those libraries will be the only data provided).

Each path defines where your nuclear data is; so, depending of the calculation you are running you need to add them. Most likely, you will need to set: acelib paths for neutron and photon data, pdatadir for photon additional data, and declib path for decay, nfylib for neutron fission yield.

Np-237 is included in the nuclear data provided with Serpent 1.1.7 —> ENDF/B-VII and/or JEFF3.1.1 (300K - 1800K).
If you have Serpent in a cluster with already processed nuclear data available, check the .xsdata file/s to verify if the nuclides (at the temperature required) for your calculation are included.

If the data you need it is not available, through NJOY you process the nuclear data, obtaining the ACE and DIR files. With them you can generate your own .xsdir file or append the information to an existing .xsdir file.
The structure of the .xsdir file is as follows:
  • atomic weight ratio: [Nuclide ZZAAA format - 1st entry DIR file without the library .ID] [atomic weight - 2nd entry DIR file]
  • directory: [1st line from the DIR file corresponding the nuclide ACE data file]
for each of the nuclides included in the library.
From there, by executing the xsdirconvert.pl script you can generate the corresponding .xsdata.
- Ana

colvinem
Posts: 10
Joined: Wed Jul 15, 2020 8:15 pm
Security question 1: No
Security question 2: 7

Re: Photonuclear data

Post by colvinem » Fri Jul 24, 2020 2:09 am

Thank you again for being so, so helpful with this. I keep ending up in dead ends because I don't have a good enough understanding of this to troubleshoot very effectively. Are there files required for the conversion script to work other than the three updated files? I've tried every combination of the data I have available on the system I'm using, but still haven't gotten it to work (I just get a long string of ACE files not found). Do I need to just find a fresh full MCNP5 library somewhere (I'm sure I have a disk around here somewhere that would have the data library on it, if I can find my DVD drive) and put it in my working folder?

Ana Jambrina
Posts: 685
Joined: Tue May 26, 2020 5:32 pm
Security question 1: No
Security question 2: 7

Re: Photonuclear data

Post by Ana Jambrina » Fri Jul 24, 2020 2:44 am

In the same directory you should have the mcplib63 and mcplib84 files (photon data libraries), plus the .xsdir file (i.e. xsdir-mcp5-1.51-new.txt, from the link), and the xsdirconvert.pl perl script.

Add the absolute path of the directory where the files are to the .xsdir file (1st line): datapath=/absolute/path/directory

Execute the script: ./xsdirconvert.pl xsdir-mcp5-1.51-new.txt >> [name].xsdata

That will generate the [name].xsdata file (Serpent format). However, since the .xsdir file you are using contains other nuclides/ACE files with their respective libraries that you do not have (MCNP release), a list of items not found will be listed when you run the script; such: ’83209.24h: ACE file “/absolute/path/library/“ does not exist.
(That does not mean that the script has failed. Check that the .xsdata is generated and it is not empty - you will see a list of nuclides and their paths to the libraries mcplib63/mcplib84).
- Ana

colvinem
Posts: 10
Joined: Wed Jul 15, 2020 8:15 pm
Security question 1: No
Security question 2: 7

Re: Photonuclear data

Post by colvinem » Fri Jul 24, 2020 2:50 am

You're right! I can't believe I missed that, I just freaked out at the errors. That also tells me that I do need the added cross-sections from NJOY, but I think I know how to add them. Thank you so much!

colvinem
Posts: 10
Joined: Wed Jul 15, 2020 8:15 pm
Security question 1: No
Security question 2: 7

Re: Photonuclear data

Post by colvinem » Fri Jul 24, 2020 11:23 pm

I've hit one more snag and I can't see where the difference is between what I'm trying to do and what I got to work with mcplib63 and mcplib84.

I'm using data from https://tendl.web.psi.ch/tendl_2019/tar.html because I care about a Np237(gamma,n) reaction. The set that's already processed into ace format doesn't have 237, so I used NJOY to process that file into an acelib independently. However, I cannot add just that to the xsdir file I used with the two libraries earlier (which seem to only have the elemental versions of each element, not individual isotopes) - it still goes through the xsdirconvert.pl ok, but doesn't add the Np data. Then I tried to use the pre-made TENDL ace library. Using the directory that comes with that, xsdirconvert.pl just gives me an empty directory with or without the Np, though it doesn't give me any errors. I did try adding atomic weight ratios (not just the directory), but it didn't make a difference.

Am I missing something super basic and obvious? I've looked at the contents of all the files and all of the formatting/content looks consistent.

Ana Jambrina
Posts: 685
Joined: Tue May 26, 2020 5:32 pm
Security question 1: No
Security question 2: 7

Re: Photonuclear data

Post by Ana Jambrina » Sat Jul 25, 2020 2:50 am

You can create a new .xsdir file with the new photon data or append the information to an existing one.

As mentioned, the structure of the .xsdir file should be:
--------------------------------------------
datapath=/absolute/path/directory
atomic weight ratios
[…]
directory
[…]
--------------------------------------------
If you are adding the photon data to an existing .xsdir file, check if the nuclide (in format ZZAAA) and its atomic weight is already included.
If needed, this information corresponds to the first two entries of the ACE file (or DIR file): 1st entry ZZAAA.ID, 2nd entry atomic weight

Then, add the entry (1st line) of the de DIR file (pay attention to the relative path to the ACE file)

Practical example: from TENDL-2019 —> I.e. let’s add Zr096 ACE file.

In the .xsdir downloaded with mcplib63/mpclib84, the nuclide and its atomic weight is already included.

Code: Select all

40096	     95.084390
Append the DIR file corresponding the Zr096 ACE file:

Code: Select all

40096.19u    95.084390   tendl19u/Zr096   0   1   1   58139   0   0   0   0.000E+00
—> TENDL’s library ID type ‘u’ is not recognised by ‘xsdirconvert.pl’ script:
There are two alternatives:
  • switch the library ID 'u' to 'p', for photons.
    (Change consequently the ACE file - ZZAAA.ID, or, once you have generated the .xsdata file, switch back to the original ID 'u' in the .xsdata file) - the library ID is not going to affect the calculation, but has to be consistent between the libraries and the .xsdata file.

    Code: Select all

    40096.19p    95.084390   tendl19u/Zr096   0   1   1   58139   0   0   0   0.000E+00
  • modify the xsdirconvert.pl file as follows: add after line 280

    Code: Select all

    	elsif ($id =~ m/u/)
    	  {
    	    $type = 5;
    	  }
    
Last edited by Ana Jambrina on Sun Aug 09, 2020 10:33 am, edited 1 time in total.
- Ana

colvinem
Posts: 10
Joined: Wed Jul 15, 2020 8:15 pm
Security question 1: No
Security question 2: 7

Re: Photonuclear data

Post by colvinem » Mon Jul 27, 2020 10:18 pm

Thank you!! It worked now. You've been amazing!

Post Reply